-
Notifications
You must be signed in to change notification settings - Fork 940
ci: add changelog verification workflow #4776
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a markdown (.md) file but it would need to be a YAML (.yml or .yaml) for it to be a functioning workflow that's picked up by Github.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds a GitHub Actions workflow to enforce CHANGELOG.md updates for pull requests, addressing issue #2315. The workflow automatically verifies that non-trivial changes include corresponding CHANGELOG.md updates.
Key changes:
- New CI workflow that checks for CHANGELOG.md modifications in PRs
- Support for bypass labels ("Skip Changelog" and "dependencies") to exclude certain PRs
- Validation logic that allows CHANGELOG-only PRs and fails PRs with code changes but no CHANGELOG update
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -0,0 +1,63 @@ | |||
| name: "Verify CHANGELOG Update" | |||
Copilot
AI
Dec 3, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The workflow file has a '.md' extension but contains YAML content. Rename the file to 'changelog.yml' or 'changelog.yaml' to match GitHub Actions naming conventions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
acknowledged
| elif echo "$labels" | grep -q '"dependencies"'; then | ||
| echo "skip=true" >> $GITHUB_OUTPUT | ||
| else | ||
| echo "skip=false" >> $GITHUB_OUTPUT |
Copilot
AI
Dec 3, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing 'fi' statement to close the if block starting at line 30. This will cause a syntax error when the workflow runs.
| echo "skip=false" >> $GITHUB_OUTPUT | |
| echo "skip=false" >> $GITHUB_OUTPUT | |
| fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
acknowledged
.github/workflows/changelog.md
Outdated
|
|
||
| # If other files changed but CHANGELOG.md did NOT change → FAIL | ||
| if ! echo "$changed_files" | grep -q '^CHANGELOG\.md'; then | ||
| echo "::error ::This PR changes repository files but does NOT update CHANGELOG.md." |
Copilot
AI
Dec 3, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extra space in error annotation syntax. Should be '::error::' without the space before the second colon.
| echo "::error ::This PR changes repository files but does NOT update CHANGELOG.md." | |
| echo "::error::This PR changes repository files but does NOT update CHANGELOG.md." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
acknowledged
.github/workflows/changelog.md
Outdated
| # Allow PRs that only edit CHANGELOG.md | ||
| if echo "$changed_files" | grep -Eq '^CHANGELOG\.md$' && \ | ||
| [ "$(echo "$changed_files" | wc -l)" -eq 1 ]; then | ||
| echo "Only CHANGELOG.md changed — OK" | ||
| exit 0 | ||
| fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this already implicitly allowed since it should pass the check below as it's actually editing CHANGELOG.md?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Yes, you’re right, I will remove it to simplify the workflow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@arminru resolved the comments now, can you please check it now
Fixes #2315
Changes
Please provide a brief description of the changes here.
For non-trivial changes, follow the change proposal process.
CHANGELOG.mdfile updated for non-trivial changes