Repository navigation
Conversation
… teardown A project whose remote is a GitLab instance registers forge=gitlab, and every forge-facing path then speaks merge requests: the registry accepts the binding, briefs name glab-axi (with gh-axi kept for secondary sync work), a direct-PR worker opens its own merge request with a ready-not- draft check, fm-pr-check arms a merge watch with the MR head recorded from the one JSON view (requiring jq) and refuses a draft, fm-review-diff fetches refs/merge-requests/<iid>/head freshly so review follows fix rounds, fm-pr-merge verifies open/mergeable/green at the live head and merges with squash by default and --auto-merge=false, teardown proves landed work through the MR ref with the same containment proof as the GitHub path, and the backlog records a merge request URL as a labeled note wherever tasks-axi cannot type it as a pr link. Reads fall back to glab-axi on hosts without plain glab, reading GitLab's native states including opened and locked. Composes with the Forgejo forge support: the closed forge set is gerrit, gitlab, forgejo.
|
Speaking as Kun's firstmate: thank you @gh0stwin — a real I reviewed tip Contract-class: opt-in. Unconfigured homes stay on forge=none. VISION.md: one-interface / authority / scripts / restart / spine / vendor / scope: align (explicit captain binding; scripts own forge mechanics; GitLab is another forge family beside gerrit/forgejo, not a vendor lock-in). Still waiting on you:
Main is red on unrelated Pi type drift, so even when this clears there will be no merge until main is green. When attestation MATCH, live ok, and CI green → auto-merge (opt-in). |
|
Re-raised through the no-mistakes pipeline as #7243 - it carries this PR's full diff plus the review rulings applied (no forced squash default on GitLab, glab-axi for the forge=gitlab no-mistakes draft readback, jq-optional arm matching the GitHub twin, restored forgejo base-branch refusal, neutralized private fixture identifiers), a matching-head_sha attestation, and the live evidence you asked for: arm/refuse-draft on a real merge request, a fresh refs/merge-requests//head review fetch over a stale recorded head, and the teardown landed-work proof, all against https://gitlab.com/gh0stwin/firstmate-gitlab-port-fixture (merge request !1 merged, !2 used for the draft/arm cycle and cleaned up). The inherited-from-main Pi lane failures are named in the new PR's description rather than fixed. Closing this one in favor of #7243. |
What this adds
Firstmate can now drive a project whose remote is a GitLab instance end to end. A project registers the explicit binding
forge=gitlab(same explicit-binding rule asforge=gerrit; nothing is inferred from host names), and every forge-facing path then speaks merge requests:bin/fm-project-mode.shacceptsforge=gitlabin the closed set (nowgerrit,gitlab,forgejo, composing with feat(bin): support Forgejo/Gitea as a forge via the tea CLI #4395);bin/fm-forge-detect.shproposesgitlabfromgitlab.comremote spellings at project-add intake.glab-axi(keepinggh-axinamed for secondary sync work such a project may still do); adirect-PRworker opens its own merge request withglab-axiincluding a ready-not-draft readback check (glab-axi mr viewmust printdraft: no); ano-mistakesrun's pull request stays the pipeline's own publish at its configured push target, so that block keeps its existing readback.fm-pr-check): arms on an MR URL, reads one JSON view (requiringjq) to refuse a draft and record the MR head aspr_head=, and never arms on a work-in-progress MR.fm-review-diff): always fetchesrefs/merge-requests/<iid>/headfreshly, so review follows fix rounds that push to the MR; a recorded head is only a fallback.fm-pr-merge): verifies open, mergeable, and a green pipeline at the live head (a recorded head that disagrees is treated as stale, never authoritative), then merges with--squashby default and--auto-merge=false, binding the merge to the verified head.GitLab merge request <url>) on close, retain, and retained-artifact paths.glab: falls back toglab-axi, reading GitLab's native states includingopenedandlocked(native spellingopened, not the GitHub twin'sopen;lockedpasses through as a readable non-merged state). An unknown state stays unreadable rather than guessed.Design notes
-R <host>/<path>) is used throughout, never a configured default host.Testing
glab-axistate matrix for the fallback (merged, opened, locked, closed, unknown-state refusal).opened-state gap the new fallback tests pin) are folded into this PR.