Skip to content

Forge-agnostic core + GitLab support (from upstream PR #5) - #3

Merged
solalbaudoincs merged 7 commits into
mainfrom
forge-agnostic
Oct 30, 2026
Merged

solalbaudoincs merged 7 commits into
mainfrom
forge-agnostic

Conversation

@solalbaudoincs

Copy link
Copy Markdown
Owner

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.

Solal Baudoin and others added 7 commits October 30, 2026 13:41
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>
@solalbaudoincs
solalbaudoincs merged commit 0a40b11 into main Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant