Skip to content

Commit 37604ef

Browse files
authored
fix(git-node): promoting a release using only PR number (#1028)
Using the full URL should be preferred as that's the path to the least surprise, but passing only PR number should not error.
1 parent d6ab4fc commit 37604ef

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

components/git/release.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ export function builder(yargs) {
8787
'Prepare a new security release of Node.js with auto-determined version')
8888
.example('git node release --prepare --newVersion=1.2.3',
8989
'Prepare a new release of Node.js tagged v1.2.3')
90-
.example('git node release --promote 12345',
91-
'Promote a prepared release of Node.js with PR #12345')
90+
.example('git node release --promote https://github.com/nodejs/node/pull/12345 https://github.com/nodejs/node/pull/54321',
91+
'Promote two prepared releases of Node.js with PR #12345 and #54321')
9292
.example('git node --prepare --startLTS',
9393
'Prepare the first LTS release');
9494
}
@@ -182,7 +182,11 @@ async function main(state, argv, cli, dir) {
182182
console.info(`E.g. --fetch-from=git@github.com:${owner}/${repo}.git`);
183183
throw new Error('You need to tell what remote use to fetch security release proposal.');
184184
}
185-
releases.push(await release.preparePromotion({ owner, repo, prid: Number(prid) }));
185+
releases.push(await release.preparePromotion({
186+
owner: owner ?? release.owner,
187+
repo: repo ?? release.repo,
188+
prid: Number(prid)
189+
}));
186190
}
187191
return release.promote(releases);
188192
}

0 commit comments

Comments
 (0)