Repository navigation
Add GitLab code-host and tracker adapters - #120
Merged
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
tools/adapters/tracker/gitlab.sh(issues) andtools/adapters/code-host/gitlab.sh(merge requests):curl+jqagainst GitLab REST API v4, gitlab.com or self-managed. All six verbs each.GITLAB_URL(optional, default gitlab.com),GITLAB_PROJECTandGITLAB_TOKEN. The token reaches curl as aPRIVATE-TOKENheader on stdin — never argv, never a file; shims carry only URL + project.ref= iid; threads = MR discussions (reply target = discussion id);outdatedandreviewsomitted (no GitLab equivalent). Issues#NN, close/reopen state events, close tokenCloses #NN.bootstrap-cdd-project.shgains--gitlab-project/--gitlab-url;/cdd-bootstrapoffers GitLab;/cdd-retrofitproposes 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).adapter-bindings, aglpat-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:
issue-list,issue-readclosedissue-close-tokenCloses #7pr-for-branch,pr-mergedmerged,merged: truepr-commentslive-test.txt:2with its reply, a general thread, two top-level comments,viewerdefault-branchmain, with and withoutorigin/HEADUntested 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