No description
- Go 98.2%
- Dockerfile 1.8%
| .woodpecker | ||
| config | ||
| forgejo | ||
| llm | ||
| modes | ||
| tools | ||
| utils | ||
| .dockerignore | ||
| .env.example | ||
| .gitignore | ||
| Dockerfile | ||
| go.mod | ||
| go.sum | ||
| LICENSE | ||
| main.go | ||
| README.md | ||
| renovate.json | ||
cicd-ai
AI-powered CI/CD assistant that reviews pull requests using an LLM.
Overview
This tool runs in your CI pipeline (Woodpecker CI), analyzes pull requests, and posts AI-generated review comments directly to Forgejo.
Features
- Automated Code Review - Analyzes PR changes and provides feedback on code quality, bugs, and improvements
- LLM Integration - Powered by any OpenAI-compatible LLM API
- Forgejo Integration - Posts review comments directly to pull requests
- Tool-Augmented AI - Uses git and file reading tools for comprehensive code analysis
Setup
Environment Variables
# LLM Configuration
LLM_API_KEY=your-api-key
LLM_BASE_URL=https://api.openai.com/v1 # or your custom endpoint
LLM_MODEL=gpt-4
# Forgejo Configuration
FORGEJO_TOKEN=your-forgejo-token
CI_FORGE_URL=https://forgejo.example.com
Woodpecker CI Configuration
steps:
- name: ai-review
image: your-cicd-ai-image
settings:
LLM_API_KEY:
from_secret: LLM_API_KEY
LLM_BASE_URL:
from_secret: LLM_BASE_URL
LLM_MODEL:
from_secret: LLM_MODEL
FORGEJO_TOKEN:
from_secret: FORGEJO_TOKEN
CI_FORGE_URL:
from_secret: CI_FORGE_URL
How It Works
- CI pipeline triggers on pull request events
- Tool reads git diff and PR metadata
- LLM agent analyzes changes using available tools
- Review comment posted to the pull request
Available Tools
git_status- Working directory statusgit_diff- Full diff of changesgit_show- Commit detailsgit_log- Commit historyread_file- Repository file contentsforgejo_get_pr- Pull request detailsforgejo_get_pr_diff- Pull request diff
Build
go build -o cicd-ai .
Docker
docker build -t cicd-ai .