Skip to content

Commit 9a54a8d

Browse files
authored
Merge pull request #699 from PolicyEngine/fix/changelog-fragments
Fix changelog fragment PR check
2 parents 6a80f0a + 89a84d1 commit 9a54a8d

4 files changed

Lines changed: 9 additions & 8 deletions

File tree

.github/workflows/pr.yaml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,15 @@ jobs:
4848
needs: check-fork
4949
steps:
5050
- uses: actions/checkout@v4
51+
with:
52+
fetch-depth: 0
53+
- uses: actions/setup-python@v5
54+
with:
55+
python-version: "3.14"
56+
- uses: astral-sh/setup-uv@v5
57+
- run: uv sync --dev
5158
- name: Check for changelog fragment
52-
run: |
53-
FRAGMENTS=$(find changelog.d -type f ! -name '.gitkeep' | wc -l)
54-
if [ "$FRAGMENTS" -eq 0 ]; then
55-
echo "::error::No changelog fragment in changelog.d/"
56-
exit 1
57-
fi
59+
run: uv run towncrier check --compare-with origin/main
5860

5961
unit-tests:
6062
runs-on: ubuntu-latest

changelog.d/changed/553.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

changelog.d/changed/589.md

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix the PR changelog fragment check to validate fragments added by the pull request rather than pre-existing files.

0 commit comments

Comments
 (0)