Skip to content
File

Blob: .github/workflows/labels.yml

yaml18 lines
1# Based on https://www.neilmacy.co.uk/blog/github-action-to-block-merging
2name: "Internal PR Required"
3on:
4 workflow_call:
5 pull_request:
6 types: [labeled, unlabeled]
7 
8jobs:
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