From 5d33f20a2a2c85cfb521ae9c5f9254bfe9fc2fd9 Mon Sep 17 00:00:00 2001 From: Cooper Lees Date: Sun, 21 Mar 2021 13:05:24 -0700 Subject: [PATCH 1/1] Add a GitHub CHANGELOG/News Check (#2057) - Run grep to see commit has a line mentioning it to CHANGES.md - Also add a label to disable this being required for PRs that don't need a change entry --- .github/workflows/changelog.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/changelog.yml diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml new file mode 100644 index 0000000..434950d --- /dev/null +++ b/.github/workflows/changelog.yml @@ -0,0 +1,21 @@ +name: changelog + +on: + pull_request: + types: [opened, synchronize, labeled, unlabeled, reopened] + +jobs: + build: + name: Changelog Entry Check + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Grep CHANGES.md for PR number + if: contains(github.event.pull_request.labels.*.name, 'skip news') != true + run: | + grep -P "PR #${{ github.event.pull_request.number }}[^0-9]" CHANGES.md || \ + (echo "Please add 'PR #${{ github.event.pull_request.number }}' change line to CHANGES.md" && \ + exit 1) -- 2.39.5