From 2b9d4d62a60366318a6bb87edc8156bcf445557b Mon Sep 17 00:00:00 2001 From: Tim Jacomb <21194782+timja@users.noreply.github.com> Date: Sun, 16 Feb 2025 10:31:42 +0000 Subject: [PATCH] Require a changelog label (#10273) --- .github/PULL_REQUEST_TEMPLATE.md | 29 +++++++++++++++++ .github/workflows/require-changelog-label.yml | 31 +++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 .github/workflows/require-changelog-label.yml diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index a2ed88450d..c937a5df64 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -42,6 +42,35 @@ You may add multiple changelog entries if applicable by adding a new entry to th - Second changelog entry --> +### Proposed changelog category + +/label + + + ### Proposed upgrade guidelines N/A diff --git a/.github/workflows/require-changelog-label.yml b/.github/workflows/require-changelog-label.yml new file mode 100644 index 0000000000..457d9f3e60 --- /dev/null +++ b/.github/workflows/require-changelog-label.yml @@ -0,0 +1,31 @@ +name: Require Changelog Label +on: + pull_request_target: + types: [opened, labeled, unlabeled, synchronize] + branches: + - 'master' +jobs: + label: + runs-on: ubuntu-latest + permissions: + issues: write + pull-requests: write + steps: + - uses: mheap/github-action-required-labels@388fd6af37b34cdfe5a23b37060e763217e58b03 # v5 + with: + mode: minimum + count: 1 + add_comment: true + message: "Missing required label for changelog. Requires {{errorString}} {{count}} of: {{ provided }}. Found: {{ applied }}.\n\nYou can add the required label by adding a comment with the following text: `/label `" + labels: | + bug + developer + dependencies + internal + localization + major-bug + major-rfe + rfe + regression-fix + removed + skip-changelog