formatChangeSummary builds a compact one-line summary of field and subtask changes.
(f feed.FileChange)
| 174 | |
| 175 | // formatChangeSummary builds a compact one-line summary of field and subtask changes. |
| 176 | func formatChangeSummary(f feed.FileChange) string { |
| 177 | var parts []string |
| 178 | for _, fc := range f.FieldChanges { |
| 179 | parts = append(parts, fmt.Sprintf("%s %s \u2192 %s", fc.Field, fc.OldValue, fc.NewValue)) |
| 180 | } |
| 181 | done := 0 |
| 182 | undone := 0 |
| 183 | for _, sc := range f.SubtaskChanges { |
| 184 | if sc.Done { |
| 185 | done++ |
| 186 | } else { |
| 187 | undone++ |
| 188 | } |
| 189 | } |
| 190 | if done > 0 { |
| 191 | parts = append(parts, fmt.Sprintf("%d subtask(s) completed", done)) |
| 192 | } |
| 193 | if undone > 0 { |
| 194 | parts = append(parts, fmt.Sprintf("%d subtask(s) unchecked", undone)) |
| 195 | } |
| 196 | return strings.Join(parts, ", ") |
| 197 | } |
| 198 | |
| 199 | func fileStatusTag(fc feed.FileChange) string { |
| 200 | if fc.TaskStatus == "completed" { |
no outgoing calls
no test coverage detected