@kiro-paradigm/code-review-pipeline
v0.2.0
Published
Automated AI code review for GitLab CI pipelines. Uses Bedrock Claude + MCP tools to review merge requests on every push.
Maintainers
Readme
Code Review Pipeline
Automated AI code review for GitLab CI pipelines. Runs on every merge request event (open + push) and posts review findings directly on the MR.
How It Works
- Triggered by GitLab CI on
merge_request_event - Auto-discovers environment from CI variables (no configuration needed)
- Spawns MCP servers from
@kiro-paradigm/code-reviewfor git + GitLab API access - Bedrock Claude analyzes the diff in full context
- Posts findings as draft notes, then publishes with a verdict (approve / request changes)
Setup
1. Add to .gitlab-ci.yml
code-review:
stage: review
image: node:20
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
script:
- npx @kiro-paradigm/code-review-pipeline2. Configure CI/CD Variables
| Variable | Required | Description |
|----------|----------|-------------|
| CODE_REVIEW_TOKEN | Yes | GitLab PAT with api scope (for posting review comments) |
| AWS_ACCESS_KEY_ID | Yes | AWS credentials for Bedrock |
| AWS_SECRET_ACCESS_KEY | Yes | AWS credentials for Bedrock |
| AWS_REGION | No | Defaults to us-east-1 |
| BEDROCK_MODEL_ID | No | Defaults to anthropic.claude-sonnet-4-20250514-v1:0. Use region-prefixed IDs for cross-region inference (e.g. eu.anthropic.claude-sonnet-4-20250514-v1:0) |
3. That's It
No per-project configuration needed. The pipeline auto-discovers:
- GitLab URL from
CI_SERVER_URL - Project path from
CI_PROJECT_PATH - MR number from
CI_MERGE_REQUEST_IID - Branches from
CI_MERGE_REQUEST_SOURCE/TARGET_BRANCH_NAME
Architecture
┌─────────────────────────────────────────────┐
│ GitLab CI Job (merge_request_event) │
├─────────────────────────────────────────────┤
│ │
│ ┌─────────────┐ ┌──────────────────┐ │
│ │ CI Env Auto │───▶│ Review Agent │ │
│ │ Discovery │ │ (Bedrock Claude) │ │
│ └─────────────┘ └────────┬─────────┘ │
│ │ tool calls │
│ ┌─────────┼─────────┐ │
│ ▼ ▼ ▼ │
│ ┌────────┐ ┌───────┐ ┌─────┐ │
│ │git MCP │ │gitlab │ │gen. │ │
│ │server │ │MCP │ │MCP │ │
│ └────────┘ └───────┘ └─────┘ │
│ │ │ │
│ ▼ ▼ │
│ git CLI GitLab REST API │
└─────────────────────────────────────────────┘Development
npm install
npm run buildLicense
MIT
