vermiculus / magithub

**DEPRECATED - please use Forge instead!** -- Magit-based interfaces to GitHub
GNU General Public License v3.0
579 stars 62 forks source link

Don't ask if only one remote option is available #348

Closed necaris closed 5 years ago

necaris commented 6 years ago

When only one remote repo is defined (e.g. my situation with work repos, where I am directly submitting to origin) it seems superfluous to confirm the remote every time I submit a PR. So this adds a function to auto-select the remote if it's the only one, when submitting a PR. There is also a custom option to turn on / off this behavior.

tarsius commented 5 years ago

I would just do it without even adding an option.

necaris commented 5 years ago

@tarsius removed the option in https://github.com/vermiculus/magithub/pull/348/commits/59b7e50f11e066dc0b40ad7ddc6ba48baa44ab9e :smile:

vermiculus commented 5 years ago

Thanks for doing this 👍 One comment -- what's the real difference between -read-repo and -select-repo? Shouldn't the latter be an option of the former? I'm not sure I'd search for 'select' when I want to read from the minibuffer.

necaris commented 5 years ago

That's fair, I'll change that behavior :-)

necaris commented 5 years ago

Updated in https://github.com/vermiculus/magithub/pull/348/commits/6a2fc83565cec3045c1af79c8bebdb1e2d243792

vermiculus commented 5 years ago

Changes look good! Can you squash the commits? I'll merge after that.

In an interactive rebase, I would do the following:

pick   Allow a repo to be automatically selected if it's the only option
squash Refactor `magithub-select-repo` into an option to `magithub-read-repo`
squash Remove option
pick   Use this new function when submitting a PR
necaris commented 5 years ago

Apologies, I fat-fingered it and squashed it all into one commit. Is that OK or should I split it out again?

vermiculus commented 5 years ago

No worries, not super important 😄 Thanks!