diff options
author | Waylan Limberg <waylan.limberg@icloud.com> | 2020-10-23 11:58:19 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-23 11:58:19 -0400 |
commit | 897c8541998cdbd0499b04942244f7fdf1191a6c (patch) | |
tree | fd8d9f3d57c6d886b974c6295a6dbea19627a5a8 | |
parent | 2a883a2931fd9cec63ec245c080760a15460a72c (diff) | |
download | python-markdown-897c8541998cdbd0499b04942244f7fdf1191a6c.tar.gz |
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.
-rw-r--r-- | .github/workflows/process.yml | 24 |
1 files changed, 24 insertions, 0 deletions
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. |