This repository was archived by the owner on Mar 24, 2026. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +41
-0
lines changed
Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Changelog Check
2+
3+ on :
4+ pull_request :
5+ types : [opened, synchronize, reopened]
6+
7+ jobs :
8+ check-changelog :
9+ runs-on : ubuntu-latest
10+ steps :
11+ - uses : actions/checkout@v4
12+ with :
13+ fetch-depth : 0
14+
15+ - name : Check for changelog entry
16+ id : changelog-check
17+ run : |
18+ # Get the files changed in this PR
19+ git fetch origin ${{ github.base_ref }}
20+ CHANGED_FILES=$(git diff --name-only origin/${{ github.base_ref }}...HEAD)
21+
22+ # Check if docs/pages/resources/changelog.md was modified
23+ if echo "$CHANGED_FILES" | grep -q "docs/pages/resources/changelog.md"; then
24+ echo "Changelog was modified ✅"
25+ echo "has_changelog=true" >> $GITHUB_OUTPUT
26+ else
27+ echo "No changelog entry found ❌"
28+ echo "has_changelog=false" >> $GITHUB_OUTPUT
29+ fi
30+
31+ - name : Comment on PR
32+ if : steps.changelog-check.outputs.has_changelog == 'false'
33+ uses : actions/github-script@v7
34+ with :
35+ script : |
36+ github.rest.issues.createComment({
37+ issue_number: context.issue.number,
38+ owner: context.repo.owner,
39+ repo: context.repo.name,
40+ body: '⚠️ This PR is missing a changelog entry. Please add an entry to `docs/pages/resources/changelog.md` describing your changes.'
41+ })
You can’t perform that action at this time.
0 commit comments