No description
  • Go 98.2%
  • Dockerfile 1.8%
Find a file
phil bcbfd5582f
All checks were successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/docker Pipeline was successful
ci/woodpecker/push/release Pipeline was successful
Merge pull request 'Configure Renovate' (#3) from renovate/configure into main
Reviewed-on: #3
2026-03-27 05:30:57 +01:00
.woodpecker ci/add Added CI Pipeline 2026-03-26 21:14:10 +01:00
config Added project 2026-03-26 21:03:15 +01:00
forgejo Added project 2026-03-26 21:03:15 +01:00
llm Added project 2026-03-26 21:03:15 +01:00
modes Added project 2026-03-26 21:03:15 +01:00
tools Added project 2026-03-26 21:03:15 +01:00
utils Added project 2026-03-26 21:03:15 +01:00
.dockerignore Added project 2026-03-26 21:03:15 +01:00
.env.example Added project 2026-03-26 21:03:15 +01:00
.gitignore Initial commit 2026-03-26 17:23:02 +01:00
Dockerfile Added project 2026-03-26 21:03:15 +01:00
go.mod Added project 2026-03-26 21:03:15 +01:00
go.sum Added project 2026-03-26 21:03:15 +01:00
LICENSE Initial commit 2026-03-26 17:23:02 +01:00
main.go Added project 2026-03-26 21:03:15 +01:00
README.md Added project 2026-03-26 21:03:15 +01:00
renovate.json Add renovate.json 2026-03-26 22:01:30 +00:00

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

  1. CI pipeline triggers on pull request events
  2. Tool reads git diff and PR metadata
  3. LLM agent analyzes changes using available tools
  4. Review comment posted to the pull request

Available Tools

  • git_status - Working directory status
  • git_diff - Full diff of changes
  • git_show - Commit details
  • git_log - Commit history
  • read_file - Repository file contents
  • forgejo_get_pr - Pull request details
  • forgejo_get_pr_diff - Pull request diff

Build

go build -o cicd-ai .

Docker

docker build -t cicd-ai .