Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to target another repo with hub command #2338

Open
ssk101 opened this issue Nov 1, 2019 · 8 comments
Open

Ability to target another repo with hub command #2338

ssk101 opened this issue Nov 1, 2019 · 8 comments
Labels

Comments

@ssk101
Copy link

ssk101 commented Nov 1, 2019

hub issue show organization/repository#1234
hub pr show organization/repository#1234

Or something with even more brevity depending on your context/git config would be nice. Our company works across many repositories but cannot always guarantee that our assigned issues are created in the "correct" repo, because... no real excuse. However, point still stands, I think.

@mislav mislav added the feature label Nov 1, 2019
@mislav
Copy link
Owner

mislav commented Nov 1, 2019

There were feature requests floating around for a while proposing across-the-board support for overriding the repo (or specifying another git remote) for any hub command, which would then include hub issue/pr show.

It could work something like this: hub issue show -R org/repo 1234. The -R/--repo flag would ideally be supported across all commands.

Would this solve your use case?

@ssk101
Copy link
Author

ssk101 commented Nov 1, 2019

Overriding repo for any command would be ideal, yes. Thank you.

@mislav mislav changed the title Be able to target another repo with issue show / pr show Ability to target another repo with hub command Nov 1, 2019
@lersek
Copy link

lersek commented Nov 1, 2019

Today is the first day that I've tried the hub command, and the lack of an explicit remote repo specification has caught my eye immediately. For example I've got a local repository with 22 remotes, and I'd like to be able to submit pull requests to multiple / different remote repositories from that local repo.

In fact I find it a limitation that the github WebUI requires repository F to be a github-level fork of repository O in order for me to submit a pullreq to O, pointing into F. F may contain topic branches on top of O1/B1, O2/B2, O3/B3 etc, and so pull requests to all three of O1, O2, O3 should be possible to submit, all pointing to F's topic branches.

I don't understand why F has to be forked -- and forked especially on github -- from either of On. Using the webui or hub fork, repository F surely can't be forked from all of O1, O2, O3 at the same time.

In other words, I suspect (and worry) that this isn't a problem with just the hub command, but even with the data model on the github server side.

@mislav
Copy link
Owner

mislav commented Nov 1, 2019

@lersek I cannot follow what you've describe really well, but you're right that you can't open a Pull Request on GitHub from a repo that isn't a github-fork (or, at least, in the same "network" of forks), even if their git repositories technically share the same object history.

@gvela024
Copy link

@mislav are you working on this actively? I want this so bad that I may try to do it.

@mislav
Copy link
Owner

mislav commented Nov 13, 2019

@gvela024 Go right ahead! 🙏

@gvela024
Copy link

@mislav cool. Realistically, with how exciting stuff is at work right now, I probably won't finish something until by the end of the year (also given that I've never written anything in Go so yeah....). I'll let you know if I won't be able to do it.

@dwanderson-intel
Copy link

bump? 🙃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants