mirror of
https://github.com/MichaelMure/git-bug.git
synced 2024-12-15 02:01:43 +03:00
commands: fix labels no showing properly in "git bug show <id> -f labels"
fix #119
This commit is contained in:
parent
96987bf6ae
commit
a64aaacc03
@ -32,7 +32,7 @@ func runShowBug(cmd *cobra.Command, args []string) error {
|
||||
snapshot := b.Snapshot()
|
||||
|
||||
if len(snapshot.Comments) == 0 {
|
||||
return errors.New("Invalid bug: no comment")
|
||||
return errors.New("invalid bug: no comment")
|
||||
}
|
||||
|
||||
firstComment := snapshot.Comments[0]
|
||||
@ -49,7 +49,10 @@ func runShowBug(cmd *cobra.Command, args []string) error {
|
||||
fmt.Printf("%s\n", snapshot.Id())
|
||||
case "labels":
|
||||
var labels = make([]string, len(snapshot.Labels))
|
||||
fmt.Printf("%s\n", strings.Join(labels, ", "))
|
||||
for i, l := range snapshot.Labels {
|
||||
labels[i] = string(l)
|
||||
}
|
||||
fmt.Printf("%s\n", strings.Join(labels, "\n"))
|
||||
case "shortId":
|
||||
fmt.Printf("%s\n", snapshot.HumanId())
|
||||
case "status":
|
||||
|
Loading…
Reference in New Issue
Block a user