(entries []feed.FeedEntry)
| 121 | } |
| 122 | |
| 123 | func writeFeedText(entries []feed.FeedEntry) error { |
| 124 | r := getRenderer() |
| 125 | |
| 126 | fmt.Println(formatDim("Recent task activity", r)) |
| 127 | fmt.Println() |
| 128 | |
| 129 | for i, entry := range entries { |
| 130 | if i > 0 { |
| 131 | fmt.Println() |
| 132 | } |
| 133 | |
| 134 | if entry.Source == "worklog" { |
| 135 | writeWorklogEntryText(entry, r) |
| 136 | continue |
| 137 | } |
| 138 | |
| 139 | date := formatDim(entry.Timestamp.Format("2006-01-02 15:04"), r) |
| 140 | author := formatLabel(entry.Author, r) |
| 141 | fmt.Printf("%s %s: %s\n", date, author, entry.Message) |
| 142 | |
| 143 | for _, f := range entry.Files { |
| 144 | writeFileChangeText(f, r) |
| 145 | } |
| 146 | } |
| 147 | |
| 148 | return nil |
| 149 | } |
| 150 | |
| 151 | func writeWorklogEntryText(entry feed.FeedEntry, r *lipgloss.Renderer) { |
| 152 | date := formatDim(entry.Timestamp.Format("2006-01-02 15:04"), r) |
no test coverage detected