Skip to content

Commit

Permalink
readme update
Browse files Browse the repository at this point in the history
  • Loading branch information
upalatucci committed Feb 10, 2022
1 parent 3732c47 commit f14bf80
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 7 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
on: [push]
on: push

jobs:
test_get_owners_action:
Expand All @@ -7,15 +7,15 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Test
id: hello
- name: Parse OWNERS
id: owners
uses: ./
with:
owners-path: './test/OWNERS'
n-random-reviewers: 2
- name: Get approvers
run: echo "The Approvers are ${{ steps.hello.outputs.approvers }}"
run: echo "The Approvers are ${{ steps.owners.outputs.approvers }}"
- name: Get reviewers
run: echo "The Reviewers are ${{ steps.hello.outputs.reviewers }}"
run: echo "The Reviewers are ${{ steps.owners.outputs.reviewers }}"
- name: Get random reviewers
run: echo "The Random reviewers are ${{ steps.hello.outputs.random-reviewers }}"
run: echo "The Random reviewers are ${{ steps.owners.outputs.random-reviewers }}"
53 changes: 52 additions & 1 deletion README.md
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

0 comments on commit f14bf80

Please sign in to comment.