Open dantewang opened 5 years ago
@dantewang That is a good use case thanks for bringing it up.
In ~/.gh.json
there is a field that we could leverage to do this: "pull_branch_name_prefix": "pr-",
.
One approach might be to add something like "pull_branch_name_prefix": "{{options.user}}-pr-",
and where we set the branch name dynamically add the user name at that point.
If you are interested the relevant code to make this change would be here: https://github.com/node-gh/gh/blob/master/lib/cmds/pull-request.js#L417
@dantewang That is a good use case thanks for bringing it up.
In
~/.gh.json
there is a field that we could leverage to do this:"pull_branch_name_prefix": "pr-",
.One approach might be to add something like
"pull_branch_name_prefix": "{{options.user}}-pr-",
and where we set the branch name dynamically add the user name at that point.If you are interested the relevant code to make this change would be here: https://github.com/node-gh/gh/blob/master/lib/cmds/pull-request.js#L417
For example, can we make
gh pr 100
fetches the PR on my repo to local branchpr-100
, whilegh pr 100 -u johndoe
fetches the PR on John Doe's repo to local branchjohn-doe-pr-100
?