design dataplane internals #224
This file contains 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
# Block Pull Request merge (by failing the check) if specific labels are set. | |
name: "mergeability.yml" | |
on: | |
pull_request: | |
types: [synchronize, opened, reopened, labeled, unlabeled] | |
merge_group: | |
types: ["checks_requested"] | |
jobs: | |
check-labels: | |
runs-on: "ubuntu-latest" | |
name: "Check mergeability based on labels" | |
# Skip this job in merge group checks; but we need the workflow to run, | |
# given that the status check is required for merging. | |
if: "${{ github.event.pull_request }}" | |
steps: | |
- if: ${{ contains(github.event.*.labels.*.name, 'dont-merge') }} | |
name: "Fail test due to 'dont-merge' label presence" | |
run: | | |
exit 1 | |
- name: "Allow merging" | |
run: | | |
exit 0 |