Skip to content

Add GitLab code-host and tracker adapters - #120

Merged
drabaioli merged 1 commit into
mainfrom
gitlab_code_host_adapter
Oct 3, 2026
Merged

drabaioli merged 1 commit into
mainfrom
gitlab_code_host_adapter

Conversation

@drabaioli

Copy link
Copy Markdown
Owner

Summary

  • Two new standalone adapters, tools/adapters/tracker/gitlab.sh (issues) and tools/adapters/code-host/gitlab.sh (merge requests): curl + jq against GitLab REST API v4, gitlab.com or self-managed. All six verbs each.
  • Configured by GITLAB_URL (optional, default gitlab.com), GITLAB_PROJECT and GITLAB_TOKEN. The token reaches curl as a PRIVATE-TOKEN header on stdin — never argv, never a file; shims carry only URL + project.
  • Mapping: MR ref = iid; threads = MR discussions (reply target = discussion id); outdated and reviews omitted (no GitLab equivalent). Issues #NN, close/reopen state events, close token Closes #NN.
  • bootstrap-cdd-project.sh gains --gitlab-project / --gitlab-url; /cdd-bootstrap offers GitLab; /cdd-retrofit proposes it for a gitlab origin host. /cdd-pre-pr §11 now states the same-backend auto-close case for GitLab too, with its caveat (default-branch merge only, auto-close setting on).
  • Gates: GitLab binding cases in adapter-bindings, a glpat- secret pattern (mutation-tested), GitLab controls/mutations in the conformance contract, install lists. Docs and roadmap updated (both GitLab items ticked).

Live validation (gitlab.com scratch project)

The implementation session exercised all twelve verbs, an inline thread with an in-thread reply, and an issue closed by a merged MR carrying the adapter's close token. Re-checked read-only during pre-PR against what it left behind:

Check Result
issue-list, issue-read ✓ states, ids, comments (system notes dropped)
Issue closed by merged MR (#2) ✓ closed
issue-close-token ✓ Closes #7
pr-for-branch, pr-merged ✓ MR 1 merged, merged: true
pr-comments ✓ inline thread on live-test.txt:2 with its reply, a general thread, two top-level comments, viewer
default-branch ✓ main, with and without origin/HEAD
Bad token / missing issue ✓ exit 1 with "rejected the token" / 404 message

Untested offline beyond the conformance floor: the response mapping itself is verified only by the live run, as with the Jira adapter.

Test plan

  • ./scripts/ci.sh — 24/24 gates pass

🤖 Generated with Claude Code

https://claude.ai/code/session_01ErsYN411mkV7e9tLfLyx1A

Two standalone adapters, tools/adapters/{code-host,tracker}/gitlab.sh: curl +
jq against GitLab REST v4, gitlab.com or self-managed. Configured by
GITLAB_URL (optional), GITLAB_PROJECT and GITLAB_TOKEN; the token goes to
curl as a PRIVATE-TOKEN header on stdin, never argv or a file. MR ref = iid;
threads = MR discussions (reply target = discussion id); outdated and
reviews omitted. Issues: #NN, close/reopen state events, Closes #NN.

bootstrap-cdd-project.sh gains --gitlab-project / --gitlab-url; /cdd-bootstrap
offers GitLab, /cdd-retrofit proposes it for a gitlab origin host. /cdd-pre-pr
states the same-backend auto-close case for GitLab too, with its caveat.
Gates: GitLab binding cases, glpat- secret pattern, install lists.

Validated live on a gitlab.com scratch project: all twelve verbs, an inline
thread with an in-thread reply, and an issue closed by a merged MR.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01ErsYN411mkV7e9tLfLyx1A
@drabaioli
drabaioli merged commit 3198f57 into main Oct 3, 2026
1 check passed
@drabaioli
drabaioli deleted the gitlab_code_host_adapter branch October 3, 2026 16:25
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