-
Notifications
You must be signed in to change notification settings - Fork 0
GitLab Support
Since 1.0, SpecGit is dual-platform: GitHub.com and self-managed GitLab CE/Free. Every behavioral claim is pinned in the committed evidence ledger docs/evidence/gitlab-19.2.md.
-
Self-managed GitLab is supported at exactly
>= 19.2.4 < 19.3.0, CE/Free tier. Known-good anchor: release tagv19.2.4-ee(commit85f4a2d9). Any other version fails closed withgitlab_version_unsupported(exit 3). The window moves only through an explicit rebaseline delivery — never silent drift. - The
-ee/-cesuffix is a release-channel marker, not semver pre-release: comparison strips the suffix, then compares thex.y.ztriple. - Version discovery uses the authenticated metadata endpoint (
glab api /metadata). -
glab floor: 1.113.0, authenticated per host (
glab auth status --hostname <host>). - GitLab.com (SaaS) is judged by capability probing, never version pinning.
The platform is declared, never guessed:
specgit init --gitlab-host git.example.com # bare hostname
specgit init --gitlab-host git.example.com:8443 # non-default portThe declaration persists to spec_git/providers.yaml (gitlab.host, optional gitlab.port) and is committed, so the team shares it. Nested-group origins (group/subgroup/project, depth 2–5, %2F-encoded separators included) are first-class. init in GitLab mode writes every platform-neutral harness asset but no GitHub Actions workflow (gitlab_harness_pending warning) — the repo carries its own .gitlab-ci.yml, whose top-level job keys are detected as required checks.
| Aspect | GitHub | GitLab |
|---|---|---|
| Evidence CLI | gh |
glab (≥ 1.113.0, per-host auth) |
| Merge request | PR | MR, drafts via Draft: title prefix |
| Checks | check runs at the PR head | pipeline jobs mapped to checks (job name = check name); allow_failure failure passes per pipeline semantics; skipped produces no check run |
| Required checks | required status checks | the verified pipeline-gate intersection (only_allow_merge_if_pipeline_succeeds); Ultimate-only status checks are never used |
| Closing references | full keyword/URL grammar | common subset — Closes #<iid> / Fixes #<iid> — valid on both platforms |
| Harness | .github/workflows/specgit-accept.yml |
your own .gitlab-ci.yml (template is future work); a read-only project access token (read_api) authenticates glab in CI |
| Failure codes |
gh_missing, gh_unauthenticated, gh_transport
|
glab_missing, glab_unauthenticated, glab_transport, plus gitlab_version_unsupported
|
-
SPECGIT_GLAB(executable path) andSPECGIT_GLAB_TIMEOUT_MS(default15000; timeout ⇒glab_transport, exit 3). - Fail-closed carries over: missing glab, unauth, out-of-range version, unreachable instance ⇒
unknown, neveraccepted. - Non-goals: no cross-platform deliveries (one delivery, one platform, one PR/MR); no token storage; no Ultimate-tier primitives, ever.
从 1.0 起 SpecGit 双平台:GitHub.com 与自建 GitLab CE/Free。所有行为声明都钉在已提交的证据台账 docs/evidence/gitlab-19.2.md 中。
-
自建 GitLab 仅在
>= 19.2.4 < 19.3.0、CE/Free 层级下受支持。 已知可用锚点:release tagv19.2.4-ee(commit85f4a2d9)。其他版本一律 fail-closed,报gitlab_version_unsupported(退出 3)。版本窗口只通过显式的 rebaseline 交付移动 —— 绝不静默漂移。 -
-ee/-ce后缀是发布渠道标记,不是 semver 预发布语义:比较时先剥离后缀,再比较x.y.z三元组。 - 版本发现走已认证的 metadata 端点(
glab api /metadata)。 -
glab 最低版本 1.113.0,按主机认证(
glab auth status --hostname <host>)。 - GitLab.com(SaaS)按能力探测判定,不做版本钉死。
平台是声明出来的,不是猜的:
specgit init --gitlab-host git.example.com # 纯主机名
specgit init --gitlab-host git.example.com:8443 # 非默认端口声明持久化到 spec_git/providers.yaml(gitlab.host,可选 gitlab.port)并提交,团队共享。嵌套组 origin(group/subgroup/project,深度 2–5,含 %2F 编码分隔符)是一等公民。GitLab 模式下 init 会写入所有平台中立的护栏资产,但不写 GitHub Actions 工作流(警告 gitlab_harness_pending)—— 仓库自带 .gitlab-ci.yml,其顶层 job key 会被检测为必需检查。
| 方面 | GitHub | GitLab |
|---|---|---|
| 证据 CLI | gh |
glab(≥ 1.113.0,按主机认证) |
| 合并请求 | PR | MR,草稿用 Draft: 标题前缀 |
| 检查 | PR head 上的 check runs | pipeline jobs 映射为检查(job 名 = 检查名);allow_failure 的失败按 pipeline 语义放行;skipped 不产生 check run |
| 必需检查 | required status checks | 已验证的 pipeline 门禁交集(only_allow_merge_if_pipeline_succeeds);永不使用 Ultimate 专属 status checks |
| 关闭引用 | 完整的关键词/URL 语法 | 公共子集 —— Closes #<iid> / Fixes #<iid> —— 两平台均有效 |
| 护栏 | .github/workflows/specgit-accept.yml |
仓库自带 .gitlab-ci.yml(模板属未来工作);CI 中用只读 project access token(read_api)认证 glab |
| 失败码 |
gh_missing、gh_unauthenticated、gh_transport
|
glab_missing、glab_unauthenticated、glab_transport,另有 gitlab_version_unsupported
|
-
SPECGIT_GLAB(可执行文件路径)和SPECGIT_GLAB_TIMEOUT_MS(默认15000;超时 ⇒glab_transport,退出 3)。 - Fail-closed 同样适用:glab 缺失、未认证、版本越界、实例不可达 ⇒
unknown,绝不accepted。 - 非目标:不跨平台交付(一次交付、一个平台、一个 PR/MR);不存储 token;永不使用 Ultimate 层级能力。