We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 216163f commit 0296077Copy full SHA for 0296077
src/commands/repos/list-repos.ts
@@ -48,6 +48,20 @@ export async function listRepos({
48
return
49
}
50
51
+ spinner.stop('')
52
+
53
+ if (outputJson) {
54
+ const data = result.data.results.map(o => ({
55
+ id: o.id,
56
+ name: o.name,
57
+ visibility: o.visibility,
58
+ defaultBranch: o.default_branch,
59
+ archived: o.archived
60
+ }))
61
+ console.log(JSON.stringify(data, null, 2))
62
+ return
63
+ }
64
65
const options = {
66
columns: [
67
{ field: 'id', name: colors.magenta('ID') },
@@ -58,5 +72,5 @@ export async function listRepos({
72
]
73
74
- spinner.stop(chalkTable(options, result.data.results))
75
+ console.log(chalkTable(options, result.data.results))
76
0 commit comments