Skip to content

Commit d7c30d6

Browse files
committed
feat: add --yes option to git node release
This will enable us to automate release proposal creation: nodejs/security-wg#860
1 parent 9224469 commit d7c30d6

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

components/git/release.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ const releaseOptions = {
3232
startLTS: {
3333
describe: 'Mark the release as the transition from Current to LTS',
3434
type: 'boolean'
35+
},
36+
yes: {
37+
type: 'boolean',
38+
default: false,
39+
describe: 'Assume "yes" as answer to all prompts and run ' +
40+
'non-interactively.'
3541
}
3642
};
3743

@@ -66,6 +72,10 @@ function release(state, argv) {
6672
const cli = new CLI(logStream);
6773
const dir = process.cwd();
6874

75+
if (argv.yes) {
76+
cli.setAssumeYes();
77+
}
78+
6979
return runPromise(main(state, argv, cli, dir)).catch((err) => {
7080
if (cli.spinner.enabled) {
7181
cli.spinner.fail();

docs/git-node.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,8 @@ Options:
224224
--security Demarcate the new security release as a security release [boolean]
225225
--startLTS Mark the release as the transition from Current to LTS [boolean]
226226
--filterLabel Filter PR by label when preparing a security release [string]
227+
--yes Assume "yes" as answer to all prompts and run
228+
non-interactively. [boolean] [default: false]
227229
```
228230

229231
### Example
@@ -336,7 +338,7 @@ ncu-config set waitTimeMultiApproval 48
336338

337339
## `git node v8`
338340

339-
Update or patch the V8 engine.
341+
Update or patch the V8 engine.
340342
This tool will maintain a clone of the V8 repository in `~/.update-v8/v8`
341343
if it's used without `--v8-dir`.
342344

@@ -373,7 +375,7 @@ Options:
373375
### `git node v8 minor`
374376

375377
Compare current V8 version with latest upstream of the same major. Applies a
376-
patch if necessary.
378+
patch if necessary.
377379
If the `git apply` command fails, a patch file will be written in the Node.js
378380
clone directory.
379381

@@ -462,7 +464,7 @@ It will retrieve all the triaged HackerOne reports and add creates the `vulnerab
462464

463465
This command updates the `vulnerabilities.json` with target date of the security release.
464466
Example:
465-
467+
466468
```sh
467469
git node security --update-date=2023/12/31
468470
```
@@ -471,7 +473,7 @@ Example:
471473

472474
This command creates a pre-release announcement for the security release.
473475
Example:
474-
476+
475477
```sh
476478
git node security --pre-release
477479
```

0 commit comments

Comments
 (0)