Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/reload/action-backstop-review
https://github.com/reload/action-backstop-review
Last synced: about 4 hours ago
JSON representation
- Host: GitHub
- URL: https://github.com/reload/action-backstop-review
- Owner: reload
- Created: 2021-12-06T09:00:18.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-08-18T19:48:16.000Z (over 2 years ago)
- Last Synced: 2023-03-11T02:34:19.008Z (over 1 year ago)
- Language: TypeScript
- Size: 158 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# action-approve-failure
GitHub action that let's you turn failure into success. For a short while.
## Example
Presume you have a couple of jobs that run on pull requests.
(These are merely examples but take a look in `.github/workflows` for closer inspection)```yaml
name: Checkson: pull_request
jobs:
checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2- uses: LouisBrunner/checks-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
name: BackstopJS visual test
conclusion: failure- uses: LouisBrunner/checks-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
name: ESLint
conclusion: failure
```These jobs might from time to time need to be forced into success since a failure
might just be a new state.In comes `action-approve-failure`:
```yaml
name: Approve failureon:
issue_comment:
types: [created]jobs:
approve-failure:
# This condition is important since you want to prevent all of the steps
# from running as early as possible if the comment isn't in a PR.
if: ${{ github.event.issue.pull_request }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2- uses: reload/[email protected]
name: Approve BackstopJS
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
check_name: BackstopJS visual test
approve_comment: backstop-check approve- uses: reload/[email protected]
name: Approve ESLint
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
check_name: ESLint
approve_comment: eslint-check approve
```Now, by simply commenting `backstop-check approve` you can turn that `failure`
into a `success`. The victory is short lived though. Whenever the PR get's
updated and the jobs re-run your override will be lost and you are forced to
yet again determine if this failure is change of state or an actual failure.