feat: add minimal GitLab adapter with CI/CD setup#85
feat: add minimal GitLab adapter with CI/CD setup#85jaysomani wants to merge 3 commits intoutopia-php:mainfrom
Conversation
jaysomani
commented
Apr 7, 2026
- Add GitLab CE service to docker-compose with OAuth2 bootstrap
- Add GitLab adapter with createRepository, getRepository, deleteRepository
- Add GitLabTest with 4 passing tests, remaining skipped for follow-up PRs
- Fix Adapter.php body decoding bug (strpos ?: 0 -> strlen) for adapters returning plain 'application/json' without charset suffix
- All unimplemented methods throw Exception('Not implemented')
- Add GitLab CE service to docker-compose with OAuth2 bootstrap
- Add GitLab adapter with createRepository, getRepository, deleteRepository
- Add GitLabTest with 4 passing tests, remaining skipped for follow-up PRs
- Fix Adapter.php body decoding bug (strpos ?: 0 -> strlen) for adapters
returning plain 'application/json' without charset suffix
- All unimplemented methods throw Exception('Not implemented')
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Greptile SummaryThis PR introduces a minimal GitLab adapter ( The critical issue is in
Confidence Score: 3/5Not safe to merge — the bootstrap script will fail on GitLab 18.x, preventing all GitLab CI tests from running. A P0 defect in the bootstrap script means every fresh CI run will exit with 'Failed to get token', making the entire feature untestable. The PHP adapter code is sound and the Adapter.php fix is correct, but broken CI infrastructure is a blocker. docker-compose.yml requires adding Important Files Changed
Reviews (3): Last reviewed commit: "fix: suggestions2" | Re-trigger Greptile |
| if [ -z "$$TOKEN" ]; then echo "Failed to get token"; exit 1; fi | ||
| mkdir -p /gitlab-data | ||
| echo $$TOKEN > /gitlab-data/token.txt | ||
|
|
There was a problem hiding this comment.
Missing
expires_at breaks the bootstrap on GitLab 18.x
GitLab made expires_at mandatory for PAT creation starting in 17.x, and this is fully enforced in gitlab-ce:18.10.1-ce.0. Omitting it causes the API to return a 422 validation error ("Expiration date can't be blank"). Because the bootstrap script greps for "token":"..." in the error response body (which won't match), TOKEN stays empty, and the container exits with "Failed to get token" — preventing every CI pipeline from acquiring credentials and running any GitLab tests.
Add expires_at to the payload. A far-future date is fine for a test environment:
| -d '{"name":"bootstrap","scopes":["api","read_user","read_repository","write_repository"],"expires_at":"2099-01-01"}') |