From 897c8541998cdbd0499b04942244f7fdf1191a6c Mon Sep 17 00:00:00 2001 From: Waylan Limberg Date: Fri, 23 Oct 2020 11:58:19 -0400 Subject: Add require_changelog workflow action (#1051) This action checks that an update was made to any file in docs/change_log/ but only if changes were made to files in markdown/. Presumably, any changes outside of markdown/ do not affect the behavior and do not require a notation in the change_log. If the proper permissions are available, a comment is added to the PR informing the PR author that an update to the changelog is missing. However, any PR's from forks do not have permission on the pull_request event. Unfortunately, the pull_request_target event doesn't seem to work at all. However, as the action only attempts to add a comment on failure, we only get a failure in the correct conditions, even if the error message is related to auth. --- .github/workflows/process.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/process.yml diff --git a/.github/workflows/process.yml b/.github/workflows/process.yml new file mode 100644 index 0000000..6e3ac51 --- /dev/null +++ b/.github/workflows/process.yml @@ -0,0 +1,24 @@ +name: bot + +on: + pull_request: + branches: + - '**' + +jobs: + require_changelog: + + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: mskelton/changelog-reminder-action@v1 + with: + # Match any file in the docs/change_log/ dir. + changelogRegex: "docs/change_log/.*" + # Only require changelog update if changes were made in markdown/ + include: "markdown/.*" + message: | + @${{ github.actor }}, thank you for your contribution. It appears that you have not added a comment to the + change log describing the changes you have made. Doing so will help to ensure your contribution is accepted. + + Please see the [Contributing Guide](https://python-markdown.github.io/contributing/#pull-requests) for details. -- cgit v1.2.1