Skip to content

Add GitLab Issues as a backlog manager option#643

Open
rcfrias wants to merge 1 commit into
mattpocock:mainfrom
rcfrias:gitlab-issues-backlog-manager
Open

Add GitLab Issues as a backlog manager option#643
rcfrias wants to merge 1 commit into
mattpocock:mainfrom
rcfrias:gitlab-issues-backlog-manager

Conversation

@rcfrias
Copy link
Copy Markdown

@rcfrias rcfrias commented May 13, 2026

Summary

  • Adds a new gitlab-issues backlog manager that drives the glab CLI: sandcastle init offers it alongside GitHub Issues and Beads, the sandbox Dockerfile/Containerfile installs glab, and the scaffold writes GITLAB_TOKEN (with a commented GITLAB_HOST for self-hosted instances) into .env.example.
  • glab issue close does not accept a comment, so CLOSE_TASK_COMMAND widens from string to readonly string[] and renders as a &&-joined shell pipeline (glab issue note <ID> -m "..." && glab issue close <ID>). The GitHub and Beads entries become single-element arrays.
  • New --backlog-manager <name> flag on sandcastle init skips the interactive prompt (parallels the existing --agent / --template flags).

Design notes

  • JSON shape parity. GitHub's LIST_TASKS_COMMAND produces [{number, title, body, labels, comments}]. To keep the templates provider-agnostic, GitLab's command reshapes glab issue list -O json via jq into the same shape (number: .iid, body: .description). comments is rendered as []; agents fetch full comments via VIEW_TASK_COMMAND (glab issue view <ID> --comments).
  • Arch-aware install. The GitLab CLI install resolves the latest release at build time and downloads the matching .deb for the container architecture (amd64 / arm64), so the same Dockerfile works on both Apple Silicon and Linux hosts.
  • Label flow. cli.ts gains a glab label create branch alongside the existing gh label create one, gated on selectedBacklogManager.name. The --label Sandcastle stripping in rewritePromptFiles already handles the long-form flag, so it works for GitLab too without changes.

Test plan

  • npx vitest run src/InitService.test.ts — 161/161 pass, including 11 new tests covering registry shape, scaffold output across all 5 templates, Dockerfile install, and .env.example shape for GitLab.
  • src/cli.test.ts — added 2 tests for --backlog-manager flag (--help exposure + unknown-value error).
  • prettier --check clean on changed files; lint-staged ran on commit.
  • tsgo --noEmit — no new errors; only the pre-existing @daytona/sdk errors remain.
  • Manual sandbox build with gitlab-issues selected (not run in this PR — the CI image build will exercise it).

Changeset

.changeset/add-gitlab-backlog-manager.md (patch).

`sandcastle init` now offers GitLab Issues alongside GitHub Issues and
Beads. The new entry installs `glab` in the sandbox Dockerfile,
substitutes `glab issue ...` commands into the scaffolded prompts, and
writes a GITLAB_TOKEN (plus commented GITLAB_HOST for self-hosted) into
.env.example.

`glab issue close` does not accept a comment, so `CLOSE_TASK_COMMAND` is
widened from `string` to `readonly string[]` and rendered as a
`&&`-joined shell pipeline at substitution time. The GitHub and Beads
entries become single-element arrays.

A new `--backlog-manager <name>` flag on `sandcastle init` skips the
interactive selection.
@vercel
Copy link
Copy Markdown

vercel Bot commented May 13, 2026

@rcfrias is attempting to deploy a commit to the Matt Pocock's projects Team on Vercel.

A member of the Team first needs to authorize it.

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