Review Cycles
A review cycle is defined as the sequence of comments and commits within a PR. Each cycle is counted when a comment or request for change is followed by a commit or approved by someone. This cycle can repeat multiple times, indicating multiple review cycles within the same PR.
This field can be found in the PR screen as a column.
Understanding the review cycle count helps in assessing the thoroughness and efficiency of the review process. High review cycle counts might indicate thorough reviews or potential issues in the code requiring multiple revisions, whereas low counts might suggest either fewer issues or potentially less thorough reviews.
Below is the explanation on how it gets calculated:
1. Review Cycle = 0 - If a pull request has neither comments nor approval, the review cycle count is 0.
2. Review Cycle = 1 - If a pull request has been approved with or without comments, the review cycle count is 1. This accounts for the fact that some form of review has taken place (the approval), even if no comments were left.
Example
A PR is created and a reviewer approves it without leaving any comments. Then review cycle count is 1 because the PR was reviewed (approved) even though no comments were made.
3. Review Cycle is more than 1 - For pull requests with both comments and commits, the review cycle count is calculated based on the number of comment-commit pairs. Each sequence where a comment is followed by a commit is counted as one review cycle. This means that for each set of comments followed by a commit, the review cycle count increases.
Example
A PR is created, and a reviewer leaves comments. The developer makes changes and commits those changes. This sequence repeats.
- Result: The review cycle count is incremented for each comment-commit pair.
- 1st Cycle: Reviewer comments -> Developer commits changes (Cycle 1)
- 2nd Cycle: Reviewer comments again -> Developer commits changes again (Cycle 2)
- The review cycle count is the number of these comment-commit sequences.
If you encounter any issues or have further questions, feel free to contact us at support@hivel.ai.
Last updated