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
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.

@pellared pellared added the Skip Changelog Label to skip the changelog check label Dec 8, 2025
@pellared
Copy link
Member

pellared commented Dec 8, 2025

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?

@vanshika622
Copy link
Author

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

@pellared pellared requested a review from reyang December 8, 2025 08:29
@pellared
Copy link
Member

pellared commented Dec 8, 2025

@vanshika622
Copy link
Author

vanshika622 commented Dec 8, 2025

yamllint is failing https://github.com/open-telemetry/opentelemetry-specification/actions/runs/20038553862/job/57466822059?pr=4776

yes working on the same and some makrdown one also failing

@pellared pellared added Skip Changelog Label to skip the changelog check and removed Skip Changelog Label to skip the changelog check labels Dec 8, 2025
Copy link
Member

@pellared pellared left a 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.

@pellared pellared requested a review from arminru December 8, 2025 19:22
@carlosalberto
Copy link
Contributor

Let's wait for @arminru to review, and let's advertise this in our Spec call.

Comment on lines +37 to +41
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
Copy link
Member

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)

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

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

Labels

Skip Changelog Label to skip the changelog check

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Github workflow to ensure changelogs are added

6 participants