first commit
This commit is contained in:
36
.github/workflows/ai-comment-reply.yml
vendored
Normal file
36
.github/workflows/ai-comment-reply.yml
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
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, '@ai-bot') # <-- Change this to your bot name
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- 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.GITHUB_TOKEN }}
|
||||
AI_REVIEW_REPO: ${{ github.repository }}
|
||||
AI_REVIEW_API_URL: https://api.github.com
|
||||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
||||
OPENROUTER_API_KEY: ${{ secrets.OPENROUTER_API_KEY }}
|
||||
OLLAMA_HOST: ${{ secrets.OLLAMA_HOST }}
|
||||
SEARXNG_URL: ${{ secrets.SEARXNG_URL }}
|
||||
run: |
|
||||
cd tools/ai-review
|
||||
python main.py comment ${{ github.repository }} ${{ github.event.issue.number }} \
|
||||
"${{ github.event.comment.body }}"
|
||||
Reference in New Issue
Block a user