Skip to content

Commit ce12fad

Browse files
committed
added check for updated changelog in PR
1 parent 3ef5cab commit ce12fad

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

.github/workflows/check.yml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,24 @@ permissions:
1010
pull-requests: read
1111

1212
jobs:
13+
changelog:
14+
if: github.event_name == 'pull_request'
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v5
18+
with:
19+
fetch-depth: 0
20+
21+
- name: Check CHANGELOG was updated
22+
run: |
23+
if git diff --name-only origin/${{ github.base_ref }}...HEAD | grep -q "^CHANGELOG.md$"; then
24+
echo "✅ CHANGELOG.md was updated"
25+
else
26+
echo "❌ ERROR: CHANGELOG.md was not updated"
27+
echo "Please add your changes to the CHANGELOG.md file"
28+
exit 1
29+
fi
30+
1331
check:
1432
runs-on: ubuntu-latest
1533
env:
@@ -56,8 +74,7 @@ jobs:
5674
strategy:
5775
fail-fast: false
5876
matrix:
59-
python-version:
60-
["3.9", "3.10", "3.11", "3.12", "3.13", "3.14", "3.15"]
77+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14", "3.15"]
6178

6279
steps:
6380
- uses: actions/checkout@v5

0 commit comments

Comments
 (0)