Fully support voting with arbitrary labels

This is mostly TODO cleanup where we originally ignored unknown
labels without knowing for sure that would be the right long-term
approach.

The only semantic change is that a change can no longer possibly be
considered submittable from the publish comment screen if it contains
some completely undefined labels.

Change-Id: I7a722c3e7485b681a7fe9aff8e8da1413f70771e
This commit is contained in:
Dave Borowitz
2013-02-28 15:25:19 -08:00
parent 8e5de82e56
commit 0e0a41a281
5 changed files with 11 additions and 12 deletions

View File

@@ -92,10 +92,10 @@ public class ReviewerJson {
for (PatchSetApproval ca : approvals) {
for (PermissionRange pr : ctl.getLabelRanges()) {
if (!pr.isEmpty()) {
// TODO: Support arbitrary labels.
LabelType at = labelTypes.byLabel(ca.getLabelId());
if (at != null) {
out.approvals.put(at.getName(), formatValue(ca.getValue())); }
out.approvals.put(at.getName(), formatValue(ca.getValue()));
}
}
}
}