jira-sprinter 2.1.1 → 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 +8 -5
- package/dist/main.js +32 -7
- package/package.json +1 -1
- package/src/auto.ts +39 -5
- package/src/cli.ts +2 -2
package/README.md
CHANGED
|
@@ -76,20 +76,23 @@ Options:
|
|
|
76
76
|
-h, --help display help for command
|
|
77
77
|
|
|
78
78
|
Commands:
|
|
79
|
-
auto [options] Automatically manages split tasks (
|
|
80
|
-
|
|
81
|
-
status
|
|
79
|
+
auto [options] Automatically manages split tasks (Preliminary
|
|
80
|
+
Testing and QE) based on ticket state and status
|
|
82
81
|
```
|
|
83
82
|
|
|
84
83
|
### `auto` command
|
|
85
84
|
|
|
86
|
-
The `auto` command automates the
|
|
85
|
+
The `auto` command automates the management of split tasks based on ticket state and status. It performs the following actions:
|
|
86
|
+
|
|
87
|
+
- **Preliminary Testing Requested**: Scans the board for issues where Preliminary Testing is marked as "Requested" and creates the corresponding split task if one does not already exist (or was previously closed).
|
|
88
|
+
- **Preliminary Testing Failed**: When testing has failed, automatically closes the linked Preliminary Testing split task.
|
|
89
|
+
- **Integration without QE Task**: Finds issues in "Integration" status that lack an open QE Task and creates one automatically.
|
|
87
90
|
|
|
88
91
|
```md
|
|
89
92
|
$ jira-sprinter auto --help
|
|
90
93
|
Usage: jira-sprinter auto [options]
|
|
91
94
|
|
|
92
|
-
Automatically manages split tasks (
|
|
95
|
+
Automatically manages split tasks (Preliminary Testing and QE) based on ticket
|
|
93
96
|
state and status
|
|
94
97
|
|
|
95
98
|
Options:
|
package/dist/main.js
CHANGED
|
@@ -47837,9 +47837,11 @@ async function runAuto(options) {
|
|
|
47837
47837
|
) && l.outwardIssue?.fields?.status.name !== "Closed"
|
|
47838
47838
|
)
|
|
47839
47839
|
);
|
|
47840
|
-
|
|
47841
|
-
|
|
47842
|
-
|
|
47840
|
+
if (preliminaryTestingRequested.length > 0) {
|
|
47841
|
+
logger.log(
|
|
47842
|
+
`${source_default.green("Preliminary Testing Requested")} - ${preliminaryTestingRequested.length}`
|
|
47843
|
+
);
|
|
47844
|
+
}
|
|
47843
47845
|
const preliminaryTestingFailed = boardIssues.filter(
|
|
47844
47846
|
(issue2) => issue2.fields?.[jira.fields.preliminaryTesting]?.value === "Fail" && issue2.fields?.issuelinks?.some(
|
|
47845
47847
|
(l) => l.type?.outward === "split to" && l.outwardIssue?.fields?.summary.startsWith(
|
|
@@ -47847,9 +47849,21 @@ async function runAuto(options) {
|
|
|
47847
47849
|
) && l.outwardIssue?.fields?.status.name !== "Closed"
|
|
47848
47850
|
)
|
|
47849
47851
|
);
|
|
47850
|
-
|
|
47851
|
-
|
|
47852
|
+
if (preliminaryTestingFailed.length > 0) {
|
|
47853
|
+
logger.log(
|
|
47854
|
+
`${source_default.red("Preliminary Testing Failed")} - ${preliminaryTestingFailed.length}`
|
|
47855
|
+
);
|
|
47856
|
+
}
|
|
47857
|
+
const issuesInIntegration = boardIssues.filter(
|
|
47858
|
+
(issue2) => issue2.fields?.status.name === "Integration" && !issue2.fields?.issuelinks?.some(
|
|
47859
|
+
(l) => l.type?.outward === "split to" && l.outwardIssue?.fields?.summary.startsWith(jira.qeTask.summary) && l.outwardIssue?.fields?.status.name !== "Closed"
|
|
47860
|
+
)
|
|
47852
47861
|
);
|
|
47862
|
+
if (issuesInIntegration.length > 0) {
|
|
47863
|
+
logger.log(
|
|
47864
|
+
`${source_default.yellow("Issues in Integration w/o QE Task")} - ${issuesInIntegration.length}`
|
|
47865
|
+
);
|
|
47866
|
+
}
|
|
47853
47867
|
if (preliminaryTestingRequested.length > 0) {
|
|
47854
47868
|
logger.log(
|
|
47855
47869
|
`${source_default.cyan("Creating split tasks for Preliminary Testing Requested...")}`
|
|
@@ -47883,6 +47897,17 @@ async function runAuto(options) {
|
|
|
47883
47897
|
}
|
|
47884
47898
|
await jira.closeTask(preliminaryTestingTask.outwardIssue?.key);
|
|
47885
47899
|
}
|
|
47900
|
+
if (issuesInIntegration.length > 0) {
|
|
47901
|
+
logger.log(
|
|
47902
|
+
`${source_default.cyan("Creating split tasks for Issues in Integration w/o QE Task...")}`
|
|
47903
|
+
);
|
|
47904
|
+
}
|
|
47905
|
+
for (const issue2 of issuesInIntegration) {
|
|
47906
|
+
if (!issue2.key) {
|
|
47907
|
+
continue;
|
|
47908
|
+
}
|
|
47909
|
+
await jira.createTasks(issue2.key, [jira.qeTask.value]);
|
|
47910
|
+
}
|
|
47886
47911
|
process.exit(0);
|
|
47887
47912
|
}
|
|
47888
47913
|
|
|
@@ -47989,10 +48014,10 @@ var issueStatusSchema = external_exports.union([
|
|
|
47989
48014
|
// src/cli.ts
|
|
47990
48015
|
function cli() {
|
|
47991
48016
|
const program2 = new Command();
|
|
47992
|
-
program2.name("jira-sprinter").description("\u{1F3C3} Small CLI tool to manage sprints in JIRA Board").version("2.
|
|
48017
|
+
program2.name("jira-sprinter").description("\u{1F3C3} Small CLI tool to manage sprints in JIRA Board").version("2.2.0");
|
|
47993
48018
|
program2.addCommand(
|
|
47994
48019
|
new Command("auto").description(
|
|
47995
|
-
"Automatically manages split tasks (
|
|
48020
|
+
"Automatically manages split tasks (Preliminary Testing and QE) based on ticket state and status"
|
|
47996
48021
|
).option("-b, --board [board]", "Jira Board ID", getDefaultValue("BOARD")).requiredOption(
|
|
47997
48022
|
"-t, --team [assigned team]",
|
|
47998
48023
|
"Jira Assigned Team",
|
package/package.json
CHANGED
package/src/auto.ts
CHANGED
|
@@ -26,9 +26,11 @@ export async function runAuto(options: OptionValues): Promise<void> {
|
|
|
26
26
|
l.outwardIssue?.fields?.status.name !== 'Closed'
|
|
27
27
|
)
|
|
28
28
|
);
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
if (preliminaryTestingRequested.length > 0) {
|
|
30
|
+
logger.log(
|
|
31
|
+
`${chalk.green('Preliminary Testing Requested')} - ${preliminaryTestingRequested.length}`
|
|
32
|
+
);
|
|
33
|
+
}
|
|
32
34
|
|
|
33
35
|
const preliminaryTestingFailed = boardIssues.filter(
|
|
34
36
|
issue =>
|
|
@@ -42,9 +44,27 @@ export async function runAuto(options: OptionValues): Promise<void> {
|
|
|
42
44
|
l.outwardIssue?.fields?.status.name !== 'Closed'
|
|
43
45
|
)
|
|
44
46
|
);
|
|
45
|
-
|
|
46
|
-
|
|
47
|
+
if (preliminaryTestingFailed.length > 0) {
|
|
48
|
+
logger.log(
|
|
49
|
+
`${chalk.red('Preliminary Testing Failed')} - ${preliminaryTestingFailed.length}`
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
const issuesInIntegration = boardIssues.filter(
|
|
54
|
+
issue =>
|
|
55
|
+
issue.fields?.status.name === 'Integration' &&
|
|
56
|
+
!issue.fields?.issuelinks?.some(
|
|
57
|
+
l =>
|
|
58
|
+
l.type?.outward === 'split to' &&
|
|
59
|
+
l.outwardIssue?.fields?.summary.startsWith(jira.qeTask.summary) &&
|
|
60
|
+
l.outwardIssue?.fields?.status.name !== 'Closed'
|
|
61
|
+
)
|
|
47
62
|
);
|
|
63
|
+
if (issuesInIntegration.length > 0) {
|
|
64
|
+
logger.log(
|
|
65
|
+
`${chalk.yellow('Issues in Integration w/o QE Task')} - ${issuesInIntegration.length}`
|
|
66
|
+
);
|
|
67
|
+
}
|
|
48
68
|
|
|
49
69
|
if (preliminaryTestingRequested.length > 0) {
|
|
50
70
|
logger.log(
|
|
@@ -90,5 +110,19 @@ export async function runAuto(options: OptionValues): Promise<void> {
|
|
|
90
110
|
await jira.closeTask(preliminaryTestingTask.outwardIssue?.key);
|
|
91
111
|
}
|
|
92
112
|
|
|
113
|
+
if (issuesInIntegration.length > 0) {
|
|
114
|
+
logger.log(
|
|
115
|
+
`${chalk.cyan('Creating split tasks for Issues in Integration w/o QE Task...')}`
|
|
116
|
+
);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
for (const issue of issuesInIntegration) {
|
|
120
|
+
if (!issue.key) {
|
|
121
|
+
continue;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
await jira.createTasks(issue.key, [jira.qeTask.value]);
|
|
125
|
+
}
|
|
126
|
+
|
|
93
127
|
process.exit(0);
|
|
94
128
|
}
|
package/src/cli.ts
CHANGED
|
@@ -24,12 +24,12 @@ export function cli(): Command {
|
|
|
24
24
|
program
|
|
25
25
|
.name('jira-sprinter')
|
|
26
26
|
.description('🏃 Small CLI tool to manage sprints in JIRA Board')
|
|
27
|
-
.version('2.
|
|
27
|
+
.version('2.2.0');
|
|
28
28
|
|
|
29
29
|
program.addCommand(
|
|
30
30
|
new Command('auto')
|
|
31
31
|
.description(
|
|
32
|
-
'Automatically manages split tasks (
|
|
32
|
+
'Automatically manages split tasks (Preliminary Testing and QE) based on ticket state and status'
|
|
33
33
|
)
|
|
34
34
|
.option('-b, --board [board]', 'Jira Board ID', getDefaultValue('BOARD'))
|
|
35
35
|
.requiredOption(
|