github-issue-tower-defence-management 1.162.4 → 1.162.5
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/bin/domain/usecases/SetNoStoryIssueToStoryUseCase.js +1 -1
- package/bin/domain/usecases/SetNoStoryIssueToStoryUseCase.js.map +1 -1
- package/package.json +1 -1
- package/src/domain/usecases/SetNoStoryIssueToStoryUseCase.test.ts +17 -13
- package/src/domain/usecases/SetNoStoryIssueToStoryUseCase.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [1.162.5](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/compare/v1.162.4...v1.162.5) (2026-08-19)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **use-case:** run SetNoStoryIssueToStoryUseCase regardless of cacheUsed ([#1618](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/issues/1618)) ([3cee86d](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/3cee86d7dde60afb9f0bab841672a127ffe249ce)), closes [#1614](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/issues/1614)
|
|
7
|
+
|
|
1
8
|
## [1.162.4](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/compare/v1.162.3...v1.162.4) (2026-08-19)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -6,7 +6,7 @@ class SetNoStoryIssueToStoryUseCase {
|
|
|
6
6
|
this.issueRepository = issueRepository;
|
|
7
7
|
this.run = async (input) => {
|
|
8
8
|
const story = input.project.story;
|
|
9
|
-
if (!story
|
|
9
|
+
if (!story) {
|
|
10
10
|
return;
|
|
11
11
|
}
|
|
12
12
|
const earliestTargetDate = input.targetDates[0] ?? null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SetNoStoryIssueToStoryUseCase.js","sourceRoot":"","sources":["../../../src/domain/usecases/SetNoStoryIssueToStoryUseCase.ts"],"names":[],"mappings":";;;AAIA,MAAa,6BAA6B;IACxC,YAAqB,eAAqD;QAArD,oBAAe,GAAf,eAAe,CAAsC;QAE1E,QAAG,GAAG,KAAK,EAAE,KAKZ,EAAiB,EAAE;YAClB,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;YAClC,IAAI,CAAC,KAAK,
|
|
1
|
+
{"version":3,"file":"SetNoStoryIssueToStoryUseCase.js","sourceRoot":"","sources":["../../../src/domain/usecases/SetNoStoryIssueToStoryUseCase.ts"],"names":[],"mappings":";;;AAIA,MAAa,6BAA6B;IACxC,YAAqB,eAAqD;QAArD,oBAAe,GAAf,eAAe,CAAsC;QAE1E,QAAG,GAAG,KAAK,EAAE,KAKZ,EAAiB,EAAE;YAClB,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;YAClC,IAAI,CAAC,KAAK,EAAE,CAAC;gBACX,OAAO;YACT,CAAC;YACD,MAAM,kBAAkB,GAAgB,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC;YACrE,MAAM,aAAa,GAAG,CAAC,KAAY,EAAW,EAAE;gBAC9C,OAAO,CACL,KAAK,CAAC,KAAK,KAAK,IAAI;oBACpB,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAC3B,KAAK,CAAC,WAAW,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CACzC;oBACD,CAAC,KAAK,CAAC,cAAc,KAAK,IAAI;wBAC5B,CAAC,kBAAkB,KAAK,IAAI;4BAC1B,KAAK,CAAC,cAAc,CAAC,OAAO,EAAE,IAAI,kBAAkB,CAAC,OAAO,EAAE,CAAC,CAAC;oBACpE,KAAK,CAAC,cAAc,KAAK,IAAI;oBAC7B,KAAK,CAAC,KAAK,KAAK,MAAM,CACvB,CAAC;YACJ,CAAC,CAAC;YACF,MAAM,UAAU,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;YACnD,IAAI,CAAC,UAAU,EAAE,CAAC;gBAChB,OAAO;YACT,CAAC;YACD,KAAK,MAAM,KAAK,IAAI,KAAK,CAAC,MAAM,EAAE,CAAC;gBACjC,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,EAAE,CAAC;oBAC1B,SAAS;gBACX,CAAC;gBACD,MAAM,IAAI,CAAC,eAAe,CAAC,WAAW,CACpC,EAAE,GAAG,KAAK,CAAC,OAAO,EAAE,KAAK,EAAE,EAC3B,KAAK,EACL,UAAU,CAAC,EAAE,CACd,CAAC;gBACF,MAAM,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC;YAC5D,CAAC;QACH,CAAC,CAAC;IAzC2E,CAAC;CA0C/E;AA3CD,sEA2CC"}
|
package/package.json
CHANGED
|
@@ -94,24 +94,28 @@ describe('SetNoStoryIssueToStoryUseCase', () => {
|
|
|
94
94
|
expect(mockIssueRepository.updateStory).not.toHaveBeenCalled();
|
|
95
95
|
});
|
|
96
96
|
|
|
97
|
-
it('should
|
|
98
|
-
|
|
97
|
+
it('should assign story to eligible issue even when cacheUsed is true', async () => {
|
|
98
|
+
const issue: Issue = {
|
|
99
|
+
...mock<Issue>(),
|
|
100
|
+
labels: [],
|
|
101
|
+
story: null,
|
|
102
|
+
state: 'OPEN',
|
|
103
|
+
nextActionDate: null,
|
|
104
|
+
nextActionHour: null,
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
const promise = useCase.run({
|
|
99
108
|
targetDates: [targetDate],
|
|
100
109
|
project: basicProject,
|
|
101
|
-
issues: [
|
|
102
|
-
{
|
|
103
|
-
...mock<Issue>(),
|
|
104
|
-
labels: [],
|
|
105
|
-
story: null,
|
|
106
|
-
state: 'OPEN',
|
|
107
|
-
nextActionDate: null,
|
|
108
|
-
nextActionHour: null,
|
|
109
|
-
},
|
|
110
|
-
],
|
|
110
|
+
issues: [issue],
|
|
111
111
|
cacheUsed: true,
|
|
112
112
|
});
|
|
113
|
+
await jest.runAllTimersAsync();
|
|
114
|
+
await promise;
|
|
113
115
|
|
|
114
|
-
expect(mockIssueRepository.updateStory).
|
|
116
|
+
expect(mockIssueRepository.updateStory.mock.calls).toEqual([
|
|
117
|
+
[{ ...basicProject, story: basicProject.story }, issue, 'noStoryId'],
|
|
118
|
+
]);
|
|
115
119
|
});
|
|
116
120
|
|
|
117
121
|
it('should assign first story to eligible issue on non-minute-0 target date', async () => {
|
|
@@ -12,7 +12,7 @@ export class SetNoStoryIssueToStoryUseCase {
|
|
|
12
12
|
cacheUsed: boolean;
|
|
13
13
|
}): Promise<void> => {
|
|
14
14
|
const story = input.project.story;
|
|
15
|
-
if (!story
|
|
15
|
+
if (!story) {
|
|
16
16
|
return;
|
|
17
17
|
}
|
|
18
18
|
const earliestTargetDate: Date | null = input.targetDates[0] ?? null;
|