ReviewAssistant";
+ if (calculation != null) {
+ advice += "
Reviewers should spend ";
+ if (calculation.hours == 1) {
+ advice += calculation.hours + " hour";
+ } else if (calculation.hours > 1) {
+ advice += calculation.hours + " hours";
}
- }
- if (calculation.hours == 1) {
- advice += calculation.hours + " hour";
- } else if (calculation.hours > 1) {
- advice += calculation.hours + " hours";
- }
- if (calculation.hours > 0 && calculation.minutes > 0) {
- advice += " and ";
- }
- if (calculation.minutes > 0) {
- advice += calculation.minutes + " minutes";
- }
- advice += " reviewing this change.
";
- if (calculation.hours >= 1) {
- advice += "
This should be split up in " + calculation.sessions +
+ if (calculation.hours > 0 && calculation.minutes > 0) {
+ advice += " and ";
+ }
+ if (calculation.minutes > 0) {
+ advice += calculation.minutes + " minutes";
+ }
+ advice += " reviewing this change.
";
+ if (calculation.hours >= 1) {
+ advice += "
This should be split up in " + calculation.sessions +
" to " + (calculation.sessions + 1) + " sessions.
";
+ }
+ } else {
+ advice += "
Could not get advice for this change.
";
}
advice += "
";
return advice;
}
-}
\ No newline at end of file
+}
diff --git a/src/main/resources/Documentation/about.md b/src/main/resources/Documentation/about.md
index f65dc7c..307364a 100644
--- a/src/main/resources/Documentation/about.md
+++ b/src/main/resources/Documentation/about.md
@@ -4,4 +4,5 @@ The review assistant plugin gives advice on how to perform code reviews in an ef
- Time estimations: Reviewers get advice on how much time that should be put into reviewing the current patch.
- Review sessions: Reviewers get advice on how to partition the review time.
-- Auto add reviewers. Reviewers are auto added based on git blame.
\ No newline at end of file
+- Auto add reviewers based on git blame.
+- Auto add one reviewer that has +2'd a change in the project previously.
diff --git a/src/main/resources/Documentation/config.md b/src/main/resources/Documentation/config.md
index cbd4481..c3774c5 100644
--- a/src/main/resources/Documentation/config.md
+++ b/src/main/resources/Documentation/config.md
@@ -11,9 +11,59 @@ Other projects can then override the configuration in their own
```
[reviewers]
maxReviewers = 3
+ enableLoadBalancing = false
+ plusTwoAge = 8
+ plusTwoLimit = 10
+ plusTwoRequired = true
+ autoAddReviewers = true
+
+ [time]
+ reviewTimeModifier = 100
+
```
reviewers.maxReviewers
-: The maximum number of reviewers that should automatically be added to a change.
+: The maximum number of reviewers that should automatically be added to a change.
By default 3.
+
+reviewers.enableLoadBalancing
+: If loadbalancing is enabled, reviewers' other reviews are taken into account, and those with
+ fewer other reviews are favored.
+
+ By default false.
+
+ The query used for finding suitable +2 accounts is
+
+ status:merged -age: