Merge "Plugin API: Add factory methods for frequently used review operations"

This commit is contained in:
Shawn Pearce
2014-01-29 20:18:57 +00:00
committed by Gerrit Code Review
4 changed files with 34 additions and 34 deletions

View File

@@ -113,4 +113,20 @@ public class ReviewInput {
public ReviewInput label(String name) {
return label(name, (short) 1);
}
public static ReviewInput recommend() {
return new ReviewInput().label("Code-Review", 1);
}
public static ReviewInput dislike() {
return new ReviewInput().label("Code-Review", -1);
}
public static ReviewInput approve() {
return new ReviewInput().label("Code-Review", 2);
}
public static ReviewInput reject() {
return new ReviewInput().label("Code-Review", -2);
}
}