Repository navigation
Forge-agnostic core + GitLab support (from upstream PR #5) - #3
Merged
Merged
Conversation
The GitHub specifics that lived outside github.go (PR URL parsing, fork PR head refs, clone and sign-in commands, merge-method vocabulary, host display) now sit on a forge descriptor (forge.go), with capability flags on the source interface the TUI consults to hide a tab or key a forge doesn't support. GitHub and demo behavior is unchanged; a GitLab sibling can now bring its own descriptor.
The signed-out screen, error wording, login command and toast titles now come from the forge descriptor, so a sibling forge spells its own. Tests: caps-gated UI covered (Review tab hidden, merge key hidden); TestSignedOutScreen asserts via the descriptor.
…orge cloneCmd built its Env from nothing, so a clone ran gh with no PATH, HOME or GH_TOKEN (the command's Env now starts from os.Environ, as before); and the signed-out screen and sign-in errors lost gh's exact words. Both go through the descriptor now (loginText, cliName), which renders GitHub byte-identical to main while a sibling forge can spell its own. Tests cover both.
…nfig) (#1) * feat: GitLab merge requests behind the forge descriptor A gitlabSource over GitLab's REST API (v4) maps merge requests onto the plugin's pull requests, and gitlabForge spells GitLab's URLs, fork refs, merge methods and sign-in. "forge": "gitlab" in config.json switches the plugin to it; GitHub stays the default, and the demo stays on GitHub. The descriptor now also builds the picker's source and answers the label hooks and status (newSource, api), so no call site names GitHub's client. The multi-host cursor and repo paging are shared (fanOut, pageHosts), and repo paths may nest (group/sub/project) when the forge says so. * refactor: comments and the truncation notice name the forge in use The forge's comments still spoke of GitLab as a forge to come, and the list-cap notice was built at start-up, before the config chose the forge, so it said GitHub on GitLab. --------- Co-authored-by: Solal Baudoin <solal.baudoin@macbook-air-solalbaudoin.cheetah-koi.ts.net>
loadAll fired the Review tab's load whatever the forge: with the GitLab source, which answers nothing for it, a signed-out error from that load flipped the whole popup to the signed-out screen and hid the lists. Ask only for the tabs the forge can answer. Co-authored-by: Solal Baudoin <solal.baudoin@macbook-air-solalbaudoin.cheetah-koi.ts.net>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Brings upstream PR mrolafsson#5 (forge descriptor + capability flags, zero GitHub behavior change) and the GitLab source (mrolafsson#6) into my main, plus the signed-out fix, so the plugin is usable day-to-day on GitLab. Tracked upstream: mrolafsson#4, mrolafsson#6, PR mrolafsson#5.