anc95 / anc95/ChatGPT-CodeReview

How to code review with push instead of pull

Open
#137 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
4.5k
Forks
461
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the .github/workflows/cr.yml workflow and the anc95/ChatGPT-CodeReview@main action configuration. Check how the action handles pull_request and push events, then verify what configuration is needed for reviews triggered by pushes to main. Done means the workflow runs successfully on the intended push event and performs a code review.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions
Domain
ci-cd
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.