Initial codeowners #29
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] | |
| jobs: | |
| check-labels: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check for labels that should block merge | |
| 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"* ]]; then | |
| echo "Pull request has 'do-not-merge' label. Blocking merge." | |
| exit 1 | |
| fi | |
| done |