Contributing¶
Thanks for helping out! Issues, ideas and pull requests are all welcome.
Development setup¶
git clone https://github.com/parvez3019/ai-code-review-gitlab-plugin.git
cd ai-code-review-gitlab-plugin
npm ci
npm test # builds with tsc, then runs node:test suites in test/
Requires Node.js 20+.
Project layout¶
| Path | What |
|---|---|
src/index.ts |
CLI entry point and review loop |
src/config.ts |
Flag / env-var resolution |
src/gitlab.ts |
GitLab API client |
src/ai-client.ts |
AICodeReviewClient interface |
src/{gemini,bedrock,anthropic,openai}.ts |
Provider implementations |
src/prompts/ |
Default prompts |
templates/ |
Reusable GitLab CI template (include: remote) |
docs/ + mkdocs.yml |
Documentation site |
Adding a provider¶
- Implement
AICodeReviewClientinsrc/<provider>.ts. Re-throw HTTP errors so thaterror.response.status === 429triggers the retry. - Add it to
PROVIDERSand the env-var mapping insrc/config.ts. - Wire it in
createAIClient()insrc/index.ts. - Add a test in
test/providers.test.js(there's a tiny fake HTTP server helper) and a page underdocs/providers/.
Docs¶
Pull requests¶
- Keep PRs focused. Add or update tests and docs alongside code.
npm testandmkdocs build --strictmust pass (CI checks both).- Add a line to
CHANGELOG.md.
Good first issues¶
Look for the good first issue label.