Search in sources :

Example 1 with SubmitLabelAttribute

use of com.google.gerrit.server.data.SubmitLabelAttribute in project gerrit by GerritCodeReview.

the class EventFactory method addSubmitRecordLabels.

private void addSubmitRecordLabels(SubmitRecord submitRecord, SubmitRecordAttribute sa) {
    if (submitRecord.labels != null && !submitRecord.labels.isEmpty()) {
        sa.labels = new ArrayList<>();
        for (SubmitRecord.Label lbl : submitRecord.labels) {
            SubmitLabelAttribute la = new SubmitLabelAttribute();
            la.label = lbl.label;
            la.status = lbl.status.name();
            if (lbl.appliedBy != null) {
                la.by = asAccountAttribute(lbl.appliedBy);
            }
            sa.labels.add(la);
        }
    }
}
Also used : SubmitRecord(com.google.gerrit.entities.SubmitRecord) SubmitLabelAttribute(com.google.gerrit.server.data.SubmitLabelAttribute)

Aggregations

SubmitRecord (com.google.gerrit.entities.SubmitRecord)1 SubmitLabelAttribute (com.google.gerrit.server.data.SubmitLabelAttribute)1