-
-
Notifications
You must be signed in to change notification settings - Fork 218
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
CodeRabbit config #35636
CodeRabbit config #35636
Conversation
.coderabbit.yaml
Outdated
- path: "https://github.com/dimagi/open-source/blob/master/docs/Writing_PRs.md" | ||
instructions: | | ||
Please follow this guide when evaluating the pull request and make sure that the PR meets all the requirements. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
path_instructions
are to give additional instructions for how to review files that match the path regex. Adding this file here won't change how it reviews other code, only this one file.
You may be able to add this kind of info via the Learnings database: https://docs.coderabbit.ai/integrations/knowledge-base
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've wondered about that.
So you're suggesting that we rather configure CodeRabbit on the fly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed it here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So you're suggesting that we rather configure CodeRabbit on the fly?
I'm not what you mean by 'on the fly'. Do you mean without any special instructions? We can add instructions but will need to copy them into the config and use regex to have them applied to specific sets of files. I'm not sure if the ones you had for JS files would work (whether it would load the info from the link) but I suspect not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@snopoke I want the assistant to following the guidelines we have in HQ in the docs as context to evaluating any PR, so my question was around if we should/could only tell the assistant to use the said guidelines docs when speaking to it during a review process as opposed to configuring it in the coderabbit.yaml file?
I guess it's OK to only tell it during a review process (I know it can learn from one PR and apply to future PRs), but then we lose visibility into what the assistant considers for context when reviewing a PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this path instructions config be used to ignore file types? Reviewing diff files like this isn't helpful. Reviewing dependency management files is also questionable - this review is noise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Found it - there's a path_filters
config.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so my question was around if we should/could only tell the assistant to use the said guidelines docs when speaking to it during a review process as opposed to configuring it in the coderabbit.yaml file?
The only way I know of to do this would be to pass it in the yaml config file as you were except you'd need to include the full text and not just links to the file that has the info. Also you have to use a regex to tell it what file paths the instructions apply to.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also you have to use a regex to tell it what file paths the instructions apply to
Helpful to know! Missed that somehow in the docs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@orangejenny Thanks for the feedback! Will update!
high_level_summary: false | ||
review_status: false | ||
poem: false | ||
collapse_walkthrough: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this instead be turned off and only included when requested? It adds a lot of clutter to emails.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a good suggestion. Will update.
I'll merge this for now and respond to the feedback in a followup PR. |
auto_reply: true | ||
enabled: false | ||
auto_incremental_review: false | ||
drafts: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure we want auto-review on drafts yet. Should we turn it off until we are confident that we want automatic reviews?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure!
.coderabbit.yaml
Outdated
# Code Review Instructions | ||
|
||
- Ensure the code follows best practices and coding standards. | ||
- For **Python** code, follow |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason why you did not replace this with links to our code review guidelines, most of which were provided in this Slack thread?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uh...good question. I moved it to the path_instructions, but let me add it back here and see what it does. I'm not sure if it will read the links, but let's test!
Technical Summary
This PR merely adds a couple of configs to the recently-added CodeRabbit tool, like telling it to not do an auto-review (and only when prompted).
The CodeRabbit-HQ integration is experimental and will be tested during the next 2 or so weeks. As such the config might change as time goes on and new needs are being discovered.
Rollback instructions
Rolling back this PR will roll back the config which means CodeRabbit might act differently