Skip to content

Fix git node release --prepare update proposal workflow #882

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

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix(git-node): prepare_release resilient checkout
In `git node release --prepare` when checking out a new proposal branch
make sure it's also possible to update an already existing branch of
that same name instead of failing and terminating the automation.
  • Loading branch information
ruyadorno committed Jan 6, 2025
commit 0a14955c39f36a24c62bb68b86e706cc8838df5b
10 changes: 5 additions & 5 deletions lib/prepare_release.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@ export default class ReleasePreparation extends Session {
} = this;

// Create new proposal branch.
cli.startSpinner(`Creating new proposal branch for ${newVersion}`);
cli.startSpinner(`Switching to proposal branch for ${newVersion}`);
const proposalBranch = await this.createProposalBranch(releaseBranch);
cli.stopSpinner(`Created new proposal branch for ${newVersion}`);
cli.stopSpinner(`Switched to proposal branch for ${newVersion}`);

const success = await this.cherryPickSecurityPRs(filterLabels);
if (!success) {
Expand Down Expand Up @@ -201,9 +201,9 @@ export default class ReleasePreparation extends Session {
}

// Create new proposal branch.
cli.startSpinner(`Creating new proposal branch for ${newVersion}`);
cli.startSpinner(`Switching to proposal branch for ${newVersion}`);
await this.createProposalBranch();
cli.stopSpinner(`Created new proposal branch for ${newVersion}`);
cli.stopSpinner(`Switched to proposal branch for ${newVersion}`);

if (this.isLTSTransition) {
// For releases transitioning into LTS, fetch the new code name.
Expand Down Expand Up @@ -535,7 +535,7 @@ export default class ReleasePreparation extends Session {

await runAsync('git', [
'checkout',
'-b',
'-B',
proposalBranch,
base
]);
Expand Down
Loading