feat(web): add GitLab issues/MRs server module

Add a server-side GitLab integration mirroring the GitHub module:
- auth.js: PAT auth storage with multi-account support and configurable
  base URL (gitlab.com default, self-hosted instances supported)
- client.js: raw-fetch GitLab REST v4 client with per-request timeout,
  ETag conditional-GET cache, own rate-limit cooldown, pagination, and
  single-follow redirect handling
- repo.js: GitLab remote URL parser + directory resolution
- routes.js: read-only /api/gitlab/* routes (auth, issues, MRs, branches)
- index.js + DOCUMENTATION.md + unit tests for auth, client, repo, routes
- Wire registerGitLabRoutes into feature-routes-runtime
This commit is contained in:
2026-08-16 15:42:26 +00:00
parent b5ddb6f3a1
commit d798b3f479
11 changed files with 2609 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
export {
getGitLabAuth,
getGitLabAuthAccounts,
setGitLabAuth,
activateGitLabAuth,
clearGitLabAuth,
normalizeBaseUrl,
GITLAB_AUTH_FILE,
DEFAULT_GITLAB_BASE_URL,
} from './auth.js';
export {
createGitLabClient,
getGitLabClientOrNull,
isGitLabRateLimited,
noteGitLabRateLimit,
} from './client.js';
export {
parseGitLabRemoteUrl,
resolveGitLabRepoFromDirectory,
} from './repo.js';