Skip to content

Fix update-changelogs workflow#8741

Open
mcmire wants to merge 1 commit intomainfrom
fix-update-changelogs-workflow
Open

Fix update-changelogs workflow#8741
mcmire wants to merge 1 commit intomainfrom
fix-update-changelogs-workflow

Conversation

@mcmire
Copy link
Copy Markdown
Contributor

@mcmire mcmire commented May 7, 2026

Explanation

A recent commit changed the update-changelog workflow so that instead of checking out the release PR branch directly, it checks out the base branch and then overlays files from the release PR that are necessary to run auto-changelog validate.

Currently, only changelogs are copied from the release PR. However, to determine which dependency bump changelog entries are missing, the auto-changelog validate command needs not only changelogs but also package manifests.

This commit fixes the update-changelog workflow accordingly.

References

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

Note

Low Risk
Low risk workflow-only change that adjusts which files are checked out/committed and how a commit SHA is captured; main risk is unintended CI behavior or pushes to PR branches.

Overview
Fixes the update-changelogs GitHub Actions workflow to overlay and temporarily commit both **/CHANGELOG.md and **/package.json from the PR branch before running yarn changelog:validate --checkDeps, ensuring dependency-bump validation uses the PR’s manifests.

Also updates the workflow to output the full commit SHA (%H) for the generated changelog-fix commit, and renames the related steps to reflect the broader file overlay/commit.

Reviewed by Cursor Bugbot for commit bd50247. Bugbot is set up for automated code reviews on this repo. Configure here.

A recent commit changed the `update-changelog` workflow so that instead
of checking out the release PR branch directly, it checks out the base
branch and then overlays files from the release PR that are necessary to
run `auto-changelog validate`.

Currently, only changelogs are copied from the release PR. However, to
determine which dependency bump changelog entries are missing, the
`auto-changelog validate` command needs not only changelogs but also
package manifests.

This commit fixes the `update-changelog` workflow accordingly.
@mcmire mcmire temporarily deployed to default-branch May 7, 2026 20:26 — with GitHub Actions Inactive
git commit -m "chore: Update dependency bump changelog entries"

new_commit_id="$(git log -1 --pretty='format:%h')"
new_commit_id="$(git log -1 --pretty='format:%H')"
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

As the PR description mentions, this workflow is somewhat sophisticated in that it checks out the base branch of the release PR, copies changelogs from the release PR, updates changelogs via yarn changelog:validate, then cherry-picks the changelogs back to the release PR. This line grabs the commit we need to cherry-pick. %h is the short commit ID, %H is the full commit ID. I wanted to make sure this wasn't a problem while I was at it.

@mcmire mcmire marked this pull request as ready for review May 7, 2026 20:34
@mcmire mcmire requested a review from a team as a code owner May 7, 2026 20:34
git fetch --no-tags origin "$PR_HEAD_SHA"
git fetch --no-tags origin "$PR_HEAD_REF"
git checkout "$PR_HEAD_SHA" -- '**/CHANGELOG.md'
git checkout "$PR_HEAD_SHA" -- '**/CHANGELOG.md' '**/package.json'
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I tested this flow locally using https://github.com/MetaMask/core/actions/runs/25519305257/job/74898870596?pr=8740 as a guide. I feel more confident it should work 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.

1 participant