From 5d9c710d4a9d0bdad24f3516832f64989bd18e07 Mon Sep 17 00:00:00 2001 From: Alex Macleod Date: Tue, 19 Nov 2024 14:46:27 +0000 Subject: [PATCH] Changelog action --- .github/workflows/pr_description.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/pr_description.yml diff --git a/.github/workflows/pr_description.yml b/.github/workflows/pr_description.yml new file mode 100644 index 000000000000..1266b34ca497 --- /dev/null +++ b/.github/workflows/pr_description.yml @@ -0,0 +1,19 @@ +name: Check Pull Request Description + +on: + pull_request: + # synchronize is not technically needed, but + types: [opened, edited, synchronize] + +jobs: + changelog: + runs-on: ubuntu-latest + + steps: + - run: | + body=$(jq -r <<< '${{ toJson(github.event.pull_request.body) }}') + if [[ -z $(grep -oP 'changelog: *\K\S+' <<< "$body") ]]; then + echo '::error title=Pull Request body is missing `changelog: ...`::Please write a short comment explaining your change (or "none" for internal only changes)' + exit 1 + fi +