Skip to content

Commit 76d693a

Browse files
author
parvez3019
committed
Update README
1 parent fe9547f commit 76d693a

File tree

4 files changed

+29
-17
lines changed

4 files changed

+29
-17
lines changed

README.md

Lines changed: 29 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,32 @@ Based on - https://github.com/hataiit9x/gemini-review-code
66

77
## Summary
88

9-
![](preview.png)
10-
119
`@parvez3019/ai-code-review-gitlab-plugin` It is a small tool used for code review in GitLab Merge Requests. It supports calling the GitLab API for private
1210
deployment and uses either Gemini AI API or AWS Bedrock (Claude) to obtain review results. Please note that when using it, ensure compliance with company regulations. 😉
1311

1412

13+
1514
## Features
1615

17-
- 🛠️ Support configuration GitLab API address
18-
- ⚙️ Support configuration AWS Bedrock (Claude) for code review
19-
- 📦 Support configuration AWS Bedrock custom model ID
20-
- 📦 Support configuration GitLab Project ID
21-
- 📦 Support configuration GitLab Merge Request ID
22-
- 🚀 Support running in CI/CD
23-
- 🚦 Automatically wait and try again when the rate limit is exceeded
24-
- 💬 The review results are appended to the location of the corresponding code block in the form of comments
25-
- 🔒 Secure handling of AWS credentials and GitLab tokens
26-
- 🌐 Support for AWS Bedrock Claude models
27-
- 🏷️ Easy integration with GitLab CI/CD pipelines
16+
- 🛠️ Support configuration GitLab API address.
17+
- ⚙️ Support configuration AWS Bedrock (Claude or any bedrock models) for code review.
18+
- 📦 Support configuration GitLab Project ID & Merge Request IID.
19+
- 🚀 Support running in Gitlab CI/CD Pipeline.
20+
- 🚦 Automatically wait and try again when the rate limit is exceeded.
21+
- 💬 The review results are appended to the location of the corresponding code block in the form of comments.
22+
- 🔒 Secure handling of AWS credentials and GitLab tokens.
23+
- 🏷️ Easy integration with GitLab CI/CD pipelines.
24+
- 📝 Provide Summary Sections for the changes where no feedback is required.
25+
26+
27+
### Screenshots for comments on Gitlab Merge Requests
28+
29+
Review Comment -
30+
31+
![](screenshots/screenshot-1.png)
32+
33+
Summary Comment For No Feedback Section -
34+
![](screenshots/screenshot-2.png)
2835

2936

3037
## Install
@@ -38,9 +45,9 @@ npm i @parvez3019/ai-code-review-gitlab-plugin
3845
### AWS Bedrock Configuration
3946
```bash
4047
# Required for AWS Bedrock
41-
export AWS_ACCESS_KEY_ID="your-aws-access-key"
42-
export AWS_SECRET_ACCESS_KEY="your-aws-secret-key"
4348
export AWS_REGION="us-east-1"
49+
export AWS_SECRET_ACCESS_KEY="your-aws-secret-key"
50+
export AWS_ACCESS_KEY_ID="your-aws-access-key"
4451
# Available Claude models in Bedrock:
4552
# - anthropic.claude-3-5-sonnet-20241022-v2:0
4653
export AWS_BEDROCK_MODEL="anthropic.claude-3-5-sonnet-20241022-v2:0"
@@ -87,7 +94,12 @@ code-review:
8794
image: node:20
8895
script:
8996
- npm i -g @parvez3019/ai-code-review-gitlab-plugin
90-
- ai-code-review-gitlab-plugin -t "$CODE_REVIEW_GITLAB_TOKEN" -p "$CI_MERGE_REQUEST_PROJECT_ID" -m "$CI_MERGE_REQUEST_IID" -a bedrock -k "$AWS_ACCESS_KEY_ID" -s "$AWS_SECRET_ACCESS_KEY" -r "us-east-1" -c "anthropic.claude-3-5-sonnet-20241022-v2:0"
97+
- |
98+
if [ "$AI_PROVIDER" = "bedrock" ]; then
99+
ai-code-review-gitlab-plugin -t "$CODE_REVIEW_GITLAB_TOKEN" -p "$CI_MERGE_REQUEST_PROJECT_ID" -m "$CI_MERGE_REQUEST_IID" -a $AI_PROVIDER -k "$AWS_ACCESS_KEY_ID" -s "$AWS_SECRET_ACCESS_KEY" -r "$AWS_REGION" -c "$AWS_BEDROCK_MODEL"
100+
else
101+
ai-code-review-gitlab-plugin -t "$CODE_REVIEW_GITLAB_TOKEN" -p "$CI_MERGE_REQUEST_PROJECT_ID" -m "$CI_MERGE_REQUEST_IID" -a $AI_PROVIDER -k "$GEMINI_API_KEY" -c "$GEMINI_MODEL"
102+
fi
91103
only:
92104
- merge_requests
93105
when: manual
@@ -211,7 +223,7 @@ This can be integrated into your existing workflows or automation scripts.
211223

212224
## Requirements
213225

214-
- Node.js >= 18.0.0
226+
- Node.js >= 20.0.0
215227
- GitLab account with API access
216228
- Google Cloud account (for Gemini) or AWS account (for Bedrock)
217229

preview.png

-447 KB
Binary file not shown.

screenshots/screenshot-1.png

188 KB
Loading

screenshots/screenshot-2.png

161 KB
Loading

0 commit comments

Comments
 (0)