-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Description
Describe the feature or problem you’d like to solve
"Base" repository resolution (in other words, the specific owner/repo remote on GitHub that should be consulted by gh for pull requests, issues, etc) is tricky and any attempt to it in an automated, clever way will inevitably fail for a nontrivial number of users. It's also a very slow process which we currently perform on almost every command.
We some open issues around this now: #317 #458 and have closed others as dupes.
This issue covers explicitly confirming which base repository the user wants to associate with a given local repository be default.
Proposed solution
This issue proposes a flow of:
# first time running in new, local repository
$ gh pr list
...Fetching repository network.
? Which remote repository would you like to query?
vilmibm/coolthing (fork)
original/coolthing (parent)
mislav/coolthing (sibling fork)
> other
? Which other remote repository would you like to query? probablycorey/coolthing
...Setting probablycorey/coolthing as default base repository.
<PR LIST>
$ gh pr list
<PR LIST>
If we see a --repo flag or detect that we're not running interactively, we will not perform this prompt.
Additional context
Mislav and I have discussed this issue at length a few times and have not come up with a better solution than prompt-on-first-use for base repository setting.
Open questions
- How should a user unset this? via
git configor a command we provide? - Should we tell them how to unset it when we set it?
- Is there value in the
otheroption as shown above? - How can the wording be improved? I'm not thrilled with my first pass.