🔌 CI/CD integration for Gitea VCS
📖 Introduction
Manually launching and configuring the tool is quite a challenging task and requires a deep understanding of the AI service being used and the built-in operating rules. Therefore, to simplify the task, we have created pre-prepared actions for launching and updating the tool.
👤 1. User for review
For the tool to work, you need to add a user who will perform the review. Add to CODEOWNERS file for repository if you want it to be assigned automatically, or add it manually if necessary.
Use this Gitea user by default: @kodobot.
📄 2. Prepared step script for Gitea
Use the following script to integrate the Kodo tool into your Gitea actions. Add your .gitea/workflows/kodo-reviewer.yaml file with the following content
name: AI Code Reviewer Assistant for Gitea
on:
issue_comment:
types: [created]
pull_request_review_comment:
types: [created]
pull_request:
types: [opened, synchronize, reopened]
jobs:
claude-assistant:
runs-on: kodo-review
steps:
- name: Run AI Code Reviewer
uses: https://code.wynenterprise.io/kodo/reviewer@main
with:
gitea_token: ${{ secrets.CC_GITEATOKEN }}
anthropic_api_key: ${{ secrets.CC_API_KEY }}
This script will run automatically when a Pull Request is created or updated. If necessary, you can start it manually via the Gitea interface and add additional conditions required for start.
🔑 2.1. Environment variables for script
When configuring the tool, always strictly adhere to the following rules for certain environment variables:
- The
secrets.CC_GITEATOKENenvironment variable must contain a token for the user @kodobot. - The
secrets.CC_API_KEYenvironment variable must contain a token for access to AI model.
Important: All these environment variables must be created in advance by the devops team, and you use them as they are.
🤖 Kodo AI Reviewer
📚 Gitea
👩💻 Developer
🧑🔧 Tech Lead
- CI/CD Integration
- Extension of Existing Review Rules
- Overriding Review Rules
- Troubleshooting
- Configuration and Parameters
📚 Bitbucket
👩💻 Developer
🧑🔧 Tech Lead
- CI/CD Integration
- Extension of Existing Review Rules
- Overriding Review Rules
- Troubleshooting
- Configuration and Parameters