jiradc-cli 1.0.20 → 1.0.21
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 +13 -6
- package/dist/index.js +156 -58
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -37,14 +37,17 @@ All commands output JSON. Add `--pretty` to pretty-print.
|
|
|
37
37
|
| `jiradc issue assign <key> <user>` | Assign issue (user can be a username, `me`, or `none` to unassign) |
|
|
38
38
|
| `jiradc issue transition <key>` | Transition issue to a new status (`--to` accepts ID or status name, `--comment` to add a note) |
|
|
39
39
|
| `jiradc issue transitions <key>` | List available transitions |
|
|
40
|
-
| `jiradc issue comment <key>` | Add a comment |
|
|
41
|
-
| `jiradc issue comment
|
|
40
|
+
| `jiradc issue comment add <key>` | Add a comment (`--body`) |
|
|
41
|
+
| `jiradc issue comment edit <key>` | Edit a comment (`--id`, `--body`) |
|
|
42
|
+
| `jiradc issue comment delete <key>` | Delete a comment (`--id`) |
|
|
42
43
|
| `jiradc issue link <key> <targetKey>` | Link two issues (`--type` link type name) |
|
|
43
44
|
| `jiradc issue unlink <linkId>` | Remove a link |
|
|
44
45
|
| `jiradc issue link-types` | List available link types |
|
|
45
46
|
| `jiradc issue link-epic <keys...>` | Link one or more issues to an epic (`--epic <epicKey>`) |
|
|
46
|
-
| `jiradc issue worklog <key>` | Add a work log entry |
|
|
47
|
-
| `jiradc issue
|
|
47
|
+
| `jiradc issue worklog add <key>` | Add a work log entry (`--time`, `--comment`, `--started`) |
|
|
48
|
+
| `jiradc issue worklog list <key>` | Get work log entries |
|
|
49
|
+
| `jiradc issue worklog edit <key>` | Update a work log entry (`--id`, `--time`, `--comment`, `--started`, `--adjust-estimate`, `--new-estimate`) |
|
|
50
|
+
| `jiradc issue worklog delete <key>` | Delete a work log entry (`--id`, `--adjust-estimate`, `--new-estimate`, `--increase-by`) |
|
|
48
51
|
| `jiradc issue changelog <key>` | Get issue changelog |
|
|
49
52
|
| `jiradc issue batch-changelog` | Get changelog for multiple issues (`--keys`) |
|
|
50
53
|
| `jiradc issue clone <key>` | Clone an issue with subtasks |
|
|
@@ -93,6 +96,7 @@ All commands output JSON. Add `--pretty` to pretty-print.
|
|
|
93
96
|
| `jiradc sprint issues <boardId> <sprintId>` | Get issues in a sprint |
|
|
94
97
|
| `jiradc sprint create <boardId>` | Create a sprint |
|
|
95
98
|
| `jiradc sprint update <sprintId>` | Update a sprint |
|
|
99
|
+
| `jiradc sprint delete <sprintId>` | Delete a sprint (returns its issues to the backlog) |
|
|
96
100
|
|
|
97
101
|
### field
|
|
98
102
|
|
|
@@ -151,13 +155,16 @@ jiradc issue update AI-123 --fix-versions 1.0,2.0
|
|
|
151
155
|
jiradc issue link-epic AI-456 AI-457 AI-458 --epic AI-100
|
|
152
156
|
|
|
153
157
|
# Add a comment
|
|
154
|
-
jiradc issue comment AI-123 --body "Fixed in commit abc123"
|
|
158
|
+
jiradc issue comment add AI-123 --body "Fixed in commit abc123"
|
|
159
|
+
|
|
160
|
+
# Delete a comment
|
|
161
|
+
jiradc issue comment delete AI-123 --id 12345
|
|
155
162
|
|
|
156
163
|
# Link two issues
|
|
157
164
|
jiradc issue link AI-123 AI-456 --type "blocks"
|
|
158
165
|
|
|
159
166
|
# Log work
|
|
160
|
-
jiradc issue worklog AI-123 --time "2h 30m" --comment "Code review"
|
|
167
|
+
jiradc issue worklog add AI-123 --time "2h 30m" --comment "Code review"
|
|
161
168
|
|
|
162
169
|
# List active sprints
|
|
163
170
|
jiradc sprint list 42 --state active
|
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import { readFileSync } from "fs";
|
|
|
5
5
|
import { dirname, join as join4 } from "path";
|
|
6
6
|
import { fileURLToPath } from "url";
|
|
7
7
|
import { styleText } from "util";
|
|
8
|
-
import { Command as
|
|
8
|
+
import { Command as Command11 } from "commander";
|
|
9
9
|
|
|
10
10
|
// src/commands/board/issues.ts
|
|
11
11
|
import { Argument } from "commander";
|
|
@@ -379,8 +379,8 @@ function transformIssueFields(fields) {
|
|
|
379
379
|
issuelinks,
|
|
380
380
|
subtasks,
|
|
381
381
|
parent,
|
|
382
|
-
comment
|
|
383
|
-
worklog
|
|
382
|
+
comment,
|
|
383
|
+
worklog,
|
|
384
384
|
attachment,
|
|
385
385
|
// required scalars / structured fields we always keep verbatim
|
|
386
386
|
summary,
|
|
@@ -412,20 +412,20 @@ function transformIssueFields(fields) {
|
|
|
412
412
|
// Drop empty comment / worklog containers entirely. The default Jira
|
|
413
413
|
// search response includes both wrappers on every issue regardless of
|
|
414
414
|
// count; on a 25-issue page that's 25 × 2 empty objects of pure noise.
|
|
415
|
-
...
|
|
415
|
+
...comment && comment.comments.length > 0 ? {
|
|
416
416
|
comment: {
|
|
417
|
-
comments:
|
|
418
|
-
maxResults:
|
|
419
|
-
total:
|
|
420
|
-
startAt:
|
|
417
|
+
comments: comment.comments.map(transformComment),
|
|
418
|
+
maxResults: comment.maxResults,
|
|
419
|
+
total: comment.total,
|
|
420
|
+
startAt: comment.startAt
|
|
421
421
|
}
|
|
422
422
|
} : {},
|
|
423
|
-
...
|
|
423
|
+
...worklog && worklog.worklogs.length > 0 ? {
|
|
424
424
|
worklog: {
|
|
425
|
-
worklogs:
|
|
426
|
-
maxResults:
|
|
427
|
-
total:
|
|
428
|
-
startAt:
|
|
425
|
+
worklogs: worklog.worklogs.map(transformWorklog),
|
|
426
|
+
maxResults: worklog.maxResults,
|
|
427
|
+
total: worklog.total,
|
|
428
|
+
startAt: worklog.startAt
|
|
429
429
|
}
|
|
430
430
|
} : {},
|
|
431
431
|
...attachment && attachment.length > 0 ? { attachment: attachment.map(transformAttachment) } : {}
|
|
@@ -1071,24 +1071,49 @@ Examples:
|
|
|
1071
1071
|
);
|
|
1072
1072
|
}
|
|
1073
1073
|
|
|
1074
|
-
// src/commands/issue/comment
|
|
1075
|
-
function
|
|
1076
|
-
parent.command("
|
|
1074
|
+
// src/commands/issue/comment/add.ts
|
|
1075
|
+
function add(parent) {
|
|
1076
|
+
parent.command("add <key>").description("Add a comment to an issue").requiredOption("--body <text>", "Comment body in wiki markup").addHelpText("after", '\nExamples:\n jiradc issue comment add PROJ-123 --body "Fixed in latest build"').action(async (key, opts) => {
|
|
1077
1077
|
const client = getClient();
|
|
1078
|
-
const result = await client.issues.
|
|
1078
|
+
const result = await client.issues.addComment({ issueKeyOrId: key, body: opts.body });
|
|
1079
1079
|
output(transformComment(result));
|
|
1080
1080
|
});
|
|
1081
1081
|
}
|
|
1082
1082
|
|
|
1083
|
-
// src/commands/issue/comment.ts
|
|
1084
|
-
function
|
|
1085
|
-
parent.command("
|
|
1083
|
+
// src/commands/issue/comment/delete.ts
|
|
1084
|
+
function deleteComment(parent) {
|
|
1085
|
+
parent.command("delete <key>").description("Delete a comment from an issue").requiredOption("--id <commentId>", "Comment ID to delete").addHelpText("after", "\nExamples:\n jiradc issue comment delete PROJ-123 --id 12345").action(async (key, opts) => {
|
|
1086
1086
|
const client = getClient();
|
|
1087
|
-
|
|
1087
|
+
await client.issues.deleteComment({ issueKeyOrId: key, commentId: opts.id });
|
|
1088
|
+
output({ deleted: true, issueKey: key, commentId: opts.id });
|
|
1089
|
+
});
|
|
1090
|
+
}
|
|
1091
|
+
|
|
1092
|
+
// src/commands/issue/comment/edit.ts
|
|
1093
|
+
function edit(parent) {
|
|
1094
|
+
parent.command("edit <key>").description("Edit an existing comment").requiredOption("--id <commentId>", "Comment ID to edit").requiredOption("--body <text>", "Updated comment body in wiki markup").addHelpText("after", '\nExamples:\n jiradc issue comment edit PROJ-123 --id 12345 --body "Updated comment text"').action(async (key, opts) => {
|
|
1095
|
+
const client = getClient();
|
|
1096
|
+
const result = await client.issues.editComment({ issueKeyOrId: key, commentId: opts.id, body: opts.body });
|
|
1088
1097
|
output(transformComment(result));
|
|
1089
1098
|
});
|
|
1090
1099
|
}
|
|
1091
1100
|
|
|
1101
|
+
// src/commands/issue/comment/index.ts
|
|
1102
|
+
function registerCommentCommands(parent) {
|
|
1103
|
+
const comment = parent.command("comment").description("Comment operations").addHelpText(
|
|
1104
|
+
"after",
|
|
1105
|
+
`
|
|
1106
|
+
Examples:
|
|
1107
|
+
$ jiradc issue comment add PROJ-123 --body "Fixed in latest build"
|
|
1108
|
+
$ jiradc issue comment edit PROJ-123 --id 12345 --body "Updated comment text"
|
|
1109
|
+
$ jiradc issue comment delete PROJ-123 --id 12345
|
|
1110
|
+
`
|
|
1111
|
+
);
|
|
1112
|
+
add(comment);
|
|
1113
|
+
edit(comment);
|
|
1114
|
+
deleteComment(comment);
|
|
1115
|
+
}
|
|
1116
|
+
|
|
1092
1117
|
// src/commands/issue/create.ts
|
|
1093
1118
|
function create2(parent) {
|
|
1094
1119
|
parent.command("create").description("Create a new issue").requiredOption("--project <key>", "Project key or ID").requiredOption("--type <name>", "Issue type name (e.g., Task, Bug, Story)").requiredOption("--summary <text>", "Issue summary/title").option("--description <text>", "Issue description in wiki markup").option("--assignee <username>", "Assignee username").option("--reporter <username>", "Reporter username").option("--priority <name>", "Priority name (e.g., High, Medium, Low)").option("--labels <labels>", "Comma-separated labels").option("--components <names>", "Comma-separated component names").option("--fix-versions <versions>", "Comma-separated fix version names").option("--due-date <date>", "Due date in YYYY-MM-DD format").option("--parent <key>", "Parent issue key (for subtasks)").option("--custom-fields <json>", `Additional custom fields as JSON (e.g., '{"customfield_10100": "EPIC-1"}')`).addHelpText(
|
|
@@ -1213,22 +1238,6 @@ function devStatus(parent) {
|
|
|
1213
1238
|
});
|
|
1214
1239
|
}
|
|
1215
1240
|
|
|
1216
|
-
// src/commands/issue/get-worklog.ts
|
|
1217
|
-
function getWorklog(parent) {
|
|
1218
|
-
parent.command("get-worklog <key>").description("Get worklogs for an issue").option("--start <number>", "Starting index for pagination", nonNegativeInt).option("--limit <number>", "Max results per page (1-1000)", intInRange(1, 1e3), 25).addHelpText(
|
|
1219
|
-
"after",
|
|
1220
|
-
"\nExamples:\n jiradc issue get-worklog PROJ-123\n jiradc issue get-worklog PROJ-123 --limit 10\n jiradc issue get-worklog PROJ-123 --start 10 --limit 5"
|
|
1221
|
-
).action(async (key, opts) => {
|
|
1222
|
-
const client = getClient();
|
|
1223
|
-
const result = await client.issues.getWorklogs({
|
|
1224
|
-
issueKeyOrId: key,
|
|
1225
|
-
startAt: opts.start,
|
|
1226
|
-
maxResults: opts.limit
|
|
1227
|
-
});
|
|
1228
|
-
output(transformPaged(result, transformWorklog));
|
|
1229
|
-
});
|
|
1230
|
-
}
|
|
1231
|
-
|
|
1232
1241
|
// src/utils/constants.ts
|
|
1233
1242
|
var DEFAULT_FIELDS = [
|
|
1234
1243
|
"summary",
|
|
@@ -1521,11 +1530,11 @@ Examples:
|
|
|
1521
1530
|
});
|
|
1522
1531
|
}
|
|
1523
1532
|
|
|
1524
|
-
// src/commands/issue/worklog.ts
|
|
1525
|
-
function
|
|
1526
|
-
parent.command("
|
|
1533
|
+
// src/commands/issue/worklog/add.ts
|
|
1534
|
+
function add2(parent) {
|
|
1535
|
+
parent.command("add <key>").description("Log time spent on an issue").requiredOption("--time <timeSpent>", "Time spent (e.g., '2h', '30m', '1d 4h')").option("--comment <text>", "Worklog comment").option("--started <datetime>", "Start time in ISO 8601 format").addHelpText(
|
|
1527
1536
|
"after",
|
|
1528
|
-
'\nExamples:\n jiradc issue worklog PROJ-123 --time 2h\n jiradc issue worklog PROJ-123 --time "1d 4h" --comment "Backend implementation"\n jiradc issue worklog PROJ-123 --time 3h --started "2026-03-19T09:00:00.000+0000"'
|
|
1537
|
+
'\nExamples:\n jiradc issue worklog add PROJ-123 --time 2h\n jiradc issue worklog add PROJ-123 --time "1d 4h" --comment "Backend implementation"\n jiradc issue worklog add PROJ-123 --time 3h --started "2026-03-19T09:00:00.000+0000"'
|
|
1529
1538
|
).action(async (key, opts) => {
|
|
1530
1539
|
const client = getClient();
|
|
1531
1540
|
const result = await client.issues.addWorklog({
|
|
@@ -1538,6 +1547,86 @@ function worklog(parent) {
|
|
|
1538
1547
|
});
|
|
1539
1548
|
}
|
|
1540
1549
|
|
|
1550
|
+
// src/commands/issue/worklog/delete.ts
|
|
1551
|
+
import { Option as Option4 } from "commander";
|
|
1552
|
+
var ADJUST_ESTIMATE = ["new", "leave", "manual", "auto"];
|
|
1553
|
+
function deleteWorklog(parent) {
|
|
1554
|
+
parent.command("delete <key>").description("Delete a worklog entry").requiredOption("--id <worklogId>", "Worklog ID to delete").addOption(new Option4("--adjust-estimate <mode>", "How to adjust the remaining estimate").choices(ADJUST_ESTIMATE)).option("--new-estimate <estimate>", 'New remaining estimate; required when --adjust-estimate is "new"').option("--increase-by <amount>", 'Amount to increase the estimate by; required when --adjust-estimate is "manual"').addHelpText(
|
|
1555
|
+
"after",
|
|
1556
|
+
"\nExamples:\n jiradc issue worklog delete PROJ-123 --id 12345\n jiradc issue worklog delete PROJ-123 --id 12345 --adjust-estimate leave\n jiradc issue worklog delete PROJ-123 --id 12345 --adjust-estimate new --new-estimate 2h"
|
|
1557
|
+
).action(
|
|
1558
|
+
async (key, opts) => {
|
|
1559
|
+
const client = getClient();
|
|
1560
|
+
await client.issues.deleteWorklog({
|
|
1561
|
+
issueKeyOrId: key,
|
|
1562
|
+
worklogId: opts.id,
|
|
1563
|
+
adjustEstimate: opts.adjustEstimate,
|
|
1564
|
+
newEstimate: opts.newEstimate,
|
|
1565
|
+
increaseBy: opts.increaseBy
|
|
1566
|
+
});
|
|
1567
|
+
output({ deleted: true, issueKey: key, worklogId: opts.id });
|
|
1568
|
+
}
|
|
1569
|
+
);
|
|
1570
|
+
}
|
|
1571
|
+
|
|
1572
|
+
// src/commands/issue/worklog/edit.ts
|
|
1573
|
+
import { Option as Option5 } from "commander";
|
|
1574
|
+
var ADJUST_ESTIMATE2 = ["new", "leave", "auto"];
|
|
1575
|
+
function edit2(parent) {
|
|
1576
|
+
parent.command("edit <key>").description("Update an existing worklog entry").requiredOption("--id <worklogId>", "Worklog ID to edit").option("--time <timeSpent>", "Time spent (e.g., '2h', '30m', '1d 4h')").option("--comment <text>", "Worklog comment").option("--started <datetime>", "Start time in ISO 8601 format").addOption(new Option5("--adjust-estimate <mode>", "How to adjust the remaining estimate").choices(ADJUST_ESTIMATE2)).option("--new-estimate <estimate>", 'New remaining estimate; required when --adjust-estimate is "new"').addHelpText(
|
|
1577
|
+
"after",
|
|
1578
|
+
'\nExamples:\n jiradc issue worklog edit PROJ-123 --id 12345 --time "1h 30m"\n jiradc issue worklog edit PROJ-123 --id 12345 --comment "Revised note"\n jiradc issue worklog edit PROJ-123 --id 12345 --time 2h --adjust-estimate new --new-estimate 4h'
|
|
1579
|
+
).action(
|
|
1580
|
+
async (key, opts) => {
|
|
1581
|
+
const client = getClient();
|
|
1582
|
+
const result = await client.issues.updateWorklog({
|
|
1583
|
+
issueKeyOrId: key,
|
|
1584
|
+
worklogId: opts.id,
|
|
1585
|
+
timeSpent: opts.time,
|
|
1586
|
+
comment: opts.comment,
|
|
1587
|
+
started: opts.started,
|
|
1588
|
+
adjustEstimate: opts.adjustEstimate,
|
|
1589
|
+
newEstimate: opts.newEstimate
|
|
1590
|
+
});
|
|
1591
|
+
output(transformWorklog(result));
|
|
1592
|
+
}
|
|
1593
|
+
);
|
|
1594
|
+
}
|
|
1595
|
+
|
|
1596
|
+
// src/commands/issue/worklog/list.ts
|
|
1597
|
+
function list4(parent) {
|
|
1598
|
+
parent.command("list <key>").description("Get worklogs for an issue").option("--start <number>", "Starting index for pagination", nonNegativeInt).option("--limit <number>", "Max results per page (1-1000)", intInRange(1, 1e3), 25).addHelpText(
|
|
1599
|
+
"after",
|
|
1600
|
+
"\nExamples:\n jiradc issue worklog list PROJ-123\n jiradc issue worklog list PROJ-123 --limit 10\n jiradc issue worklog list PROJ-123 --start 10 --limit 5"
|
|
1601
|
+
).action(async (key, opts) => {
|
|
1602
|
+
const client = getClient();
|
|
1603
|
+
const result = await client.issues.getWorklogs({
|
|
1604
|
+
issueKeyOrId: key,
|
|
1605
|
+
startAt: opts.start,
|
|
1606
|
+
maxResults: opts.limit
|
|
1607
|
+
});
|
|
1608
|
+
output(transformPaged(result, transformWorklog));
|
|
1609
|
+
});
|
|
1610
|
+
}
|
|
1611
|
+
|
|
1612
|
+
// src/commands/issue/worklog/index.ts
|
|
1613
|
+
function registerWorklogCommands(parent) {
|
|
1614
|
+
const worklog = parent.command("worklog").description("Worklog operations").addHelpText(
|
|
1615
|
+
"after",
|
|
1616
|
+
`
|
|
1617
|
+
Examples:
|
|
1618
|
+
$ jiradc issue worklog add PROJ-123 --time 2h --comment "Backend work"
|
|
1619
|
+
$ jiradc issue worklog list PROJ-123 --limit 10
|
|
1620
|
+
$ jiradc issue worklog edit PROJ-123 --id 12345 --time "1h 30m"
|
|
1621
|
+
$ jiradc issue worklog delete PROJ-123 --id 12345
|
|
1622
|
+
`
|
|
1623
|
+
);
|
|
1624
|
+
add2(worklog);
|
|
1625
|
+
list4(worklog);
|
|
1626
|
+
edit2(worklog);
|
|
1627
|
+
deleteWorklog(worklog);
|
|
1628
|
+
}
|
|
1629
|
+
|
|
1541
1630
|
// src/commands/issue/index.ts
|
|
1542
1631
|
function registerIssueCommands(program2) {
|
|
1543
1632
|
const issue = program2.command("issue").description("Issue operations").addHelpText(
|
|
@@ -1560,10 +1649,8 @@ Examples:
|
|
|
1560
1649
|
transition(issue);
|
|
1561
1650
|
transitions(issue);
|
|
1562
1651
|
assign(issue);
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
worklog(issue);
|
|
1566
|
-
getWorklog(issue);
|
|
1652
|
+
registerCommentCommands(issue);
|
|
1653
|
+
registerWorklogCommands(issue);
|
|
1567
1654
|
changelog(issue);
|
|
1568
1655
|
batchChangelog(issue);
|
|
1569
1656
|
link(issue);
|
|
@@ -1578,7 +1665,7 @@ Examples:
|
|
|
1578
1665
|
}
|
|
1579
1666
|
|
|
1580
1667
|
// src/commands/project/list.ts
|
|
1581
|
-
function
|
|
1668
|
+
function list5(parent) {
|
|
1582
1669
|
parent.command("list").description("List all projects").option("--expand <expand>", 'Expand options (e.g., "description,lead")').option("--include-archived", "Include archived projects (default: false)").addHelpText(
|
|
1583
1670
|
"after",
|
|
1584
1671
|
"\nExamples:\n jiradc project list\n jiradc project list --expand description,lead\n jiradc project list --include-archived"
|
|
@@ -1611,7 +1698,7 @@ Examples:
|
|
|
1611
1698
|
$ jiradc project versions PROJ
|
|
1612
1699
|
`
|
|
1613
1700
|
);
|
|
1614
|
-
|
|
1701
|
+
list5(project);
|
|
1615
1702
|
versions(project);
|
|
1616
1703
|
}
|
|
1617
1704
|
|
|
@@ -1633,10 +1720,20 @@ function create3(parent) {
|
|
|
1633
1720
|
});
|
|
1634
1721
|
}
|
|
1635
1722
|
|
|
1636
|
-
// src/commands/sprint/
|
|
1723
|
+
// src/commands/sprint/delete.ts
|
|
1637
1724
|
import { Argument as Argument2 } from "commander";
|
|
1725
|
+
function deleteSprint(parent) {
|
|
1726
|
+
parent.command("delete").description("Delete a sprint (returns its issues to the backlog)").addArgument(new Argument2("<id>", "Sprint ID").argParser(positiveInt)).addHelpText("after", "\nExamples:\n jiradc sprint delete 100").action(async (id) => {
|
|
1727
|
+
const client = getClient();
|
|
1728
|
+
await client.agile.deleteSprint({ sprintId: id });
|
|
1729
|
+
output({ deleted: true, sprintId: id });
|
|
1730
|
+
});
|
|
1731
|
+
}
|
|
1732
|
+
|
|
1733
|
+
// src/commands/sprint/issues.ts
|
|
1734
|
+
import { Argument as Argument3 } from "commander";
|
|
1638
1735
|
function issues2(parent) {
|
|
1639
|
-
parent.command("issues").description("Get issues in a sprint").addArgument(new
|
|
1736
|
+
parent.command("issues").description("Get issues in a sprint").addArgument(new Argument3("<id>", "Sprint ID").argParser(positiveInt)).option("--limit <number>", "Max results (1-50, Jira DC caps at 50)", intInRange(1, 50), 25).option("--start <number>", "Starting index for pagination", nonNegativeInt).option("--fields <fields>", "Comma-separated field names to return").option("--jql <jql>", "Additional JQL filter within the sprint").addHelpText(
|
|
1640
1737
|
"after",
|
|
1641
1738
|
'\nExamples:\n jiradc sprint issues 100\n jiradc sprint issues 100 --limit 20\n jiradc sprint issues 100 --jql "status = Done" --fields summary,status\n jiradc sprint issues 100 --start 50 --limit 25'
|
|
1642
1739
|
).action(async (id, opts) => {
|
|
@@ -1653,10 +1750,10 @@ function issues2(parent) {
|
|
|
1653
1750
|
}
|
|
1654
1751
|
|
|
1655
1752
|
// src/commands/sprint/list.ts
|
|
1656
|
-
import { Option as
|
|
1753
|
+
import { Option as Option6 } from "commander";
|
|
1657
1754
|
var SPRINT_STATES = ["future", "active", "closed"];
|
|
1658
|
-
function
|
|
1659
|
-
parent.command("list").description("List sprints for a board").requiredOption("--board <id>", "Board ID", positiveInt).addOption(new
|
|
1755
|
+
function list6(parent) {
|
|
1756
|
+
parent.command("list").description("List sprints for a board").requiredOption("--board <id>", "Board ID", positiveInt).addOption(new Option6("--state <state>", "Filter by sprint state").choices(SPRINT_STATES)).addHelpText(
|
|
1660
1757
|
"after",
|
|
1661
1758
|
"\nExamples:\n jiradc sprint list --board 42\n jiradc sprint list --board 42 --state active"
|
|
1662
1759
|
).action(async (opts) => {
|
|
@@ -1670,10 +1767,10 @@ function list5(parent) {
|
|
|
1670
1767
|
}
|
|
1671
1768
|
|
|
1672
1769
|
// src/commands/sprint/update.ts
|
|
1673
|
-
import { Argument as
|
|
1770
|
+
import { Argument as Argument4, Option as Option7 } from "commander";
|
|
1674
1771
|
var SPRINT_STATES2 = ["future", "active", "closed"];
|
|
1675
1772
|
function update3(parent) {
|
|
1676
|
-
parent.command("update").description("Update an existing sprint").addArgument(new
|
|
1773
|
+
parent.command("update").description("Update an existing sprint").addArgument(new Argument4("<id>", "Sprint ID").argParser(positiveInt)).option("--name <name>", "New sprint name").addOption(new Option7("--state <state>", "New sprint state").choices(SPRINT_STATES2)).option("--start-date <date>", "New start date in ISO 8601 format").option("--end-date <date>", "New end date in ISO 8601 format").option("--goal <goal>", "New sprint goal").addHelpText(
|
|
1677
1774
|
"after",
|
|
1678
1775
|
'\nExamples:\n jiradc sprint update 100 --name "Sprint 10 - Extended"\n jiradc sprint update 100 --state active\n jiradc sprint update 100 --end-date 2026-04-10 --goal "Updated goal"'
|
|
1679
1776
|
).action(
|
|
@@ -1704,10 +1801,11 @@ Examples:
|
|
|
1704
1801
|
$ jiradc sprint create --board 42 --name "Sprint 10" --start-date 2026-04-01 --end-date 2026-04-14
|
|
1705
1802
|
`
|
|
1706
1803
|
);
|
|
1707
|
-
|
|
1804
|
+
list6(sprint);
|
|
1708
1805
|
issues2(sprint);
|
|
1709
1806
|
create3(sprint);
|
|
1710
1807
|
update3(sprint);
|
|
1808
|
+
deleteSprint(sprint);
|
|
1711
1809
|
}
|
|
1712
1810
|
|
|
1713
1811
|
// src/commands/token/client.ts
|
|
@@ -1767,7 +1865,7 @@ Examples:
|
|
|
1767
1865
|
}
|
|
1768
1866
|
|
|
1769
1867
|
// src/commands/token/list.ts
|
|
1770
|
-
function
|
|
1868
|
+
function list7(parent) {
|
|
1771
1869
|
parent.command("list").description("List Personal Access Tokens owned by the authenticated user (secrets not included)").option("--basic-username <u>", "Override $JIRA_BASIC_USERNAME").option(
|
|
1772
1870
|
"--basic-password <p>",
|
|
1773
1871
|
"Override $JIRA_BASIC_PASSWORD (caution: visible in process table; prefer the env var)"
|
|
@@ -1811,7 +1909,7 @@ Auth:
|
|
|
1811
1909
|
`
|
|
1812
1910
|
);
|
|
1813
1911
|
create4(token);
|
|
1814
|
-
|
|
1912
|
+
list7(token);
|
|
1815
1913
|
revoke(token);
|
|
1816
1914
|
}
|
|
1817
1915
|
|
|
@@ -1880,7 +1978,7 @@ function readPackageVersion() {
|
|
|
1880
1978
|
}
|
|
1881
1979
|
var DIM = "\x1B[2m";
|
|
1882
1980
|
var RESET = "\x1B[0m";
|
|
1883
|
-
var program = new
|
|
1981
|
+
var program = new Command11();
|
|
1884
1982
|
program.name("jiradc").description("Jira Data Center CLI").version(readPackageVersion()).configureHelp({
|
|
1885
1983
|
styleTitle: (str) => styleText("bold", str),
|
|
1886
1984
|
styleUsage: (str) => styleText("dim", str),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jiradc-cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.21",
|
|
4
4
|
"publish": true,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
],
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"commander": "^13.1.0",
|
|
15
|
-
"jira-data-center-client": "1.0.
|
|
15
|
+
"jira-data-center-client": "1.0.37"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
18
|
"@types/node": "24.10.4",
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
"tsx": "^4.19.2",
|
|
23
23
|
"typescript": "^5.7.2",
|
|
24
24
|
"vitest": "^4.0.16",
|
|
25
|
-
"config-
|
|
26
|
-
"config-
|
|
25
|
+
"config-eslint": "0.0.0",
|
|
26
|
+
"config-typescript": "0.0.0"
|
|
27
27
|
},
|
|
28
28
|
"engines": {
|
|
29
29
|
"node": ">=22.0.0"
|