Files
openrabbit/.gitea/workflows/ai-comment-reply.yml
latte b428d0a37e
All checks were successful
Enterprise AI Code Review / ai-review (pull_request) Successful in 27s
feat: Add @codebot review-again command for manual PR re-review
- Add review-again command to trigger PR review without new commits
- Implement review comparison logic to show resolved/new/changed issues
- Update workflow to handle PR comments via dispatcher
- Add comprehensive help documentation in README and CLAUDE.md
- Show diff from previous review with resolved/new issues count
- Update PR labels based on new severity assessment
- Support re-evaluation after config changes or false positive clarification

Key features:
-  Shows diff from previous review (resolved/new/changed issues)
- 🏷️ Updates labels based on new severity
-  No need for empty commits to trigger review
- 🔧 Respects latest .ai-review.yml configuration

Closes feature request for manual PR re-review capability
2025-12-28 19:12:34 +00:00

51 lines
2.0 KiB
YAML

name: AI Comment Reply
on:
issue_comment:
types: [created]
# CUSTOMIZE YOUR BOT NAME:
# Change '@ai-bot' below to match your config.yml mention_prefix
# Examples: '@bartender', '@uni', '@joey', '@codebot'
jobs:
ai-reply:
runs-on: ubuntu-latest
if: contains(github.event.comment.body, '@codebot') # <-- Change this to your bot name
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
repository: Hiddenden/openrabbit
path: .ai-review
token: ${{ secrets.AI_REVIEW_TOKEN }}
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- run: pip install requests pyyaml
- name: Run AI Comment Response
env:
AI_REVIEW_TOKEN: ${{ secrets.AI_REVIEW_TOKEN }}
AI_REVIEW_REPO: ${{ gitea.repository }}
AI_REVIEW_API_URL: https://git.hiddenden.cafe/api/v1
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
OPENROUTER_API_KEY: ${{ secrets.OPENROUTER_API_KEY }}
OLLAMA_HOST: ${{ secrets.OLLAMA_HOST }}
run: |
cd .ai-review/tools/ai-review
# Check if this is a PR or an issue
if [ "${{ gitea.event.issue.pull_request }}" != "" ]; then
# This is a PR comment - dispatch as issue_comment event
python main.py dispatch ${{ gitea.repository }} issue_comment \
'{"action":"created","issue":${{ toJSON(gitea.event.issue) }},"comment":${{ toJSON(gitea.event.comment) }}}'
else
# This is an issue comment - use the comment command
python main.py comment ${{ gitea.repository }} ${{ gitea.event.issue.number }} \
"${{ gitea.event.comment.body }}"
fi