Skip to content

Test

Test #23

Workflow file for this run

name: Code Reviewer
on:
issue_comment:
types: [created]
pull_request:
types: [opened, synchronize]
permissions:
contents: read
pull-requests: write
jobs:
review:
runs-on: ubuntu-latest
if: |
github.event_name == 'pull_request' ||
(github.event_name == 'issue_comment' &&
github.event.issue.pull_request != null && (
contains(github.event.comment.body || '', 'please review') ||
contains(github.event.comment.body || '', 'review please') ||
contains(github.event.comment.body || '', 'request review')
))
steps:
- name: Debug Info
run: |
echo "Event name: ${{ github.event_name }}"
echo "Event type: ${{ github.event.action }}"
echo "Is PR?: ${{ github.event.issue.pull_request != null }}"
echo "Comment body: ${{ github.event.comment.body }}"
echo "PR number: ${{ github.event.pull_request.number || github.event.issue.number }}"
echo "Comment author: ${{ github.event.comment.user.login }}"
- name: Checkout Repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Run Code Reviewer
uses: pivanov/code-review@main
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
OPENAI_API_MODEL: "gpt-4-1106-preview"
exclude: "**/*.json, **/*.md, **/*.lock, **/dist/**, **/node_modules/**, **/.github/**, **/.vscode/**"