dmitri.shuralyov.com/service/change/...

gerritapi: show ReopenedEvent when CL is restored

When a Gerrit CL change is restored, there should be an
associated ReopenedEvent. This change implements that.

I've finally encountered a Gerrit CL that was restored,
so this change could be tested on it:

	https://go-review.googlesource.com/c/build/+/169198
dmitshur committed 5 years ago commit e9885884f07001d494be49738df5397e05019c5a
Collapse all
gerritapi/gerritapi.go
@@ -340,10 +340,16 @@ func (s service) ListTimeline(ctx context.Context, repo string, id uint64, opt *
					User:      s.gerritUser(message.Author),
					CreatedAt: message.Date.Time,
					Body:      strings.TrimPrefix(message.Message, "Abandoned\n\n"),
					Editable:  false,
				})
			case "gerrit:restore":
				timeline = append(timeline, change.TimelineItem{
					Actor:     s.gerritUser(message.Author),
					CreatedAt: message.Date.Time,
					Payload:   change.ReopenedEvent{},
				})
			}
			continue
		}
		labels, body, ok := parseMessage(message.Message)
		if !ok {