jira-pilot 2.1.2 → 2.2.0
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/README.md +54 -0
- package/bin/jira.ts +2 -0
- package/dist/bin/jira.js +2 -0
- package/dist/bin/jira.js.map +1 -1
- package/dist/src/commands/ai-actions/plan.js +1 -1
- package/dist/src/commands/ai-actions/plan.js.map +1 -1
- package/dist/src/commands/ai-actions/review.js +5 -4
- package/dist/src/commands/ai-actions/review.js.map +1 -1
- package/dist/src/commands/ai-actions/standup.js +1 -1
- package/dist/src/commands/ai-actions/standup.js.map +1 -1
- package/dist/src/commands/ai.js +1 -1
- package/dist/src/commands/ai.js.map +1 -1
- package/dist/src/commands/board.js +10 -5
- package/dist/src/commands/board.js.map +1 -1
- package/dist/src/commands/bulk.js +11 -10
- package/dist/src/commands/bulk.js.map +1 -1
- package/dist/src/commands/config.js +1 -1
- package/dist/src/commands/config.js.map +1 -1
- package/dist/src/commands/dashboard.js +19 -12
- package/dist/src/commands/dashboard.js.map +1 -1
- package/dist/src/commands/filter.js +7 -4
- package/dist/src/commands/filter.js.map +1 -1
- package/dist/src/commands/git.js +1 -1
- package/dist/src/commands/git.js.map +1 -1
- package/dist/src/commands/issue-attach.js +1 -1
- package/dist/src/commands/issue-attach.js.map +1 -1
- package/dist/src/commands/issue-pr.js +1 -1
- package/dist/src/commands/issue-pr.js.map +1 -1
- package/dist/src/commands/issue-worklog.js +10 -5
- package/dist/src/commands/issue-worklog.js.map +1 -1
- package/dist/src/commands/issue.js +173 -122
- package/dist/src/commands/issue.js.map +1 -1
- package/dist/src/commands/project.js +10 -5
- package/dist/src/commands/project.js.map +1 -1
- package/dist/src/commands/sprint.js +19 -8
- package/dist/src/commands/sprint.js.map +1 -1
- package/dist/src/commands/tui.d.ts +2 -0
- package/dist/src/commands/tui.js +10 -0
- package/dist/src/commands/tui.js.map +1 -0
- package/dist/src/server/mcp-server.js +209 -27
- package/dist/src/server/mcp-server.js.map +1 -1
- package/dist/src/services/ai-service.js +7 -4
- package/dist/src/services/ai-service.js.map +1 -1
- package/dist/src/services/api-service.d.ts +2 -0
- package/dist/src/services/api-service.js +32 -20
- package/dist/src/services/api-service.js.map +1 -1
- package/dist/src/tui/App.d.ts +1 -0
- package/dist/src/tui/App.js +26 -0
- package/dist/src/tui/App.js.map +1 -0
- package/dist/src/tui/index.d.ts +1 -0
- package/dist/src/tui/index.js +8 -0
- package/dist/src/tui/index.js.map +1 -0
- package/dist/src/tui/screens/BoardList.d.ts +1 -0
- package/dist/src/tui/screens/BoardList.js +71 -0
- package/dist/src/tui/screens/BoardList.js.map +1 -0
- package/dist/src/tui/screens/Dashboard.d.ts +1 -0
- package/dist/src/tui/screens/Dashboard.js +41 -0
- package/dist/src/tui/screens/Dashboard.js.map +1 -0
- package/dist/src/tui/screens/IssueDetail.d.ts +6 -0
- package/dist/src/tui/screens/IssueDetail.js +40 -0
- package/dist/src/tui/screens/IssueDetail.js.map +1 -0
- package/dist/src/tui/screens/IssueList.d.ts +1 -0
- package/dist/src/tui/screens/IssueList.js +72 -0
- package/dist/src/tui/screens/IssueList.js.map +1 -0
- package/dist/src/tui/screens/KanbanBoard.d.ts +6 -0
- package/dist/src/tui/screens/KanbanBoard.js +86 -0
- package/dist/src/tui/screens/KanbanBoard.js.map +1 -0
- package/dist/src/tui/utils/adf-render.d.ts +1 -0
- package/dist/src/tui/utils/adf-render.js +29 -0
- package/dist/src/tui/utils/adf-render.js.map +1 -0
- package/dist/src/utils/api-paths.d.ts +31 -0
- package/dist/src/utils/api-paths.js +32 -0
- package/dist/src/utils/api-paths.js.map +1 -0
- package/dist/src/utils/error-handler.d.ts +2 -2
- package/dist/src/utils/error-handler.js.map +1 -1
- package/dist/src/utils/http.d.ts +27 -0
- package/dist/src/utils/http.js +95 -0
- package/dist/src/utils/http.js.map +1 -0
- package/dist/src/utils/spinner.d.ts +21 -0
- package/dist/src/utils/spinner.js +79 -0
- package/dist/src/utils/spinner.js.map +1 -0
- package/package.json +10 -5
- package/src/commands/ai-actions/plan.ts +1 -1
- package/src/commands/ai-actions/review.ts +5 -4
- package/src/commands/ai-actions/standup.ts +1 -1
- package/src/commands/ai.ts +1 -1
- package/src/commands/board.ts +10 -5
- package/src/commands/bulk.ts +11 -10
- package/src/commands/config.ts +1 -1
- package/src/commands/dashboard.ts +20 -12
- package/src/commands/filter.ts +8 -5
- package/src/commands/git.ts +1 -1
- package/src/commands/issue-attach.ts +1 -1
- package/src/commands/issue-pr.ts +1 -1
- package/src/commands/issue-worklog.ts +10 -5
- package/src/commands/issue.ts +181 -124
- package/src/commands/project.ts +10 -5
- package/src/commands/sprint.ts +19 -8
- package/src/commands/tui.ts +11 -0
- package/src/server/mcp-server.ts +234 -27
- package/src/services/ai-service.ts +7 -4
- package/src/services/api-service.ts +34 -21
- package/src/tui/App.tsx +61 -0
- package/src/tui/index.tsx +8 -0
- package/src/tui/screens/BoardList.tsx +102 -0
- package/src/tui/screens/Dashboard.tsx +75 -0
- package/src/tui/screens/IssueDetail.tsx +93 -0
- package/src/tui/screens/IssueList.tsx +116 -0
- package/src/tui/screens/KanbanBoard.tsx +133 -0
- package/src/tui/utils/adf-render.ts +30 -0
- package/src/utils/api-paths.ts +32 -0
- package/src/utils/error-handler.ts +2 -2
- package/src/utils/http.ts +128 -0
- package/src/utils/spinner.ts +87 -0
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { Command } from 'commander';
|
|
2
2
|
import chalk from 'chalk';
|
|
3
|
-
import Table from '
|
|
4
|
-
import ora from '
|
|
3
|
+
import { Table } from 'cmd-table';
|
|
4
|
+
import ora from '../utils/spinner.js';
|
|
5
5
|
import enquirer from 'enquirer';
|
|
6
6
|
import { api } from '../services/api-service.js';
|
|
7
7
|
import { handleCommandError } from '../utils/error-handler.js';
|
|
8
|
+
import { API } from '../utils/api-paths.js';
|
|
8
9
|
|
|
9
10
|
// Utility for status icons
|
|
10
11
|
const getStatusIcon = (status: string) => {
|
|
@@ -67,11 +68,11 @@ export function registerDashboardCommand(program: Command) {
|
|
|
67
68
|
console.clear();
|
|
68
69
|
const spinner = ora('Loading dashboard...').start();
|
|
69
70
|
try {
|
|
70
|
-
const myself = await api.get(
|
|
71
|
+
const myself = await api.get(API.USER.MYSELF);
|
|
71
72
|
|
|
72
73
|
// Fetch in parallel: my open issues + recently updated
|
|
73
74
|
const [myIssues, recentIssues] = await Promise.all([
|
|
74
|
-
api.post(
|
|
75
|
+
api.post(API.SEARCH.JQL, {
|
|
75
76
|
jql: 'assignee = currentUser() AND statusCategory != Done ORDER BY priority ASC, updated DESC', // Fixed Sort
|
|
76
77
|
maxResults: 15,
|
|
77
78
|
fields: ['summary', 'status', 'priority', 'updated', 'issuetype']
|
|
@@ -96,11 +97,17 @@ export function registerDashboardCommand(program: Command) {
|
|
|
96
97
|
|
|
97
98
|
if (issues.length > 0) {
|
|
98
99
|
const table = new Table({
|
|
99
|
-
|
|
100
|
+
columns: [
|
|
101
|
+
{ name: chalk.bold('Key') },
|
|
102
|
+
{ name: chalk.bold('Type') },
|
|
103
|
+
{ name: chalk.bold('Summary') },
|
|
104
|
+
{ name: chalk.bold('Status') },
|
|
105
|
+
{ name: chalk.bold('Priority') }
|
|
106
|
+
]
|
|
100
107
|
});
|
|
101
108
|
|
|
102
109
|
issues.forEach((i: any) => {
|
|
103
|
-
table.
|
|
110
|
+
table.addRow([
|
|
104
111
|
chalk.cyan(i.key),
|
|
105
112
|
i.fields.issuetype?.name || '',
|
|
106
113
|
i.fields.summary ? (i.fields.summary.length > 40 ? i.fields.summary.substring(0, 37) + '...' : i.fields.summary) : '',
|
|
@@ -108,7 +115,7 @@ export function registerDashboardCommand(program: Command) {
|
|
|
108
115
|
getPriorityColor(i.fields.priority?.name || '', i.fields.priority?.name || '')
|
|
109
116
|
]);
|
|
110
117
|
});
|
|
111
|
-
console.log(table.
|
|
118
|
+
console.log(table.render());
|
|
112
119
|
} else {
|
|
113
120
|
console.log(chalk.green(' 🎉 No open issues — nice work!'));
|
|
114
121
|
}
|
|
@@ -168,7 +175,7 @@ export function registerDashboardCommand(program: Command) {
|
|
|
168
175
|
if (issueAction === 'back') continue;
|
|
169
176
|
|
|
170
177
|
if (issueAction === 'view') {
|
|
171
|
-
const issue = await api.get(
|
|
178
|
+
const issue = await api.get(API.ISSUE.GET(selectedKey));
|
|
172
179
|
console.log(chalk.bold(`\n${issue.key}: ${issue.fields.summary}`));
|
|
173
180
|
console.log(chalk.grey('────────────────────────────────────────'));
|
|
174
181
|
console.log(`${getStatusIcon(issue.fields.status.name)} ${issue.fields.status.name} | ${getPriorityColor(issue.fields.priority?.name || '', issue.fields.priority?.name || '')}`);
|
|
@@ -184,27 +191,28 @@ export function registerDashboardCommand(program: Command) {
|
|
|
184
191
|
}) as any;
|
|
185
192
|
if (inputComment) {
|
|
186
193
|
const { textToADF } = await import('../utils/text-to-adf.js');
|
|
187
|
-
await api.post(
|
|
194
|
+
await api.post(API.ISSUE.COMMENT(selectedKey), { body: textToADF(inputComment) });
|
|
188
195
|
console.log(chalk.green('Comment added.'));
|
|
189
196
|
await pause();
|
|
190
197
|
}
|
|
191
198
|
}
|
|
192
199
|
|
|
193
200
|
if (issueAction === 'transition') {
|
|
194
|
-
const transData = await api.get(
|
|
201
|
+
const transData = await api.get(API.ISSUE.TRANSITIONS(selectedKey));
|
|
195
202
|
const { transId } = await enquirer.prompt({
|
|
196
203
|
type: 'select',
|
|
197
204
|
name: 'transId',
|
|
198
205
|
message: 'Select Status:',
|
|
199
206
|
choices: transData.transitions.map((t: any) => ({ name: t.id, message: t.to.name }))
|
|
200
207
|
}) as any;
|
|
201
|
-
await api.post(
|
|
208
|
+
await api.post(API.ISSUE.TRANSITIONS(selectedKey), { transition: { id: transId } });
|
|
202
209
|
console.log(chalk.green('Transitioned.'));
|
|
203
210
|
await pause();
|
|
204
211
|
}
|
|
205
212
|
|
|
213
|
+
|
|
206
214
|
if (issueAction === 'assign') {
|
|
207
|
-
await api.put(
|
|
215
|
+
await api.put(API.ISSUE.ASSIGNEE(selectedKey), { accountId: myself.accountId });
|
|
208
216
|
console.log(chalk.green('Assigned to you.'));
|
|
209
217
|
await pause();
|
|
210
218
|
}
|
package/src/commands/filter.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Command } from 'commander';
|
|
2
2
|
import chalk from 'chalk';
|
|
3
|
-
import Table from '
|
|
3
|
+
import { Table } from 'cmd-table';
|
|
4
4
|
import { api } from '../services/api-service.js';
|
|
5
|
-
import ora from '
|
|
5
|
+
import ora from '../utils/spinner.js';
|
|
6
6
|
import enquirer from 'enquirer';
|
|
7
7
|
import { handleCommandError } from '../utils/error-handler.js';
|
|
8
8
|
import { ConfigService } from '../services/config-service.js';
|
|
@@ -30,14 +30,17 @@ Examples:
|
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
const table = new Table({
|
|
33
|
-
|
|
33
|
+
columns: [
|
|
34
|
+
{ name: chalk.bold('Name') },
|
|
35
|
+
{ name: chalk.bold('JQL') }
|
|
36
|
+
]
|
|
34
37
|
});
|
|
35
38
|
|
|
36
39
|
for (const [name, jql] of Object.entries(filters)) {
|
|
37
|
-
table.
|
|
40
|
+
table.addRow([chalk.cyan(name), jql as string] as any);
|
|
38
41
|
}
|
|
39
42
|
|
|
40
|
-
console.log(table.
|
|
43
|
+
console.log(table.render());
|
|
41
44
|
});
|
|
42
45
|
|
|
43
46
|
filterCmd
|
package/src/commands/git.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { Command } from 'commander';
|
|
|
2
2
|
import chalk from 'chalk';
|
|
3
3
|
import { execSync } from 'child_process';
|
|
4
4
|
import { api } from '../services/api-service.js';
|
|
5
|
-
import ora from '
|
|
5
|
+
import ora from '../utils/spinner.js';
|
|
6
6
|
import enquirer from 'enquirer';
|
|
7
7
|
import { validateIssueKey } from '../utils/validators.js';
|
|
8
8
|
import { handleCommandError } from '../utils/error-handler.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Command } from 'commander';
|
|
2
2
|
import chalk from 'chalk';
|
|
3
3
|
import { api } from '../services/api-service.js';
|
|
4
|
-
import ora from '
|
|
4
|
+
import ora from '../utils/spinner.js';
|
|
5
5
|
import fs from 'fs';
|
|
6
6
|
import path from 'path';
|
|
7
7
|
import { validateIssueKey } from '../utils/validators.js';
|
package/src/commands/issue-pr.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { Command } from 'commander';
|
|
|
2
2
|
import chalk from 'chalk';
|
|
3
3
|
import enquirer from 'enquirer';
|
|
4
4
|
import { api } from '../services/api-service.js';
|
|
5
|
-
import ora from '
|
|
5
|
+
import ora from '../utils/spinner.js';
|
|
6
6
|
import { exec } from 'child_process';
|
|
7
7
|
import { promisify } from 'util';
|
|
8
8
|
import { validateIssueKey } from '../utils/validators.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Command } from 'commander';
|
|
2
2
|
import chalk from 'chalk';
|
|
3
|
-
import Table from '
|
|
3
|
+
import { Table } from 'cmd-table';
|
|
4
4
|
import { api } from '../services/api-service.js';
|
|
5
|
-
import ora from '
|
|
5
|
+
import ora from '../utils/spinner.js';
|
|
6
6
|
import enquirer from 'enquirer';
|
|
7
7
|
import { textToADF } from '../utils/text-to-adf.js';
|
|
8
8
|
import { validateIssueKey } from '../utils/validators.js';
|
|
@@ -67,11 +67,16 @@ Examples:
|
|
|
67
67
|
console.log(chalk.bold(`\nWorklogs for ${chalk.cyan(issueKey)}:`));
|
|
68
68
|
|
|
69
69
|
const table = new Table({
|
|
70
|
-
|
|
70
|
+
columns: [
|
|
71
|
+
{ name: chalk.bold('Author') },
|
|
72
|
+
{ name: chalk.bold('Time Spent') },
|
|
73
|
+
{ name: chalk.bold('Date') },
|
|
74
|
+
{ name: chalk.bold('Comment') }
|
|
75
|
+
]
|
|
71
76
|
});
|
|
72
77
|
|
|
73
78
|
data.worklogs.forEach((w: any) => {
|
|
74
|
-
table.
|
|
79
|
+
table.addRow([
|
|
75
80
|
w.author?.displayName || 'Unknown',
|
|
76
81
|
w.timeSpent,
|
|
77
82
|
w.started.split('T')[0],
|
|
@@ -79,7 +84,7 @@ Examples:
|
|
|
79
84
|
]);
|
|
80
85
|
});
|
|
81
86
|
|
|
82
|
-
console.log(table.
|
|
87
|
+
console.log(table.render());
|
|
83
88
|
|
|
84
89
|
} catch (e: any) {
|
|
85
90
|
handleCommandError(spinner, e, 'Failed to list worklogs');
|