A code review is a software quality assurance activity where several people view, read the source code, and give feedback. The people performing the checking, excluding the author, are called reviewers.
At Nimble, code is never merged directly into the
main branches. Each feature, bug, or chore branch requires a code review.
To make code reviews speedier and more efficient, it’s essential to have clear guidelines for the author of the pull request, code reviewers, and Team Lead.
Author of the pull request
- Implement code changes that follow the team code conventions.
- Open a pull request with a detailed description.
- Separate each story into a distinct pull request.
- Notify the code reviewers on time to have an efficient review time.
- Consistently reply to code reviewer’s comments and follow open pull requests to have them merged at the earliest.
Code reviewer of a pull request
- Take ownership and responsibility when providing feedback and approval for a pull request.
- Review the pull request with courtesy, meaningful, and guidance comments.
- Only approve when the proposed change is well-designed, follows best practices, and delivers the required functionality.
- Each PR should be reviewed within one day. However, it is ok for PR authors to ask for a speedier code review on Slack.
Guidelines for merging
- Merge once you feel confident in the code and its impact on the project.
- Merging requires a minimum of two review approvals. On large squads with over two developers, the approvals must include at least the Team Lead and/or one senior teammate to avoid merges with approvals from only junior teammates.
- Each PR should be merged within 2-3 days, i.e. during the current or next sprint. Stale PRs are usually hard to merge past this time range and require difficult rebase.
- The Team Lead is the only one who can merge the PR and ensures following Code Reviews Management