From f14bf808f63ef04dad7d8a469dd46f28e6bb10a7 Mon Sep 17 00:00:00 2001 From: Ugo Palatucci Date: Thu, 10 Feb 2022 10:18:13 +0100 Subject: [PATCH] readme update --- .github/workflows/main.yml | 12 ++++----- README.md | 53 +++++++++++++++++++++++++++++++++++++- 2 files changed, 58 insertions(+), 7 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0f15b4e..bb82c33 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,4 +1,4 @@ -on: [push] +on: push jobs: test_get_owners_action: @@ -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 }}" \ No newline at end of file + run: echo "The Random reviewers are ${{ steps.owners.outputs.random-reviewers }}" \ No newline at end of file diff --git a/README.md b/README.md index 1c46d10..fcb64bc 100644 --- a/README.md +++ b/README.md @@ -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