From f4178795746695a205d5c4ba0d481c6a4eb0780f Mon Sep 17 00:00:00 2001 From: Ed Morley <501702+edmorley@users.noreply.github.com> Date: Thu, 21 Jan 2021 16:03:04 +0000 Subject: [PATCH] Check Changelog: Use commit body skip messages instead (#81) Cluttering up the commit title with `[skip changelog]` is suboptimal. This switches to the approach used by the Python buildpack. --- .github/workflows/check_changelog.yml | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/.github/workflows/check_changelog.yml b/.github/workflows/check_changelog.yml index 0d1139f..282bf46 100644 --- a/.github/workflows/check_changelog.yml +++ b/.github/workflows/check_changelog.yml @@ -1,13 +1,17 @@ name: Check Changelog on: - pull_request: - types: [opened, reopened, edited, synchronize] + 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 + check-changelog: + runs-on: ubuntu-latest + if: | + !contains(github.event.pull_request.body, '[skip changelog]') && + !contains(github.event.pull_request.body, '[changelog skip]') && + !contains(github.event.pull_request.body, '[skip ci]') + steps: + - uses: actions/checkout@v1 + - name: Check that CHANGELOG is touched + run: git diff remotes/origin/${{ github.base_ref }} --name-only | grep CHANGELOG.md