From 2237b7a399c69bd406f3bf862ec1cc17bfd3e28c Mon Sep 17 00:00:00 2001 From: Zack Pollard Date: Mon, 19 Aug 2024 20:47:27 +0100 Subject: [PATCH] chore: validate every PR has a changelog related label (#11909) --- .github/release.yml | 14 +++++++------- .github/workflows/pr-label-validation.yml | 18 ++++++++++++++++++ 2 files changed, 25 insertions(+), 7 deletions(-) create mode 100644 .github/workflows/pr-label-validation.yml diff --git a/.github/release.yml b/.github/release.yml index 4463555deb..1d9764194c 100644 --- a/.github/release.yml +++ b/.github/release.yml @@ -2,28 +2,28 @@ changelog: categories: - title: 🚨 Breaking Changes labels: - - breaking-change + - changelog:breaking-change - title: 🔒 Security labels: - - security + - changelog:security - title: 🚀 Features labels: - - feature + - changelog:feature - title: 🌟 Enhancements labels: - - enhancement + - changelog:enhancement - title: 🐛 Bug fixes labels: - - bugfix + - changelog:bugfix - title: 📚 Documentation labels: - - documentation + - changelog:documentation - title: 🌐 Translations labels: - - translation + - changelog:translation diff --git a/.github/workflows/pr-label-validation.yml b/.github/workflows/pr-label-validation.yml new file mode 100644 index 0000000000..510995aa54 --- /dev/null +++ b/.github/workflows/pr-label-validation.yml @@ -0,0 +1,18 @@ +name: PR Label Validation + +on: + pull_request: + types: [opened, labeled, unlabeled, synchronize] + +jobs: + validate-release-label: + runs-on: ubuntu-latest + steps: + - name: Require PR to have a changelog label + uses: mheap/github-action-required-labels@v5 + with: + mode: exactly + count: 1 + use_regex: true + labels: "changelog:.*" + add_comment: true