From 17e55106fcec57c2805efca254733ebc4442662b Mon Sep 17 00:00:00 2001 From: Richard Schneeman Date: Wed, 13 May 2020 10:43:09 -0500 Subject: [PATCH] [changelog skip] Fix Escaping in Changelog Script (#127) * [changelog skip] Ensure PRs include a Changelog entry The goal of this PR is to add a github action that checks for the presence of a changelog entry. It is better to add entries as a PR is merged instead of having to remember what was merged and generate a changelog at release time. By automating this check, it's one less thing the maintainer has to remember, and it's one less thing a change might be blocked on i.e. "Looks good, but please add a changelog entry". Let me know if you have any questions and Happy Friday! * [changelog skip] Fix Escaping in Changelog Script The previous PR had a bug where the REGEX for grep was not properly escaped. This PR fixes that issue. * Update check_changelog.yml --- .github/workflows/check_changelog.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .github/workflows/check_changelog.yml diff --git a/.github/workflows/check_changelog.yml b/.github/workflows/check_changelog.yml new file mode 100644 index 0000000..0d1139f --- /dev/null +++ b/.github/workflows/check_changelog.yml @@ -0,0 +1,13 @@ +name: Check Changelog + +on: + pull_request: + types: [opened, reopened, edited, synchronize] +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - name: Check that CHANGELOG is touched + run: | + cat $GITHUB_EVENT_PATH | jq .pull_request.title | grep -i '\[\(\(changelog skip\)\|\(ci skip\)\)\]' || git diff remotes/origin/${{ github.base_ref }} --name-only | grep CHANGELOG.md