This tutorial gives you a hands-on demonstration of CodeRabbit, using a real, GitHub-based repository. It guides you through the following tasks:
Integrate CodeRabbit into a GitHub-based repository that you own
Observe CodeRabbit perform a code review of a pull request that you initiate
Converse with CodeRabbit about the code review
Prompt CodeRabbit to generate its own improvements to the pull request
coderabbit-test
, and let it have otherwise default GitHub settings.
Create an account
Login with your git provider
Authorize
Access repository settings
Grant repository access
Select your test repository
coderabbit-test
repository that you created earlier in this Quickstart.Install and authorize CodeRabbit
Complete signup if prompted
coderabbit-test
repository:
Create a branch
add-utils
.Create a new file
add-utils
branch, create a new file called simple_utils.py
, with the following content:Commit the file
add-utils
branch. Use any text you want for the commit message.Create a pull request
add-utils
branch into the main
branch. Use any text you want for the pull request message.@coderabbitai
GitHub account. It performs the following actions, all of which are visible on the pull request’s page on GitHub:
You’re right that these functions are quite self-explanatory from their names alone. Docstrings aren’t strictly necessary for every function, especially in smaller projects with clear function names. While docstrings do provide benefits (IDE tooltips, documentation generation, help for future developers), they can sometimes feel redundant for very straightforward functions. It’s ultimately a matter of coding style and project requirements. If you prefer to skip docstrings for obvious utility functions in this project, that’s perfectly reasonable. Would you like me to adjust my review approach regarding documentation for this repository?In this case, CodeRabbit is offering to adjust its future behavior when reviewing changes to this repository. Instead, follow the next step to ask CodeRabbit to implement part of its suggestions.
add-utils
.add-utils
.add-utils
.