diff --git a/.github/workflows/code-review.yml b/.github/workflows/code-review.yml index 74f55d8..11dd31c 100644 --- a/.github/workflows/code-review.yml +++ b/.github/workflows/code-review.yml @@ -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 \ No newline at end of file + - 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:' \ No newline at end of file