0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Code Rabbitを使ってPRを自動レビューしてみた

Last updated at Posted at 2025-12-07

Code Rabbitを使用してGitHubのPRのレビューをしてもらった

Code Rabbit導入編
無事Code Rabbitを導入できたので、適当なPRを作成してレビューをしてもらった記録

とりあえず動かしてみる

Goで書いた小規模なBotリポジトリで適当なPRを作成する。
変更内容はこんな感じ

  • LLMクライアントのリファクタ
  • PRレビュー用BOTの追加

PR

image.png

これで自動レビューしてもらえるはずだが果たして、、、

Code Rabbitのコメント

image.png

image.png

image.png

image.png

リポジトリ直下に .coderabbit.yml を作成して言語なんかも設定できるようだが、とりあえず今回はデフォルト設定で試してみる。

Estimated code review effort
🎯 4 (Complex) | ⏱️ ~45 minutes

Pay attention to:
CallLLM signature change and every invocation site (cmd/*).
embed.FS usage and getPromptTemplate file paths/error handling in internal/llm/client.go.
JSON parsing expectations in both bots against the new templates and internal/models/* structs.
getGitHubAccessInfo() parameter validation and error messages in cmd/review-bot/main.go.

ここは重点的に見てねって内容らしい、例えば

  • CallLLM signature change and every invocation site (cmd/*).

    • CallLLM の引数・戻り値が変更されているため、cmd/* 以下の全ての呼び出し箇所が新しいシグネチャに正しく追従できているか確認してください。
  • embed.FS usage and getPromptTemplate file paths/error handling in internal/llm/client.go.

    • internal/llm/client.go の embed.FS と getPromptTemplate が、正しいパス・エラーハンドリングで実装されているか確認する。

こんな感じで破壊的差分のフォローなんかもレビュー内容として出力してくれる。

その後

なんか調べながらいろいろやってたら、コメント増えてた

Code Rabbitのコメント

image.png

修正の提案してくれてる、、、
かなり細かく提案してくれてるので、初学者の個人開発としてはかなりありがたい印象
とはいえあまり多すぎると対応疲れしてしまうのはあるかもしれない
これもCode Rabbitの設定ファイルである程度制御できるようなので、
今後その周りも整備していきたいなという気持ち
最終的には、プロジェクトや自分の好みに合わせて「どこまで厳しくレビューしてもらうか」を .coderabbit.yml でチューニングしていく前提になりそう。

まとめ

使ってみた印象としては

  • 導入が手軽
  • PR作成するだけで自動でレビューできるのは使い勝手としてはかなりいい
  • レビュー粒度もかなり詳細にしてくれるし、提案も具体的なので勉強にもなる

事前に調べてた印象通りではあるけど

  • どんどんコメントが追加されるので、圧はあるかもしれない。

次は Code Rabbitのタスクを優先度付けして管理できる、reviewtaskなるツールがあるらしいので、
それを使っていきたい。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?