ChatGPT-CodeReview icon indicating copy to clipboard operation
ChatGPT-CodeReview copied to clipboard

How to code review with push instead of pull

Open dev-shinyu opened this issue 1 year ago • 3 comments

Can bots review during push event on github as well? I set it as below but it doesn't seem to work. Is there a way? API_KEY registered successfully.

.github/workflows/cr.yml

name: Code Review

permissions: contents: read pull-requests: write

on: pull_request: branches: - main types: [opened, reopened, synchronize] push: branches: - main jobs: test: runs-on: ubuntu-latest steps:
- uses: anc95/ChatGPT-CodeReview@main env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} LANGUAGE: Chinese OPENAI_API_ENDPOINT: https://api.openai.com/v1 MODEL: gpt-3.5-turbo-1106

dev-shinyu avatar Jan 24 '24 17:01 dev-shinyu

Have you checked the CI job, was it run successfully?

anc95 avatar Jan 27 '24 07:01 anc95

@anc95 Of course, I checked it

dev-shinyu avatar Jan 29 '24 20:01 dev-shinyu

Works for me:

on:
  push:
    branches:
      - 'master'
  pull_request:
    types: [opened, reopened, synchronize]

vitaly-zdanevich avatar Sep 15 '24 09:09 vitaly-zdanevich