Skip to content

feat: add Update Changelogs workflow with auto-changelog v6 --checkDeps#8443

Open
cryptodev-2s wants to merge 15 commits intomainfrom
feat/auto-changelog-check-deps
Open

feat: add Update Changelogs workflow with auto-changelog v6 --checkDeps#8443
cryptodev-2s wants to merge 15 commits intomainfrom
feat/auto-changelog-check-deps

Conversation

@cryptodev-2s
Copy link
Copy Markdown
Contributor

@cryptodev-2s cryptodev-2s commented Apr 13, 2026

Explanation

Adds an Update Changelogs workflow that uses @metamask/auto-changelog v6's --checkDeps --fix feature to automatically validate and fix missing dependency bump changelog entries.

Triggers:

  • Automatic: When a release PR (release/* branch) is opened targeting main
  • On-demand: Comment @metamaskbot update-changelogs on any non-fork PR

What it does:

  1. Detects and skips fork PRs (security)
  2. Checks out the PR head branch
  3. Runs changelog:validate --checkDeps --fix --currentPr <PR#> across all packages
  4. Commits and pushes any CHANGELOG.md fixes back to the PR branch
  5. Comments on the PR with the result

Security:

  • Fork PRs are blocked via isCrossRepository check
  • All dynamic values use environment variables (no ${{ }} in run: blocks)
  • SHA-based checkout with branch name switch for release branch detection
  • 30-minute job timeout

References

N/A

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

Medium Risk
Adds a GitHub Actions workflow with contents: write that can commit/push changes to PR branches, so misconfiguration could unintentionally modify branches. Risk is mitigated by skipping fork PRs and scoping writes to **/CHANGELOG.md.

Overview
Adds a new GitHub Actions workflow (.github/workflows/update-changelogs.yml) to automatically validate and auto-fix missing dependency bump entries in package changelogs.

The workflow triggers on newly opened release/* PRs targeting main or when a commenter requests it via @metamaskbot update-changelogs, skips fork PRs, runs yarn ... changelog:validate --checkDeps --fix --currentPr, then commits and pushes any CHANGELOG.md updates back to the PR and comments the outcome.

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

@cryptodev-2s cryptodev-2s requested a review from a team as a code owner April 13, 2026 21:20
@cryptodev-2s cryptodev-2s changed the title feat: adopt auto-changelog v6 --checkDeps for dependency bump validation feat: add Update Changelogs workflow with auto-changelog v6 --checkDeps Apr 14, 2026
- Add --checkDeps to validate-changelog.sh to catch missing dep entries
- Add --checkDeps --fix to update-changelog.sh to auto-generate dep entries
- Add fix-changelogs workflow to auto-fix changelogs on release branches
- --checkDeps/--fix are validate-only flags, revert from update-changelog.sh
- Skip --checkDeps on main branch to avoid "HEAD is same as base" error
- Workflow uses validate --checkDeps --fix with PR number for auto-fixing
Keep dependency bump validation opt-in via @metamaskbot check-deps only.
- Add missing --checkDeps flag to validate step
- Fix shell quoting bug in fork detection
- Narrow git add to **/CHANGELOG.md only
- Report validation failures in PR comment instead of swallowing them
- Use chore: prefix for automated commit message
- Add concurrency group to prevent racing on duplicate triggers
- Add if: always() to comment step so users always get feedback
- Add comment explaining branch checkout purpose
- Remove -A flag from git add (only staging tracked CHANGELOG.md files)
- Improve step name and commit message for clarity
- Add pull_request opened trigger for release/* branches targeting main
- Use github.event.issue.number || github.event.pull_request.number for both triggers
- Conditionally show reaction only for comment triggers
- Rename file from fix-changelogs.yml to update-changelogs.yml
- Update workflow name, job names, and concurrency group
- Rename bot command to @metamaskbot update-changelogs
- Add git fetch before branch checkout (shallow clone has no branch refs)
- Handle partial fix case: report remaining errors when fixes are pushed
- Handle skipped steps: detect when earlier steps fail and report accurately
- Rename job ID from fix-changelogs to update-changelogs for consistency
@cryptodev-2s cryptodev-2s force-pushed the feat/auto-changelog-check-deps branch from 772928a to f4aabbb Compare April 14, 2026 13:58
Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit f4aabbb. Configure here.

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.

2 participants