Skip to content
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

feat: add --yes option to git node release #862

Merged
merged 5 commits into from
Nov 5, 2024
Merged
Show file tree
Hide file tree
Changes from 4 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
16 changes: 13 additions & 3 deletions components/git/release.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
describe: 'Promote new release of Node.js',
type: 'boolean'
},
releaseDate: {
describe: 'Default relase date when --prepare is used. It must be YYYY-MM-DD',
type: 'string'
},
security: {
describe: 'Demarcate the new security release as a security release',
type: 'boolean'
Expand All @@ -33,9 +37,11 @@
describe: 'Mark the release as the transition from Current to LTS',
type: 'boolean'
},
releaseDate: {
describe: 'Default relase date when --prepare is used. It must be YYYY-MM-DD',
type: 'string'
yes: {
type: 'boolean',
default: false,
describe: 'Assume "yes" as answer to all prompts and run ' +
'non-interactively.',

Check failure on line 44 in components/git/release.js

View workflow job for this annotation

GitHub Actions / Lint using ESLint

Unexpected trailing comma
RafaelGSS marked this conversation as resolved.
Show resolved Hide resolved
}
};

Expand Down Expand Up @@ -70,6 +76,10 @@
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
2 changes: 2 additions & 0 deletions docs/git-node.md
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,8 @@ Options:
--prepare Prepare a new release of Node.js [boolean]
--security Demarcate the new security release as a security release [boolean]
--startLTS Mark the release as the transition from Current to LTS [boolean]
--yes Skip all prompts and run
non-interactively. [boolean] [default: false]
RafaelGSS marked this conversation as resolved.
Show resolved Hide resolved
--filterLabel Filter PR by label when preparing a security release [string]
--releaseDate Default relase date when --prepare is used.
It must be YYYY-MM-DD [string]
Expand Down
Loading