Skip to content

Commit 9174ea2

Browse files
authored
Merge pull request #79 from Escape-Technologies/fix/issues-get-json-yaml-output
fix: issues get json/yaml output
2 parents 8f6b3af + 353fca1 commit 9174ea2

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

pkg/cli/cmd/issues.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -200,11 +200,10 @@ ID CREATED AT SEVERITY CATE
200200
return fmt.Errorf("unable to get issue %s: %w", issueID, err)
201201
}
202202

203-
result := []string{"ID\tCREATED AT\tSEVERITY\tCATEGORY\tSTATUS\tNAME\tASSET\tLINK"}
204-
result = append(result, fmt.Sprintf("%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s", issue.GetId(), issue.GetCreatedAt(), issue.GetSeverity(), issue.GetCategory(), issue.GetStatus(), issue.GetName(), issue.GetAsset().Name, issue.GetLinks().IssueOverview))
205-
206-
out.Table(result, func() []string {
207-
return result
203+
out.Table(issue, func() []string {
204+
res := []string{"ID\tCREATED AT\tSEVERITY\tCATEGORY\tSTATUS\tNAME\tASSET\tLINK"}
205+
res = append(res, fmt.Sprintf("%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s", issue.GetId(), issue.GetCreatedAt(), issue.GetSeverity(), issue.GetCategory(), issue.GetStatus(), issue.GetName(), issue.GetAsset().Name, issue.GetLinks().IssueOverview))
206+
return res
208207
})
209208

210209
return nil

0 commit comments

Comments
 (0)