Skip to content

Conversation

@vanshika622
Copy link

@vanshika622 vanshika622 commented Dec 3, 2025

Fixes #2315

Changes

  • Add the workflow to verify the changes in changelog.md

Please provide a brief description of the changes here.

For non-trivial changes, follow the change proposal process.

@vanshika622 vanshika622 requested review from a team as code owners December 3, 2025 14:09
@arminru arminru requested a review from Copilot December 3, 2025 17:43
Copy link
Member

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.

Copy link
Contributor

Copilot AI left a 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"
Copy link

Copilot AI Dec 3, 2025

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.

Copilot uses AI. Check for mistakes.
Copy link
Author

@vanshika622 vanshika622 Dec 7, 2025

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
Copy link

Copilot AI Dec 3, 2025

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.

Suggested change
echo "skip=false" >> $GITHUB_OUTPUT
echo "skip=false" >> $GITHUB_OUTPUT
fi

Copilot uses AI. Check for mistakes.
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

acknowledged


# 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."
Copy link

Copilot AI Dec 3, 2025

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.

Suggested change
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."

Copilot uses AI. Check for mistakes.
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

acknowledged

Comment on lines 49 to 54
# 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
Copy link
Member

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?

Copy link
Author

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.

Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Github workflow to ensure changelogs are added

3 participants