Envoy jwt #964
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # This workflow blocks PRs from merging if they have certain labels. | |
| name: Pre-merge label checker | |
| on: | |
| pull_request: | |
| types: [opened, edited, reopened, synchronize, labeled, unlabeled] | |
| merge_group: | |
| types: [checks_requested] | |
| jobs: | |
| check-labels: | |
| runs-on: ubuntu-latest | |
| steps: | |
| # only run this step on PRs, not in the merge queue (we need to explicitly add the merge queue logic because making this check required | |
| # causes it to get run in the merge queue as well) | |
| - name: Conditional skip for merge queue | |
| if: github.event_name == 'merge_group' | |
| run: | | |
| echo "Skipping check in merge queue" | |
| exit 0 | |
| - name: Check for labels that should block merge | |
| if: github.event_name != 'merge_group' | |
| env: | |
| PR_LABELS: ${{ toJson(github.event.pull_request.labels) }} | |
| run: | | |
| echo "$PR_LABELS" | jq -r '.[].name' | while read -r label; do | |
| if [[ "$label" == "do-not-merge"* || "$label" == "work in progress" ]]; then | |
| echo "Pull request has 'do-not-merge' or 'work in progress' label. Blocking merge." | |
| exit 1 | |
| fi | |
| done |