更新 .gitea/workflows/code-review.yml
This commit is contained in:
@@ -1,17 +0,0 @@
|
|||||||
name: Code Review
|
|
||||||
on:
|
|
||||||
issue_comment:
|
|
||||||
types: [created, edited]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
code-review:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: OpenAI Code Review
|
|
||||||
uses: bhavik/gitea-code-review-action@v0.1
|
|
||||||
with:
|
|
||||||
PROGRAMMING_LANGUAGE: 'JavaScript'
|
|
||||||
OPENAI_TOKEN: ${{ secrets.OPENAI_TOKEN }}
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
|
|
||||||
FULL_REVIEW_COMMENT: 'openai'
|
|
||||||
REVIEW_COMMENT_PREFIX: 'openai:'
|
|
||||||
21
.gitea/workflows/code-review.yml
Normal file
21
.gitea/workflows/code-review.yml
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
name: AI Code Review (on comment)
|
||||||
|
on:
|
||||||
|
issue_comment:
|
||||||
|
types: [created, edited]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
review:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: startsWith(github.event.comment.body, 'openai') || github.event.comment.body == 'openai'
|
||||||
|
steps:
|
||||||
|
- name: OpenAI Code Review
|
||||||
|
uses: ingress-it-solutions/gitea-code-review-action@v0.1
|
||||||
|
with:
|
||||||
|
SOURCE_AT: gitea
|
||||||
|
GITHUB_BASE_URL: https://your-gitea.example.com
|
||||||
|
PROGRAMMING_LANGUAGE: auto
|
||||||
|
FULL_REVIEW_COMMENT: openai
|
||||||
|
REVIEW_COMMENT_PREFIX: 'openai:'
|
||||||
|
MAX_CODE_LENGTH: 6000
|
||||||
|
OPENAI_TOKEN: ${{ secrets.OPENAI_TOKEN }}
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
|
||||||
Reference in New Issue
Block a user