Automated pull request analysis and review comments powered by Google Gemini AI.
1.7K
An AI-powered Pull Request reviewer for Bitbucket powered by Google Gemini. The pipe automatically analyzes pull request changes and posts review comments with suggestions related to code quality, maintainability, security, performance, and best practices.
Before using this pipe, ensure you have:
In the target repository:
Repository Settings → Pipelines → Repository Variables
Create the following variables:
| Variable | Secure | Description |
|---|---|---|
GEMINI_API_KEY | ✅ Yes | Google Gemini API Key |
BITBUCKET_EMAIL | ❌ No | Atlassian account email address |
BITBUCKET_TOKEN | ✅ Yes | Atlassian API Token |
Navigate to:
Repository Settings → Pipelines
Enable Pipelines for the repository.
Add the following configuration to trigger AI reviews for all pull requests:
pipelines:
pull-requests:
"**":
- step:
name: Run AI Code Review
script:
- pipe: docker://shubhamstr/gemini-pr-reviewer:v1.0.0
variables:
GEMINI_API_KEY: $GEMINI_API_KEY
BITBUCKET_EMAIL: $BITBUCKET_EMAIL
BITBUCKET_TOKEN: $BITBUCKET_TOKEN
Replace:
v1.0.0 with the desired image versionThe following variables can be used to customize Gemini behavior:
| Variable | Description | Default |
|---|---|---|
GEMINI_MODEL | Gemini model to use | gemini-2.5-flash |
GEMINI_MAX_TOKENS | Maximum response tokens | 8192 |
GEMINI_TEMPERATURE | Response creativity level | 0.7 |
GEMINI_MAX_RETRIES | Retry attempts for Gemini API calls | 3 |
GEMINI_FALLBACK_MODELS | Comma-separated fallback models | None |
MAX_DIFF_CHARS | Maximum diff size processed | 120000 |
REVIEW_PROMPT | Custom prompt | You are a senior software engineer. Review the following code... |
Example:
pipelines:
pull-requests:
"**":
- step:
name: Run AI Code Review
script:
- pipe: docker://shubhamstr/gemini-pr-reviewer:v1.0.0
variables:
GEMINI_API_KEY: $GEMINI_API_KEY
BITBUCKET_EMAIL: $BITBUCKET_EMAIL
BITBUCKET_TOKEN: $BITBUCKET_TOKEN
GEMINI_MODEL: "gemini-2.5-flash"
GEMINI_MAX_TOKENS: "8192"
GEMINI_TEMPERATURE: "0.7"
GEMINI_MAX_RETRIES: "3"
GEMINI_FALLBACK_MODELS: "gemini-2.5-pro,gemini-2.0-flash"
MAX_DIFF_CHARS: "120000"
REVIEW_PROMPT: 'You are a senior software engineer. Review the following code...'
The reviewer can provide:
See the project repository for license details.
Content type
Image
Digest
sha256:f1f893bf9…
Size
48.2 MB
Last updated
4 months ago
docker pull shubhamstr/gemini-pr-reviewer:v1.0.4