File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change 1919 enable-cache : true
2020 - name : Check lockfile is consistent with pyproject.toml
2121 run : uv lock --check
22+ check-changelog-history-untouched :
23+ runs-on : ubuntu-24.04
24+ if : ${{ !contains(github.event.pull_request.labels.*.name, 'changelog-history-fix') || !startsWith(github.event.pull_request.title, 'release:') }}
25+ steps :
26+ - uses : actions/checkout@v6
27+ - name : Check if changes are limited to upcoming changes
28+ run : |
29+ upcoming_changes_start=$(git diff -W CHANGELOG.md | grep "^ ## Upcoming Changes" -n | cut -d: -f1)
30+ releases_start=$(git diff -W CHANGELOG.md | grep "^ ## " -n | tail -n +2 | head -n 1 | cut -d: -f1) # +2 to skip first line
31+ echo "All changes should be between $upcoming_changes_start and $releases_start"
32+
33+ # +6 to skip diff header
34+ git diff -W CHANGELOG.md | grep "^[^ ]" -n | tail -n +6 | cut -d: -f1 \
35+ | while read -r changed_line_nr; do
36+ echo -n "Checking line $changed_line_nr...";
37+ if [ $upcoming_changes_start -lt $changed_line_nr ] && [ $changed_line_nr -lt $releases_start ]; then
38+ echo "...valid";
39+ else
40+ echo "...invalid";
41+ echo "Detected illegal changes"
42+ exit 1
43+ fi
44+ done
2245 test :
2346 uses : ./.github/workflows/testing.yml
2447 build-docs :
You can’t perform that action at this time.
0 commit comments