Add option to disable automatic PR creation#83
Conversation
|
|
||
| await respondToUserInput( | ||
| 'Are you sure you want to create a pull request with these corrections?', | ||
| `Are you sure you want to ${createPR ? 'create a pull request with' : 'push and send'} these corrections?`, |
There was a problem hiding this comment.
Any ideas for better wording?
There was a problem hiding this comment.
How about:
- "Are you sure you want to create a pull request with these corrections?" if
createPRis true - "Are you sure you want to push these changes to on <repository/fork owner and name>?" if
createPRis false
There was a problem hiding this comment.
Looks great, thank you very much for the contribution!
Would you mind copying the output of node index.js --help into the "Usage" section of README.md, and adding a sentence to CHANGELOG.md describing the change (and linking to this PR and your GitHub profile if you feel like it 🙂)?
| name: 'repository', alias: 'r', typeLabel: '<username/repository or URL>', description: 'The repository to spellcheck.', | ||
| }, | ||
| { | ||
| name: 'no-pr', type: Boolean, description: 'Do not create the pull request.', |
There was a problem hiding this comment.
How about "Do not automatically create a pull request on the target repository."?
|
|
||
| await respondToUserInput( | ||
| 'Are you sure you want to create a pull request with these corrections?', | ||
| `Are you sure you want to ${createPR ? 'create a pull request with' : 'push and send'} these corrections?`, |
There was a problem hiding this comment.
How about:
- "Are you sure you want to create a pull request with these corrections?" if
createPRis true - "Are you sure you want to push these changes to on <repository/fork owner and name>?" if
createPRis false
| description: 'Create a pull request with the specified changes.', | ||
| description: createPR | ||
| ? 'Create a pull request with the specified changes.' | ||
| : `Push the changes${!quiet ? ' and open the pull request creation page' : ''}.`, |
| await git(clonePath, `push ${repoFullUrl} refs/heads/${branchName}`); | ||
|
|
||
| if (await findGithubFile('PULL_REQUEST_TEMPLATE') && !quiet) { | ||
| if (!quiet && !createPR) { |
There was a problem hiding this comment.
If the user sets the --no-pr and --quiet flags, quiet === true so a PR will be created. That's not the behaviour I would expect.
002954e to
563ccb9
Compare
|
@tbroadley - I updated the PR. Please take a look. |
|
Thanks, I'll take a look soon! Hopefully in the next 24 hours. |
90b4482 to
5853000
Compare
|
@tbroadley - Sorry for disturbing you, but is there anything I need to do? |
tbroadley
left a comment
There was a problem hiding this comment.
I'm sorry for taking so long to review this! Looks great.
Closes #79.