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

gerritapi: Skip autogenerated comments.

These are not actual comments, they add noise. Perhaps we can display
them as events in the future.
dmitshur committed 7 years ago commit 4b6d6ebc6f797287c90f73b818082bb2fa84743d
Collapse all
gerritapi/gerritapi.go
@@ -146,10 +146,13 @@ func (s service) ListComments(ctx context.Context, _ string, id uint64, opt *cha
	if err != nil {
		return nil, err
	}
	var comments []issues.Comment
	for idx, message := range change.Messages {
		if strings.HasPrefix(message.Tag, "autogenerated:") {
			continue
		}
		comments = append(comments, issues.Comment{
			ID:        uint64(idx), // TODO: message.ID is not uint64; e.g., "bfba753d015916303152305cee7152ea7a112fe0".
			User:      s.gerritUser(message.Author),
			CreatedAt: time.Time(message.Date),
			Body:      message.Message,