feat(forge): GitLab adapter client and core Forge methods #144
Loading…
Reference in a new issue
No description provided.
Delete branch "feature/138-gitlab-adapter-core"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Refs #138 (parent #137)
Summary
New
internal/forge/gitlabadapter: the API client plus every coreForgemethod andApprover, so a GitLab session (gitlab.com or self-managed, subgroups included) can list projects, show MRs and issues with CI state, merge, approve, comment and close. ADR 0018 records the decisions;docs/architecture.md's GitLab column is updated, every row marked unverified (no live GitLab was used; fixtures are synthesised from docs.gitlab.com). Connecting from onboarding is #141.Decisions
net/httpclient,PRIVATE-TOKEN, API root<web root>/api/v4; projects addressed by URL-encoded full path (%2Fkept on the request line).squash_option; the method is the project's own (GitLab has no per-call method), and a differentMethodisErrUnsupported.ErrRefused(GitLab's "not allowed"), not a bad token. 429 waitsRetry-After(≤ 60 s) and retries once.sha(the interface carries no confirmed head); draft MRs aren't decoded (no domain field), so a draft merge fails with GitLab's 405 reason.Test plan
make build,make test(go test -race ./..., 14/14 packages ok),make fmt-check,make vuln,make install-test,make vet-windows: pass.forgetest.RunContractagainst a stateful fake GitLab, plus unit tests for each plan item. Tests were written red-first from the acceptance criteria, then a mutation check: 100 behaviour mutations, all caught (3 hollow tests found and fixed).🤖 Generated with Claude Code