github-issue-tower-defence-management 1.48.0 → 1.49.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/CHANGELOG.md +7 -0
- package/README.md +2 -2
- package/bin/domain/entities/WorkflowStatus.js +32 -12
- package/bin/domain/entities/WorkflowStatus.js.map +1 -1
- package/bin/domain/usecases/AnalyzeStoriesUseCase.js +1 -1
- package/bin/domain/usecases/AnalyzeStoriesUseCase.js.map +1 -1
- package/bin/domain/usecases/ChangeStatusByStoryColorUseCase.js +4 -4
- package/bin/domain/usecases/ChangeStatusByStoryColorUseCase.js.map +1 -1
- package/bin/domain/usecases/ConvertCheckboxToIssueInStoryIssueUseCase.js +1 -1
- package/bin/domain/usecases/ConvertCheckboxToIssueInStoryIssueUseCase.js.map +1 -1
- package/bin/domain/usecases/CreateEstimationIssueUseCase.js +1 -1
- package/bin/domain/usecases/CreateEstimationIssueUseCase.js.map +1 -1
- package/bin/domain/usecases/SetupTowerDefenceProjectUseCase.js +4 -2
- package/bin/domain/usecases/SetupTowerDefenceProjectUseCase.js.map +1 -1
- package/package.json +1 -1
- package/src/domain/entities/WorkflowStatus.ts +31 -12
- package/src/domain/usecases/AnalyzeStoriesUseCase.ts +2 -2
- package/src/domain/usecases/ChangeStatusByStoryColorUseCase.test.ts +5 -5
- package/src/domain/usecases/ChangeStatusByStoryColorUseCase.ts +5 -5
- package/src/domain/usecases/ConvertCheckboxToIssueInStoryIssueUseCase.test.ts +2 -2
- package/src/domain/usecases/ConvertCheckboxToIssueInStoryIssueUseCase.ts +2 -2
- package/src/domain/usecases/CreateEstimationIssueUseCase.ts +2 -2
- package/src/domain/usecases/SetupTowerDefenceProjectUseCase.test.ts +100 -21
- package/src/domain/usecases/SetupTowerDefenceProjectUseCase.ts +6 -2
- package/types/domain/entities/WorkflowStatus.d.ts +6 -2
- package/types/domain/entities/WorkflowStatus.d.ts.map +1 -1
- package/types/domain/usecases/SetupTowerDefenceProjectUseCase.d.ts.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [1.49.0](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/compare/v1.48.0...v1.49.0) (2026-05-18)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **core:** redefine REQUIRED_WORKFLOW_STATUSES to 10 statuses without descriptions ([c147066](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/c1470661776a20ee064555b74e067afc7eca07d9))
|
|
7
|
+
|
|
1
8
|
# [1.48.0](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/compare/v1.47.0...v1.48.0) (2026-05-17)
|
|
2
9
|
|
|
3
10
|
|
package/README.md
CHANGED
|
@@ -73,7 +73,7 @@ npx github-issue-tower-defence-management notifyFinishedIssuePreparation --confi
|
|
|
73
73
|
|
|
74
74
|
The `config.yaml` for the `schedule` command must match the input type of `HandleScheduledEventUseCase.run()`. Below is the structure:
|
|
75
75
|
|
|
76
|
-
Workflow status names (`Unread`, `Awaiting Workspace`, `Preparation`, `Awaiting Quality Check`, `
|
|
76
|
+
Workflow status names (`Unread`, `Awaiting Task Breakdown`, `Awaiting Workspace`, `Preparation`, `Awaiting Quality Check`, `Todo`, `PC Todo`, `In Tmux`, `Done`, `Icebox`) are fixed code constants and cannot be overridden from CLI options, config files, or project README. The `schedule` command automatically creates any missing required statuses on the target project on each run via `SetupTowerDefenceProjectUseCase`.
|
|
77
77
|
|
|
78
78
|
```yaml
|
|
79
79
|
disabled: boolean # When true, skip all processing and return null
|
|
@@ -172,7 +172,7 @@ awLogDirectoryPath?: string # Optional: Directory path where aw log files named
|
|
|
172
172
|
awLogStaleThresholdMinutes?: number # Optional: Minutes since last aw log mtime after which a Preparation issue is considered orphaned even when pgrep still returns 0. Requires awLogDirectoryPath
|
|
173
173
|
```
|
|
174
174
|
|
|
175
|
-
Workflow status names (`Unread`, `Awaiting Workspace`, `Preparation`, `Awaiting Quality Check`, `
|
|
175
|
+
Workflow status names (`Unread`, `Awaiting Task Breakdown`, `Awaiting Workspace`, `Preparation`, `Awaiting Quality Check`, `Todo`, `PC Todo`, `In Tmux`, `Done`, `Icebox`) are hardcoded constants and are not accepted via this config, the CLI, or the project README. To ensure they exist on the target project, run the `schedule` command — it invokes `SetupTowerDefenceProjectUseCase` automatically.
|
|
176
176
|
|
|
177
177
|
Example:
|
|
178
178
|
|
|
@@ -1,36 +1,56 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.REQUIRED_WORKFLOW_STATUSES = exports.
|
|
3
|
+
exports.REQUIRED_WORKFLOW_STATUSES = exports.ICEBOX_STATUS_NAME = exports.DONE_STATUS_NAME = exports.IN_TMUX_STATUS_NAME = exports.PC_TODO_STATUS_NAME = exports.TODO_STATUS_NAME = exports.AWAITING_QUALITY_CHECK_STATUS_NAME = exports.PREPARATION_STATUS_NAME = exports.AWAITING_WORKSPACE_STATUS_NAME = exports.AWAITING_TASK_BREAKDOWN_STATUS_NAME = exports.DEFAULT_STATUS_NAME = void 0;
|
|
4
4
|
exports.DEFAULT_STATUS_NAME = 'Unread';
|
|
5
|
+
exports.AWAITING_TASK_BREAKDOWN_STATUS_NAME = 'Awaiting Task Breakdown';
|
|
5
6
|
exports.AWAITING_WORKSPACE_STATUS_NAME = 'Awaiting Workspace';
|
|
6
7
|
exports.PREPARATION_STATUS_NAME = 'Preparation';
|
|
7
8
|
exports.AWAITING_QUALITY_CHECK_STATUS_NAME = 'Awaiting Quality Check';
|
|
8
|
-
exports.
|
|
9
|
+
exports.TODO_STATUS_NAME = 'Todo';
|
|
10
|
+
exports.PC_TODO_STATUS_NAME = 'PC Todo';
|
|
11
|
+
exports.IN_TMUX_STATUS_NAME = 'In Tmux';
|
|
12
|
+
exports.DONE_STATUS_NAME = 'Done';
|
|
13
|
+
exports.ICEBOX_STATUS_NAME = 'Icebox';
|
|
9
14
|
exports.REQUIRED_WORKFLOW_STATUSES = [
|
|
10
15
|
{
|
|
11
16
|
name: exports.DEFAULT_STATUS_NAME,
|
|
12
|
-
color: '
|
|
13
|
-
|
|
17
|
+
color: 'ORANGE',
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
name: exports.AWAITING_TASK_BREAKDOWN_STATUS_NAME,
|
|
21
|
+
color: 'ORANGE',
|
|
14
22
|
},
|
|
15
23
|
{
|
|
16
24
|
name: exports.AWAITING_WORKSPACE_STATUS_NAME,
|
|
17
|
-
color: '
|
|
18
|
-
description: 'Issue is ready and waiting for an agent workspace',
|
|
25
|
+
color: 'BLUE',
|
|
19
26
|
},
|
|
20
27
|
{
|
|
21
28
|
name: exports.PREPARATION_STATUS_NAME,
|
|
22
|
-
color: '
|
|
23
|
-
description: 'Agent is preparing the issue',
|
|
29
|
+
color: 'YELLOW',
|
|
24
30
|
},
|
|
25
31
|
{
|
|
26
32
|
name: exports.AWAITING_QUALITY_CHECK_STATUS_NAME,
|
|
27
|
-
color: '
|
|
28
|
-
|
|
33
|
+
color: 'GREEN',
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
name: exports.TODO_STATUS_NAME,
|
|
37
|
+
color: 'PINK',
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
name: exports.PC_TODO_STATUS_NAME,
|
|
41
|
+
color: 'PINK',
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
name: exports.IN_TMUX_STATUS_NAME,
|
|
45
|
+
color: 'RED',
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
name: exports.DONE_STATUS_NAME,
|
|
49
|
+
color: 'PURPLE',
|
|
29
50
|
},
|
|
30
51
|
{
|
|
31
|
-
name: exports.
|
|
52
|
+
name: exports.ICEBOX_STATUS_NAME,
|
|
32
53
|
color: 'GRAY',
|
|
33
|
-
description: 'Disabled and excluded from the active workflow',
|
|
34
54
|
},
|
|
35
55
|
];
|
|
36
56
|
//# sourceMappingURL=WorkflowStatus.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WorkflowStatus.js","sourceRoot":"","sources":["../../../src/domain/entities/WorkflowStatus.ts"],"names":[],"mappings":";;;AAEa,QAAA,mBAAmB,GAAG,QAAQ,CAAC;AAC/B,QAAA,8BAA8B,GAAG,oBAAoB,CAAC;AACtD,QAAA,uBAAuB,GAAG,aAAa,CAAC;AACxC,QAAA,kCAAkC,GAAG,wBAAwB,CAAC;AAC9D,QAAA,
|
|
1
|
+
{"version":3,"file":"WorkflowStatus.js","sourceRoot":"","sources":["../../../src/domain/entities/WorkflowStatus.ts"],"names":[],"mappings":";;;AAEa,QAAA,mBAAmB,GAAG,QAAQ,CAAC;AAC/B,QAAA,mCAAmC,GAAG,yBAAyB,CAAC;AAChE,QAAA,8BAA8B,GAAG,oBAAoB,CAAC;AACtD,QAAA,uBAAuB,GAAG,aAAa,CAAC;AACxC,QAAA,kCAAkC,GAAG,wBAAwB,CAAC;AAC9D,QAAA,gBAAgB,GAAG,MAAM,CAAC;AAC1B,QAAA,mBAAmB,GAAG,SAAS,CAAC;AAChC,QAAA,mBAAmB,GAAG,SAAS,CAAC;AAChC,QAAA,gBAAgB,GAAG,MAAM,CAAC;AAC1B,QAAA,kBAAkB,GAAG,QAAQ,CAAC;AAO9B,QAAA,0BAA0B,GAA+B;IACpE;QACE,IAAI,EAAE,2BAAmB;QACzB,KAAK,EAAE,QAAQ;KAChB;IACD;QACE,IAAI,EAAE,2CAAmC;QACzC,KAAK,EAAE,QAAQ;KAChB;IACD;QACE,IAAI,EAAE,sCAA8B;QACpC,KAAK,EAAE,MAAM;KACd;IACD;QACE,IAAI,EAAE,+BAAuB;QAC7B,KAAK,EAAE,QAAQ;KAChB;IACD;QACE,IAAI,EAAE,0CAAkC;QACxC,KAAK,EAAE,OAAO;KACf;IACD;QACE,IAAI,EAAE,wBAAgB;QACtB,KAAK,EAAE,MAAM;KACd;IACD;QACE,IAAI,EAAE,2BAAmB;QACzB,KAAK,EAAE,MAAM;KACd;IACD;QACE,IAAI,EAAE,2BAAmB;QACzB,KAAK,EAAE,KAAK;KACb;IACD;QACE,IAAI,EAAE,wBAAgB;QACtB,KAAK,EAAE,QAAQ;KAChB;IACD;QACE,IAAI,EAAE,0BAAkB;QACxB,KAAK,EAAE,MAAM;KACd;CACF,CAAC"}
|
|
@@ -32,7 +32,7 @@ class AnalyzeStoriesUseCase {
|
|
|
32
32
|
...storyIssue,
|
|
33
33
|
...story,
|
|
34
34
|
};
|
|
35
|
-
if (storyIssue.status === WorkflowStatus_1.
|
|
35
|
+
if (storyIssue.status === WorkflowStatus_1.ICEBOX_STATUS_NAME) {
|
|
36
36
|
phases.get('others')?.push(storyIssueObject);
|
|
37
37
|
}
|
|
38
38
|
else if (storyIssue.labels.includes('story:phase:finished-qa')) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AnalyzeStoriesUseCase.js","sourceRoot":"","sources":["../../../src/domain/usecases/AnalyzeStoriesUseCase.ts"],"names":[],"mappings":";;;AAMA,mCAAuC;AACvC,+
|
|
1
|
+
{"version":3,"file":"AnalyzeStoriesUseCase.js","sourceRoot":"","sources":["../../../src/domain/usecases/AnalyzeStoriesUseCase.ts"],"names":[],"mappings":";;;AAMA,mCAAuC;AACvC,+DAAgE;AAEhE,MAAa,qBAAqB;IAChC,YACW,eAAwD,EACxD,cAA4D;QAD5D,oBAAe,GAAf,eAAe,CAAyC;QACxD,mBAAc,GAAd,cAAc,CAA8C;QAGvE,QAAG,GAAG,KAAK,EAAE,KAWZ,EAAiB,EAAE;YAClB,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;YAClC,IACE,CAAC,KAAK;gBACN,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,CACrB,CAAC,UAAU,EAAE,EAAE,CACb,UAAU,CAAC,QAAQ,EAAE,KAAK,CAAC,IAAI,UAAU,CAAC,UAAU,EAAE,KA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,OAAO,CAAC;gBAC5F,CAAC,CAAC;qBACD,IAAI,CAAC,IAAI,CAAC;;;;CAIZ,CAAC;YACA,CAAC,CAAC;iBACD,IAAI,CAAC,IAAI,CAAC;;;CAGZ,CAAC;QACA,CAAC,CAAC;IAzRC,CAAC;CA0RL;AA9RD,sDA8RC"}
|
|
@@ -14,22 +14,22 @@ class ChangeStatusByStoryColorUseCase {
|
|
|
14
14
|
else if (input.cacheUsed) {
|
|
15
15
|
return;
|
|
16
16
|
}
|
|
17
|
-
const disabledStatusObject = input.project.status.statuses.find((status) => status.name === WorkflowStatus_1.
|
|
17
|
+
const disabledStatusObject = input.project.status.statuses.find((status) => status.name === WorkflowStatus_1.ICEBOX_STATUS_NAME);
|
|
18
18
|
if (!disabledStatusObject) {
|
|
19
|
-
throw new Error('
|
|
19
|
+
throw new Error('Icebox status is not found');
|
|
20
20
|
}
|
|
21
21
|
for (const storyObject of Array.from(input.storyObjectMap.values())) {
|
|
22
22
|
const isStoryDisabled = storyObject.story.color === 'GRAY';
|
|
23
23
|
for (const issue of storyObject.issues) {
|
|
24
24
|
if (isStoryDisabled) {
|
|
25
|
-
if (issue.status && issue.status === WorkflowStatus_1.
|
|
25
|
+
if (issue.status && issue.status === WorkflowStatus_1.ICEBOX_STATUS_NAME) {
|
|
26
26
|
continue;
|
|
27
27
|
}
|
|
28
28
|
await this.issueRepository.updateStatus(input.project, issue, disabledStatusObject.id);
|
|
29
29
|
await this.issueRepository.createComment(issue, `This issue status is changed because the story is disabled.`);
|
|
30
30
|
}
|
|
31
31
|
else if (!isStoryDisabled) {
|
|
32
|
-
if (issue.status && issue.status !== WorkflowStatus_1.
|
|
32
|
+
if (issue.status && issue.status !== WorkflowStatus_1.ICEBOX_STATUS_NAME) {
|
|
33
33
|
continue;
|
|
34
34
|
}
|
|
35
35
|
await this.issueRepository.updateStatus(input.project, issue, firstStatus.id);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChangeStatusByStoryColorUseCase.js","sourceRoot":"","sources":["../../../src/domain/usecases/ChangeStatusByStoryColorUseCase.ts"],"names":[],"mappings":";;;AAIA,+
|
|
1
|
+
{"version":3,"file":"ChangeStatusByStoryColorUseCase.js","sourceRoot":"","sources":["../../../src/domain/usecases/ChangeStatusByStoryColorUseCase.ts"],"names":[],"mappings":";;;AAIA,+DAAgE;AAEhE,MAAa,+BAA+B;IAC1C,YACW,cAA2C,EAC3C,eAGR;QAJQ,mBAAc,GAAd,cAAc,CAA6B;QAC3C,oBAAe,GAAf,eAAe,CAGvB;QAGH,QAAG,GAAG,KAAK,EAAE,KAMZ,EAAiB,EAAE;YAClB,MAAM,WAAW,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;YACrD,IAAI,CAAC,WAAW,EAAE,CAAC;gBACjB,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;YAC/C,CAAC;iBAAM,IAAI,KAAK,CAAC,SAAS,EAAE,CAAC;gBAC3B,OAAO;YACT,CAAC;YACD,MAAM,oBAAoB,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAC7D,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,KAAK,mCAAkB,CAC/C,CAAC;YACF,IAAI,CAAC,oBAAoB,EAAE,CAAC;gBAC1B,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAC;YAChD,CAAC;YACD,KAAK,MAAM,WAAW,IAAI,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,EAAE,CAAC,EAAE,CAAC;gBACpE,MAAM,eAAe,GAAG,WAAW,CAAC,KAAK,CAAC,KAAK,KAAK,MAAM,CAAC;gBAC3D,KAAK,MAAM,KAAK,IAAI,WAAW,CAAC,MAAM,EAAE,CAAC;oBACvC,IAAI,eAAe,EAAE,CAAC;wBACpB,IAAI,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,MAAM,KAAK,mCAAkB,EAAE,CAAC;4BACxD,SAAS;wBACX,CAAC;wBACD,MAAM,IAAI,CAAC,eAAe,CAAC,YAAY,CACrC,KAAK,CAAC,OAAO,EACb,KAAK,EACL,oBAAoB,CAAC,EAAE,CACxB,CAAC;wBACF,MAAM,IAAI,CAAC,eAAe,CAAC,aAAa,CACtC,KAAK,EACL,6DAA6D,CAC9D,CAAC;oBACJ,CAAC;yBAAM,IAAI,CAAC,eAAe,EAAE,CAAC;wBAC5B,IAAI,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,MAAM,KAAK,mCAAkB,EAAE,CAAC;4BACxD,SAAS;wBACX,CAAC;wBACD,MAAM,IAAI,CAAC,eAAe,CAAC,YAAY,CACrC,KAAK,CAAC,OAAO,EACb,KAAK,EACL,WAAW,CAAC,EAAE,CACf,CAAC;wBACF,MAAM,IAAI,CAAC,eAAe,CAAC,aAAa,CACtC,KAAK,EACL,4DAA4D,CAC7D,CAAC;oBACJ,CAAC;gBACH,CAAC;YACH,CAAC;QACH,CAAC,CAAC;IArDC,CAAC;CAsDL;AA7DD,0EA6DC"}
|
|
@@ -21,7 +21,7 @@ class ConvertCheckboxToIssueInStoryIssueUseCase {
|
|
|
21
21
|
throw new Error(`Story issue not found: ${storyOption.name}`);
|
|
22
22
|
}
|
|
23
23
|
else if (storyIssue.isClosed ||
|
|
24
|
-
storyIssue.status === WorkflowStatus_1.
|
|
24
|
+
storyIssue.status === WorkflowStatus_1.ICEBOX_STATUS_NAME) {
|
|
25
25
|
continue;
|
|
26
26
|
}
|
|
27
27
|
const storyViewLink = this.buildStoryViewLink(input.urlOfStoryView, storyOption.name);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConvertCheckboxToIssueInStoryIssueUseCase.js","sourceRoot":"","sources":["../../../src/domain/usecases/ConvertCheckboxToIssueInStoryIssueUseCase.ts"],"names":[],"mappings":";;;AAIA,mCAAuC;AACvC,+
|
|
1
|
+
{"version":3,"file":"ConvertCheckboxToIssueInStoryIssueUseCase.js","sourceRoot":"","sources":["../../../src/domain/usecases/ConvertCheckboxToIssueInStoryIssueUseCase.ts"],"names":[],"mappings":";;;AAIA,mCAAuC;AACvC,+DAAgE;AAEhE,MAAa,yCAAyC;IACpD,YACW,eAGR;QAHQ,oBAAe,GAAf,eAAe,CAGvB;QAGH,QAAG,GAAG,KAAK,EAAE,KAMZ,EAAiB,EAAE;YAClB,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;YAClC,IAAI,CAAC,KAAK,IAAI,KAAK,CAAC,SAAS,EAAE,CAAC;gBAC9B,OAAO;YACT,CAAC;YAED,KAAK,MAAM,WAAW,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,OAAO,IAAI,EAAE,EAAE,CAAC;gBAC7D,MAAM,UAAU,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAC7C,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,KAAK,CAAC,CACzC,CAAC;gBACF,MAAM,WAAW,GAAG,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;gBAC/D,IAAI,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC,EAAE,CAAC;oBAC9C,SAAS;gBACX,CAAC;qBAAM,IAAI,CAAC,UAAU,IAAI,CAAC,WAAW,EAAE,CAAC;oBACvC,MAAM,IAAI,KAAK,CAAC,0BAA0B,WAAW,CAAC,IAAI,EAAE,CAAC,CAAC;gBAChE,CAAC;qBAAM,IACL,UAAU,CAAC,QAAQ;oBACnB,UAAU,CAAC,MAAM,KAAK,mCAAkB,EACxC,CAAC;oBACD,SAAS;gBACX,CAAC;gBACD,MAAM,aAAa,GAAG,IAAI,CAAC,kBAAkB,CAC3C,KAAK,CAAC,cAAc,EACpB,WAAW,CAAC,IAAI,CACjB,CAAC;gBACF,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C,CAAC;gBAC1D,CAAC,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAC5B,CAAC;QACJ,CAAC,CAAC;IAnGC,CAAC;CAoGL;AA1GD,8FA0GC"}
|
|
@@ -39,7 +39,7 @@ class CreateEstimationIssueUseCase {
|
|
|
39
39
|
if (issueInStory.isClosed ||
|
|
40
40
|
issueInStory.isPr ||
|
|
41
41
|
issueInStory.labels.includes('story') ||
|
|
42
|
-
issueInStory.status === WorkflowStatus_1.
|
|
42
|
+
issueInStory.status === WorkflowStatus_1.ICEBOX_STATUS_NAME) {
|
|
43
43
|
continue;
|
|
44
44
|
}
|
|
45
45
|
if (estimationMinutesField &&
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CreateEstimationIssueUseCase.js","sourceRoot":"","sources":["../../../src/domain/usecases/CreateEstimationIssueUseCase.ts"],"names":[],"mappings":";;;AAMA,mCAAuC;AACvC,+
|
|
1
|
+
{"version":3,"file":"CreateEstimationIssueUseCase.js","sourceRoot":"","sources":["../../../src/domain/usecases/CreateEstimationIssueUseCase.ts"],"names":[],"mappings":";;;AAMA,mCAAuC;AACvC,+DAAgE;AAEhE,MAAa,4BAA4B;IACvC,YACW,eAGR,EACQ,cAA+D;QAJ/D,oBAAe,GAAf,eAAe,CAGvB;QACQ,mBAAc,GAAd,cAAc,CAAiD;QAG1E,QAAG,GAAG,KAAK,EAAE,KAUZ,EAAiB,EAAE;YAClB,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;YAClC,IACE,CAAC,KAAK;gBACN,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,CACrB,CAAC,UAAU,EAAE,EAAE,CACb,UAAU,CAAC,QAAQ,EAAE,KAAK,CAAC,IAAI,UAAU,CAAC,UAAU,EAAE,KAAK,CAAC,CAC/D,EACD,CAAC;gBACD,OAAO;YACT,CAAC;YACD,MAAM,UAAU,GAAG,KAAK,CAAC,WAAW,CAAC,KAAK,CAAC,WAA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KAAK,CAAC,MAAM,CAAC,IAAI,CACb,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,8BAA8B,CACpD;wCACH,CAAC,CAAC,aAAa;wCACf,CAAC,CAAC,YAAY,CAAC;oBACzB,MAAM,QAAQ,GAAG,GAAG,cAAc,2BAA2B,IAAA,oBAAY,EAAC,KAAK,CAAC,KAAK,CAAC,eAAe,CAAC;oBAEtG,OAAO,KAAK,UAAU,IAAI,WAAW,IAAI,KAAK,CAAC,GAAG,aAAa,QAAQ,GAAG,CAAC;gBAC7E,CAAC,CAAC;qBACD,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;YACd,CAAC,CAAC;iBACD,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;QACd,CAAC,CAAC;IA1LC,CAAC;CA2LL;AAlMD,oEAkMC"}
|
|
@@ -20,7 +20,7 @@ class SetupTowerDefenceProjectUseCase {
|
|
|
20
20
|
id: found ? found.id : null,
|
|
21
21
|
name: required.name,
|
|
22
22
|
color: required.color,
|
|
23
|
-
description:
|
|
23
|
+
description: '',
|
|
24
24
|
};
|
|
25
25
|
}),
|
|
26
26
|
...others.map((other) => ({
|
|
@@ -41,7 +41,9 @@ SetupTowerDefenceProjectUseCase.hasRequiredStatusesInCanonicalOrder = (existing)
|
|
|
41
41
|
}
|
|
42
42
|
return WorkflowStatus_1.REQUIRED_WORKFLOW_STATUSES.every((required, index) => {
|
|
43
43
|
const actual = existing[index];
|
|
44
|
-
return actual.name === required.name &&
|
|
44
|
+
return (actual.name === required.name &&
|
|
45
|
+
actual.color === required.color &&
|
|
46
|
+
actual.description === '');
|
|
45
47
|
});
|
|
46
48
|
};
|
|
47
49
|
//# sourceMappingURL=SetupTowerDefenceProjectUseCase.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SetupTowerDefenceProjectUseCase.js","sourceRoot":"","sources":["../../../src/domain/usecases/SetupTowerDefenceProjectUseCase.ts"],"names":[],"mappings":";;;AAEA,+DA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,IAAI,EAAE,KAAK,CAAC,IAAI;oBAChB,KAAK,EAAE,KAAK,CAAC,KAAK;oBAClB,WAAW,EAAE,KAAK,CAAC,WAAW;iBAC/B,CAAC,CAAC;aACJ,CAAC;YAEF,MAAM,IAAI,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC;QACxE,CAAC,CAAC;IAxCC,CAAC;;AANN,0EAiEC;AAjBgB,mEAAmC,GAAG,CACnD,QAAuB,EACd,EAAE;IACX,IAAI,QAAQ,CAAC,MAAM,GAAG,2CAA0B,CAAC,MAAM,EAAE,CAAC;QACxD,OAAO,KAAK,CAAC;IACf,CAAC;IACD,OAAO,2CAA0B,CAAC,KAAK,CACrC,CAAC,QAAkC,EAAE,KAAa,EAAE,EAAE;QACpD,MAAM,MAAM,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;QAC/B,OAAO,CACL,MAAM,CAAC,IAAI,KAAK,QAAQ,CAAC,IAAI;YAC7B,MAAM,CAAC,KAAK,KAAK,QAAQ,CAAC,KAAK;YAC/B,MAAM,CAAC,WAAW,KAAK,EAAE,CAC1B,CAAC;IACJ,CAAC,CACF,CAAC;AACJ,CAAC,AAhBiD,CAgBhD"}
|
package/package.json
CHANGED
|
@@ -1,41 +1,60 @@
|
|
|
1
1
|
import { FieldOption } from './Project';
|
|
2
2
|
|
|
3
3
|
export const DEFAULT_STATUS_NAME = 'Unread';
|
|
4
|
+
export const AWAITING_TASK_BREAKDOWN_STATUS_NAME = 'Awaiting Task Breakdown';
|
|
4
5
|
export const AWAITING_WORKSPACE_STATUS_NAME = 'Awaiting Workspace';
|
|
5
6
|
export const PREPARATION_STATUS_NAME = 'Preparation';
|
|
6
7
|
export const AWAITING_QUALITY_CHECK_STATUS_NAME = 'Awaiting Quality Check';
|
|
7
|
-
export const
|
|
8
|
+
export const TODO_STATUS_NAME = 'Todo';
|
|
9
|
+
export const PC_TODO_STATUS_NAME = 'PC Todo';
|
|
10
|
+
export const IN_TMUX_STATUS_NAME = 'In Tmux';
|
|
11
|
+
export const DONE_STATUS_NAME = 'Done';
|
|
12
|
+
export const ICEBOX_STATUS_NAME = 'Icebox';
|
|
8
13
|
|
|
9
14
|
export type WorkflowStatusDefinition = {
|
|
10
15
|
name: string;
|
|
11
16
|
color: FieldOption['color'];
|
|
12
|
-
description: string;
|
|
13
17
|
};
|
|
14
18
|
|
|
15
19
|
export const REQUIRED_WORKFLOW_STATUSES: WorkflowStatusDefinition[] = [
|
|
16
20
|
{
|
|
17
21
|
name: DEFAULT_STATUS_NAME,
|
|
18
|
-
color: '
|
|
19
|
-
|
|
22
|
+
color: 'ORANGE',
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
name: AWAITING_TASK_BREAKDOWN_STATUS_NAME,
|
|
26
|
+
color: 'ORANGE',
|
|
20
27
|
},
|
|
21
28
|
{
|
|
22
29
|
name: AWAITING_WORKSPACE_STATUS_NAME,
|
|
23
|
-
color: '
|
|
24
|
-
description: 'Issue is ready and waiting for an agent workspace',
|
|
30
|
+
color: 'BLUE',
|
|
25
31
|
},
|
|
26
32
|
{
|
|
27
33
|
name: PREPARATION_STATUS_NAME,
|
|
28
|
-
color: '
|
|
29
|
-
description: 'Agent is preparing the issue',
|
|
34
|
+
color: 'YELLOW',
|
|
30
35
|
},
|
|
31
36
|
{
|
|
32
37
|
name: AWAITING_QUALITY_CHECK_STATUS_NAME,
|
|
33
|
-
color: '
|
|
34
|
-
|
|
38
|
+
color: 'GREEN',
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
name: TODO_STATUS_NAME,
|
|
42
|
+
color: 'PINK',
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
name: PC_TODO_STATUS_NAME,
|
|
46
|
+
color: 'PINK',
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
name: IN_TMUX_STATUS_NAME,
|
|
50
|
+
color: 'RED',
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
name: DONE_STATUS_NAME,
|
|
54
|
+
color: 'PURPLE',
|
|
35
55
|
},
|
|
36
56
|
{
|
|
37
|
-
name:
|
|
57
|
+
name: ICEBOX_STATUS_NAME,
|
|
38
58
|
color: 'GRAY',
|
|
39
|
-
description: 'Disabled and excluded from the active workflow',
|
|
40
59
|
},
|
|
41
60
|
];
|
|
@@ -5,7 +5,7 @@ import { Member } from '../entities/Member';
|
|
|
5
5
|
import { DateRepository } from './adapter-interfaces/DateRepository';
|
|
6
6
|
import { StoryObjectMap } from '../entities/StoryObjectMap';
|
|
7
7
|
import { encodeForURI } from './utils';
|
|
8
|
-
import {
|
|
8
|
+
import { ICEBOX_STATUS_NAME } from '../entities/WorkflowStatus';
|
|
9
9
|
|
|
10
10
|
export class AnalyzeStoriesUseCase {
|
|
11
11
|
constructor(
|
|
@@ -66,7 +66,7 @@ export class AnalyzeStoriesUseCase {
|
|
|
66
66
|
...story,
|
|
67
67
|
};
|
|
68
68
|
|
|
69
|
-
if (storyIssue.status ===
|
|
69
|
+
if (storyIssue.status === ICEBOX_STATUS_NAME) {
|
|
70
70
|
phases.get('others')?.push(storyIssueObject);
|
|
71
71
|
} else if (storyIssue.labels.includes('story:phase:finished-qa')) {
|
|
72
72
|
phases.get('story:phase:finished-qa')?.push(storyIssueObject);
|
|
@@ -18,9 +18,9 @@ describe('ChangeStatusByStoryColorUseCase', () => {
|
|
|
18
18
|
mockReviewStatus.id = 'status2';
|
|
19
19
|
mockReviewStatus.name = 'InReview';
|
|
20
20
|
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
const mockIceboxStatus = mock<FieldOption>();
|
|
22
|
+
mockIceboxStatus.id = 'status3';
|
|
23
|
+
mockIceboxStatus.name = 'Icebox';
|
|
24
24
|
|
|
25
25
|
const basicProject = {
|
|
26
26
|
...mock<Project>(),
|
|
@@ -38,7 +38,7 @@ describe('ChangeStatusByStoryColorUseCase', () => {
|
|
|
38
38
|
status: {
|
|
39
39
|
name: 'Status Field',
|
|
40
40
|
fieldId: 'statusFieldId',
|
|
41
|
-
statuses: [mockStatus, mockReviewStatus,
|
|
41
|
+
statuses: [mockStatus, mockReviewStatus, mockIceboxStatus],
|
|
42
42
|
},
|
|
43
43
|
};
|
|
44
44
|
|
|
@@ -185,7 +185,7 @@ describe('ChangeStatusByStoryColorUseCase', () => {
|
|
|
185
185
|
issues: [
|
|
186
186
|
{
|
|
187
187
|
...basicStoryObject1.issues[0],
|
|
188
|
-
status: '
|
|
188
|
+
status: 'Icebox',
|
|
189
189
|
},
|
|
190
190
|
],
|
|
191
191
|
},
|
|
@@ -2,7 +2,7 @@ import { IssueRepository } from './adapter-interfaces/IssueRepository';
|
|
|
2
2
|
import { Project } from '../entities/Project';
|
|
3
3
|
import { DateRepository } from './adapter-interfaces/DateRepository';
|
|
4
4
|
import { StoryObjectMap } from '../entities/StoryObjectMap';
|
|
5
|
-
import {
|
|
5
|
+
import { ICEBOX_STATUS_NAME } from '../entities/WorkflowStatus';
|
|
6
6
|
|
|
7
7
|
export class ChangeStatusByStoryColorUseCase {
|
|
8
8
|
constructor(
|
|
@@ -27,16 +27,16 @@ export class ChangeStatusByStoryColorUseCase {
|
|
|
27
27
|
return;
|
|
28
28
|
}
|
|
29
29
|
const disabledStatusObject = input.project.status.statuses.find(
|
|
30
|
-
(status) => status.name ===
|
|
30
|
+
(status) => status.name === ICEBOX_STATUS_NAME,
|
|
31
31
|
);
|
|
32
32
|
if (!disabledStatusObject) {
|
|
33
|
-
throw new Error('
|
|
33
|
+
throw new Error('Icebox status is not found');
|
|
34
34
|
}
|
|
35
35
|
for (const storyObject of Array.from(input.storyObjectMap.values())) {
|
|
36
36
|
const isStoryDisabled = storyObject.story.color === 'GRAY';
|
|
37
37
|
for (const issue of storyObject.issues) {
|
|
38
38
|
if (isStoryDisabled) {
|
|
39
|
-
if (issue.status && issue.status ===
|
|
39
|
+
if (issue.status && issue.status === ICEBOX_STATUS_NAME) {
|
|
40
40
|
continue;
|
|
41
41
|
}
|
|
42
42
|
await this.issueRepository.updateStatus(
|
|
@@ -49,7 +49,7 @@ export class ChangeStatusByStoryColorUseCase {
|
|
|
49
49
|
`This issue status is changed because the story is disabled.`,
|
|
50
50
|
);
|
|
51
51
|
} else if (!isStoryDisabled) {
|
|
52
|
-
if (issue.status && issue.status !==
|
|
52
|
+
if (issue.status && issue.status !== ICEBOX_STATUS_NAME) {
|
|
53
53
|
continue;
|
|
54
54
|
}
|
|
55
55
|
await this.issueRepository.updateStatus(
|
|
@@ -173,7 +173,7 @@ describe('ConvertCheckboxToIssueInStoryIssueUseCase', () => {
|
|
|
173
173
|
},
|
|
174
174
|
|
|
175
175
|
{
|
|
176
|
-
name: 'should skip closed story issues or
|
|
176
|
+
name: 'should skip closed story issues or icebox status',
|
|
177
177
|
input: {
|
|
178
178
|
project: basicProject,
|
|
179
179
|
issues: [
|
|
@@ -184,7 +184,7 @@ describe('ConvertCheckboxToIssueInStoryIssueUseCase', () => {
|
|
|
184
184
|
},
|
|
185
185
|
{
|
|
186
186
|
...basicStoryIssue2,
|
|
187
|
-
status: '
|
|
187
|
+
status: 'Icebox',
|
|
188
188
|
},
|
|
189
189
|
],
|
|
190
190
|
cacheUsed: false,
|
|
@@ -3,7 +3,7 @@ import { IssueRepository } from './adapter-interfaces/IssueRepository';
|
|
|
3
3
|
import { Project } from '../entities/Project';
|
|
4
4
|
import { StoryObjectMap } from '../entities/StoryObjectMap';
|
|
5
5
|
import { encodeForURI } from './utils';
|
|
6
|
-
import {
|
|
6
|
+
import { ICEBOX_STATUS_NAME } from '../entities/WorkflowStatus';
|
|
7
7
|
|
|
8
8
|
export class ConvertCheckboxToIssueInStoryIssueUseCase {
|
|
9
9
|
constructor(
|
|
@@ -36,7 +36,7 @@ export class ConvertCheckboxToIssueInStoryIssueUseCase {
|
|
|
36
36
|
throw new Error(`Story issue not found: ${storyOption.name}`);
|
|
37
37
|
} else if (
|
|
38
38
|
storyIssue.isClosed ||
|
|
39
|
-
storyIssue.status ===
|
|
39
|
+
storyIssue.status === ICEBOX_STATUS_NAME
|
|
40
40
|
) {
|
|
41
41
|
continue;
|
|
42
42
|
}
|
|
@@ -5,7 +5,7 @@ import { Member } from '../entities/Member';
|
|
|
5
5
|
import { DateRepository } from './adapter-interfaces/DateRepository';
|
|
6
6
|
import { StoryObjectMap } from '../entities/StoryObjectMap';
|
|
7
7
|
import { encodeForURI } from './utils';
|
|
8
|
-
import {
|
|
8
|
+
import { ICEBOX_STATUS_NAME } from '../entities/WorkflowStatus';
|
|
9
9
|
|
|
10
10
|
export class CreateEstimationIssueUseCase {
|
|
11
11
|
constructor(
|
|
@@ -66,7 +66,7 @@ export class CreateEstimationIssueUseCase {
|
|
|
66
66
|
issueInStory.isClosed ||
|
|
67
67
|
issueInStory.isPr ||
|
|
68
68
|
issueInStory.labels.includes('story') ||
|
|
69
|
-
issueInStory.status ===
|
|
69
|
+
issueInStory.status === ICEBOX_STATUS_NAME
|
|
70
70
|
) {
|
|
71
71
|
continue;
|
|
72
72
|
}
|
|
@@ -4,11 +4,16 @@ import { ProjectRepository } from './adapter-interfaces/ProjectRepository';
|
|
|
4
4
|
import { FieldOption, Project } from '../entities/Project';
|
|
5
5
|
import {
|
|
6
6
|
AWAITING_QUALITY_CHECK_STATUS_NAME,
|
|
7
|
+
AWAITING_TASK_BREAKDOWN_STATUS_NAME,
|
|
7
8
|
AWAITING_WORKSPACE_STATUS_NAME,
|
|
8
9
|
DEFAULT_STATUS_NAME,
|
|
9
|
-
|
|
10
|
+
DONE_STATUS_NAME,
|
|
11
|
+
ICEBOX_STATUS_NAME,
|
|
12
|
+
IN_TMUX_STATUS_NAME,
|
|
13
|
+
PC_TODO_STATUS_NAME,
|
|
10
14
|
PREPARATION_STATUS_NAME,
|
|
11
15
|
REQUIRED_WORKFLOW_STATUSES,
|
|
16
|
+
TODO_STATUS_NAME,
|
|
12
17
|
} from '../entities/WorkflowStatus';
|
|
13
18
|
|
|
14
19
|
const buildProject = (statuses: FieldOption[]): Project => ({
|
|
@@ -34,11 +39,29 @@ const buildCanonicalStatuses = (): FieldOption[] =>
|
|
|
34
39
|
id: `id-${index}`,
|
|
35
40
|
name: required.name,
|
|
36
41
|
color: required.color,
|
|
37
|
-
description:
|
|
42
|
+
description: '',
|
|
38
43
|
}));
|
|
39
44
|
|
|
40
45
|
describe('SetupTowerDefenceProjectUseCase', () => {
|
|
41
|
-
it('should
|
|
46
|
+
it('should define exactly the 10 required statuses in the documented order with the documented colors and no descriptions', () => {
|
|
47
|
+
expect(REQUIRED_WORKFLOW_STATUSES).toEqual([
|
|
48
|
+
{ name: DEFAULT_STATUS_NAME, color: 'ORANGE' },
|
|
49
|
+
{ name: AWAITING_TASK_BREAKDOWN_STATUS_NAME, color: 'ORANGE' },
|
|
50
|
+
{ name: AWAITING_WORKSPACE_STATUS_NAME, color: 'BLUE' },
|
|
51
|
+
{ name: PREPARATION_STATUS_NAME, color: 'YELLOW' },
|
|
52
|
+
{ name: AWAITING_QUALITY_CHECK_STATUS_NAME, color: 'GREEN' },
|
|
53
|
+
{ name: TODO_STATUS_NAME, color: 'PINK' },
|
|
54
|
+
{ name: PC_TODO_STATUS_NAME, color: 'PINK' },
|
|
55
|
+
{ name: IN_TMUX_STATUS_NAME, color: 'RED' },
|
|
56
|
+
{ name: DONE_STATUS_NAME, color: 'PURPLE' },
|
|
57
|
+
{ name: ICEBOX_STATUS_NAME, color: 'GRAY' },
|
|
58
|
+
]);
|
|
59
|
+
for (const required of REQUIRED_WORKFLOW_STATUSES) {
|
|
60
|
+
expect(required).not.toHaveProperty('description');
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
it('should skip update when project already has required statuses in canonical order with no descriptions', async () => {
|
|
42
65
|
const mockProjectRepository =
|
|
43
66
|
mock<Pick<ProjectRepository, 'getByUrl' | 'updateStatusList'>>();
|
|
44
67
|
const project = buildProject(buildCanonicalStatuses());
|
|
@@ -57,7 +80,7 @@ describe('SetupTowerDefenceProjectUseCase', () => {
|
|
|
57
80
|
...buildCanonicalStatuses(),
|
|
58
81
|
{
|
|
59
82
|
id: 'extra-1',
|
|
60
|
-
name: '
|
|
83
|
+
name: 'Custom Extra Status',
|
|
61
84
|
color: 'GREEN' as const,
|
|
62
85
|
description: '',
|
|
63
86
|
},
|
|
@@ -71,6 +94,27 @@ describe('SetupTowerDefenceProjectUseCase', () => {
|
|
|
71
94
|
expect(mockProjectRepository.updateStatusList).not.toHaveBeenCalled();
|
|
72
95
|
});
|
|
73
96
|
|
|
97
|
+
it('should rewrite required statuses with empty descriptions when an existing status carries a description', async () => {
|
|
98
|
+
const mockProjectRepository =
|
|
99
|
+
mock<Pick<ProjectRepository, 'getByUrl' | 'updateStatusList'>>();
|
|
100
|
+
const statuses = buildCanonicalStatuses();
|
|
101
|
+
statuses[0] = { ...statuses[0], description: 'stale description' };
|
|
102
|
+
const project = buildProject(statuses);
|
|
103
|
+
mockProjectRepository.getByUrl.mockResolvedValue(project);
|
|
104
|
+
mockProjectRepository.updateStatusList.mockResolvedValue([]);
|
|
105
|
+
|
|
106
|
+
const useCase = new SetupTowerDefenceProjectUseCase(mockProjectRepository);
|
|
107
|
+
await useCase.run({ projectUrl: project.url });
|
|
108
|
+
|
|
109
|
+
expect(mockProjectRepository.updateStatusList).toHaveBeenCalledTimes(1);
|
|
110
|
+
const [, payload] = mockProjectRepository.updateStatusList.mock.calls[0];
|
|
111
|
+
expect(
|
|
112
|
+
payload
|
|
113
|
+
.slice(0, REQUIRED_WORKFLOW_STATUSES.length)
|
|
114
|
+
.every((status) => status.description === ''),
|
|
115
|
+
).toBe(true);
|
|
116
|
+
});
|
|
117
|
+
|
|
74
118
|
it('should add missing required statuses while preserving existing custom statuses', async () => {
|
|
75
119
|
const mockProjectRepository =
|
|
76
120
|
mock<Pick<ProjectRepository, 'getByUrl' | 'updateStatusList'>>();
|
|
@@ -78,12 +122,12 @@ describe('SetupTowerDefenceProjectUseCase', () => {
|
|
|
78
122
|
{
|
|
79
123
|
id: 'unread-id',
|
|
80
124
|
name: DEFAULT_STATUS_NAME,
|
|
81
|
-
color: '
|
|
82
|
-
description: '
|
|
125
|
+
color: 'ORANGE',
|
|
126
|
+
description: '',
|
|
83
127
|
},
|
|
84
128
|
{
|
|
85
129
|
id: 'extra-1',
|
|
86
|
-
name: '
|
|
130
|
+
name: 'Custom Extra Status',
|
|
87
131
|
color: 'GREEN',
|
|
88
132
|
description: '',
|
|
89
133
|
},
|
|
@@ -102,36 +146,66 @@ describe('SetupTowerDefenceProjectUseCase', () => {
|
|
|
102
146
|
{
|
|
103
147
|
id: 'unread-id',
|
|
104
148
|
name: DEFAULT_STATUS_NAME,
|
|
105
|
-
color: '
|
|
106
|
-
description: '
|
|
149
|
+
color: 'ORANGE',
|
|
150
|
+
description: '',
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
id: null,
|
|
154
|
+
name: AWAITING_TASK_BREAKDOWN_STATUS_NAME,
|
|
155
|
+
color: 'ORANGE',
|
|
156
|
+
description: '',
|
|
107
157
|
},
|
|
108
158
|
{
|
|
109
159
|
id: null,
|
|
110
160
|
name: AWAITING_WORKSPACE_STATUS_NAME,
|
|
111
|
-
color: '
|
|
112
|
-
description: '
|
|
161
|
+
color: 'BLUE',
|
|
162
|
+
description: '',
|
|
113
163
|
},
|
|
114
164
|
{
|
|
115
165
|
id: null,
|
|
116
166
|
name: PREPARATION_STATUS_NAME,
|
|
117
|
-
color: '
|
|
118
|
-
description: '
|
|
167
|
+
color: 'YELLOW',
|
|
168
|
+
description: '',
|
|
119
169
|
},
|
|
120
170
|
{
|
|
121
171
|
id: null,
|
|
122
172
|
name: AWAITING_QUALITY_CHECK_STATUS_NAME,
|
|
123
|
-
color: '
|
|
124
|
-
description: '
|
|
173
|
+
color: 'GREEN',
|
|
174
|
+
description: '',
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
id: null,
|
|
178
|
+
name: TODO_STATUS_NAME,
|
|
179
|
+
color: 'PINK',
|
|
180
|
+
description: '',
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
id: null,
|
|
184
|
+
name: PC_TODO_STATUS_NAME,
|
|
185
|
+
color: 'PINK',
|
|
186
|
+
description: '',
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
id: null,
|
|
190
|
+
name: IN_TMUX_STATUS_NAME,
|
|
191
|
+
color: 'RED',
|
|
192
|
+
description: '',
|
|
125
193
|
},
|
|
126
194
|
{
|
|
127
195
|
id: null,
|
|
128
|
-
name:
|
|
196
|
+
name: DONE_STATUS_NAME,
|
|
197
|
+
color: 'PURPLE',
|
|
198
|
+
description: '',
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
id: null,
|
|
202
|
+
name: ICEBOX_STATUS_NAME,
|
|
129
203
|
color: 'GRAY',
|
|
130
|
-
description: '
|
|
204
|
+
description: '',
|
|
131
205
|
},
|
|
132
206
|
{
|
|
133
207
|
id: 'extra-1',
|
|
134
|
-
name: '
|
|
208
|
+
name: 'Custom Extra Status',
|
|
135
209
|
color: 'GREEN',
|
|
136
210
|
description: '',
|
|
137
211
|
},
|
|
@@ -148,7 +222,7 @@ describe('SetupTowerDefenceProjectUseCase', () => {
|
|
|
148
222
|
id: `reversed-id-${index}`,
|
|
149
223
|
name: required.name,
|
|
150
224
|
color: required.color,
|
|
151
|
-
description:
|
|
225
|
+
description: '',
|
|
152
226
|
}));
|
|
153
227
|
const project = buildProject(reversedStatuses);
|
|
154
228
|
mockProjectRepository.getByUrl.mockResolvedValue(project);
|
|
@@ -161,10 +235,15 @@ describe('SetupTowerDefenceProjectUseCase', () => {
|
|
|
161
235
|
const [, payload] = mockProjectRepository.updateStatusList.mock.calls[0];
|
|
162
236
|
expect(payload.map((status) => status.name)).toEqual([
|
|
163
237
|
DEFAULT_STATUS_NAME,
|
|
238
|
+
AWAITING_TASK_BREAKDOWN_STATUS_NAME,
|
|
164
239
|
AWAITING_WORKSPACE_STATUS_NAME,
|
|
165
240
|
PREPARATION_STATUS_NAME,
|
|
166
241
|
AWAITING_QUALITY_CHECK_STATUS_NAME,
|
|
167
|
-
|
|
242
|
+
TODO_STATUS_NAME,
|
|
243
|
+
PC_TODO_STATUS_NAME,
|
|
244
|
+
IN_TMUX_STATUS_NAME,
|
|
245
|
+
DONE_STATUS_NAME,
|
|
246
|
+
ICEBOX_STATUS_NAME,
|
|
168
247
|
]);
|
|
169
248
|
});
|
|
170
249
|
|
|
@@ -182,6 +261,6 @@ describe('SetupTowerDefenceProjectUseCase', () => {
|
|
|
182
261
|
|
|
183
262
|
expect(mockProjectRepository.updateStatusList).toHaveBeenCalledTimes(1);
|
|
184
263
|
const [, payload] = mockProjectRepository.updateStatusList.mock.calls[0];
|
|
185
|
-
expect(payload[2].color).toBe(
|
|
264
|
+
expect(payload[2].color).toBe(REQUIRED_WORKFLOW_STATUSES[2].color);
|
|
186
265
|
});
|
|
187
266
|
});
|
|
@@ -39,7 +39,7 @@ export class SetupTowerDefenceProjectUseCase {
|
|
|
39
39
|
id: found ? found.id : null,
|
|
40
40
|
name: required.name,
|
|
41
41
|
color: required.color,
|
|
42
|
-
description:
|
|
42
|
+
description: '',
|
|
43
43
|
};
|
|
44
44
|
}),
|
|
45
45
|
...others.map((other) => ({
|
|
@@ -62,7 +62,11 @@ export class SetupTowerDefenceProjectUseCase {
|
|
|
62
62
|
return REQUIRED_WORKFLOW_STATUSES.every(
|
|
63
63
|
(required: WorkflowStatusDefinition, index: number) => {
|
|
64
64
|
const actual = existing[index];
|
|
65
|
-
return
|
|
65
|
+
return (
|
|
66
|
+
actual.name === required.name &&
|
|
67
|
+
actual.color === required.color &&
|
|
68
|
+
actual.description === ''
|
|
69
|
+
);
|
|
66
70
|
},
|
|
67
71
|
);
|
|
68
72
|
};
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
import { FieldOption } from './Project';
|
|
2
2
|
export declare const DEFAULT_STATUS_NAME = "Unread";
|
|
3
|
+
export declare const AWAITING_TASK_BREAKDOWN_STATUS_NAME = "Awaiting Task Breakdown";
|
|
3
4
|
export declare const AWAITING_WORKSPACE_STATUS_NAME = "Awaiting Workspace";
|
|
4
5
|
export declare const PREPARATION_STATUS_NAME = "Preparation";
|
|
5
6
|
export declare const AWAITING_QUALITY_CHECK_STATUS_NAME = "Awaiting Quality Check";
|
|
6
|
-
export declare const
|
|
7
|
+
export declare const TODO_STATUS_NAME = "Todo";
|
|
8
|
+
export declare const PC_TODO_STATUS_NAME = "PC Todo";
|
|
9
|
+
export declare const IN_TMUX_STATUS_NAME = "In Tmux";
|
|
10
|
+
export declare const DONE_STATUS_NAME = "Done";
|
|
11
|
+
export declare const ICEBOX_STATUS_NAME = "Icebox";
|
|
7
12
|
export type WorkflowStatusDefinition = {
|
|
8
13
|
name: string;
|
|
9
14
|
color: FieldOption['color'];
|
|
10
|
-
description: string;
|
|
11
15
|
};
|
|
12
16
|
export declare const REQUIRED_WORKFLOW_STATUSES: WorkflowStatusDefinition[];
|
|
13
17
|
//# sourceMappingURL=WorkflowStatus.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WorkflowStatus.d.ts","sourceRoot":"","sources":["../../../src/domain/entities/WorkflowStatus.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAExC,eAAO,MAAM,mBAAmB,WAAW,CAAC;AAC5C,eAAO,MAAM,8BAA8B,uBAAuB,CAAC;AACnE,eAAO,MAAM,uBAAuB,gBAAgB,CAAC;AACrD,eAAO,MAAM,kCAAkC,2BAA2B,CAAC;AAC3E,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"WorkflowStatus.d.ts","sourceRoot":"","sources":["../../../src/domain/entities/WorkflowStatus.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAExC,eAAO,MAAM,mBAAmB,WAAW,CAAC;AAC5C,eAAO,MAAM,mCAAmC,4BAA4B,CAAC;AAC7E,eAAO,MAAM,8BAA8B,uBAAuB,CAAC;AACnE,eAAO,MAAM,uBAAuB,gBAAgB,CAAC;AACrD,eAAO,MAAM,kCAAkC,2BAA2B,CAAC;AAC3E,eAAO,MAAM,gBAAgB,SAAS,CAAC;AACvC,eAAO,MAAM,mBAAmB,YAAY,CAAC;AAC7C,eAAO,MAAM,mBAAmB,YAAY,CAAC;AAC7C,eAAO,MAAM,gBAAgB,SAAS,CAAC;AACvC,eAAO,MAAM,kBAAkB,WAAW,CAAC;AAE3C,MAAM,MAAM,wBAAwB,GAAG;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;CAC7B,CAAC;AAEF,eAAO,MAAM,0BAA0B,EAAE,wBAAwB,EAyChE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SetupTowerDefenceProjectUseCase.d.ts","sourceRoot":"","sources":["../../../src/domain/usecases/SetupTowerDefenceProjectUseCase.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAM3E,qBAAa,+BAA+B;IAExC,OAAO,CAAC,QAAQ,CAAC,iBAAiB;gBAAjB,iBAAiB,EAAE,IAAI,CACtC,iBAAiB,EACjB,UAAU,GAAG,kBAAkB,CAChC;IAGH,GAAG,GAAU,QAAQ;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE,KAAG,OAAO,CAAC,IAAI,CAAC,CAsCzD;IAEF,OAAO,CAAC,MAAM,CAAC,mCAAmC,
|
|
1
|
+
{"version":3,"file":"SetupTowerDefenceProjectUseCase.d.ts","sourceRoot":"","sources":["../../../src/domain/usecases/SetupTowerDefenceProjectUseCase.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAM3E,qBAAa,+BAA+B;IAExC,OAAO,CAAC,QAAQ,CAAC,iBAAiB;gBAAjB,iBAAiB,EAAE,IAAI,CACtC,iBAAiB,EACjB,UAAU,GAAG,kBAAkB,CAChC;IAGH,GAAG,GAAU,QAAQ;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE,KAAG,OAAO,CAAC,IAAI,CAAC,CAsCzD;IAEF,OAAO,CAAC,MAAM,CAAC,mCAAmC,CAgBhD;CACH"}
|