Skip to content

Commit cb41d33

Browse files
authored
Added changelog reminder (#184)
Adds a workflow that automatically reminds contributors to update the changelog by commenting on pull requests that lack changelog entries.
2 parents 4bf77e1 + 04e0a0c commit cb41d33

3 files changed

Lines changed: 44 additions & 0 deletions

File tree

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Verify changelog updated
2+
3+
on:
4+
pull_request_target:
5+
types:
6+
- opened
7+
- ready_for_review
8+
9+
jobs:
10+
check_changes:
11+
permissions:
12+
pull-requests: write
13+
contents: read
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v5
17+
18+
- name: Get all updated Python files
19+
id: changed-python-files
20+
uses: tj-actions/changed-files@v46
21+
with:
22+
files: |
23+
**.py
24+
25+
- name: Check for the changelog update
26+
id: changelog-update
27+
uses: tj-actions/changed-files@v46
28+
with:
29+
files: docs/changelog.rst
30+
31+
- name: Comment under the PR with a reminder
32+
if: steps.changed-python-files.outputs.any_changed == 'true' && steps.changelog-update.outputs.any_changed == 'false'
33+
uses: thollander/actions-comment-pull-request@v2
34+
with:
35+
message: 'Thank you for the PR! The changelog has not been updated, so here is a friendly reminder to check if you need to add an entry.'
36+
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'

docs/changelog.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
Changelog
22
---------
33

4+
v2.1.1
5+
''''''
6+
7+
- Include `docs` and `tests` directory in source distributions.
8+
49
v2.1.0
510
''''''
611

docs/dev.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,6 @@ To create a new version, follow these steps:
2121
3. Refresh the page to see the status of the workflow.
2222
4. Once it succeeds, create a GitHub release with notes from the
2323
``docs/changelog.rst`` file.
24+
25+
Note: This workflow does not update the changelog version numbers; this must be
26+
done manually before running the release workflow.

0 commit comments

Comments
 (0)