| 26 | } |
| 27 | |
| 28 | func runBugComment(env *execenv.Env, args []string) error { |
| 29 | b, _, err := ResolveSelected(env.Backend, args) |
| 30 | if err != nil { |
| 31 | return err |
| 32 | } |
| 33 | |
| 34 | snap := b.Snapshot() |
| 35 | |
| 36 | for i, comment := range snap.Comments { |
| 37 | if i != 0 { |
| 38 | env.Out.Println() |
| 39 | } |
| 40 | |
| 41 | env.Out.Printf("Author: %s\n", colors.Magenta(comment.Author.DisplayName())) |
| 42 | env.Out.Printf("Id: %s\n", colors.Cyan(comment.CombinedId().Human())) |
| 43 | env.Out.Printf("Date: %s\n\n", comment.FormatTime()) |
| 44 | env.Out.Println(text.LeftPadLines(comment.Message, 4)) |
| 45 | } |
| 46 | |
| 47 | return nil |
| 48 | } |