Repository navigation
Description
Status: the refactor this proposed is now up as PR #5 (no behavior change, forge descriptor + capability flags). The GitLab sibling is tracked in #6. The original proposal, for the record:
I'd like to add GitLab support, as a sibling plugin (herdr-gitlab) rather than a fork, and this issue is to agree on the design before any code. I'm happy to do the work.
What's already there
The architecture is a good part of the way: the source interface (source.go) already isolates where PRs come from — GitHub or the built-in demo (demo.go is a second implementation in ~400 lines) — and the TUI, worktree handling and labels consume it without caring about the forge.
What leaks GitHub outside github.go
repos.go— remote matching assumes github.com / GHE hostsworktree.go—refs/pull/N/headfor fork PRs, the push-back-to-fork flowlabels.go/agents.go— parsinggithub.com/owner/repo/pull/NURLs out of Claude Code transcriptsmain.go/ auth —gh auth tokenas the only sign-in path
Proposed design
- A forge descriptor next to the
sourceinterface: URL patterns for PR links, ref namespaces, known hosts / remote matching, auth method, merge-method vocabulary. The files above read from the descriptor instead of GitHub constants. For GitLab:glab auth token, fork MR heads viarefs/merge-requests/N/head, the same transcript-parsing with GitLab URL patterns. - Capability flags on the source, generalizing what the demo already implicitly lacks: the TUI hides a tab or key when a forge can't do it. GitLab covers most of the surface (draft =
Draft:title prefix, auto-merge =merge_when_pipeline_succeeds, squash / remove_source_branch, pinned-sha merge). The one real gap: GitLab has noreview-requested:@meequivalent — the Review requested tab would be dropped or remapped for that forge.
For the tabs where GitLab's REST API is simpler than GraphQL search (Mine → GET /merge_requests?scope=created_by_me&state=opened), the GitLab source implements them directly.
Why a sibling plugin, not a fork
The plugin family already shares conventions across repos (look.go kept identical between herdr-github / herdr-linear / herdr-recap). A herdr-gitlab built on the same agnostic core would follow that pattern and multiply the plugin family's reach to GitLab users. Concretely: either a small shared module for the forge-agnostic parts, or whatever structure you prefer — this issue is the place to decide that.
Scope
- No behavior change for GitHub users; the demo keeps working as a third
sourceimplementation. - No new runtime dependencies.
- The GitLab implementation itself comes as a follow-up once the shape here is agreed.
PR #5 implements points 1 and 2 with zero GitHub behavior change (byte-identical wording, 165/165 tests including new ones for the descriptor and the capability gating). Happy to adjust whatever you'd rather see structured differently.
Activity
solalbaudoincs commentedon Oct 30, 2026
Closing — wrong order of operations on our side, will redo properly.
[-]Proposal: make the plugin forge-agnostic (toward a GitLab sibling)[/-][+]Withdrawn proposal[/+][-]Withdrawn proposal[/-][+]Proposal: make the plugin forge-agnostic (toward a GitLab sibling)[/+]mrolafsson commentedon Nov 4, 2026
Closing as you mentioned. #5 and #6 carry this on. Thanks!