Skip to content

Commit

Permalink
Address CR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
greglockwood committed Jan 18, 2021
1 parent 75c74f3 commit 03746e4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 12 deletions.
13 changes: 5 additions & 8 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ async function main() {
}

const defaultBase = getConfigOption(ymlConfig, 'prs.main-branch-name') || DEFAULT_BASE_BRANCH;
const draftByDefault = getConfigOption(ymlConfig, 'prs.draft-by-default');
const draftByDefault = !!getConfigOption(ymlConfig, 'prs.draft-by-default');

program
.version(package.version)
Expand All @@ -228,13 +228,10 @@ async function main() {
.option('-f, --force', 'Force push to remote')
.option('--push-merged', 'Push all branches (including those that have already been merged into the base branch)')
.option('--remote <remote>', 'Set remote to push to. Defaults to "origin"')
.option('-b, --base <base>', `Specify the base branch to use for the first and combined PRs.`, defaultBase);
if (draftByDefault) {
program.option('--no-draft', 'Do not create PRs in draft mode (override default)');
} else {
program.option('-d, --draft', 'Create PRs in draft mode')
}
program.option('-c, --create-prs', 'Create GitHub PRs from your train branches');
.option('-b, --base <base>', `Specify the base branch to use for the first and combined PRs.`, defaultBase)
.option('-d, --draft', 'Create PRs in draft mode', draftByDefault)
.option('--no-draft', 'Do not create PRs in draft mode', !draftByDefault)
.option('-c, --create-prs', 'Create GitHub PRs from your train branches');

program.on('--help', () => {
console.log('');
Expand Down
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
},
"dependencies": {
"colors": "^1.2.1",
"commander": "^2.15.0",
"commander": "^3.0.2",
"figlet": "^1.2.0",
"inquirer": "^6.2.1",
"js-yaml": "^3.13.1",
Expand Down

0 comments on commit 03746e4

Please sign in to comment.