This commit is contained in:
Mislav Marohnić 2018-01-30 22:15:58 +01:00
Родитель d0639534f4
Коммит cd443ec234
1 изменённых файлов: 6 добавлений и 10 удалений

Просмотреть файл

@ -30,8 +30,8 @@ With no arguments, show a list of open issues.
* _create_:
Open an issue in the current project.
* _labels_:
List the labels available in this repository.
* _labels_:
List the labels available in this repository.
## Options:
-a, --assignee <ASSIGNEE>
@ -142,7 +142,7 @@ With no arguments, show a list of open issues.
Include pull requests as well as issues.
--color
Enable colored output for labels.
Enable colored output for labels list.
`,
}
@ -467,15 +467,11 @@ func listLabels(cmd *Command, args *Args) {
}
func formatLabel(label github.IssueLabel, colorize bool) string {
color, err := utils.NewColor(label.Color)
if err != nil {
utils.Check(err)
}
if colorize {
return fmt.Sprintf("%s\n", colorizeLabel(label, color))
if color, err := utils.NewColor(label.Color); err == nil {
return fmt.Sprintf("%s\n", colorizeLabel(label, color))
}
}
return fmt.Sprintf("%s\n", label.Name)
}