Skip to content

[create-release-branch] Revise CLI to be interactive #56

Open

Description

@mcmire

Currently, create-release-branch will generate a file that you are expected to edit before re-running the tool. If you have EDITOR set or if code exists, then it will open this file for you. However, most people are using VSCode, and VSCode doesn't create a code executable by default. Therefore it would create a more friendly and inclusive experience to replace this workflow with one that's more interactive. It would present a set of changed packages and let you choose major, minor, or patch for each of the packages.

The tool could print something like this:

The create-release-branch tool has reviewed the changes since the previous release (39.0.0). Based on this analysis, there may be 3 packages that need releasing.

You now need to determine how the versions for these packages should be bumped.

To do this, you'll want to pull up the history for this repo and go through the commits that have occurred since 39.0.0 was released. For each commit, review the changes along with its summary. Take note of which files were changed and which package those files belong to. (Keep in mind that each directory in packages/ is one package, and each package may have multiple files inside.)

In the end, for each package changed, you want to know:

  • Were there any breaking changes? For instance, a public export or a method in a public class was renamed or removed entirely. If so you can stop here: we want to bump the major part of the package.
  • If no breaking changes, were there any additions to the API made? For instance, a new export was added or a new method was added to a public class. If so you can stop here: we want to bump the minor part of the package.
  • Were there any other changes made that aren't breaking changes or additions to the API? For instance, part of the logic in a file was fixed to remove a bug. If so, we want to bump the patch part of the package.

Then it would list each package and offer the user a way to select major, minor, or patch for each package — something like:

(Use arrow keys ← → ↑ ↓ to select, and Enter ↩︎ to confirm.)

+----------------------------------+-----------------------------------+
+ Name                             | Bump strategy                     |
+----------------------------------+-----------------------------------+
+ @metamask/assets-controller      | ◉ major  ○ minor  ○ patch  ○ skip |
+----------------------------------+-----------------------------------+
+ @metamask/network-controller     | ○ major  ◉ minor  ○ patch  ○ skip |
+----------------------------------+-----------------------------------+
+ @metamask/transaction-controller | ○ major  ○ minor  ◉ patch  ○ skip |
+----------------------------------+-----------------------------------+

When you pressed Enter it would spit out a confirmation screen, something like:

Based on your selection, the tool will bump the versions of the following packages and update their changelogs to match.

∙ @metamask/assets-controller      (2.0.0 → 3.0.0)
∙ @metamask/network-controller     (2.0.0 → 2.1.0)
∙ @metamask/transaction-controller (2.0.0 → 2.0.1)

Do you want to proceed? (y/n)

Activity

  1. mcmire commented on Jan 30, 2023

    @mcmire
    ContributorAuthor

    The new beta CLI for the Render PAAS looks very cool. We might consider borrowing some ideas from this tool.

    I'm sure there are other tools we could consider for inspiration as well.

  2. mcmire commented on Feb 3, 2023

    @mcmire
    ContributorAuthor
  3. changed the title [-]Revise workflow to be interactive[/-] [+]Revise CLI to be interactive[/+] on Nov 27, 2024
  4. mcmire commented on Jul 1, 2025

    @mcmire
    ContributorAuthor

    I know that we will most likely retire the CLI, but just in case we don't, the bubbletea library seems like it could be useful.

  5. changed the title [-]Revise CLI to be interactive[/-] [+][create-release-branch] Revise CLI to be interactive[/+] on Oct 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions