Conversation
mvbattan
left a comment
There was a problem hiding this comment.
git command may fail due missing credentials (e.g. a SSH key), connectivity, etc.
I'd like to define the behavior of this generator while encountering a failure.
| command: [ | ||
| 'git', | ||
| ['push', 'origin', 'master'], | ||
| { cwd: `${process.cwd()}/${this.projectName}` } |
There was a problem hiding this comment.
I'd extract this command as a function that receives the branch name
wfolini
left a comment
There was a problem hiding this comment.
Excellent!
I'd add another change also. The problem is when you create the branch kickoff. If you create this branch setting the remote url without clone the repo, you cant create the pull request because will not find matches between branches. The solution is change this piece of code...
command: [
'git',
['remote', 'add', 'origin', repoUrl],
{ cwd: `${process.cwd()}/${this.projectName}` }
]
Change it to a command that clones the repository instead of that command
| { | ||
| type: 'confirm', | ||
| name: 'pushToMaster', | ||
| message: 'Do you want to push to master?' |
There was a problem hiding this comment.
Instead of asking: push to master? I'd change this to ask which branch do you want to use? and use master as default value.
That way the branch to use is customizable and we dont need if (!pushToMaster) {
|
@ignaciosantise ? Whats up? |
Summary
Added option to push to
kickoffbranch, instead ofmaster. This is useful in cases when the user doesnt have permissions to push directly tomasterScreenshot