-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3732c47
commit f14bf80
Showing
2 changed files
with
58 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,52 @@ | ||
# get-owners-action | ||
# Get Owners Github Action | ||
|
||
Do you want to have all the approvers and reviewers without having strange scripts in your actions? | ||
Do you want to have random reviewers? | ||
This seems the action you need | ||
|
||
GitHub Action | ||
----------------------------- | ||
|
||
```yaml | ||
on: push | ||
|
||
jobs: | ||
test_get_owners_action: | ||
runs-on: ubuntu-latest | ||
name: Test | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Parse OWNERS | ||
id: owners | ||
uses: ./ | ||
with: | ||
owners-path: './test/OWNERS' | ||
n-random-reviewers: 2 | ||
- name: Get approvers | ||
run: echo "The Approvers are ${{ steps.owners.outputs.approvers }}" | ||
- name: Get reviewers | ||
run: echo "The Reviewers are ${{ steps.owners.outputs.reviewers }}" | ||
- name: Get random reviewers | ||
run: echo "The Random reviewers are ${{ steps.owners.outputs.random-reviewers }}" | ||
``` | ||
Input Parameters | ||
-------------------------- | ||
You can set any or all of the following input parameters: | ||
|Name |Type |Required? |Default |Description | ||
|-------------------------|--------|----------|----------------------------|------------------------------------ | ||
|`owners-path` |string |no |OWNERS |OWNERS file path including the actual file name | ||
|`n-random-reviewers` |string |no | |If you want, the action can expose also random reviewers | ||
|
||
|
||
Output Variables | ||
-------------------------- | ||
|
||
|Variable |Type |Description | ||
|-------------------|----------|------------------------------------ | ||
|`approvers` |string[] |All the approvers in the OWNERS file | ||
|`reviewers` |string[] |All the reviewers in the OWNERS file | ||
|`random-reviewers` |string[] |Random reviewers |