Update code-review.yml
This commit is contained in:
28
.github/workflows/code-review.yml
vendored
28
.github/workflows/code-review.yml
vendored
@@ -1,22 +1,18 @@
|
||||
name: Code Review
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: write
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, reopened, synchronize]
|
||||
issue_comment:
|
||||
types: [created, edited]
|
||||
|
||||
jobs:
|
||||
test:
|
||||
code-review:
|
||||
runs-on: self_hosted
|
||||
if: github.event.comment.user.login == 'bhavik' && startsWith(github.event.comment.body, 'openai')
|
||||
steps:
|
||||
- uses: anc95/ChatGPT-CodeReview@main
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
|
||||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
||||
# optional
|
||||
LANGUAGE: Korean
|
||||
PROMPT:
|
||||
IGNORE_PATTERNS: /node_modules,*.md # Regex pattern to ignore files, separated by comma
|
||||
- name: OpenAI Code Review
|
||||
uses: bhavik/gitea-code-review-action@v0.1
|
||||
with:
|
||||
PROGRAMMING_LANGUAGE: 'JavaScript'
|
||||
OPENAI_TOKEN: ${{ secrets.OPENAI_API_KEY }}
|
||||
GITHUB_TOKEN: ${{ secrets.GH_CUSTOM_GITHUB_TOKEN }}
|
||||
FULL_REVIEW_COMMENT: 'openai'
|
||||
REVIEW_COMMENT_PREFIX: 'openai:'
|
||||
Reference in New Issue
Block a user