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-10-22 18:24:25 +02:00
|
|
|
if: ${{ contains(github.event.*.labels.*.name, 'hold') || contains(github.event.*.labels.*.name, 'needs-qa') || contains(github.event.*.labels.*.name, 'DB-migrations-changed') || contains(github.event.*.labels.*.name, 'ephemeral-environment') }}
|
2024-01-23 19:24:52 +01:00
|
|
|
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: |
|
2024-10-22 18:24:25 +02:00
|
|
|
echo "PRs with the hold, needs-qa or ephemeral-environment labels cannot be merged"
|
|
|
|
echo "### :x: PRs with the hold, needs-qa or ephemeral-environment labels cannot be merged" >> $GITHUB_STEP_SUMMARY
|
2024-01-23 19:24:52 +01:00
|
|
|
exit 1
|