Cian Johnston
579daaff70
feat: add GitLab support to coderd/externalauth/gitprovider
Fixes CODAGT-146
Add GitLab support to the gitprovider package for gitsync/chatd PR
diff flows. This is a squashed stack of 3 PRs:
#25651 - refactor(coderd/externalauth): prepare gitprovider for multi-provider support
- Change gitprovider.New to return (Provider, error)
- Extract shared helpers (parseRetryAfter, checkRateLimitError,
countDiffLines, escapePathPreserveSlashes) from github.go
- Update all callers (db2sdk, exp_chats, gitsync) for new signature
- Add error logging for provider construction failures
- Thread context through provider resolution
#25652 - feat(coderd/externalauth/gitprovider): add GitLab provider
- Implement full Provider interface: FetchPullRequestStatus,
FetchPullRequestDiff, FetchBranchDiff, ResolveBranchPullRequest
- Handle nested groups, forks, and self-hosted instances
- Rate limit detection on both library and raw HTTP paths
- URL parsing/building with NormalizePullRequestURL support
- Unit tests covering error paths, URL parsing, state mapping
- Document GitLab configuration and known limitations
#25653 - test(coderd/externalauth/gitprovider): add GitLab VCR integration tests
- FetchPullRequestStatus: 4 fixtures (open, conflicts, merged, closed)
- FetchPullRequestDiff: 4 fixtures
- FetchBranchDiff: 3 fixtures (open, deleted, fork)
- ResolveBranchPullRequest: 3 fixtures
- go-vcr cassettes with sanitized GitLab API responses
2026-05-25 17:41:02 +01:00
..
2026-05-25 17:41:02 +01:00
2026-05-25 11:14:36 +02:00
2026-04-17 00:07:30 +10:00
2026-05-25 11:14:36 +02:00
2026-05-25 11:14:36 +02:00
2026-05-25 11:14:36 +02:00
2026-05-22 11:39:44 +01:00
2026-01-08 15:24:11 +04:00
2026-05-13 18:55:24 +10:00
2026-05-15 09:39:05 +02:00
2026-05-14 17:18:50 +01:00
2026-05-25 11:14:36 +02:00
2026-05-19 14:53:13 +00:00
2026-05-25 16:31:48 +02:00
2026-02-03 17:52:07 +00:00
2026-05-25 11:14:36 +02:00
2026-05-10 11:04:55 -04:00
2026-04-30 10:27:53 -07:00
2026-04-30 10:27:53 -07:00
2026-05-25 11:14:36 +02:00
2025-08-07 11:00:31 +10:00
2026-05-25 11:14:36 +02:00
2026-03-05 22:32:18 +02:00
2026-05-22 09:50:01 +02:00
2026-05-22 08:37:27 +02:00
2026-05-18 22:32:05 +01:00
2026-05-20 00:09:09 +02:00
2026-04-13 15:06:06 +02:00
2026-05-25 16:31:48 +02:00
2026-05-25 11:14:36 +02:00
2025-07-09 09:46:31 +02:00
2026-05-22 13:58:07 +01:00
2026-05-25 11:14:36 +02:00
2026-05-25 16:31:48 +02:00
2026-05-22 02:16:01 +02:00
2026-05-18 22:32:05 +01:00
2026-05-25 11:14:36 +02:00
2026-05-20 00:09:09 +02:00