File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111 runs-on : ubuntu-latest
1212
1313 steps :
14- - uses : actions/checkout@v5
14+ - uses : actions/checkout@v6
1515 with :
1616 fetch-depth : 0
1717
Original file line number Diff line number Diff line change 1111 runs-on : ubuntu-latest
1212
1313 steps :
14- - uses : actions/checkout@v5
14+ - uses : actions/checkout@v6
1515 with :
1616 fetch-depth : 0
1717
Original file line number Diff line number Diff line change 99 runs-on : ubuntu-latest
1010
1111 steps :
12- - uses : actions/checkout@v5
12+ - uses : actions/checkout@v6
1313 with :
1414 fetch-depth : 0
1515
Original file line number Diff line number Diff line change 1616 contents : write
1717
1818 steps :
19- - uses : actions/checkout@v5
19+ - uses : actions/checkout@v6
2020 with :
2121 fetch-depth : 0
2222 - name : setup Python
Original file line number Diff line number Diff line change 1616 python-version : ['3.11', '3.13']
1717
1818 steps :
19- - uses : actions/checkout@v5
19+ - uses : actions/checkout@v6
2020 with :
2121 fetch-depth : 0
2222
Original file line number Diff line number Diff line change 1- #!/usr/bin/env python3
1+ #!/usr/bin/env python
22"""Check if the CHANGELOG has been modified with respect to the main branch."""
33import os
44
@@ -22,7 +22,21 @@ class ChangelogError(Exception):
2222 workfile = f .read ()
2323
2424if file .strip () == workfile .strip ():
25- raise ChangelogError ("You have not updated the CHANGELOG file. Please "
26- f"add a summary of your additions to { changelog } ." )
25+ # Check for changed files and ignore .github/ changes
26+ head_commit = repo .head .commit
27+ diff = head_commit .diff ("origin/main" )
28+ changed_files = []
29+ for x in diff :
30+ if x .a_blob .path not in changed_files :
31+ changed_files .append (x .a_blob .path )
32+ if x .b_blob is not None and x .b_blob .path not in changed_files :
33+ changed_files .append (x .b_blob .path )
34+ changed_files = [x for x in changed_files if not x .startswith (".github/" )]
35+
36+ if len (changed_files ) > 0 :
37+ raise ChangelogError ("You have not updated the CHANGELOG file. Please "
38+ f"add a summary of your additions to { changelog } ." )
39+ else :
40+ print ("No changes detected." )
2741else :
2842 print ("CHANGELOG is up to date." )
Original file line number Diff line number Diff line change @@ -5,9 +5,10 @@ Changelog
55Unreleased
66----------
77
8+ * Ignore ``.github `` workflows for changelog checks
89* Ignore unrelated warnings from MDAnalysis
9- * Added argcomplete for tab completion
10- * Updated docs
10+ * Added `` argcomplete `` for tab completion
11+ * Updated docs
1112
1213v0.1.33 (2025-10-20)
1314------------------------------------------
You can’t perform that action at this time.
0 commit comments