File
Blob: .github/workflows/labels.yml
| 1 | # Based on https://www.neilmacy.co.uk/blog/github-action-to-block-merging |
| 2 | name: "Internal PR Required" |
| 3 | on: |
| 4 | workflow_call: |
| 5 | pull_request: |
| 6 | types: [labeled, unlabeled] |
| 7 | |
| 8 | jobs: |
| 9 | InternalPRRequired: |
| 10 | runs-on: ubuntu-latest |
| 11 | steps: |
| 12 | - name: Check for label |
| 13 | if: contains(github.event.*.labels.*.name, 'needs-internal-pr') |
| 14 | run: | |
| 15 | echo "Pull request is labeled as 'needs-internal-pr'" |
| 16 | echo "This workflow fails so the pull request cannot be merged" |
| 17 | exit 1 |
| 18 |