github-issue-tower-defence-management 1.27.1 → 1.29.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.
Files changed (73) hide show
  1. package/.github/workflows/test.yml +2 -2
  2. package/CHANGELOG.md +14 -0
  3. package/bin/adapter/entry-points/handlers/GetStoryObjectMapUseCaseHandler.js.map +1 -1
  4. package/bin/adapter/entry-points/handlers/HandleScheduledEventUseCaseHandler.js +3 -0
  5. package/bin/adapter/entry-points/handlers/HandleScheduledEventUseCaseHandler.js.map +1 -1
  6. package/bin/adapter/repositories/issue/ApiV3CheerioRestIssueRepository.js +6 -0
  7. package/bin/adapter/repositories/issue/ApiV3CheerioRestIssueRepository.js.map +1 -1
  8. package/bin/domain/entities/StoryObjectMap.js +3 -0
  9. package/bin/domain/entities/StoryObjectMap.js.map +1 -0
  10. package/bin/domain/usecases/ConvertCheckboxToIssueInStoryIssueUseCase.js +15 -3
  11. package/bin/domain/usecases/ConvertCheckboxToIssueInStoryIssueUseCase.js.map +1 -1
  12. package/bin/domain/usecases/GetStoryObjectMapUseCase.js.map +1 -1
  13. package/bin/domain/usecases/HandleScheduledEventUseCase.js.map +1 -1
  14. package/bin/domain/usecases/StartPreparationUseCase.js.map +1 -1
  15. package/bin/domain/usecases/adapter-interfaces/CopilotRepository.js +3 -0
  16. package/bin/domain/usecases/adapter-interfaces/CopilotRepository.js.map +1 -0
  17. package/package.json +1 -1
  18. package/src/adapter/entry-points/handlers/GetStoryObjectMapUseCaseHandler.ts +2 -4
  19. package/src/adapter/entry-points/handlers/HandleScheduledEventUseCaseHandler.ts +8 -1
  20. package/src/adapter/repositories/issue/ApiV3CheerioRestIssueRepository.ts +7 -0
  21. package/src/domain/entities/StoryObjectMap.ts +12 -0
  22. package/src/domain/usecases/AnalyzeProblemByIssueUseCase.ts +1 -1
  23. package/src/domain/usecases/AnalyzeStoriesUseCase.ts +1 -1
  24. package/src/domain/usecases/ChangeStatusByStoryColorUseCase.test.ts +1 -1
  25. package/src/domain/usecases/ChangeStatusByStoryColorUseCase.ts +1 -1
  26. package/src/domain/usecases/ConvertCheckboxToIssueInStoryIssueUseCase.test.ts +254 -23
  27. package/src/domain/usecases/ConvertCheckboxToIssueInStoryIssueUseCase.ts +20 -4
  28. package/src/domain/usecases/CreateEstimationIssueUseCase.ts +1 -1
  29. package/src/domain/usecases/CreateNewStoryByLabelUseCase.test.ts +1 -1
  30. package/src/domain/usecases/CreateNewStoryByLabelUseCase.ts +1 -1
  31. package/src/domain/usecases/GetStoryObjectMapUseCase.ts +2 -11
  32. package/src/domain/usecases/HandleScheduledEventUseCase.ts +2 -11
  33. package/src/domain/usecases/StartPreparationUseCase.ts +2 -11
  34. package/src/domain/usecases/adapter-interfaces/ClaudeRepository.ts +1 -0
  35. package/src/domain/usecases/adapter-interfaces/CopilotRepository.ts +3 -0
  36. package/src/domain/usecases/adapter-interfaces/IssueRepository.ts +3 -0
  37. package/src/domain/usecases/adapter-interfaces/ProjectRepository.ts +1 -0
  38. package/src/index.ts +1 -4
  39. package/types/adapter/entry-points/handlers/GetStoryObjectMapUseCaseHandler.d.ts +1 -1
  40. package/types/adapter/entry-points/handlers/GetStoryObjectMapUseCaseHandler.d.ts.map +1 -1
  41. package/types/adapter/entry-points/handlers/HandleScheduledEventUseCaseHandler.d.ts.map +1 -1
  42. package/types/adapter/repositories/issue/ApiV3CheerioRestIssueRepository.d.ts +3 -0
  43. package/types/adapter/repositories/issue/ApiV3CheerioRestIssueRepository.d.ts.map +1 -1
  44. package/types/domain/entities/StoryObjectMap.d.ts +9 -0
  45. package/types/domain/entities/StoryObjectMap.d.ts.map +1 -0
  46. package/types/domain/usecases/AnalyzeProblemByIssueUseCase.d.ts +1 -1
  47. package/types/domain/usecases/AnalyzeProblemByIssueUseCase.d.ts.map +1 -1
  48. package/types/domain/usecases/AnalyzeStoriesUseCase.d.ts +1 -1
  49. package/types/domain/usecases/AnalyzeStoriesUseCase.d.ts.map +1 -1
  50. package/types/domain/usecases/ChangeStatusByStoryColorUseCase.d.ts +1 -1
  51. package/types/domain/usecases/ChangeStatusByStoryColorUseCase.d.ts.map +1 -1
  52. package/types/domain/usecases/ConvertCheckboxToIssueInStoryIssueUseCase.d.ts +2 -1
  53. package/types/domain/usecases/ConvertCheckboxToIssueInStoryIssueUseCase.d.ts.map +1 -1
  54. package/types/domain/usecases/CreateEstimationIssueUseCase.d.ts +1 -1
  55. package/types/domain/usecases/CreateEstimationIssueUseCase.d.ts.map +1 -1
  56. package/types/domain/usecases/CreateNewStoryByLabelUseCase.d.ts +1 -1
  57. package/types/domain/usecases/CreateNewStoryByLabelUseCase.d.ts.map +1 -1
  58. package/types/domain/usecases/GetStoryObjectMapUseCase.d.ts +2 -7
  59. package/types/domain/usecases/GetStoryObjectMapUseCase.d.ts.map +1 -1
  60. package/types/domain/usecases/HandleScheduledEventUseCase.d.ts +2 -7
  61. package/types/domain/usecases/HandleScheduledEventUseCase.d.ts.map +1 -1
  62. package/types/domain/usecases/StartPreparationUseCase.d.ts +2 -7
  63. package/types/domain/usecases/StartPreparationUseCase.d.ts.map +1 -1
  64. package/types/domain/usecases/adapter-interfaces/ClaudeRepository.d.ts +1 -0
  65. package/types/domain/usecases/adapter-interfaces/ClaudeRepository.d.ts.map +1 -1
  66. package/types/domain/usecases/adapter-interfaces/CopilotRepository.d.ts +4 -0
  67. package/types/domain/usecases/adapter-interfaces/CopilotRepository.d.ts.map +1 -0
  68. package/types/domain/usecases/adapter-interfaces/IssueRepository.d.ts +3 -0
  69. package/types/domain/usecases/adapter-interfaces/IssueRepository.d.ts.map +1 -1
  70. package/types/domain/usecases/adapter-interfaces/ProjectRepository.d.ts +1 -0
  71. package/types/domain/usecases/adapter-interfaces/ProjectRepository.d.ts.map +1 -1
  72. package/types/index.d.ts +1 -1
  73. package/types/index.d.ts.map +1 -1
