jira-pilot 2.0.0 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +5 -5
- package/README.md +465 -404
- package/bin/jira.js +62 -55
- package/package.json +90 -84
- package/src/commands/ai-actions/plan.js +119 -0
- package/src/commands/ai-actions/review.js +109 -0
- package/src/commands/ai-actions/standup.js +42 -0
- package/src/commands/ai.js +232 -204
- package/src/commands/board.js +75 -66
- package/src/commands/bulk.js +108 -0
- package/src/commands/config.js +224 -154
- package/src/commands/dashboard.js +89 -0
- package/src/commands/git.js +63 -60
- package/src/commands/issue.js +985 -698
- package/src/commands/mcp.js +20 -20
- package/src/commands/project.js +59 -50
- package/src/commands/sprint.js +153 -78
- package/src/server/mcp-server.js +332 -332
- package/src/services/ai-service.js +165 -107
- package/src/services/api-service.js +115 -115
- package/src/utils/adf-parser.js +49 -49
- package/src/utils/config.js +97 -60
- package/src/utils/error-handler.js +41 -41
- package/src/utils/text-to-adf.js +34 -34
- package/src/utils/validators.js +88 -0
package/src/commands/ai.js
CHANGED
|
@@ -1,204 +1,232 @@
|
|
|
1
|
-
import { Command } from 'commander';
|
|
2
|
-
import chalk from 'chalk';
|
|
3
|
-
import ora from 'ora';
|
|
4
|
-
import enquirer from 'enquirer';
|
|
5
|
-
import { api } from '../services/api-service.js';
|
|
6
|
-
import { aiService } from '../services/ai-service.js';
|
|
7
|
-
import { parseADF } from '../utils/adf-parser.js';
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
spinner.stop();
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
.
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
const
|
|
155
|
-
|
|
156
|
-
const
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
const
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
${
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
}
|
|
1
|
+
import { Command } from 'commander';
|
|
2
|
+
import chalk from 'chalk';
|
|
3
|
+
import ora from 'ora';
|
|
4
|
+
import enquirer from 'enquirer';
|
|
5
|
+
import { api } from '../services/api-service.js';
|
|
6
|
+
import { aiService } from '../services/ai-service.js';
|
|
7
|
+
import { parseADF } from '../utils/adf-parser.js';
|
|
8
|
+
import { validateIssueKey } from '../utils/validators.js';
|
|
9
|
+
import { reviewAction } from './ai-actions/review.js';
|
|
10
|
+
import { planAction } from './ai-actions/plan.js';
|
|
11
|
+
import { standupAction } from './ai-actions/standup.js';
|
|
12
|
+
|
|
13
|
+
export function registerAiCommand(program) {
|
|
14
|
+
const aiCmd = new Command('ai')
|
|
15
|
+
.description('AI Helper commands')
|
|
16
|
+
.addHelpText('after', `
|
|
17
|
+
Common Actions:
|
|
18
|
+
$ jira ai summarize <KEY> # Summarize an issue
|
|
19
|
+
$ jira ai draft # Draft an issue description from bullet points
|
|
20
|
+
$ jira ai suggest <KEY> # Suggest next actions for an issue
|
|
21
|
+
`);
|
|
22
|
+
|
|
23
|
+
// ── SUMMARIZE ─────────────────────────────────────────────────────
|
|
24
|
+
aiCmd
|
|
25
|
+
.command('summarize')
|
|
26
|
+
.description('Summarize an issue using AI')
|
|
27
|
+
.argument('<issueKey>', 'Jira Issue Key')
|
|
28
|
+
.action(async (issueKey) => {
|
|
29
|
+
const check = validateIssueKey(issueKey);
|
|
30
|
+
if (!check.valid) { console.error(chalk.red(check.message)); return; }
|
|
31
|
+
const spinner = ora(`Fetching issue ${issueKey}...`).start();
|
|
32
|
+
try {
|
|
33
|
+
const issue = await api.get(`/issue/${issueKey}?fields=summary,description,comment`);
|
|
34
|
+
spinner.text = 'Generating summary...';
|
|
35
|
+
|
|
36
|
+
const summary = issue.fields.summary;
|
|
37
|
+
const description = issue.fields.description
|
|
38
|
+
? parseADF(issue.fields.description)
|
|
39
|
+
: 'No description';
|
|
40
|
+
const comments = (issue.fields.comment?.comments || [])
|
|
41
|
+
.map(c => `${c.author.displayName}: ${typeof c.body === 'object' ? parseADF(c.body) : c.body}`)
|
|
42
|
+
.join('\n');
|
|
43
|
+
|
|
44
|
+
const prompt = `
|
|
45
|
+
You are a helpful Jira assistant. Please summarize the following Jira issue.
|
|
46
|
+
|
|
47
|
+
Title: ${summary}
|
|
48
|
+
Description: ${description}
|
|
49
|
+
|
|
50
|
+
Comments:
|
|
51
|
+
${comments || 'No comments'}
|
|
52
|
+
|
|
53
|
+
Provide a concise summary of the current status, key discussion points, and next steps if clear.
|
|
54
|
+
`;
|
|
55
|
+
|
|
56
|
+
const aiResponse = await aiService.generate(prompt);
|
|
57
|
+
spinner.stop();
|
|
58
|
+
|
|
59
|
+
console.log(chalk.green(`\n🤖 AI Summary for ${issueKey}:\n`));
|
|
60
|
+
console.log(aiResponse);
|
|
61
|
+
|
|
62
|
+
} catch (e) {
|
|
63
|
+
spinner.stop();
|
|
64
|
+
if (e.response && e.response.config && e.response.config.url.includes('/issue/')) {
|
|
65
|
+
console.error(chalk.red(`\nError: Issue "${issueKey}" not found.`));
|
|
66
|
+
} else {
|
|
67
|
+
console.error(chalk.red('\nFailed to generate summary:'));
|
|
68
|
+
if (e.response) {
|
|
69
|
+
console.error(chalk.red(`API Error ${e.response.status}: `), e.response.data);
|
|
70
|
+
} else {
|
|
71
|
+
console.error(chalk.red(e.message));
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
// ── DRAFT ─────────────────────────────────────────────────────────
|
|
78
|
+
aiCmd
|
|
79
|
+
.command('draft')
|
|
80
|
+
.description('Draft a structured issue description from bullet points')
|
|
81
|
+
.option('-i, --input <text>', 'Bullet points or rough notes (alternative to interactive prompt)')
|
|
82
|
+
.option('-t, --type <type>', 'Issue type context (bug, story, task)', 'task')
|
|
83
|
+
.addHelpText('after', `
|
|
84
|
+
Examples:
|
|
85
|
+
$ jira ai draft # Interactive
|
|
86
|
+
$ jira ai draft -i "login fails, returns 500, only on mobile"
|
|
87
|
+
$ jira ai draft -i "add dark mode toggle" -t story
|
|
88
|
+
`)
|
|
89
|
+
.action(async (options) => {
|
|
90
|
+
try {
|
|
91
|
+
let bulletPoints = options.input;
|
|
92
|
+
|
|
93
|
+
if (!bulletPoints) {
|
|
94
|
+
const { inputNotes } = await enquirer.prompt({
|
|
95
|
+
type: 'input',
|
|
96
|
+
name: 'inputNotes',
|
|
97
|
+
message: 'Enter your bullet points or rough notes:',
|
|
98
|
+
validate: (val) => val.trim().length > 0 || 'Input cannot be empty'
|
|
99
|
+
});
|
|
100
|
+
bulletPoints = inputNotes;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
const issueType = options.type || 'task';
|
|
104
|
+
|
|
105
|
+
const spinner = ora('Drafting description...').start();
|
|
106
|
+
|
|
107
|
+
const prompt = `
|
|
108
|
+
You are a Jira expert. Given the following rough notes/bullet points, generate a well-structured Jira issue description.
|
|
109
|
+
|
|
110
|
+
Issue Type: ${issueType}
|
|
111
|
+
Notes: ${bulletPoints}
|
|
112
|
+
|
|
113
|
+
Format the output as follows:
|
|
114
|
+
## Summary
|
|
115
|
+
A clear one-line summary for the issue title.
|
|
116
|
+
|
|
117
|
+
## Description
|
|
118
|
+
A well-structured description with:
|
|
119
|
+
- Context / Background
|
|
120
|
+
- Expected Behavior (if applicable)
|
|
121
|
+
- Steps to Reproduce (if it's a bug)
|
|
122
|
+
- Acceptance Criteria (if it's a story)
|
|
123
|
+
|
|
124
|
+
Keep it professional and concise. Output in plain text (not markdown headers, use plain labels).
|
|
125
|
+
`;
|
|
126
|
+
|
|
127
|
+
const aiResponse = await aiService.generate(prompt);
|
|
128
|
+
spinner.stop();
|
|
129
|
+
|
|
130
|
+
console.log(chalk.green('\n✍️ AI-Generated Draft:\n'));
|
|
131
|
+
console.log(aiResponse);
|
|
132
|
+
console.log(chalk.grey('\nTip: Copy this into "jira issue create" or use it as a starting point.'));
|
|
133
|
+
|
|
134
|
+
} catch (e) {
|
|
135
|
+
if (e === '' || e.message === '') {
|
|
136
|
+
console.log(chalk.yellow('\nCancelled.'));
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
console.error(chalk.red('\nFailed to generate draft:'));
|
|
140
|
+
console.error(chalk.red(e.message));
|
|
141
|
+
}
|
|
142
|
+
});
|
|
143
|
+
|
|
144
|
+
// ── SUGGEST ───────────────────────────────────────────────────────
|
|
145
|
+
aiCmd
|
|
146
|
+
.command('suggest')
|
|
147
|
+
.description('Suggest next actions for an issue based on its context')
|
|
148
|
+
.argument('<issueKey>', 'Jira Issue Key')
|
|
149
|
+
.action(async (issueKey) => {
|
|
150
|
+
const check = validateIssueKey(issueKey);
|
|
151
|
+
if (!check.valid) { console.error(chalk.red(check.message)); return; }
|
|
152
|
+
const spinner = ora(`Analyzing issue ${issueKey}...`).start();
|
|
153
|
+
try {
|
|
154
|
+
const issue = await api.get(`/issue/${issueKey}?fields=summary,description,status,assignee,priority,comment,issuetype`);
|
|
155
|
+
|
|
156
|
+
const summary = issue.fields.summary;
|
|
157
|
+
const description = issue.fields.description
|
|
158
|
+
? parseADF(issue.fields.description)
|
|
159
|
+
: 'No description';
|
|
160
|
+
const status = issue.fields.status?.name || 'Unknown';
|
|
161
|
+
const issueType = issue.fields.issuetype?.name || 'Unknown';
|
|
162
|
+
const priority = issue.fields.priority?.name || 'None';
|
|
163
|
+
const assignee = issue.fields.assignee?.displayName || 'Unassigned';
|
|
164
|
+
const comments = (issue.fields.comment?.comments || [])
|
|
165
|
+
.slice(-5) // Last 5 comments for context
|
|
166
|
+
.map(c => `${c.author.displayName}: ${typeof c.body === 'object' ? parseADF(c.body) : c.body}`)
|
|
167
|
+
.join('\n');
|
|
168
|
+
|
|
169
|
+
spinner.text = 'Generating suggestions...';
|
|
170
|
+
|
|
171
|
+
const prompt = `
|
|
172
|
+
You are a senior software engineer and Jira workflow expert. Analyze the following Jira issue and suggest practical next actions.
|
|
173
|
+
|
|
174
|
+
Issue Key: ${issueKey}
|
|
175
|
+
Type: ${issueType}
|
|
176
|
+
Status: ${status}
|
|
177
|
+
Priority: ${priority}
|
|
178
|
+
Assignee: ${assignee}
|
|
179
|
+
Title: ${summary}
|
|
180
|
+
Description: ${description}
|
|
181
|
+
|
|
182
|
+
Recent Comments:
|
|
183
|
+
${comments || 'No comments'}
|
|
184
|
+
|
|
185
|
+
Based on the current status and context, suggest:
|
|
186
|
+
1. **Immediate Next Action** — What should be done right now?
|
|
187
|
+
2. **Potential Blockers** — Are there any risks or dependencies to watch?
|
|
188
|
+
3. **Suggested Status Transition** — Should this issue be moved to a different status?
|
|
189
|
+
4. **Recommendations** — Any other advice for this issue?
|
|
190
|
+
|
|
191
|
+
Keep suggestions actionable and concise.
|
|
192
|
+
`;
|
|
193
|
+
|
|
194
|
+
const aiResponse = await aiService.generate(prompt);
|
|
195
|
+
spinner.stop();
|
|
196
|
+
|
|
197
|
+
console.log(chalk.green(`\n💡 AI Suggestions for ${issueKey}:\n`));
|
|
198
|
+
console.log(aiResponse);
|
|
199
|
+
|
|
200
|
+
} catch (e) {
|
|
201
|
+
spinner.stop();
|
|
202
|
+
if (e.response && e.response.status === 404) {
|
|
203
|
+
console.error(chalk.red(`\nError: Issue "${issueKey}" not found.`));
|
|
204
|
+
} else {
|
|
205
|
+
console.error(chalk.red('\nFailed to generate suggestions:'));
|
|
206
|
+
console.error(chalk.red(e.message));
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
});
|
|
210
|
+
|
|
211
|
+
// ── REVIEW ────────────────────────────────────────────────────────
|
|
212
|
+
aiCmd
|
|
213
|
+
.command('review')
|
|
214
|
+
.description('Analyze linked code/PRs for an issue')
|
|
215
|
+
.argument('<issueKey>', 'Jira Issue Key')
|
|
216
|
+
.action(reviewAction);
|
|
217
|
+
|
|
218
|
+
// ── PLAN ──────────────────────────────────────────────────────────
|
|
219
|
+
aiCmd
|
|
220
|
+
.command('plan')
|
|
221
|
+
.description('Break down an Epic into child stories/tasks')
|
|
222
|
+
.argument('<epicKey>', 'Epic Issue Key')
|
|
223
|
+
.action(planAction);
|
|
224
|
+
|
|
225
|
+
// ── STANDUP ───────────────────────────────────────────────────────
|
|
226
|
+
aiCmd
|
|
227
|
+
.command('standup')
|
|
228
|
+
.description('Generate a daily standup report from activity')
|
|
229
|
+
.action(standupAction);
|
|
230
|
+
|
|
231
|
+
program.addCommand(aiCmd);
|
|
232
|
+
}
|
package/src/commands/board.js
CHANGED
|
@@ -1,66 +1,75 @@
|
|
|
1
|
-
import { Command } from 'commander';
|
|
2
|
-
import chalk from 'chalk';
|
|
3
|
-
import { table } from 'table';
|
|
4
|
-
import { api } from '../services/api-service.js';
|
|
5
|
-
import ora from 'ora';
|
|
6
|
-
import { handleCommandError } from '../utils/error-handler.js';
|
|
7
|
-
|
|
8
|
-
export function registerBoardCommand(program) {
|
|
9
|
-
const boardCmd = new Command('board')
|
|
10
|
-
.description('Manage Jira boards')
|
|
11
|
-
.addHelpText('after', `
|
|
12
|
-
Common Actions:
|
|
13
|
-
$ jira board list # List all boards
|
|
14
|
-
$ jira board list -p PROJ # List boards for a project
|
|
15
|
-
`);
|
|
16
|
-
|
|
17
|
-
boardCmd
|
|
18
|
-
.command('list')
|
|
19
|
-
.description('List Jira boards')
|
|
20
|
-
.option('-p, --project <key>', 'Filter by project key')
|
|
21
|
-
.option('-t, --type <type>', 'Filter by board type (scrum, kanban, simple)')
|
|
22
|
-
.option('-l, --limit <n>', 'Max results', '50')
|
|
23
|
-
.
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
params
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
]
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
1
|
+
import { Command } from 'commander';
|
|
2
|
+
import chalk from 'chalk';
|
|
3
|
+
import { table } from 'table';
|
|
4
|
+
import { api } from '../services/api-service.js';
|
|
5
|
+
import ora from 'ora';
|
|
6
|
+
import { handleCommandError } from '../utils/error-handler.js';
|
|
7
|
+
|
|
8
|
+
export function registerBoardCommand(program) {
|
|
9
|
+
const boardCmd = new Command('board')
|
|
10
|
+
.description('Manage Jira boards')
|
|
11
|
+
.addHelpText('after', `
|
|
12
|
+
Common Actions:
|
|
13
|
+
$ jira board list # List all boards
|
|
14
|
+
$ jira board list -p PROJ # List boards for a project
|
|
15
|
+
`);
|
|
16
|
+
|
|
17
|
+
boardCmd
|
|
18
|
+
.command('list')
|
|
19
|
+
.description('List Jira boards')
|
|
20
|
+
.option('-p, --project <key>', 'Filter by project key')
|
|
21
|
+
.option('-t, --type <type>', 'Filter by board type (scrum, kanban, simple)')
|
|
22
|
+
.option('-l, --limit <n>', 'Max results', '50')
|
|
23
|
+
.option('-o, --output <format>', 'Output format (json)')
|
|
24
|
+
.action(async (options) => {
|
|
25
|
+
const spinner = ora('Fetching boards...').start();
|
|
26
|
+
try {
|
|
27
|
+
const params = new URLSearchParams();
|
|
28
|
+
params.set('maxResults', options.limit);
|
|
29
|
+
|
|
30
|
+
if (options.project) {
|
|
31
|
+
params.set('projectKeyOrId', options.project);
|
|
32
|
+
}
|
|
33
|
+
if (options.type) {
|
|
34
|
+
params.set('type', options.type);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
const data = await api.agileGet(`/board?${params.toString()}`);
|
|
38
|
+
spinner.stop();
|
|
39
|
+
|
|
40
|
+
if (!data.values || data.values.length === 0) {
|
|
41
|
+
console.log(chalk.yellow('No boards found.'));
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
if (options.output === 'json') {
|
|
46
|
+
console.log(JSON.stringify(data.values.map(b => ({
|
|
47
|
+
id: b.id, name: b.name,
|
|
48
|
+
type: b.type, project: b.location?.projectKey || null
|
|
49
|
+
})), null, 2));
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
const tableData = [
|
|
54
|
+
[chalk.bold('ID'), chalk.bold('Name'), chalk.bold('Type'), chalk.bold('Project')]
|
|
55
|
+
];
|
|
56
|
+
|
|
57
|
+
data.values.forEach(b => {
|
|
58
|
+
tableData.push([
|
|
59
|
+
b.id,
|
|
60
|
+
b.name,
|
|
61
|
+
b.type,
|
|
62
|
+
b.location?.projectKey || '-'
|
|
63
|
+
]);
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
console.log(table(tableData));
|
|
67
|
+
console.log(chalk.grey(`Showing ${data.values.length} board(s)`));
|
|
68
|
+
|
|
69
|
+
} catch (e) {
|
|
70
|
+
handleCommandError(spinner, e, 'Failed to list boards');
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
program.addCommand(boardCmd);
|
|
75
|
+
}
|