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

Support review folder

Open npquynhdo opened this issue 1 year ago • 9 comments

Instead of ignoring multiple files/folder. Isn't better to support a review folder? Something like :

steps:
  - uses: anc95/ChatGPT-CodeReview@main
    env:
      GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
      PATH: ./src

npquynhdo avatar Nov 21 '24 12:11 npquynhdo

@npquynhdo just added INCLUDE_PATTERNS support

steps:
  - uses: anc95/ChatGPT-CodeReview@main
    env:
      GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
      INCLUDE_PATTERNS: src/

anc95 avatar Nov 22 '24 03:11 anc95

@anc95 Thank you for adding the feature... It seems like the bot still read other files and folders even though INCLUDE_PATTERNS is in place image

npquynhdo avatar Nov 22 '24 12:11 npquynhdo

@npquynhdo in the screenshot, seems that the review comment was sent by the bot service, I think you are using the bot service right? If yes and the service is self-deployed, you should add the config env variable in the .env file and restart the service to make it take effect. the bot service provided by me doesn't support custom variables yet.

anc95 avatar Nov 25 '24 05:11 anc95

@anc95 Ah I understand. So if I understand correctly, to have this works I should uninstall the bot and only use as the GitHub action?

npquynhdo avatar Nov 25 '24 09:11 npquynhdo

@npquynhdo yes

anc95 avatar Nov 25 '24 10:11 anc95

@anc95 doesn't work (see the pictures) , but when I took the INCLUDE_PATTERNS: src/ out it works...but it runs through all the code base but not only files under the src folder image image

npquynhdo avatar Dec 03 '24 12:12 npquynhdo

@npquynhdo just fixed.

anc95 avatar Dec 11 '24 08:12 anc95

@anc95 Still not working. It seems to not detect changes in the /src folder even though I've included it as: INCLUDE_PATTERNS: src/

npquynhdo avatar Dec 13 '24 19:12 npquynhdo

hi @npquynhdo please try to change to /src/**/*

anc95 avatar Dec 16 '24 02:12 anc95