-
Notifications
You must be signed in to change notification settings - Fork 432
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How about excluding removed and renamed 'files' from code reviews? #42
Comments
@jeonbyeongmin Yes. This a good idea. Considering removed files are not Being used anymore, and review the removed/renamed files is no help on the code, and it's good for reducing the user's token cost Let's have excluding renamed/removed files by default, if there is any request for reviewing the renamed/removed files in the future, we can consider to add process env to support this configuration then |
@anc95 Great! Can I modify the code myself? I wonder how I can run the test of this app. |
@jeonbyeongmin Appreciated Bad new is the it's not easy to test. There are two ways
I am not sure if there is a unit test way to mock data and test. Sorry that I can't reach my Mac now, so I just typed in an phone, it's not easier to express things clearly to you. You can try the above two ways, any questions please kindly let me know. Thanks. |
@anc95 |
@jeonbyeongmin i am guessing don't need to punish an action In my case, I am using anc95/ChatGPT-CodeReview@dev To test. It can be found and triggered You can try to replace the repo owner and branch to yours to test |
Ah, If I apply it to the repository I forked, it would be I tested it on |
I have run numerous tests, and I have some bad news.
Do you know how Octokit works? I'm not sure why it's not properly excluding files. |
@jeonbyeongmin Sorry for being so late to reply you
I am not sure too. but if we can exclude removed files in both open/sync event and exclude renamed files in sync event, it's already is a good improvement |
@anc95 |
Hello!
I'm using your app really really well.
Let me give you a suggestion.
Current Issue:
The code review conducted by the app includes deleted files, which is not necessary. In the code file src/bot.ts, the
changedFiles
variable obtained from thedata.data
object includes files with changes, including deleted files. Thefile.status
property can be one ofadded
,modified
,removed
,renamed
, orcopied
. Therefore, it is suggested to exclude the files with theremoved
andrenamed
status from thechangeFiles
. It may also be helpful to add an environment variable to control this behavior.Proposed Solution:
Exclude the files with the removed and renamed status from the changeFiles function, and consider adding an environment variable to control this behavior.
The text was updated successfully, but these errors were encountered: