Skip to content
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

Use metamaskbot to guide users in making release PRs #4119

Open
mcmire opened this issue Mar 27, 2024 · 0 comments
Open

Use metamaskbot to guide users in making release PRs #4119

mcmire opened this issue Mar 27, 2024 · 0 comments

Comments

@mcmire
Copy link
Contributor

mcmire commented Mar 27, 2024

Creating release PRs is complex and difficult:

  • There is always a risk that a change to a package is not captured in the changelog, but the risk is greater the longer that a release PR is open. Because release PRs are cut against main, it is possible for a commit to slip into main while the PR is open that does not get captured in the changelog before the PR is merged.
  • There are rules that often go missed for how versions should get bumped based on the type of changes made (for instance, if a peer dependency is bumped in a package, then the major version of that package should be bumped).
  • There are also rules that often go missed for which packages should be grouped together. For instance, if the peer dependency of a package is bumped, then that peer dependency should also be released.

We can have metamaskbot help with this process. When a release PR is opened (or perhaps even when a change to a package's package.json or CHANGELOG.md is made), post a comment that:

  • Summarizes which packages are being released, as determined by which packages have version bumps in the PR
  • Provides recommendations for which packages should be released, as determined by which packages have changed since their previous release and which packages are being included in the release.
  • Provides recommendations for missing changelog entries based on changes made since previous release.

The message might look something like:

Hello, it looks like you're trying to release:

  • @metamask/controller-utils 12.9.0 -> 12.9.1
  • @metamask/gas-fee-controller 3.1.1 -> 3.1.2
  • @metamask/transaction-controller 9.2.0 -> 9.3.0

Here are my recommendations for this release:

  • @metamask/transaction-controller: It looks like you're bumping the peer dependency on @metamask/user-operation-controller, but @metamask/user-operation-controller is not included in this release. You should include it so that consumers do not get a peer dependency warning when upgrading @metamask/transaction-controller.
  • @metamask/gas-fee-controller: It looks like you're missing a changelog entry for PR 3422. Consider including this in the release if it contains a consumer-facing change.
  • @metamask/controller-utils: It looks like one of the changelog entries is marked as BREAKING, but you haven't bumped this package by a major version. You should bump it to 13.0.0 instead.

This will ensure that releases are correct and kept in lockstep with changes to main.

We might be able to even incorporate some automation in applying changelog lint fixes, similar to how we have metamaskbot apply LavaMoat policy updates on extension.

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

No branches or pull requests

1 participant