Skip to content

Commit

Permalink
feat: add --yes option to git node release
Browse files Browse the repository at this point in the history
This will enable us to automate release proposal
creation: nodejs/security-wg#860
  • Loading branch information
RafaelGSS committed Nov 1, 2024
1 parent 9224469 commit d7c30d6
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
10 changes: 10 additions & 0 deletions components/git/release.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ const releaseOptions = {
startLTS: {
describe: 'Mark the release as the transition from Current to LTS',
type: 'boolean'
},
yes: {
type: 'boolean',
default: false,
describe: 'Assume "yes" as answer to all prompts and run ' +
'non-interactively.'
}
};

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

if (argv.yes) {
cli.setAssumeYes();
}

return runPromise(main(state, argv, cli, dir)).catch((err) => {
if (cli.spinner.enabled) {
cli.spinner.fail();
Expand Down
10 changes: 6 additions & 4 deletions docs/git-node.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,8 @@ Options:
--security Demarcate the new security release as a security release [boolean]
--startLTS Mark the release as the transition from Current to LTS [boolean]
--filterLabel Filter PR by label when preparing a security release [string]
--yes Assume "yes" as answer to all prompts and run
non-interactively. [boolean] [default: false]
```

### Example
Expand Down Expand Up @@ -336,7 +338,7 @@ ncu-config set waitTimeMultiApproval 48

## `git node v8`

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

Expand Down Expand Up @@ -373,7 +375,7 @@ Options:
### `git node v8 minor`

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

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

This command updates the `vulnerabilities.json` with target date of the security release.
Example:

```sh
git node security --update-date=2023/12/31
```
Expand All @@ -471,7 +473,7 @@ Example:

This command creates a pre-release announcement for the security release.
Example:

```sh
git node security --pre-release
```
Expand Down

0 comments on commit d7c30d6

Please sign in to comment.