当开启 PR 的时候,将会自动获取修改点,并请求 Ollama ,让其给出分析,是否有明显漏洞以及 api key 等问题。
使用方式简单:
name: ai-reviews
on:
pull_request:
types: [opened, synchronize]
jobs:
review:
name: Review PR
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Review code
uses: kekxv/[email protected]
with:
model: 'gemma2:2b'
host: ${{ vars.OLLAMA_HOST }}
ai_token: ${{ secrets.AI_TOKEN }}
REVIEW_PULL_REQUEST: false
exclude_files: |
^.+\.md
test2\.js
相关链接 https://github.com/marketplace/actions/ai-code-reviewer-aireviewpr