-
Notifications
You must be signed in to change notification settings - Fork 349
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
FR: GitHub integration #4555
Comments
That sounds almost like the functionality which Phabricator's Arcanist ( |
Yeah, tbh all the integrations I can think of for GitHub would have direct analogs for other forges, and I'm questioning whether it needs anything like an explicit The gotchas making it all generic would be:
BTW I saw relevant comments in another issue about whether to support multiple remotes in the same |
Tbh, 1.5 years ago, I'd agreed with you, but I had this discussion a few times in the Discord but Martin had a good point here, which changed my opinion.
Imo, it is worthwhile to have the common generic implementation in the
Agreed, as there is no canonical main repository without user intervention. |
I think there's two concerns here: sharing code, and the UX. If the features are similar, there's no reason they couldn't share code. But I think there are UX benefits to forge specific names: it's a very clear indicator of support of your particular forge, it's easy to find, and there will always be some features that are specific to some forges that could get awkward otherwise. Then again, I'm also speaking of "forges" as maybe a bit broader of a topic than they are. Is Gerrit a forge? It's really just a code review tool. What about sourcehut? It supports many features that github/gitlab/bitbucket do, but also has things they don't, like real time chat, and uses mailing lists instead of PRs/changesets. |
The discussion in this thread regards forges in general, so I continued the discussion here: #485 (comment) |
Excellent, thanks for pointing me toward the context! So IIUC there's no concern if I send a PR to implement e.g. a |
There never was, although I'd prefer to keep it under |
Thanks!
What would that affect? You're saying |
Names bring user expectations which could imply some false dependency on the |
FWIW, we already have |
Using a full service name is the safest option, if somebody wants a shorter name, they should create an alias. |
AFAICT the logistics for this would be something like...
For 2, octorust has instructions for authenticating and I created https://github.com/apps/jujutsu-vcs but I don't really know what I'm doing on permissions and key security. If anyone wants me to transfer that (or delete it so they can recreate fresh), LMK. Alternatively it could just shell out to a separately-installed gh cli, which would be less "self-contained" but I believe would avoid some of the security complexities and allow seamlessly reusing existing tokens a user may have already set up with gh cli. |
FWIW I shelled out to Whatever solution should probably also handle Enterprise GitHub + single-sign-on as well (which I assume |
Yep, looks like From what I can tell, all the gh commands do have mechanisms to hard-code the repo/branch/etc to target, although they seem to vary a bit per command and might be a little brittle:
where I believe Those Maybe someday particular extensions like |
The commands I would find most useful would be for:
|
True. I'd assumed stacks and sync would be managed via separate forge-independent commands, but I guess anything touching PRs you'd imagine under |
While I would've preferred to build our own thing, @arxanas point still stands that we'll never get to the point of being a first-class user to GitHub, which For other providers (#485), we hopefully should be able to have a first-class experience built-in. I think the option to use a stacked workflow or the normal GitHub branch-like thing would also be good to have in the initial version. |
For creating/updating a stack of PRs, what you can't do in a forge-agnostic way is to set the base branch, so we'd need that to be under For fetching, the only thing I was thinking of that might help if it had GithHub-awareness is so you can specify a PR number instead of a ref. |
Note that there’s two options for fetching GitHub PRs, the HEAD commit ( I would love a stacked PR solution that lets you choose which commits go into which PRs rather than making every PR a single commit, but there might not be many people who want that. |
Yep, that's exactly what "topics" will accomplish, isn't it? Each topic would generally map 1:1 with a PR? |
Probably! I don’t really fully understand topics except that they will solve everything and make life perfect forever, so that sounds plausible. |
Yes, if the topic strictly maps to a topological branch (which then translates into a Git branch). Although having the option to not strictly enforce that they must not overlap would still be nice, since it allows a multi-head approach to sending a PR. |
[topic: topics] To expand on this (seems relevant to GitHub interop), a "topic" for our purposes is some subset of commits. A branch, and therefore pull request, can only be inferred if that set has a single head. (You can make the conditions more restrictive as desired.) [topic: commit message tagging] I've seen many people establish topics/branches by convention in the commit message specifically for tooling purposes.
[topic: git-branchless design] git-branchless implicitly addresses this in its GitHub forge at present by only creating branches for the commits in the provided revset.
|
If anyone starts to implement stacked PRs for the GitHub forge, here's my report on relevant issues to consider: arxanas/git-branchless#1259 |
And still seems like topics will take some time yet to implement, so initial GH integration might not include any of that in its scope. I expected for now to create a PR from a bookmark name and then include all commits from base to that bookmark in the PR, same as the gh tool does. |
That sounds good to me, fwiw. (I can't speak for others, of course.) |
Should have some forge integrations for GitHub remotes (avoiding the need to rely on https://cli.github.com/ and colocated git repos).
Some possible use cases could be:
issues
or code (browse
) related to the current repo and its stateThe text was updated successfully, but these errors were encountered: