diff --git a/.github/workflows/enforce-labels.yml b/.github/workflows/enforce-labels.yml new file mode 100644 index 00000000..5a4def36 --- /dev/null +++ b/.github/workflows/enforce-labels.yml @@ -0,0 +1,19 @@ +name: Enforce PR labels + +permissions: + contents: read +on: + pull_request: + types: [labeled, unlabeled, opened, reopened, edited, synchronize] +jobs: + enforce-labels: + name: Check for blocking labels + runs-on: ubuntu-latest + timeout-minutes: 2 + steps: + - uses: yogevbd/enforce-label-action@2.2.2 + with: + # REQUIRED_LABELS_ANY: "bug,enhancement,skip-changelog" + # REQUIRED_LABELS_ANY_DESCRIPTION: "Select at least one label ['bug','enhancement','skip-changelog']" + BANNED_LABELS: "needs changelog,DO NOT MERGE" + BANNED_LABELS_DESCRIPTION: "A PR should not be merged with `needs *` or `DO NOT MERGE` labels"