From: Cooper Lees Date: Sun, 21 Mar 2021 20:05:24 +0000 (-0700) Subject: Add a GitHub CHANGELOG/News Check (#2057) X-Git-Url: https://git.madduck.net/etc/vim.git/commitdiff_plain/5d33f20a2a2c85cfb521ae9c5f9254bfe9fc2fd9 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 --- 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)