From ff0e9c850fd6b168f7724119bcdb9984d8cdc70e Mon Sep 17 00:00:00 2001 From: Alex Ouzounis Date: Mon, 25 Nov 2019 11:54:55 +0000 Subject: [PATCH 1/6] add branding --- action.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/action.yml b/action.yml index 9b297b3..17ebf9c 100644 --- a/action.yml +++ b/action.yml @@ -1,5 +1,9 @@ name: 'commit-status-updater' description: 'Updates the current commit status' +author: 'Ouzi, ltd. Ouzi Team ' +branding: + icon: 'check-circle' + color: 'purple' inputs: context: From 85bdd958c28e5e42ebfdd25f2ceff8241f3d9c66 Mon Sep 17 00:00:00 2001 From: Alex Ouzounis Date: Mon, 25 Nov 2019 11:59:43 +0000 Subject: [PATCH 2/6] update docs --- README.md | 58 +++++++++++++++++++++++++------------------------------ 1 file changed, 26 insertions(+), 32 deletions(-) diff --git a/README.md b/README.md index b741e41..ba5056d 100644 --- a/README.md +++ b/README.md @@ -5,37 +5,17 @@ A simple Github Action that allows us to update the status of a given commit. GitHub does not update the status of a commit when running workflow and therefore tools that rely on the context/status of a given commit are not compatible with it. -An example is [Prow](https://github.com/kubernetes/test-infra/tree/master/prow) which uses the Github Status API to read the status of a given commit. - -## Integration with Prow -If using [Prow](https://github.com/kubernetes/test-infra/tree/master/prow) you can now add GitHub Workflows as required checks. +## Input Parameters -### Example with Branch Protection and Tide -branch-protection: -``` -branch-protection: - orgs: - {MY_ORG}: - repos: - {MY_REPO}: - branches: - master: - protect: true # enable protection - enforce_admins: true # rules apply to admins - required_status_checks: - contexts: - - "GithubActions - {WORKFLOW_NAME}" - restrictions: # restrict who can push to the repo - users: - - ouzibot -``` -tide: -``` -tide: - context_options: - from-branch-protection: true -``` +* context: The context for the status + * optional + * default: GithubActions - ${GITHUB_WORKFLOW} +* state: Commit state. Possible values are 'pending', 'success', 'error' or 'failure' + * optional + * default: pending +* token: The Github token + * required ## Example action @@ -49,7 +29,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 - - uses: ouzi-dev/github-action-commit-status-updater@master + - uses: ouzi-dev/commit-status-updater@v0.1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Test @@ -58,15 +38,29 @@ jobs: sleep 2m echo pass - if: success() - - uses: ouzi-dev/github-action-commit-status-updater@master + - uses: ouzi-dev/commit-status-updater@v0.1 with: state: success env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - if: failure() - - uses: ouzi-dev/github-action-commit-status-updater@master + - uses: ouzi-dev/commit-status-updater@v0.1 with: state: failure env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} +``` + + +## Integration with Prow + +An example is [Prow](https://github.com/kubernetes/test-infra/tree/master/prow) which uses the Github Status API to read the status of a given commit. +Using this actions you can tell tide to not skip optional contexts and effectively wait for a GitHub Workflow to pass before merging. + +### Example with Tide + +``` +tide: + context_options: + from-branch-protection: true ``` \ No newline at end of file From dd943bc22a31ba51029a914f3e11f5426aa4b04b Mon Sep 17 00:00:00 2001 From: Alex Ouzounis Date: Mon, 25 Nov 2019 11:59:43 +0000 Subject: [PATCH 3/6] fix tide example --- README.md | 59 +++++++++++++++++++++++++------------------------------ 1 file changed, 27 insertions(+), 32 deletions(-) diff --git a/README.md b/README.md index b741e41..631a242 100644 --- a/README.md +++ b/README.md @@ -5,37 +5,17 @@ A simple Github Action that allows us to update the status of a given commit. GitHub does not update the status of a commit when running workflow and therefore tools that rely on the context/status of a given commit are not compatible with it. -An example is [Prow](https://github.com/kubernetes/test-infra/tree/master/prow) which uses the Github Status API to read the status of a given commit. -## Integration with Prow +## Input Parameters -If using [Prow](https://github.com/kubernetes/test-infra/tree/master/prow) you can now add GitHub Workflows as required checks. - -### Example with Branch Protection and Tide -branch-protection: -``` -branch-protection: - orgs: - {MY_ORG}: - repos: - {MY_REPO}: - branches: - master: - protect: true # enable protection - enforce_admins: true # rules apply to admins - required_status_checks: - contexts: - - "GithubActions - {WORKFLOW_NAME}" - restrictions: # restrict who can push to the repo - users: - - ouzibot -``` -tide: -``` -tide: - context_options: - from-branch-protection: true -``` +* context: The context for the status + * optional + * default: GithubActions - ${GITHUB_WORKFLOW} +* state: Commit state. Possible values are 'pending', 'success', 'error' or 'failure' + * optional + * default: pending +* token: The Github token + * required ## Example action @@ -49,7 +29,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 - - uses: ouzi-dev/github-action-commit-status-updater@master + - uses: ouzi-dev/commit-status-updater@v0.1.0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Test @@ -58,15 +38,30 @@ jobs: sleep 2m echo pass - if: success() - - uses: ouzi-dev/github-action-commit-status-updater@master + - uses: ouzi-dev/commit-status-updater@v0.1.0 with: state: success env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - if: failure() - - uses: ouzi-dev/github-action-commit-status-updater@master + - uses: ouzi-dev/commit-status-updater@v0.1.0 with: state: failure env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} +``` + + +## Integration with Prow + +An example is [Prow](https://github.com/kubernetes/test-infra/tree/master/prow) which uses the Github Status API to read the status of a given commit. +Using this actions you can tell tide to not skip optional contexts and effectively wait for a GitHub Workflow to pass before merging. + +### Example with Tide + +``` +tide: + context_options: + # Treat unknown contexts as required + skip-unknown-contexts: false ``` \ No newline at end of file From 852e994269ae4499676d9e7ba2707570ef236b82 Mon Sep 17 00:00:00 2001 From: Alex Ouzounis Date: Mon, 25 Nov 2019 12:03:26 +0000 Subject: [PATCH 4/6] fix tide example --- README.md | 18 ------------------ action.yml | 1 - 2 files changed, 19 deletions(-) diff --git a/README.md b/README.md index 8794c5b..19d8908 100644 --- a/README.md +++ b/README.md @@ -5,15 +5,9 @@ A simple Github Action that allows us to update the status of a given commit. GitHub does not update the status of a commit when running workflow and therefore tools that rely on the context/status of a given commit are not compatible with it. -<<<<<<< HEAD - -## Input Parameters - -======= ## Input Parameters ->>>>>>> 85bdd958c28e5e42ebfdd25f2ceff8241f3d9c66 * context: The context for the status * optional * default: GithubActions - ${GITHUB_WORKFLOW} @@ -35,11 +29,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 -<<<<<<< HEAD - uses: ouzi-dev/commit-status-updater@v0.1.0 -======= - - uses: ouzi-dev/commit-status-updater@v0.1 ->>>>>>> 85bdd958c28e5e42ebfdd25f2ceff8241f3d9c66 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Test @@ -48,21 +38,13 @@ jobs: sleep 2m echo pass - if: success() -<<<<<<< HEAD - uses: ouzi-dev/commit-status-updater@v0.1.0 -======= - - uses: ouzi-dev/commit-status-updater@v0.1 ->>>>>>> 85bdd958c28e5e42ebfdd25f2ceff8241f3d9c66 with: state: success env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - if: failure() -<<<<<<< HEAD - uses: ouzi-dev/commit-status-updater@v0.1.0 -======= - - uses: ouzi-dev/commit-status-updater@v0.1 ->>>>>>> 85bdd958c28e5e42ebfdd25f2ceff8241f3d9c66 with: state: failure env: diff --git a/action.yml b/action.yml index 17ebf9c..b706825 100644 --- a/action.yml +++ b/action.yml @@ -4,7 +4,6 @@ author: 'Ouzi, ltd. Ouzi Team ' branding: icon: 'check-circle' color: 'purple' - inputs: context: description: 'The context for the status. Default is GithubActions - ${GITHUB_WORKFLOW}' From 0196a5d138d84ffe2bcd216e226af424689c8224 Mon Sep 17 00:00:00 2001 From: Alex Ouzounis Date: Mon, 25 Nov 2019 12:03:55 +0000 Subject: [PATCH 5/6] fix tide example --- README.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/README.md b/README.md index 19d8908..631a242 100644 --- a/README.md +++ b/README.md @@ -62,10 +62,6 @@ Using this actions you can tell tide to not skip optional contexts and effective ``` tide: context_options: -<<<<<<< HEAD # Treat unknown contexts as required skip-unknown-contexts: false -======= - from-branch-protection: true ->>>>>>> 85bdd958c28e5e42ebfdd25f2ceff8241f3d9c66 ``` \ No newline at end of file From 1a184505828117884a671f1b70c662b90b9a2a43 Mon Sep 17 00:00:00 2001 From: Alex Ouzounis Date: Mon, 25 Nov 2019 12:07:01 +0000 Subject: [PATCH 6/6] add Prow owners --- OWNERS | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 OWNERS diff --git a/OWNERS b/OWNERS new file mode 100644 index 0000000..a0ad621 --- /dev/null +++ b/OWNERS @@ -0,0 +1,14 @@ + # See the OWNERS docs at https://go.k8s.io/owners +approvers: + - belitre + - givanov + - alexouzounis +reviewers: + - belitre + - givanov + - alexouzounis +aliases: + ouzi-team: + - belitre + - givanov + - alexouzounis \ No newline at end of file