You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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.
The text was updated successfully, but these errors were encountered:
mcmire
changed the title
Detect whether user is already on release branch from current branch name
Use current branch name instead of computed branch name to detect whether user is already on release branch
Mar 1, 2024
mcmire
changed the title
Use current branch name instead of computed branch name to detect whether user is already on release branch
Recreating a release branch is difficult
Nov 20, 2024
mcmire
changed the title
Recreating a release branch is difficult
Recreating a release branch under a new name is impossible
Dec 4, 2024
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:
create-release-branch/src/workflow-operations.ts
Lines 38 to 42 in b8bffc5
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.The text was updated successfully, but these errors were encountered: