update
All checks were successful
Enterprise AI Code Review / ai-review (pull_request) Successful in 32s
All checks were successful
Enterprise AI Code Review / ai-review (pull_request) Successful in 32s
This commit is contained in:
@@ -28,9 +28,9 @@ Handles issue triage, classification, and interaction.
|
||||
|
||||
| Command | Description |
|
||||
|---------|-------------|
|
||||
| `@ai-bot summarize` | Generate concise summary |
|
||||
| `@ai-bot explain` | Detailed explanation |
|
||||
| `@ai-bot suggest` | Solution suggestions |
|
||||
| `@codebot summarize` | Generate concise summary |
|
||||
| `@codebot explain` | Detailed explanation |
|
||||
| `@codebot suggest` | Solution suggestions |
|
||||
|
||||
### Output
|
||||
|
||||
@@ -127,7 +127,7 @@ Repository-wide quality and health analysis.
|
||||
|
||||
- `schedule` - Cron schedule (default: weekly)
|
||||
- `workflow_dispatch` - Manual trigger
|
||||
- `@ai-bot codebase` - Comment command
|
||||
- `@codebot codebase` - Comment command
|
||||
|
||||
### Features
|
||||
|
||||
@@ -184,13 +184,13 @@ Missing docstrings in 15 functions.
|
||||
|
||||
---
|
||||
|
||||
## Chat Agent (Bartender)
|
||||
## Chat Agent (Interactive Chat Agent)
|
||||
|
||||
Interactive AI chat assistant with tool-calling capabilities.
|
||||
|
||||
### Triggers
|
||||
|
||||
- `issue_comment.created` - Any @ai-bot mention that isn't a specific command
|
||||
- `issue_comment.created` - Any @codebot mention that isn't a specific command
|
||||
- `chat` - Direct CLI invocation
|
||||
|
||||
### Features
|
||||
@@ -219,7 +219,7 @@ The Chat Agent uses LLM function calling to gather information before responding
|
||||
agents:
|
||||
chat:
|
||||
enabled: true
|
||||
name: "Bartender"
|
||||
name: "CodeBot"
|
||||
max_iterations: 5
|
||||
tools:
|
||||
- search_codebase
|
||||
@@ -241,9 +241,9 @@ python main.py chat owner/repo "Explain this bug" --issue 123
|
||||
### Issue Comment Usage
|
||||
|
||||
```
|
||||
@ai-bot How do I configure rate limiting?
|
||||
@ai-bot Find all files that handle user authentication
|
||||
@ai-bot What does the dispatcher module do?
|
||||
@codebot How do I configure rate limiting?
|
||||
@codebot Find all files that handle user authentication
|
||||
@codebot What does the dispatcher module do?
|
||||
```
|
||||
|
||||
### Output
|
||||
|
||||
@@ -67,13 +67,13 @@ agents:
|
||||
schedule: "0 0 * * 0" # Cron schedule (weekly)
|
||||
```
|
||||
|
||||
### Chat Agent (Bartender)
|
||||
### Chat Agent (Interactive Chat Agent)
|
||||
|
||||
```yaml
|
||||
agents:
|
||||
chat:
|
||||
enabled: true
|
||||
name: "Bartender" # Display name for the bot
|
||||
name: "CodeBot" # Display name for the bot
|
||||
max_iterations: 5 # Max tool calls per chat
|
||||
tools:
|
||||
- search_codebase # Search repository files
|
||||
@@ -103,7 +103,7 @@ interaction:
|
||||
```
|
||||
|
||||
**Example bot names:**
|
||||
- `@ai-bot` - Default, generic
|
||||
- `@codebot` - Default, generic
|
||||
- `@bartender` - Friendly, conversational
|
||||
- `@uni` - Short, quick to type
|
||||
- `@joey` - Personal assistant
|
||||
@@ -112,7 +112,7 @@ interaction:
|
||||
```yaml
|
||||
interaction:
|
||||
respond_to_mentions: true
|
||||
mention_prefix: "@ai-bot"
|
||||
mention_prefix: "@codebot"
|
||||
commands:
|
||||
- explain # Explain code/issue
|
||||
- suggest # Suggest solutions
|
||||
|
||||
@@ -51,7 +51,7 @@ mkdir -p .gitea/workflows
|
||||
| File | Trigger | Purpose |
|
||||
|------|---------|---------|
|
||||
| `enterprise-ai-review.yml` | PR opened/updated | Run AI code review |
|
||||
| `ai-issue-review.yml` | Issue opened, @ai-bot | Triage issues & respond to commands |
|
||||
| `ai-issue-review.yml` | Issue opened, @codebot | Triage issues & respond to commands |
|
||||
| `ai-codebase-review.yml` | Weekly/manual | Analyze codebase health |
|
||||
|
||||
---
|
||||
@@ -89,8 +89,8 @@ Create these labels in your repository for auto-labeling:
|
||||
1. Create a new issue
|
||||
2. The AI should automatically triage and comment
|
||||
|
||||
### Test @ai-bot Commands:
|
||||
1. On any issue, comment: `@ai-bot summarize`
|
||||
### Test @codebot Commands:
|
||||
1. On any issue, comment: `@codebot summarize`
|
||||
2. The AI should respond with a summary
|
||||
|
||||
---
|
||||
@@ -126,8 +126,8 @@ python main.py pr owner/repo 123
|
||||
# Triage a new issue
|
||||
python main.py issue owner/repo 456
|
||||
|
||||
# Handle @ai-bot command in comment
|
||||
python main.py comment owner/repo 456 "@ai-bot summarize"
|
||||
# Handle @codebot command in comment
|
||||
python main.py comment owner/repo 456 "@codebot summarize"
|
||||
|
||||
# Analyze codebase
|
||||
python main.py codebase owner/repo
|
||||
|
||||
@@ -140,7 +140,7 @@ env:
|
||||
2. Verify token has `issue:write` permission
|
||||
3. Check workflow logs for API errors
|
||||
|
||||
### @ai-bot edits the issue instead of replying
|
||||
### @codebot edits the issue instead of replying
|
||||
|
||||
**Causes:**
|
||||
- Workflow is using the wrong CLI command for comments
|
||||
@@ -149,7 +149,7 @@ env:
|
||||
**Solutions:**
|
||||
1. Ensure your workflow uses the `comment` command for mentions:
|
||||
```yaml
|
||||
python main.py comment owner/repo 123 "@ai-bot ..."
|
||||
python main.py comment owner/repo 123 "@codebot ..."
|
||||
```
|
||||
2. Verify you have separate jobs for `issues` vs `issue_comment` events (see [Workflows](workflows.md))
|
||||
|
||||
|
||||
@@ -1,21 +1,23 @@
|
||||
# Workflows
|
||||
|
||||
This document provides ready-to-use workflow files for integrating AI code review into your repositories. Workflows are provided for both **GitHub Actions** and **Gitea Actions**.
|
||||
This document provides ready-to-use workflow files for integrating AI code review into your Gitea repositories.
|
||||
|
||||
---
|
||||
|
||||
## Platform Comparison
|
||||
## Gitea Workflows Overview
|
||||
|
||||
| Feature | GitHub | Gitea |
|
||||
|---------|--------|-------|
|
||||
| Context variable | `github.*` | `gitea.*` |
|
||||
| Default token | `GITHUB_TOKEN` | `AI_REVIEW_TOKEN` (custom) |
|
||||
| API URL | `https://api.github.com` | Your Gitea instance URL |
|
||||
| Tools location | Same repo (`tools/ai-review`) | Checkout from central repo |
|
||||
| Feature | Configuration |
|
||||
|---------|--------------|
|
||||
| Context variable | `gitea.*` |
|
||||
| Token | `AI_REVIEW_TOKEN` (custom secret) |
|
||||
| API URL | Your Gitea instance URL (e.g., `https://git.example.com/api/v1`) |
|
||||
| Tools location | Checkout from central OpenRabbit repo |
|
||||
|
||||
All workflows are located in `.gitea/workflows/` directory.
|
||||
|
||||
---
|
||||
|
||||
## GitHub Workflows
|
||||
## Gitea Workflows
|
||||
|
||||
### PR Review Workflow
|
||||
|
||||
@@ -99,7 +101,7 @@ on:
|
||||
jobs:
|
||||
ai-reply:
|
||||
runs-on: ubuntu-latest
|
||||
if: contains(github.event.comment.body, '@ai-bot')
|
||||
if: contains(github.event.comment.body, '@codebot')
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
@@ -256,7 +258,7 @@ on:
|
||||
jobs:
|
||||
ai-reply:
|
||||
runs-on: ubuntu-latest
|
||||
if: contains(github.event.comment.body, '@ai-bot')
|
||||
if: contains(github.event.comment.body, '@codebot')
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
@@ -377,13 +379,13 @@ AI_REVIEW_API_URL: https://your-gitea.example.com/api/v1
|
||||
|
||||
## Chat/Bartender Workflow
|
||||
|
||||
Both platforms support the Bartender chat agent through the comment reply workflow. When `@ai-bot` is mentioned with a question (not a specific command like `summarize`), the Chat Agent handles it with tool calling capabilities.
|
||||
Both platforms support the Bartender chat agent through the comment reply workflow. When `@codebot` is mentioned with a question (not a specific command like `summarize`), the Chat Agent handles it with tool calling capabilities.
|
||||
|
||||
To enable web search, set the `SEARXNG_URL` secret to your SearXNG instance URL.
|
||||
|
||||
**Example usage:**
|
||||
```
|
||||
@ai-bot How do I configure rate limiting?
|
||||
@ai-bot Find all authentication-related files
|
||||
@ai-bot What does the dispatcher module do?
|
||||
@codebot How do I configure rate limiting?
|
||||
@codebot Find all authentication-related files
|
||||
@codebot What does the dispatcher module do?
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user