Allow to remove specific scores while leaving the reviewer listed
Currently only removal of reviewers is supported. This change implements removal of specific scores while leaving the reviewer still listed on the change. Reviewer API is added for listing and deleting votes. Bug: Issue 3035 Change-Id: Ie4f05fafb73a32835708a76eb86cfacf8ff5c670
This commit is contained in:
committed by
Edwin Kempin
parent
6f7ccf5409
commit
beb0b84af8
@@ -31,6 +31,7 @@ import java.sql.Timestamp;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import java.util.SortedSet;
|
||||
import java.util.TreeSet;
|
||||
@@ -84,6 +85,16 @@ public class ChangeInfo extends JavaScriptObject {
|
||||
return allLabels().keySet();
|
||||
}
|
||||
|
||||
public final Set<Integer> removableReviewerIds() {
|
||||
Set<Integer> removable = new HashSet<>();
|
||||
if (removableReviewers() != null) {
|
||||
for (AccountInfo a : Natives.asList(removableReviewers())) {
|
||||
removable.add(a._accountId());
|
||||
}
|
||||
}
|
||||
return removable;
|
||||
}
|
||||
|
||||
public final native String id() /*-{ return this.id; }-*/;
|
||||
public final native String project() /*-{ return this.project; }-*/;
|
||||
public final native String branch() /*-{ return this.branch; }-*/;
|
||||
|
||||
Reference in New Issue
Block a user