Skip to content
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 for AI code reviews #15439

Closed
3 tasks done
Piedone opened this issue Mar 3, 2024 · 11 comments · Fixed by #15813
Closed
3 tasks done

CodeRabbit for AI code reviews #15439

Piedone opened this issue Mar 3, 2024 · 11 comments · Fixed by #15813
Assignees
Milestone

Comments

@Piedone
Copy link
Member

Piedone commented Mar 3, 2024

Attention, contributors: See #15439 (comment).

Is your feature request related to a problem? Please describe.

PRs usually sit open for too long (related: #15029), partially due to nobody coming to review earlier.

Describe the solution you'd like

We could try CodeRabbit, which is an AI code review bot: it uses ChatGPT and perhaps other similar LLM tools to provide code review comments. Additionally:

  • You can have a discussion with it.
  • Tt's capable of learning the habits of a project.
  • When there's an issue linked, it can verify whether the PR addresses the issue.
  • It can summarize the changes of a PR.
  • Reviews are done either automatically or on-demand (requested with a comment).
  • It's free for open-source projects.

For a while now we at Lombiq tested it on a couple of repositories. It's a mixed bag, with perhaps 50-50 useful and useless comments, but the experience varies greatly PR by PR. Some examples:

So, I'm not entirely convinced, but we could try if it's useful for us and helps with reviews, or it's more like noise.

This will throw off our community metrics a bit, since the time to first reply for PRs will be down to a few minutes, so we won't be able to track the time to human reviews (and the useful remaining metric will be time to close). Also, if as a reviewer you scan for PRs to review by looking at the number of comments (as an indicator that somebody else reviewed already) then that won't apply anymore. Using the "No reviews" filter can be appropriate, but a "review" here is a changes requested/approved flag, what some people don't use during review (but they just comment).

Describe alternatives you've considered

Perhaps there are other such tools that we can check.

@MikeAlhayek
Copy link
Member

It would be nice to give it a try. Are you going to implement it to see how it does?

@Piedone
Copy link
Member Author

Piedone commented Mar 3, 2024

Sure, it's just a few minutes.

@sebastienros sebastienros added this to the 1.x milestone Mar 7, 2024
@Piedone Piedone self-assigned this Apr 23, 2024
@Piedone Piedone changed the title Try CodeRabbit for AI code reviews Experimentally enabled: CodeRabbit for AI code reviews Apr 23, 2024
@Piedone Piedone pinned this issue Apr 23, 2024
@Piedone
Copy link
Member Author

Piedone commented Apr 23, 2024

I've set it up, as an experiment for now: all non-draft PRs will get CodeRabbit review when opened, and you can ask it to review existing PRs too with https://github.com/coderabbitai review. If you think that CodeRabbit is annoying, or otherwise the feedback it provides under pull requests is not worth it, then please add a comment below!

Core contributors: You should be able to log in under https://app.coderabbit.ai/ with your GitHub account and see the OC repo settings. But this shouldn't be necessary going forward, since CodeRabbit can also be configured from code, what I did under #15813.

I'll wait a few weeks to see how it goes, gather feedback, fine-tune the config, and we should only adopt it long-term if we're all happy with it.

@Piedone Piedone changed the title Experimentally enabled: CodeRabbit for AI code reviews Experimentally enabled: CodeRabbit for AI code reviews - feedback requested! Apr 24, 2024
@Piedone
Copy link
Member Author

Piedone commented May 1, 2024

The bot comments don't skew the PR metrics, since they're excluded, only human replies count for "Time to first response": #15929

@Piedone
Copy link
Member Author

Piedone commented May 1, 2024

Please vote: #15935.

@Piedone
Copy link
Member Author

Piedone commented May 2, 2024

I've disabled automatic reviews for now, but am waiting a bit more on #15935.

@hishamco
Copy link
Member

hishamco commented May 2, 2024

CodeRabbit is good and bad, sometimes I find it annoying rather than it helps someone :)

@Piedone
Copy link
Member Author

Piedone commented May 2, 2024

Yeah, same.

@MikeAlhayek
Copy link
Member

I am okay with keeping it if we trigger it manually.

@hishamco
Copy link
Member

hishamco commented May 2, 2024

Sometimes the suggestion is excellent, thanks for having this experiment, we can leave before releasing 2.0 until we get more feedback then we can decide

@Piedone Piedone unpinned this issue May 3, 2024
@Piedone Piedone changed the title Experimentally enabled: CodeRabbit for AI code reviews - feedback requested! CodeRabbit for AI code reviews May 3, 2024
@Piedone
Copy link
Member Author

Piedone commented May 3, 2024

I've finalized the config and docs under #15813, then, please review. It's off by default but available.

@MikeAlhayek MikeAlhayek added this to the 2.0 milestone Sep 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants