2022-02-16 15:42:15 +01:00
|
|
|
name: Enforce PR labels
|
|
|
|
|
|
|
|
on:
|
2024-01-23 19:24:52 +01:00
|
|
|
workflow_call:
|
2022-02-16 15:42:15 +01:00
|
|
|
pull_request:
|
2024-01-23 19:24:52 +01:00
|
|
|
types: [labeled, unlabeled, opened, reopened, synchronize]
|
2022-02-16 15:42:15 +01:00
|
|
|
jobs:
|
|
|
|
enforce-label:
|
2024-01-23 19:24:52 +01:00
|
|
|
if: ${{ contains(github.event.*.labels.*.name, 'hold') || contains(github.event.*.labels.*.name, 'needs-qa') || contains(github.event.*.labels.*.name, 'DB-migrations-changed') }}
|
|
|
|
name: Enforce label
|
|
|
|
runs-on: ubuntu-22.04
|
|
|
|
|
2022-02-16 15:42:15 +01:00
|
|
|
steps:
|
2024-01-23 19:24:52 +01:00
|
|
|
- name: Check for label
|
|
|
|
run: |
|
|
|
|
echo "PRs with the hold or needs-qa labels cannot be merged"
|
|
|
|
echo "### :x: PRs with the hold or needs-qa labels cannot be merged" >> $GITHUB_STEP_SUMMARY
|
|
|
|
exit 1
|