-
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.
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.
|
The new workflow does not seem to work correctly. Why not doing the same as in https://github.com/open-telemetry/opentelemetry-go/blob/main/.github/workflows/changelog.yml? |
I implemented a custom logic to handle the changelog checks, but I agree that it’s better to follow the same conventions used across the other OpenTelemetry repositories. I will update the workflow |
yes working on the same and some makrdown one also failing |
pellared
left a comment
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.
Tested. Works as expected.
|
Let's wait for @arminru to review, and let's advertise this in our Spec call. |
| echo "Fetching base branch..." | ||
| git fetch origin ${{ github.base_ref }} --depth=1 | ||
|
|
||
| echo "Checking for CHANGELOG modifications..." | ||
| if git diff --name-only FETCH_HEAD | grep -q 'CHANGELOG'; then |
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 fixes a subtle bug in the workflow, which is that once a new commit is merged to main (which updates the CHANGELOG.md), the diff with ${{ github.base_ref }} will think the CHANGELOG.md has been updated (this is what using --merge-base fixes)
(also I inlined FETCH_HEAD since the extra fetch isn't needed due to using fetch-depth: 0 above)
| echo "Fetching base branch..." | |
| git fetch origin ${{ github.base_ref }} --depth=1 | |
| echo "Checking for CHANGELOG modifications..." | |
| if git diff --name-only FETCH_HEAD | grep -q 'CHANGELOG'; then | |
| echo "Checking for CHANGELOG modifications..." | |
| if git diff --name-only --merge-base origin/${{ github.base_ref }} | grep -q 'CHANGELOG'; then |
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