From dda8117e0f4b5d333f9f1b60022da8b6570c2691 Mon Sep 17 00:00:00 2001 From: Florian Esser Date: Tue, 28 May 2024 12:15:27 +0200 Subject: [PATCH] ci: add job to check PR label requirements --- .github/workflows/labels.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/labels.yml diff --git a/.github/workflows/labels.yml b/.github/workflows/labels.yml new file mode 100644 index 0000000000..70e5128d64 --- /dev/null +++ b/.github/workflows/labels.yml @@ -0,0 +1,19 @@ +name: Check labels + +on: + pull_request: + branches: + - '*' # Trigger on all branches for pull requests + types: [opened, synchronize, reopened, labeled, unlabeled] + +jobs: + require-challenge: + runs-on: ubuntu-latest + steps: + - uses: mheap/github-action-required-labels@5847eef68201219cf0a4643ea7be61e77837bbce # v5.4.1 + with: + mode: exactly + count: 1 + labels: "challenged" + add_comment: true + message: "This PR cannot be merged yet because a required label is missing: `{{ provided }}`. It needs to be added before this PR can be merged."