Skip to content

Commit 897c854

Browse files
authored
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.
1 parent 2a883a2 commit 897c854

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

.github/workflows/process.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: bot
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- '**'
7+
8+
jobs:
9+
require_changelog:
10+
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
- uses: mskelton/changelog-reminder-action@v1
15+
with:
16+
# Match any file in the docs/change_log/ dir.
17+
changelogRegex: "docs/change_log/.*"
18+
# Only require changelog update if changes were made in markdown/
19+
include: "markdown/.*"
20+
message: |
21+
@${{ github.actor }}, thank you for your contribution. It appears that you have not added a comment to the
22+
change log describing the changes you have made. Doing so will help to ensure your contribution is accepted.
23+
24+
Please see the [Contributing Guide](https://python-markdown.github.io/contributing/#pull-requests) for details.

0 commit comments

Comments
 (0)