anc95 / ChatGPT-CodeReview

🐥 A code review bot powered by ChatGPT
https://github.com/apps/cr-gpt
ISC License
3.77k stars 361 forks source link

Action does not properly get triggered upon being integrated with different actions #62

Closed mattverse closed 1 year ago

mattverse commented 1 year ago

Background

I have succeeded in integrating this via github actions with the basic, recommended commands.

I wanted to take a step further, and make this be triggered only when I have added a specific label to the PR itself.

https://github.com/mattverse/osmosis/pull/12

This is the sample integration I have been working on. Notice that this is almost identical to the original example provided in this repository, the only difference is that it has an if statement for the job to run.

Also notice how the action itself has been properly started, as we can know from run https://github.com/mattverse/osmosis/actions/runs/4604642813/jobs/8135769907?pr=12.

Would there be specific reason why adding on new logic on top of this gh action might be causing this flakiness?

anc95 commented 1 year ago

@mattverse Please note that label events do not trigger the review process, but if you attempt to push a new submission after adding a label, it should work as expected and only be reviewed on the specific label tag.

mattverse commented 1 year ago

@anc95 Thanks for getting back. Sorry did not quite understand your answer, is there a specific logic in this code base that makes it review only after push of a new commit? Or are you suggesting that there might be something wrong with my github action configuration file?

anc95 commented 1 year ago

@mattverse Yes, currently the code only responds to the opened and synchronized events and triggers code review.

mattverse commented 1 year ago

@anc95 Can you point me to the line of code that has this logic? I can try to pull up a PR to work with any other types as well

anc95 commented 1 year ago

@mattverse https://github.com/anc95/ChatGPT-CodeReview/blob/main/src/bot.ts#L42. Thank you.