https://github.com/quochuydev/gitlab-ai-agent
https://github.com/quochuydev/gitlab-ai-agent
Last synced: 9 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/quochuydev/gitlab-ai-agent
- Owner: quochuydev
- Created: 2025-08-12T04:33:13.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-08-28T10:21:49.000Z (10 months ago)
- Last Synced: 2025-08-28T13:09:10.731Z (10 months ago)
- Language: TypeScript
- Size: 277 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# AI Code Review Agent
Automatically reviews your code when you push and sends feedback to Slack.
## Setup
1. **Install**
```bash
npm install
```
2. **Configure Environment**
```bash
cp .env.example .env
```
Edit `.env`:
```env
GITHUB_TOKEN=your_github_token_here
GITHUB_REPO=owner/repository-name
SLACK_WEBHOOK_URL=https://hooks.slack.com/services/YOUR/SLACK/WEBHOOK
OPENAI_API_KEY=your_openai_api_key_here
PORT=3000
```
3. **Start Webhook Server**
```bash
npm run webhook
```
4. **Setup GitHub Webhook**
- Go to your GitHub repo → Settings → Webhooks
- Add webhook: `https://your-domain.com/webhook/github`
- Select "Push events"
- Set Content-Type: `application/json`
## Usage
**Automatic Mode (Recommended):**
1. Push code to any branch (not main)
2. Agent automatically reviews changes
3. Get Slack notifications with feedback
**Manual Mode:**
```bash
npm run review
```
## How it works
1. **Push Code** → GitHub sends webhook
2. **AI Reviews** → Compares branch vs main
3. **Slack Alert** → Sends issues + fixes
4. **Click "Update now"** → Go to GitHub PR