28 lines
922 B
YAML
28 lines
922 B
YAML
name: AI Code Review (on comment)
|
|
|
|
on:
|
|
issue_comment:
|
|
types: [created, edited]
|
|
|
|
jobs:
|
|
code-review:
|
|
runs-on: ubuntu-latest
|
|
if: github.event.issue.pull_request && (startsWith(github.event.comment.body, 'openai') || github.event.comment.body == 'openai')
|
|
|
|
steps:
|
|
|
|
- name: OpenAI Code Review
|
|
uses: sgxya/gitea-code-review-action@main
|
|
# env:
|
|
# # 可直连则删除本行;需代理则改成你的代理地址
|
|
# OPENAI_PROXY: https://aiyjg.lol
|
|
with:
|
|
SOURCE_AT: gitea
|
|
GITHUB_BASE_URL: 'https://devstar.cn'
|
|
OPENAI_BASE_URL: 'https://aiyjg.lol'
|
|
PROGRAMMING_LANGUAGE: 'JavaScript' # 避免使用 auto
|
|
FULL_REVIEW_COMMENT: openai
|
|
REVIEW_COMMENT_PREFIX: 'openai:'
|
|
MAX_CODE_LENGTH: 6000
|
|
OPENAI_TOKEN: ${{ secrets.OPENAI_TOKEN }}
|
|
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} |