@@ -255,11 +255,13 @@ func (s service) GetDiff(ctx context.Context, repo string, id uint64, opt *chang func (s service) ListTimeline(ctx context.Context, repo string, id uint64, opt *change.ListTimelineOptions) ([]interface{}, error) { // TODO: Pagination. Respect opt.Start and opt.Length, if given. project := project(repo) chg, resp, err := s.cl.Changes.GetChangeDetail(fmt.Sprintf("%s~%d", project, id), nil) chg, resp, err := s.cl.Changes.GetChangeDetail(fmt.Sprintf("%s~%d", project, id), &gerrit.ChangeOptions{ AdditionalFields: []string{"CURRENT_REVISION"}, }) if err != nil { if resp != nil && resp.StatusCode == http.StatusNotFound { return nil, os.ErrNotExist } return nil, err @@ -282,11 +284,11 @@ func (s service) ListTimeline(ctx context.Context, repo string, id uint64, opt * case "gerrit:merged": timeline = append(timeline, change.TimelineItem{ Actor: s.gerritUser(message.Author), CreatedAt: message.Date.Time, Payload: change.MergedEvent{ CommitID: message.Message[46:86], // TODO: Make safer. CommitID: chg.CurrentRevision, RefName: chg.Branch, }, }) case "gerrit:newPatchSet": // Parse a new patchset message, check if it has comments.