@@ -281,21 +281,29 @@ func (s service) ListTimeline(ctx context.Context, _ string, id uint64, opt *cha
if !ok {
continue
}
switch label {
case "Code-Review+2":
timeline = append(timeline, changes.TimelineItem{
Actor: s.gerritUser(message.Author),
timeline = append(timeline, changes.Review{
ID: uint64(idx), // TODO: message.ID is not uint64; e.g., "bfba753d015916303152305cee7152ea7a112fe0".
User: s.gerritUser(message.Author),
CreatedAt: time.Time(message.Date),
Payload: changes.ApprovedEvent{},
State: changes.Approved,
Body: body,
Editable: false,
})
continue
case "Code-Review-2":
timeline = append(timeline, changes.TimelineItem{
Actor: s.gerritUser(message.Author),
timeline = append(timeline, changes.Review{
ID: uint64(idx), // TODO: message.ID is not uint64; e.g., "bfba753d015916303152305cee7152ea7a112fe0".
User: s.gerritUser(message.Author),
CreatedAt: time.Time(message.Date),
Payload: changes.ChangesRequestedEvent{},
State: changes.ChangesRequested,
Body: body,
Editable: false,
})
continue
}
if body == "" {
continue
}
timeline = append(timeline, changes.Comment{