MetaMask / MetaMask/create-release-branch

Recreating a release branch under a new name is impossible

Open
#137 0 comments 0 reactions 0 assignees View on GitHub
team-core-platform
Dominant language
TypeScript
Stars
9
Forks
7
Avg merge
51m
Merged PRs (30d)
2

Description

Right now, each time the tool is run, it will generate a release branch name from the newly computed release version. If the user is on this branch already, then it won't attempt to create the branch, but will merely apply any new changes on top of it. Source: https://github.com/MetaMask/create-release-branch/blob/b8bffc55e34103649a65a5d41c4ad6448b473803/src/workflow-operations.ts#L38-L42

What if the user needs to make a second version of a release branch, however? For instance, say a release branch already exists, but it's missing a bunch of changes, and it's too late in the day to talk to the original authors, so it's easier to recreate it. In that case, we'd have to come up with a new name for this branch to be able to push the new branch.

So, say in this scenario that we run the tool to generate an initial branch. But then say that there are errors with the release spec (some packages were omitted, or whatever). We fix the errors with the release spec, but then we also rename the branch. Then we re-run the tool. However, because of the logic I explained up top, the tool won't see that we're already on a release branch and will recreate the original branch.

To fix this, the tool should just look at the current branch name; if it matches `release/*`, assume the user knows what they're doing and is already on some kind of release branch.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in src/workflow-operations.ts around lines 38-42, where the release branch name is generated and existing branches are handled. Trace how the current branch is detected and verify the behavior for a branch matching release/*; done means rerunning the tool on such a branch does not recreate the original release branch.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
cli, release
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.