Skip to content

Commit 444d0f9

Browse files
committed
fix(git-node): allow security release promotion
1 parent cce9b81 commit 444d0f9

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

components/git/release.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,10 @@ function release(state, argv) {
112112
}
113113

114114
async function main(state, argv, cli, dir) {
115-
const prID = /^(?:https:\/\/github\.com\/nodejs\/node\/pull\/)?(\d+)$/.exec(argv.prid);
115+
const prID = /^(?:https:\/\/github\.com\/nodejs(-private)?\/node\1\/pull\/)?(\d+)$/.exec(argv.prid);
116116
if (prID) {
117-
argv.prid = Number(prID[1]);
117+
if (prID[1]) argv.security = true;
118+
argv.prid = Number(prID[2]);
118119
}
119120
if (state === PREPARE) {
120121
const release = new ReleasePreparation(argv, cli, dir);

lib/promote_release.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ export default class ReleasePromotion extends Session {
1919
constructor(argv, req, cli, dir) {
2020
super(cli, dir, argv.prid);
2121
this.req = req;
22+
if (argv.security) {
23+
this.config.owner = 'nodejs-private';
24+
this.config.repo = 'node-private';
25+
}
2226
this.dryRun = !argv.run;
2327
this.isLTS = false;
2428
this.ltsCodename = '';
@@ -422,7 +426,7 @@ export default class ReleasePromotion extends Session {
422426
'-m',
423427
`Working on ${workingOnVersion}`,
424428
'-m',
425-
`PR-URL: https://github.com/nodejs/node/pull/${prid}`
429+
`PR-URL: https://github.com/${this.config.owner}/${this.config.owner}/pull/${prid}`
426430
], { ignoreFailure: false });
427431
const workingOnNewReleaseCommit = await forceRunAsync('git', ['rev-parse', 'HEAD'],
428432
{ ignoreFailure: false, captureStdout: true });

0 commit comments

Comments
 (0)