Skip to content

How to code review with push instead of pull #137

Description

@dev-shinyu

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

Activity

  1. anc95 commented on Jan 27, 2024

    @anc95
    Owner

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

  2. dev-shinyu commented on Jan 29, 2024

    @dev-shinyu
    Author

    @anc95 Of course, I checked it

  3. vitaly-zdanevich commented on Sep 15, 2024

    @vitaly-zdanevich

    Works for me:

    on:
      push:
        branches:
          - 'master'
      pull_request:
        types: [opened, reopened, synchronize]
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions