Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Add check to block PR if label is present #3118

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions .github/workflows/pr-e2e-checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ on:
- unlabeled

env:
SKIP_E2E_TAG: skip-e2e
SKIP_E2E_LABEL: skip-e2e
NOT_READY_LABEL: not-ready
E2E_CHECK_NAME: e2e tests

jobs:
Expand All @@ -25,11 +26,17 @@ jobs:

- uses: LouisBrunner/checks-action@v1.1.1
name: Skip e2e
if: ${{ contains(github.event.pull_request.labels.*.name, env.SKIP_E2E_TAG )}}
if: ${{ contains(github.event.pull_request.labels.*.name, env.SKIP_E2E_LABEL )}}
with:
token: ${{ secrets.GITHUB_TOKEN }}
sha: ${{ github.event.pull_request.head.sha }}
check_id: ${{ steps.create.outputs.check_id }}
conclusion: success
output: |
{"summary": "skipped by maintainer"}

- uses: docker://agilepathway/pull-request-label-checker:latest
name: Not ready checker
with:
none_of: ${{ env.NOT_READY_LABEL }}
repo_token: ${{ secrets.GITHUB_TOKEN }}