更新 .gitea/workflows/code-review.yml
This commit is contained in:
@@ -6,16 +6,18 @@ on:
|
||||
jobs:
|
||||
review:
|
||||
runs-on: ubuntu-latest
|
||||
if: startsWith(github.event.comment.body, 'openai') || github.event.comment.body == 'openai'
|
||||
if: github.event.issue.pull_request && (startsWith(github.event.comment.body, 'openai') || github.event.comment.body == 'openai')
|
||||
env:
|
||||
ACTIONS_STEP_DEBUG: 'true' # 可选,便于查看调试日志
|
||||
steps:
|
||||
- name: OpenAI Code Review
|
||||
uses: ingress-it-solutions/gitea-code-review-action@v0.1
|
||||
with:
|
||||
SOURCE_AT: gitea
|
||||
GITHUB_BASE_URL: https://devstar.cn
|
||||
PROGRAMMING_LANGUAGE: auto
|
||||
GITHUB_BASE_URL: https://devstar.cn # 若有子路径/端口,请改成真实根地址
|
||||
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 }}
|
||||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} # 需为 Gitea PAT,具备对 PR/Issue 评论权限
|
||||
Reference in New Issue
Block a user