Skip to content

feat: GitLab support for /retro, /ship, and /document-release (v0.11.20.0) - #508

Merged
garrytan merged 8 commits into
mainfrom
garrytan/gitlab-retro-ship
Mar 26, 2026
Merged

garrytan merged 8 commits into
mainfrom
garrytan/gitlab-retro-ship

Conversation

@garrytan

Copy link
Copy Markdown
Owner

Summary

  • GitLab support for /retro and /ship. You can now run /ship on GitLab repos — it creates merge requests via glab mr create instead of gh pr create. /retro detects default branches on both platforms. All 11 skills using BASE_BRANCH_DETECT automatically get GitHub, GitLab, and git-native fallback detection.
  • GitHub Enterprise and self-hosted GitLab detection. If the remote URL doesn't match github.com or gitlab, gstack checks gh auth status / glab auth status to detect authenticated platforms.
  • /document-release works on GitLab. After /ship creates a merge request, the auto-invoked /document-release reads and updates the MR body via glab.
  • GitLab safety gate for /land-and-deploy. Instead of silently failing on GitLab repos, stops early with a clear message.
  • Deduplicated gen-skill-docs resolvers. Merge created duplicate inline resolver functions that shadowed module versions.

Test Coverage

All new code paths have test coverage. 8 new assertions for GitLab support in gen-skill-docs.test.ts:

  • BASE_BRANCH_DETECT contains glab, git symbolic-ref, and mentions GitLab
  • Retro contains MR number extraction ([#!]) and uses BASE_BRANCH_DETECT
  • Ship contains glab mr create and .gitlab-ci.yml detection

Pre-Landing Review

Pre-Landing Review: No issues found. Review ran inline during /plan-eng-review with full adversarial (Claude subagent — 10 findings, 3 fixed in commit 2e34410).

Eval Results

No prompt-related files changed — evals skipped.

TODOS

  • Added P2 TODO: GitLab support for /land-and-deploy (deep gh pr checks, gh pr merge, merge queue semantics need separate work)

Pre-existing test failure

1 pre-existing test failure from main: ~/.claude/plans references in Codex-host ship/review SKILL.md (from plan-completion feature). Not caused by this PR.

Test plan

  • All bun tests pass (1 pre-existing failure from main)
  • gen-skill-docs regeneration clean
  • GitLab strings verified in generated SKILL.md files

🤖 Generated with Claude Code

garrytan and others added 8 commits March 26, 2026 00:19
…native)

Update the shared BASE_BRANCH_DETECT resolver to support GitHub, GitLab,
GitHub Enterprise, self-hosted GitLab, and a git-native fallback chain.
Platform detection uses remote URL matching plus CLI auth status for
custom domains. Add glab issue create alternative in test failure triage.

Add 7 new test assertions covering GitLab CLI presence, git symbolic-ref
fallback, and platform-specific output in retro and ship generated files.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Replace retro's custom gh-only default branch detection with the shared
BASE_BRANCH_DETECT resolver (DRY — same as 10 other skills). Update
PR/MR number extraction to match both GitHub #NNN and GitLab !NNN
patterns. Remove hardcoded github.com URL from the personal card footer.
Regenerate all SKILL.md files affected by the resolver update.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Ship Step 1.5 now checks .gitlab-ci.yml for release workflows alongside
GitHub Actions. Step 8 routes to glab mr create on GitLab repos with
correct flag mapping (-b, -t, -d). Falls back to manual instructions
when no CLI is available. Document-release now reads MR body via
glab mr view -F json and updates via glab mr update on GitLab repos.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Track the remaining work to support GitLab in /land-and-deploy — MR
merge, CI polling, and deploy workflow detection using glab equivalents.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
…vation

Three fixes from adversarial review:
1. land-and-deploy: add GitLab gate after Step 0 — prevents detection/
   execution mismatch where agent detects GitLab but all subsequent
   steps are GitHub-only
2. document-release: use heredoc for glab mr update body to avoid shell
   metacharacter mangling ($, backticks, !) in MR descriptions
3. retro: preserve original #/! prefix in PR/MR number extraction —
   GitLab !42 stays as !42, not incorrectly converted to #42

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
The merge from main created duplicate RESOLVERS records in gen-skill-docs.ts
(inline functions shadowing the imported module versions). Removed the inline
duplicates so the modular resolvers from scripts/resolvers/ are used.
Also added missing E2E_TIERS entries for plan-completion/verification tests.
@github-actions

Copy link
Copy Markdown
Contributor

E2E Evals: ✅ PASS

57/57 tests passed | $5.04 total cost | 12 parallel runners

Suite Result Status Cost
e2e-browse 7/7 ✅ $0.33
e2e-deploy 4/4 ✅ $0.57
e2e-design 3/3 ✅ $0.55
e2e-plan 7/7 ✅ $1.04
e2e-qa-workflow 3/3 ✅ $0.77
e2e-review 5/5 ✅ $0.88
e2e-workflow 4/4 ✅ $0.42
llm-judge 24/24 ✅ $0.48

12x ubicloud-standard-2 (Docker: pre-baked toolchain + deps) | wall clock ≈ slowest suite

@garrytan
garrytan merged commit 1bf888d into main Mar 26, 2026
18 checks passed
rapidstartup pushed a commit to rapidstartup/gstack that referenced this pull request Mar 29, 2026
…20.0) (garrytan#508)

* feat: multi-platform BASE_BRANCH_DETECT (GitHub + GitLab + GHE + git-native)

Update the shared BASE_BRANCH_DETECT resolver to support GitHub, GitLab,
GitHub Enterprise, self-hosted GitLab, and a git-native fallback chain.
Platform detection uses remote URL matching plus CLI auth status for
custom domains. Add glab issue create alternative in test failure triage.

Add 7 new test assertions covering GitLab CLI presence, git symbolic-ref
fallback, and platform-specific output in retro and ship generated files.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>

* feat: GitLab support in /retro — use shared BASE_BRANCH_DETECT resolver

Replace retro's custom gh-only default branch detection with the shared
BASE_BRANCH_DETECT resolver (DRY — same as 10 other skills). Update
PR/MR number extraction to match both GitHub #NNN and GitLab !NNN
patterns. Remove hardcoded github.com URL from the personal card footer.
Regenerate all SKILL.md files affected by the resolver update.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>

* feat: GitLab MR creation in /ship + /document-release

Ship Step 1.5 now checks .gitlab-ci.yml for release workflows alongside
GitHub Actions. Step 8 routes to glab mr create on GitLab repos with
correct flag mapping (-b, -t, -d). Falls back to manual instructions
when no CLI is available. Document-release now reads MR body via
glab mr view -F json and updates via glab mr update on GitLab repos.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>

* chore: add P2 TODO for land-and-deploy GitLab support

Track the remaining work to support GitLab in /land-and-deploy — MR
merge, CI polling, and deploy workflow detection using glab equivalents.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>

* fix: adversarial review — GitLab gate, shell safety, MR prefix preservation

Three fixes from adversarial review:
1. land-and-deploy: add GitLab gate after Step 0 — prevents detection/
   execution mismatch where agent detects GitLab but all subsequent
   steps are GitHub-only
2. document-release: use heredoc for glab mr update body to avoid shell
   metacharacter mangling ($, backticks, !) in MR descriptions
3. retro: preserve original #/! prefix in PR/MR number extraction —
   GitLab !42 stays as !42, not incorrectly converted to garrytan#42

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>

* fix: resolve merge conflicts — deduplicate gen-skill-docs resolvers

The merge from main created duplicate RESOLVERS records in gen-skill-docs.ts
(inline functions shadowing the imported module versions). Removed the inline
duplicates so the modular resolvers from scripts/resolvers/ are used.
Also added missing E2E_TIERS entries for plan-completion/verification tests.

* chore: bump version and changelog (v0.11.20.0)

Co-Authored-By: Claude Opus 4.6 <[email protected]>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <[email protected]>
mathiasmora2232 pushed a commit to mathiasmora2232/gstack that referenced this pull request May 30, 2026
…20.0) (garrytan#508)

* feat: multi-platform BASE_BRANCH_DETECT (GitHub + GitLab + GHE + git-native)

Update the shared BASE_BRANCH_DETECT resolver to support GitHub, GitLab,
GitHub Enterprise, self-hosted GitLab, and a git-native fallback chain.
Platform detection uses remote URL matching plus CLI auth status for
custom domains. Add glab issue create alternative in test failure triage.

Add 7 new test assertions covering GitLab CLI presence, git symbolic-ref
fallback, and platform-specific output in retro and ship generated files.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>

* feat: GitLab support in /retro — use shared BASE_BRANCH_DETECT resolver

Replace retro's custom gh-only default branch detection with the shared
BASE_BRANCH_DETECT resolver (DRY — same as 10 other skills). Update
PR/MR number extraction to match both GitHub #NNN and GitLab !NNN
patterns. Remove hardcoded github.com URL from the personal card footer.
Regenerate all SKILL.md files affected by the resolver update.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>

* feat: GitLab MR creation in /ship + /document-release

Ship Step 1.5 now checks .gitlab-ci.yml for release workflows alongside
GitHub Actions. Step 8 routes to glab mr create on GitLab repos with
correct flag mapping (-b, -t, -d). Falls back to manual instructions
when no CLI is available. Document-release now reads MR body via
glab mr view -F json and updates via glab mr update on GitLab repos.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>

* chore: add P2 TODO for land-and-deploy GitLab support

Track the remaining work to support GitLab in /land-and-deploy — MR
merge, CI polling, and deploy workflow detection using glab equivalents.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>

* fix: adversarial review — GitLab gate, shell safety, MR prefix preservation

Three fixes from adversarial review:
1. land-and-deploy: add GitLab gate after Step 0 — prevents detection/
   execution mismatch where agent detects GitLab but all subsequent
   steps are GitHub-only
2. document-release: use heredoc for glab mr update body to avoid shell
   metacharacter mangling ($, backticks, !) in MR descriptions
3. retro: preserve original #/! prefix in PR/MR number extraction —
   GitLab !42 stays as !42, not incorrectly converted to garrytan#42

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>

* fix: resolve merge conflicts — deduplicate gen-skill-docs resolvers

The merge from main created duplicate RESOLVERS records in gen-skill-docs.ts
(inline functions shadowing the imported module versions). Removed the inline
duplicates so the modular resolvers from scripts/resolvers/ are used.
Also added missing E2E_TIERS entries for plan-completion/verification tests.

* chore: bump version and changelog (v0.11.20.0)

Co-Authored-By: Claude Opus 4.6 <[email protected]>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <[email protected]>
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