@@ -3,26 +3,27 @@ import { IssueRepository } from './adapter-interfaces/IssueRepository';
3
3
  import { ConvertCheckboxToIssueInStoryIssueUseCase } from './ConvertCheckboxToIssueInStoryIssueUseCase';
4
4
  import { Project, StoryOption } from '../entities/Project';
5
5
  import { Issue } from '../entities/Issue';
6
- import { StoryObject, StoryObjectMap } from './HandleScheduledEventUseCase';
6
+ import { StoryObject, StoryObjectMap } from '../entities/StoryObjectMap';
7
7
 
8
8
  describe('ConvertCheckboxToIssueInStoryIssueUseCase', () => {
9
9
  jest.setTimeout(5 * 60 * 1000);
10
10
  const mockIssueRepository = mock<IssueRepository>();
11
11
 
12
12
  describe('run', () => {
13
+ const basicStory = {
14
+ name: 'Story Field',
15
+ databaseId: 1,
16
+ fieldId: 'storyFieldId',
17
+ stories: [
18
+ { ...mock<StoryOption>(), id: 'story1', name: 'Story 1' },
19
+ { ...mock<StoryOption>(), id: 'story2', name: 'Story 2' },
20
+ { ...mock<StoryOption>(), id: 'regular3', name: 'regular / Story 3' },
21
+ ],
22
+ workflowManagementStory: { id: 'workflow1', name: 'Workflow Story' },
23
+ };
13
24
  const basicProject: Project = {
14
25
  ...mock<Project>(),
15
- story: {
16
- name: 'Story Field',
17
- databaseId: 1,
18
- fieldId: 'storyFieldId',
19
- stories: [
20
- { ...mock<StoryOption>(), id: 'story1', name: 'Story 1' },
21
- { ...mock<StoryOption>(), id: 'story2', name: 'Story 2' },
22
- { ...mock<StoryOption>(), id: 'regular3', name: 'regular / Story 3' },
23
- ],
24
- workflowManagementStory: { id: 'workflow1', name: 'Workflow Story' },
25
- },
26
+ story: basicStory,
26
27
  };
27
28
 
28
29
  const basicStoryIssue1 = {
@@ -202,7 +203,7 @@ describe('ConvertCheckboxToIssueInStoryIssueUseCase', () => {
202
203
  expectedGetIssueByUrlCalls: [],
203
204
  },
204
205
  {
205
- name: 'should create new issues for checkboxes and update story issue',
206
+ name: 'should add story view link and create new issues for checkboxes',
206
207
  input: {
207
208
  project: basicProject,
208
209
  issues: [basicStoryIssue1, basicStoryIssue2],
@@ -249,28 +250,54 @@ describe('ConvertCheckboxToIssueInStoryIssueUseCase', () => {
249
250
  [
250
251
  {
251
252
  ...basicStoryIssue1,
252
- body: `- [ ] https://github.com/org/repo/issues/1
253
+ body: `https://example.com?sliceBy%5Bvalue%5D=Story%201
254
+
255
+ - [ ] Task 1
256
+ - [ ] Task 2`,
257
+ },
258
+ ],
259
+ [
260
+ {
261
+ ...basicStoryIssue1,
262
+ body: `https://example.com?sliceBy%5Bvalue%5D=Story%201
263
+
264
+ - [ ] https://github.com/org/repo/issues/1
253
265
  - [ ] Task 2`,
254
266
  },
255
267
  ],
256
268
  [
257
269
  {
258
270
  ...basicStoryIssue1,
259
- body: `- [ ] https://github.com/org/repo/issues/1
271
+ body: `https://example.com?sliceBy%5Bvalue%5D=Story%201
272
+
273
+ - [ ] https://github.com/org/repo/issues/1
260
274
  - [ ] https://github.com/org/repo/issues/2`,
261
275
  },
262
276
  ],
263
277
  [
264
278
  {
265
279
  ...basicStoryIssue2,
266
- body: `- [ ] https://github.com/org/repo/issues/3
280
+ body: `https://example.com?sliceBy%5Bvalue%5D=Story%202
281
+
282
+ - [ ] Task 3
267
283
  - [ ] Task 4`,
268
284
  },
269
285
  ],
270
286
  [
271
287
  {
272
288
  ...basicStoryIssue2,
273
- body: `- [ ] https://github.com/org/repo/issues/3
289
+ body: `https://example.com?sliceBy%5Bvalue%5D=Story%202
290
+
291
+ - [ ] https://github.com/org/repo/issues/3
292
+ - [ ] Task 4`,
293
+ },
294
+ ],
295
+ [
296
+ {
297
+ ...basicStoryIssue2,
298
+ body: `https://example.com?sliceBy%5Bvalue%5D=Story%202
299
+
300
+ - [ ] https://github.com/org/repo/issues/3
274
301
  - [ ] https://github.com/org/repo/issues/4`,
275
302
  },
276
303
  ],
@@ -316,6 +343,119 @@ describe('ConvertCheckboxToIssueInStoryIssueUseCase', () => {
316
343
  ['https://github.com/org/repo/issues/4'],
317
344
  ],
318
345
  },
346
+ {
347
+ name: 'should not add story view link when it already exists',
348
+ input: {
349
+ project: {
350
+ ...basicProject,
351
+ story: {
352
+ ...basicStory,
353
+ stories: [
354
+ { ...mock<StoryOption>(), id: 'story1', name: 'Story 1' },
355
+ ],
356
+ },
357
+ },
358
+ issues: [
359
+ {
360
+ ...basicStoryIssue1,
361
+ body: `https://example.com?sliceBy%5Bvalue%5D=Story%201
362
+
363
+ - [ ] Task 1`,
364
+ },
365
+ ],
366
+ cacheUsed: false,
367
+ urlOfStoryView: 'https://example.com',
368
+ disabledStatus: 'Closed',
369
+ storyObjectMap: new Map([['Story 1', basicStoryObject1]]),
370
+ },
371
+ expectedCreateNewIssueCalls: [
372
+ [
373
+ 'org',
374
+ 'repo',
375
+ 'Task 1',
376
+ '- Parent issue: https://github.com/org/repo/issues/123',
377
+ [],
378
+ [],
379
+ ],
380
+ ],
381
+ expectedUpdateIssueCalls: [
382
+ [
383
+ {
384
+ ...basicStoryIssue1,
385
+ body: `https://example.com?sliceBy%5Bvalue%5D=Story%201
386
+
387
+ - [ ] https://github.com/org/repo/issues/1`,
388
+ },
389
+ ],
390
+ ],
391
+ expectedUpdateStoryCalls: [
392
+ [
393
+ {
394
+ ...basicProject,
395
+ story: {
396
+ ...basicStory,
397
+ stories: [
398
+ { ...mock<StoryOption>(), id: 'story1', name: 'Story 1' },
399
+ ],
400
+ },
401
+ },
402
+ {
403
+ ...mock<Issue>(),
404
+ url: 'https://github.com/org/repo/issues/1',
405
+ },
406
+ 'story1',
407
+ ],
408
+ ],
409
+ expectedGetIssueByUrlCalls: [['https://github.com/org/repo/issues/1']],
410
+ },
411
+ {
412
+ name: 'should add story view link even when no checkboxes exist',
413
+ input: {
414
+ project: {
415
+ ...basicProject,
416
+ story: {
417
+ ...basicStory,
418
+ stories: [
419
+ { ...mock<StoryOption>(), id: 'story1', name: 'Story 1' },
420
+ ],
421
+ },
422
+ },
423
+ issues: [
424
+ {
425
+ ...basicStoryIssue1,
426
+ body: 'Some description without checkboxes',
427
+ },
428
+ ],
429
+ cacheUsed: false,
430
+ urlOfStoryView: 'https://example.com',
431
+ disabledStatus: 'Closed',
432
+ storyObjectMap: new Map([
433
+ [
434
+ 'Story 1',
435
+ {
436
+ ...basicStoryObject1,
437
+ storyIssue: {
438
+ ...basicStoryIssue1,
439
+ body: 'Some description without checkboxes',
440
+ },
441
+ },
442
+ ],
443
+ ]),
444
+ },
445
+ expectedCreateNewIssueCalls: [],
446
+ expectedUpdateIssueCalls: [
447
+ [
448
+ {
449
+ ...basicStoryIssue1,
450
+ body: `https://example.com?sliceBy%5Bvalue%5D=Story%201
451
+
452
+ Some description without checkboxes`,
453
+ },
454
+ ],
455
+ ],
456
+ expectedUpdateStoryCalls: [],
457
+ expectedGetIssueByUrlCalls: [],
458
+ },
319
459
  {
320
460
  name: 'should create new issues with replaced STORYNAME for checkboxes and update story issue',
321
461
  input: {
@@ -371,28 +511,54 @@ describe('ConvertCheckboxToIssueInStoryIssueUseCase', () => {
371
511
  [
372
512
  {
373
513
  ...basicStoryIssue1,
374
- body: `- [ ] https://github.com/org/repo/issues/1
514
+ body: `https://example.com?sliceBy%5Bvalue%5D=Story%201
515
+
516
+ - [ ] Task 1
375
517
  - [ ] Task 2 for \`STORYNAME\``,
376
518
  },
377
519
  ],
378
520
  [
379
521
  {
380
522
  ...basicStoryIssue1,
381
- body: `- [ ] https://github.com/org/repo/issues/1
523
+ body: `https://example.com?sliceBy%5Bvalue%5D=Story%201
524
+
525
+ - [ ] https://github.com/org/repo/issues/1
526
+ - [ ] Task 2 for \`STORYNAME\``,
527
+ },
528
+ ],
529
+ [
530
+ {
531
+ ...basicStoryIssue1,
532
+ body: `https://example.com?sliceBy%5Bvalue%5D=Story%201
533
+
534
+ - [ ] https://github.com/org/repo/issues/1
382
535
  - [ ] https://github.com/org/repo/issues/2`,
383
536
  },
384
537
  ],
385
538
  [
386
539
  {
387
540
  ...basicStoryIssue2,
388
- body: `- [ ] https://github.com/org/repo/issues/3
541
+ body: `https://example.com?sliceBy%5Bvalue%5D=Story%202
542
+
543
+ - [ ] Task 3
544
+ - [ ] Task 4`,
545
+ },
546
+ ],
547
+ [
548
+ {
549
+ ...basicStoryIssue2,
550
+ body: `https://example.com?sliceBy%5Bvalue%5D=Story%202
551
+
552
+ - [ ] https://github.com/org/repo/issues/3
389
553
  - [ ] Task 4`,
390
554
  },
391
555
  ],
392
556
  [
393
557
  {
394
558
  ...basicStoryIssue2,
395
- body: `- [ ] https://github.com/org/repo/issues/3
559
+ body: `https://example.com?sliceBy%5Bvalue%5D=Story%202
560
+
561
+ - [ ] https://github.com/org/repo/issues/3
396
562
  - [ ] https://github.com/org/repo/issues/4`,
397
563
  },
398
564
  ],
@@ -520,7 +686,29 @@ describe('ConvertCheckboxToIssueInStoryIssueUseCase', () => {
520
686
  ...basicStoryIssue1,
521
687
  org: 'orgA',
522
688
  repo: 'repoA',
523
- body: `- [ ] https://github.com/orgA/repoA/issues/1`,
689
+ body: `https://example.com?sliceBy%5Bvalue%5D=Story%201
690
+
691
+ - [ ] Task 1`,
692
+ },
693
+ ],
694
+ [
695
+ {
696
+ ...basicStoryIssue1,
697
+ org: 'orgA',
698
+ repo: 'repoA',
699
+ body: `https://example.com?sliceBy%5Bvalue%5D=Story%201
700
+
701
+ - [ ] https://github.com/orgA/repoA/issues/1`,
702
+ },
703
+ ],
704
+ [
705
+ {
706
+ ...basicStoryIssue2,
707
+ org: 'orgB',
708
+ repo: 'repoB',
709
+ body: `https://example.com?sliceBy%5Bvalue%5D=Story%202
710
+
711
+ - [ ] Task 2`,
524
712
  },
525
713
  ],
526
714
  [
@@ -528,7 +716,9 @@ describe('ConvertCheckboxToIssueInStoryIssueUseCase', () => {
528
716
  ...basicStoryIssue2,
529
717
  org: 'orgB',
530
718
  repo: 'repoB',
531
- body: `- [ ] https://github.com/orgB/repoB/issues/2`,
719
+ body: `https://example.com?sliceBy%5Bvalue%5D=Story%202
720
+
721
+ - [ ] https://github.com/orgB/repoB/issues/2`,
532
722
  },
533
723
  ],
534
724
  ],
@@ -610,6 +800,47 @@ describe('ConvertCheckboxToIssueInStoryIssueUseCase', () => {
610
800
  );
611
801
  });
612
802
 
803
+ describe('buildStoryViewLink', () => {
804
+ const testCases: {
805
+ name: string;
806
+ urlOfStoryView: string;
807
+ storyName: string;
808
+ expected: string;
809
+ }[] = [
810
+ {
811
+ name: 'should build story view link with encoded story name',
812
+ urlOfStoryView: 'https://github.com/users/TestUser/projects/1/views/1',
813
+ storyName: 'Story 1',
814
+ expected:
815
+ 'https://github.com/users/TestUser/projects/1/views/1?sliceBy%5Bvalue%5D=Story%201',
816
+ },
817
+ {
818
+ name: 'should handle story name with special characters',
819
+ urlOfStoryView: 'https://github.com/users/TestUser/projects/1/views/1',
820
+ storyName: 'planning business trip for next spring',
821
+ expected:
822
+ 'https://github.com/users/TestUser/projects/1/views/1?sliceBy%5Bvalue%5D=planning%20business%20trip%20for%20next%20spring',
823
+ },
824
+ {
825
+ name: 'should handle story name with hash',
826
+ urlOfStoryView: 'https://github.com/users/TestUser/projects/1/views/1',
827
+ storyName: 'Story #1',
828
+ expected:
829
+ 'https://github.com/users/TestUser/projects/1/views/1?sliceBy%5Bvalue%5D=Story%20%231',
830
+ },
831
+ ];
832
+
833
+ testCases.forEach(({ name, urlOfStoryView, storyName, expected }) => {
834
+ it(name, () => {
835
+ const useCase = new ConvertCheckboxToIssueInStoryIssueUseCase(
836
+ mockIssueRepository,
837
+ );
838
+ const result = useCase.buildStoryViewLink(urlOfStoryView, storyName);
839
+ expect(result).toEqual(expected);
840
+ });
841
+ });
842
+ });
843
+
613
844
  describe('findCheckboxTextsNotCreatedIssue', () => {
614
845
  const testCases: {
615
846
  name: string;
@@ -1,7 +1,8 @@
1
1
  import { Issue } from '../entities/Issue';
2
2
  import { IssueRepository } from './adapter-interfaces/IssueRepository';
3
3
  import { Project } from '../entities/Project';
4
- import { StoryObjectMap } from './HandleScheduledEventUseCase';
4
+ import { StoryObjectMap } from '../entities/StoryObjectMap';
5
+ import { encodeForURI } from './utils';
5
6
 
6
7
  export class ConvertCheckboxToIssueInStoryIssueUseCase {
7
8
  constructor(
@@ -38,12 +39,24 @@ export class ConvertCheckboxToIssueInStoryIssueUseCase {
38
39
  storyIssue.status === input.disabledStatus
39
40
  ) {
40
41
  continue;
41
- } else if (!storyIssue.body.includes('- [ ] ')) {
42
+ }
43
+ const storyViewLink = this.buildStoryViewLink(
44
+ input.urlOfStoryView,
45
+ storyOption.name,
46
+ );
47
+ let newBody = storyIssue.body;
48
+ if (!storyIssue.body.includes(storyViewLink)) {
49
+ newBody = `${storyViewLink}\n\n${newBody}`;
50
+ await this.issueRepository.updateIssue({
51
+ ...storyIssue,
52
+ body: newBody,
53
+ });
54
+ }
55
+ if (!newBody.includes('- [ ] ')) {
42
56
  continue;
43
57
  }
44
58
  const checkboxTextsNotCreatedIssue =
45
- this.findCheckboxTextsNotCreatedIssue(storyIssue.body);
46
- let newBody = storyIssue.body;
59
+ this.findCheckboxTextsNotCreatedIssue(newBody);
47
60
  for (const checkboxText of checkboxTextsNotCreatedIssue) {
48
61
  const issueTitle = checkboxText.replace(
49
62
  'STORYNAME',
@@ -80,6 +93,9 @@ export class ConvertCheckboxToIssueInStoryIssueUseCase {
80
93
  }
81
94
  }
82
95
  };
96
+ buildStoryViewLink = (urlOfStoryView: string, storyName: string): string => {
97
+ return `${urlOfStoryView}?sliceBy%5Bvalue%5D=${encodeForURI(storyName)}`;
98
+ };
83
99
  findCheckboxTextsNotCreatedIssue = (storyIssueBody: string): string[] => {
84
100
  const regexToFindCheckboxes = /^- \[ ] (.*)$/gm;
85
101
  const match = storyIssueBody.match(regexToFindCheckboxes);
@@ -3,7 +3,7 @@ import { IssueRepository } from './adapter-interfaces/IssueRepository';
3
3
  import { Project } from '../entities/Project';
4
4
  import { Member } from '../entities/Member';
5
5
  import { DateRepository } from './adapter-interfaces/DateRepository';
6
- import { StoryObjectMap } from './HandleScheduledEventUseCase';
6
+ import { StoryObjectMap } from '../entities/StoryObjectMap';
7
7
  import { encodeForURI } from './utils';
8
8
 
9
9
  export class CreateEstimationIssueUseCase {
@@ -4,7 +4,7 @@ import { ProjectRepository } from './adapter-interfaces/ProjectRepository';
4
4
  import { IssueRepository } from './adapter-interfaces/IssueRepository';
5
5
  import { Issue } from '../entities/Issue';
6
6
  import { FieldOption, Project, StoryOption } from '../entities/Project';
7
- import { StoryObject } from './HandleScheduledEventUseCase';
7
+ import { StoryObject } from '../entities/StoryObjectMap';
8
8
 
9
9
  describe('CreateNewStoryByLabelUseCase', () => {
10
10
  const mockProjectRepository = mock<ProjectRepository>();
@@ -1,6 +1,6 @@
1
1
  import { IssueRepository } from './adapter-interfaces/IssueRepository';
2
2
  import { FieldOption, Project } from '../entities/Project';
3
- import { StoryObjectMap } from './HandleScheduledEventUseCase';
3
+ import { StoryObjectMap } from '../entities/StoryObjectMap';
4
4
  import { ProjectRepository } from './adapter-interfaces/ProjectRepository';
5
5
  import { Issue } from '../entities/Issue';
6
6
 
@@ -1,6 +1,7 @@
1
1
  import { Issue } from '../entities/Issue';
2
2
  import { IssueRepository } from './adapter-interfaces/IssueRepository';
3
- import { Project, StoryOption } from '../entities/Project';
3
+ import { Project } from '../entities/Project';
4
+ import { StoryObjectMap } from '../entities/StoryObjectMap';
4
5
  import { ProjectRepository } from './adapter-interfaces/ProjectRepository';
5
6
 
6
7
  export class ProjectNotFoundError extends Error {
@@ -10,16 +11,6 @@ export class ProjectNotFoundError extends Error {
10
11
  }
11
12
  }
12
13
 
13
- export type StoryObject = {
14
- story: StoryOption;
15
- storyIssue: Issue | null;
16
- issues: Issue[];
17
- };
18
- export type StoryObjectMap = Map<
19
- NonNullable<Project['story']>['stories'][0]['name'],
20
- StoryObject
21
- >;
22
-
23
14
  export class GetStoryObjectMapUseCase {
24
15
  constructor(
25
16
  readonly projectRepository: Pick<
@@ -1,6 +1,7 @@
1
1
  import { Issue } from '../entities/Issue';
2
2
  import { IssueRepository } from './adapter-interfaces/IssueRepository';
3
- import { Project, StoryOption } from '../entities/Project';
3
+ import { Project } from '../entities/Project';
4
+ import { StoryObjectMap } from '../entities/StoryObjectMap';
4
5
  import { ProjectRepository } from './adapter-interfaces/ProjectRepository';
5
6
  import { Member } from '../entities/Member';
6
7
  import { DateRepository } from './adapter-interfaces/DateRepository';
@@ -26,16 +27,6 @@ export class ProjectNotFoundError extends Error {
26
27
  }
27
28
  }
28
29
 
29
- export type StoryObject = {
30
- story: StoryOption;
31
- storyIssue: Issue | null;
32
- issues: Issue[];
33
- };
34
- export type StoryObjectMap = Map<
35
- NonNullable<Project['story']>['stories'][0]['name'],
36
- StoryObject
37
- >;
38
-
39
30
  export class HandleScheduledEventUseCase {
40
31
  constructor(
41
32
  readonly actionAnnouncementUseCase: ActionAnnouncementUseCase,
@@ -1,20 +1,11 @@
1
1
  import { Issue } from '../entities/Issue';
2
- import { Project, StoryOption } from '../entities/Project';
2
+ import { Project } from '../entities/Project';
3
+ import { StoryObject, StoryObjectMap } from '../entities/StoryObjectMap';
3
4
  import { IssueRepository } from './adapter-interfaces/IssueRepository';
4
5
  import { ProjectRepository } from './adapter-interfaces/ProjectRepository';
5
6
  import { LocalCommandRunner } from './adapter-interfaces/LocalCommandRunner';
6
7
  import { ClaudeRepository } from './adapter-interfaces/ClaudeRepository';
7
8
 
8
- export type StoryObject = {
9
- story: StoryOption;
10
- storyIssue: Issue | null;
11
- issues: Issue[];
12
- };
13
- export type StoryObjectMap = Map<
14
- NonNullable<Project['story']>['stories'][0]['name'],
15
- StoryObject
16
- >;
17
-
18
9
  export class StartPreparationUseCase {
19
10
  constructor(
20
11
  readonly projectRepository: Pick<
@@ -2,4 +2,5 @@ import { ClaudeWindowUsage } from '../../entities/ClaudeWindowUsage';
2
2
 
3
3
  export interface ClaudeRepository {
4
4
  getUsage(): Promise<ClaudeWindowUsage[]>;
5
+ isClaudeAvailable(threshold: number): Promise<boolean>;
5
6
  }
@@ -0,0 +1,3 @@
1
+ export interface CopilotRepository {
2
+ run(prompt: string, model: 'gpt-5-mini', processTitle: string): void;
3
+ }
@@ -1,6 +1,7 @@
1
1
  import { Issue, Label } from '../../entities/Issue';
2
2
  import { FieldOption, Project } from '../../entities/Project';
3
3
  import { Member } from '../../entities/Member';
4
+ import { StoryObjectMap } from '../../entities/StoryObjectMap';
4
5
 
5
6
  export type RelatedPullRequest = {
6
7
  url: string;
@@ -70,4 +71,6 @@ export interface IssueRepository {
70
71
  get: (issueUrl: string, project: Project) => Promise<Issue | null>;
71
72
  update: (issue: Issue, project: Project) => Promise<void>;
72
73
  findRelatedOpenPRs: (issueUrl: string) => Promise<RelatedPullRequest[]>;
74
+ getAllOpened: (project: Project) => Promise<Issue[]>;
75
+ getStoryObjectMap: (project: Project) => Promise<StoryObjectMap>;
73
76
  }
@@ -8,4 +8,5 @@ export interface ProjectRepository {
8
8
  storyOption: (Omit<FieldOption, 'id'> & { id: FieldOption['id'] | null })[],
9
9
  ) => Promise<FieldOption[]>;
10
10
  getByUrl: (url: string) => Promise<Project>;
11
+ prepareStatus: (name: string, project: Project) => Promise<Project>;
11
12
  }
package/src/index.ts CHANGED
@@ -7,7 +7,4 @@ export { Project } from './domain/entities/Project';
7
7
  export { Issue } from './domain/entities/Issue';
8
8
  export const scheduledEvent = new HandleScheduledEventUseCaseHandler().handle;
9
9
  export { getStoryObjectMap };
10
- export {
11
- StoryObject,
12
- StoryObjectMap,
13
- } from './domain/usecases/GetStoryObjectMapUseCase';
10
+ export { StoryObject, StoryObjectMap } from './domain/entities/StoryObjectMap';
@@ -1,6 +1,6 @@
1
1
  import { Issue } from '../../../domain/entities/Issue';
2
2
  import { Project } from '../../../domain/entities/Project';
3
- import { StoryObjectMap } from '../../../domain/usecases/GetStoryObjectMapUseCase';
3
+ import { StoryObjectMap } from '../../../domain/entities/StoryObjectMap';
4
4
  export declare class GetStoryObjectMapUseCaseHandler {
5
5
  handle: (configFilePath: string, verbose: boolean, allowCacheMinutes?: number) => Promise<{
6
6
  project: Project;
@@ -1 +1 @@
1
- {"version":3,"file":"GetStoryObjectMapUseCaseHandler.d.ts","sourceRoot":"","sources":["../../../../src/adapter/entry-points/handlers/GetStoryObjectMapUseCaseHandler.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,KAAK,EAAE,MAAM,gCAAgC,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAI3D,OAAO,EAEL,cAAc,EACf,MAAM,mDAAmD,CAAC;AAE3D,qBAAa,+BAA+B;IAC1C,MAAM,mBACY,MAAM,WACb,OAAO,sBACI,MAAM,KACzB,OAAO,CAAC;QACT,OAAO,EAAE,OAAO,CAAC;QACjB,MAAM,EAAE,KAAK,EAAE,CAAC;QAChB,SAAS,EAAE,OAAO,CAAC;QACnB,cAAc,EAAE,cAAc,CAAC;KAChC,CAAC,CAmFA;CACH"}
1
+ {"version":3,"file":"GetStoryObjectMapUseCaseHandler.d.ts","sourceRoot":"","sources":["../../../../src/adapter/entry-points/handlers/GetStoryObjectMapUseCaseHandler.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,KAAK,EAAE,MAAM,gCAAgC,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAK3D,OAAO,EAAE,cAAc,EAAE,MAAM,yCAAyC,CAAC;AAEzE,qBAAa,+BAA+B;IAC1C,MAAM,mBACY,MAAM,WACb,OAAO,sBACI,MAAM,KACzB,OAAO,CAAC;QACT,OAAO,EAAE,OAAO,CAAC;QACjB,MAAM,EAAE,KAAK,EAAE,CAAC;QAChB,SAAS,EAAE,OAAO,CAAC;QACnB,cAAc,EAAE,cAAc,CAAC;KAChC,CAAC,CAmFA;CACH"}
@@ -1 +1 @@
1
- {"version":3,"file":"HandleScheduledEventUseCaseHandler.d.ts","sourceRoot":"","sources":["../../../../src/adapter/entry-points/handlers/HandleScheduledEventUseCaseHandler.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,KAAK,EAAE,MAAM,gCAAgC,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAc3D,qBAAa,kCAAkC;IAC7C,MAAM,mBACY,MAAM,WACb,OAAO,KACf,OAAO,CAAC;QACT,OAAO,EAAE,OAAO,CAAC;QACjB,MAAM,EAAE,KAAK,EAAE,CAAC;QAChB,SAAS,EAAE,OAAO,CAAC;QACnB,eAAe,EAAE,IAAI,EAAE,CAAC;KACzB,GAAG,IAAI,CAAC,CAuJP;CACH"}
1
+ {"version":3,"file":"HandleScheduledEventUseCaseHandler.d.ts","sourceRoot":"","sources":["../../../../src/adapter/entry-points/handlers/HandleScheduledEventUseCaseHandler.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,KAAK,EAAE,MAAM,gCAAgC,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAe3D,qBAAa,kCAAkC;IAC7C,MAAM,mBACY,MAAM,WACb,OAAO,KACf,OAAO,CAAC;QACT,OAAO,EAAE,OAAO,CAAC;QACjB,MAAM,EAAE,KAAK,EAAE,CAAC;QAChB,SAAS,EAAE,OAAO,CAAC;QACnB,eAAe,EAAE,IAAI,EAAE,CAAC;KACzB,GAAG,IAAI,CAAC,CA6JP;CACH"}
@@ -1,6 +1,7 @@
1
1
  import { IssueRepository, RelatedPullRequest } from '../../../domain/usecases/adapter-interfaces/IssueRepository';
2
2
  import { Project } from '../../../domain/entities/Project';
3
3
  import { Issue } from '../../../domain/entities/Issue';
4
+ import { StoryObjectMap } from '../../../domain/entities/StoryObjectMap';
4
5
  import { ApiV3IssueRepository } from './ApiV3IssueRepository';
5
6
  import { RestIssueRepository } from './RestIssueRepository';
6
7
  import { GraphqlProjectItemRepository, ProjectItem } from './GraphqlProjectItemRepository';
@@ -49,5 +50,7 @@ export declare class ApiV3CheerioRestIssueRepository extends BaseGitHubRepositor
49
50
  get: (_issueUrl: string, _project: Project) => Promise<Issue | null>;
50
51
  update: (issue: Issue, _project: Project) => Promise<void>;
51
52
  findRelatedOpenPRs: (_issueUrl: string) => Promise<RelatedPullRequest[]>;
53
+ getAllOpened: (_project: Project) => Promise<Issue[]>;
54
+ getStoryObjectMap: (_project: Project) => Promise<StoryObjectMap>;
52
55
  }
53
56
  //# sourceMappingURL=ApiV3CheerioRestIssueRepository.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ApiV3CheerioRestIssueRepository.d.ts","sourceRoot":"","sources":["../../../../src/adapter/repositories/issue/ApiV3CheerioRestIssueRepository.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,kBAAkB,EACnB,MAAM,6DAA6D,CAAC;AACrE,OAAO,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAC3D,OAAO,EAAE,KAAK,EAAE,MAAM,gCAAgC,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EACL,4BAA4B,EAC5B,WAAW,EACZ,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,2BAA2B,EAAE,MAAM,gCAAgC,CAAC;AAE7E,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAE/D,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAC;AAEzD,qBAAa,+BACX,SAAQ,oBACR,YAAW,eAAe;IAGxB,QAAQ,CAAC,oBAAoB,EAAE,IAAI,CAAC,oBAAoB,EAAE,aAAa,CAAC;IACxE,QAAQ,CAAC,mBAAmB,EAAE,IAAI,CAChC,mBAAmB,EACjB,gBAAgB,GAChB,aAAa,GACb,eAAe,GACf,UAAU,GACV,cAAc,GACd,aAAa,GACb,oBAAoB,CACvB;IACD,QAAQ,CAAC,4BAA4B,EAAE,IAAI,CACzC,4BAA4B,EAC1B,mBAAmB,GACnB,uBAAuB,GACvB,oBAAoB,GACpB,mBAAmB,GACnB,wBAAwB,CAC3B;IACD,QAAQ,CAAC,2BAA2B,EAAE,IAAI,CACxC,2BAA2B,EAC3B,WAAW,GAAG,KAAK,CACpB;IACD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,KAAG,OAAO,CAAC,IAAI,CAAC,CAExD;IACF,kBAAkB,UACT,KAAK,gBACE,MAAM,CAAC,MAAM,CAAC,EAAE,KAC7B,OAAO,CAAC,IAAI,CAAC,CAEd;IACF,GAAG,cAAqB,MAAM,YAAY,OAAO,KAAG,OAAO,CAAC,KAAK,GAAG,IAAI,CAAC,CAEvE;IACF,MAAM,UAAiB,KAAK,YAAY,OAAO,KAAG,OAAO,CAAC,IAAI,CAAC,CAE7D;IACF,kBAAkB,cACL,MAAM,KAChB,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAE9B;CACH"}
1
+ {"version":3,"file":"ApiV3CheerioRestIssueRepository.d.ts","sourceRoot":"","sources":["../../../../src/adapter/repositories/issue/ApiV3CheerioRestIssueRepository.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,kBAAkB,EACnB,MAAM,6DAA6D,CAAC;AACrE,OAAO,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAC3D,OAAO,EAAE,KAAK,EAAE,MAAM,gCAAgC,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EACL,4BAA4B,EAC5B,WAAW,EACZ,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,2BAA2B,EAAE,MAAM,gCAAgC,CAAC;AAE7E,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAE/D,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAC;AAEzD,qBAAa,+BACX,SAAQ,oBACR,YAAW,eAAe;IAGxB,QAAQ,CAAC,oBAAoB,EAAE,IAAI,CAAC,oBAAoB,EAAE,aAAa,CAAC;IACxE,QAAQ,CAAC,mB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,MAAM,SACR,KAAK,KACX,OAAO,CAAC,IAAI,CAAC,CAOd;IACF,aAAa,UAAiB,KAAK,WAAW,MAAM,KAAG,OAAO,CAAC,IAAI,CAAC,CAElE;IACF,sBAAsB,YACX,OAAO,WACP,MAAM,SACR,KAAK,QACN,MAAM,KACX,OAAO,CAAC,IAAI,CAAC,CAOd;IAEF,YAAY,UAAW,KAAK,UAAU,KAAK,CAAC,QAAQ,CAAC,KAAG,OAAO,CAAC,IAAI,CAAC,CAEnE;IACF,WAAW,UAAW,KAAK,SAAS,MAAM,KAAG,OAAO,CAAC,IAAI,CAAC,CAExD;IACF,kBAAkB,UACT,KAAK,gBACE,MAAM,CAAC,MAAM,CAAC,EAAE,KAC7B,OAAO,CAAC,IAAI,CAAC,CAEd;IACF,GAAG,cAAqB,MAAM,YAAY,OAAO,KAAG,OAAO,CAAC,KAAK,GAAG,IAAI,CAAC,CAEvE;IACF,MAAM,UAAiB,KAAK,YAAY,OAAO,KAAG,OAAO,CAAC,IAAI,CAAC,CAE7D;IACF,kBAAkB,cACL,MAAM,KAChB,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAE9B;IACF,YAAY,aAAoB,OAAO,KAAG,OAAO,CAAC,KAAK,EAAE,CAAC,CAExD;IACF,iBAAiB,aAAoB,OAAO,KAAG,OAAO,CAAC,cAAc,CAAC,CAEpE;CACH"}
@@ -0,0 +1,9 @@
1
+ import { Issue } from './Issue';
2
+ import { Project, StoryOption } from './Project';
3
+ export type StoryObject = {
4
+ story: StoryOption;
5
+ storyIssue: Issue | null;
6
+ issues: Issue[];
7
+ };
8
+ export type StoryObjectMap = Map<NonNullable<Project['story']>['stories'][0]['name'], StoryObject>;
9
+ //# sourceMappingURL=StoryObjectMap.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StoryObjectMap.d.ts","sourceRoot":"","sources":["../../../src/domain/entities/StoryObjectMap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAEjD,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,EAAE,WAAW,CAAC;IACnB,UAAU,EAAE,KAAK,GAAG,IAAI,CAAC;IACzB,MAAM,EAAE,KAAK,EAAE,CAAC;CACjB,CAAC;AACF,MAAM,MAAM,cAAc,GAAG,GAAG,CAC9B,WAAW,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,EACnD,WAAW,CACZ,CAAC"}
@@ -3,7 +3,7 @@ import { IssueRepository } from './adapter-interfaces/IssueRepository';
3
3
  import { Project } from '../entities/Project';
4
4
  import { Member } from '../entities/Member';
5
5
  import { DateRepository } from './adapter-interfaces/DateRepository';
6
- import { StoryObject, StoryObjectMap } from './HandleScheduledEventUseCase';
6
+ import { StoryObject, StoryObjectMap } from '../entities/StoryObjectMap';
7
7
  export declare class AnalyzeProblemByIssueUseCase {
8
8
  readonly issueRepository: Pick<IssueRepository, 'createNewIssue' | 'createComment'>;
9
9
  readonly dateRepository: Pick<DateRepository, 'formatDurationToHHMM' | 'formatDateWithDayOfWeek'>;