github-issue-tower-defence-management 1.39.0 → 1.41.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 (58) hide show
  1. package/.github/workflows/create-pr.yml +12 -5
  2. package/.github/workflows/umino-project.yml +5 -4
  3. package/CHANGELOG.md +26 -0
  4. package/README.md +21 -9
  5. package/bin/adapter/entry-points/cli/index.js +45 -10
  6. package/bin/adapter/entry-points/cli/index.js.map +1 -1
  7. package/bin/adapter/entry-points/handlers/HandleScheduledEventUseCaseHandler.js +32 -8
  8. package/bin/adapter/entry-points/handlers/HandleScheduledEventUseCaseHandler.js.map +1 -1
  9. package/bin/adapter/repositories/NodeLocalCommandRunner.js +3 -3
  10. package/bin/adapter/repositories/NodeLocalCommandRunner.js.map +1 -1
  11. package/bin/adapter/repositories/issue/ApiV3CheerioRestIssueRepository.js +446 -11
  12. package/bin/adapter/repositories/issue/ApiV3CheerioRestIssueRepository.js.map +1 -1
  13. package/bin/domain/usecases/HandleScheduledEventUseCase.js +5 -2
  14. package/bin/domain/usecases/HandleScheduledEventUseCase.js.map +1 -1
  15. package/bin/domain/usecases/NotifyFinishedIssuePreparationUseCase.js +111 -16
  16. package/bin/domain/usecases/NotifyFinishedIssuePreparationUseCase.js.map +1 -1
  17. package/bin/domain/usecases/RevertOrphanedPreparationUseCase.js +7 -2
  18. package/bin/domain/usecases/RevertOrphanedPreparationUseCase.js.map +1 -1
  19. package/bin/domain/usecases/StartPreparationUseCase.js +107 -72
  20. package/bin/domain/usecases/StartPreparationUseCase.js.map +1 -1
  21. package/package.json +1 -1
  22. package/src/adapter/entry-points/cli/index.test.ts +26 -13
  23. package/src/adapter/entry-points/cli/index.ts +74 -13
  24. package/src/adapter/repositories/NodeLocalCommandRunner.test.ts +12 -12
  25. package/src/adapter/repositories/NodeLocalCommandRunner.ts +7 -4
  26. package/src/adapter/repositories/issue/ApiV3CheerioRestIssueRepository.test.ts +3 -0
  27. package/src/adapter/repositories/issue/ApiV3CheerioRestIssueRepository.ts +689 -12
  28. package/src/adapter/repositories/issue/RestIssueRepository.test.ts +3 -0
  29. package/src/domain/entities/Issue.ts +1 -0
  30. package/src/domain/usecases/GetStoryObjectMapUseCase.test.ts +1 -0
  31. package/src/domain/usecases/HandleScheduledEventUseCase.ts +11 -3
  32. package/src/domain/usecases/NotifyFinishedIssuePreparationUseCase.test.ts +983 -167
  33. package/src/domain/usecases/NotifyFinishedIssuePreparationUseCase.ts +177 -26
  34. package/src/domain/usecases/RevertOrphanedPreparationUseCase.test.ts +22 -9
  35. package/src/domain/usecases/RevertOrphanedPreparationUseCase.ts +8 -3
  36. package/src/domain/usecases/StartPreparationUseCase.test.ts +1696 -290
  37. package/src/domain/usecases/StartPreparationUseCase.ts +171 -126
  38. package/src/domain/usecases/adapter-interfaces/IssueRepository.ts +4 -4
  39. package/src/domain/usecases/adapter-interfaces/LocalCommandRunner.ts +4 -1
  40. package/types/adapter/entry-points/cli/index.d.ts +4 -1
  41. package/types/adapter/entry-points/cli/index.d.ts.map +1 -1
  42. package/types/adapter/repositories/NodeLocalCommandRunner.d.ts +1 -1
  43. package/types/adapter/repositories/NodeLocalCommandRunner.d.ts.map +1 -1
  44. package/types/adapter/repositories/issue/ApiV3CheerioRestIssueRepository.d.ts +7 -6
  45. package/types/adapter/repositories/issue/ApiV3CheerioRestIssueRepository.d.ts.map +1 -1
  46. package/types/domain/entities/Issue.d.ts +1 -0
  47. package/types/domain/entities/Issue.d.ts.map +1 -1
  48. package/types/domain/usecases/HandleScheduledEventUseCase.d.ts +5 -1
  49. package/types/domain/usecases/HandleScheduledEventUseCase.d.ts.map +1 -1
  50. package/types/domain/usecases/NotifyFinishedIssuePreparationUseCase.d.ts +5 -1
  51. package/types/domain/usecases/NotifyFinishedIssuePreparationUseCase.d.ts.map +1 -1
  52. package/types/domain/usecases/RevertOrphanedPreparationUseCase.d.ts.map +1 -1
  53. package/types/domain/usecases/StartPreparationUseCase.d.ts +10 -18
  54. package/types/domain/usecases/StartPreparationUseCase.d.ts.map +1 -1
  55. package/types/domain/usecases/adapter-interfaces/IssueRepository.d.ts +3 -3
  56. package/types/domain/usecases/adapter-interfaces/IssueRepository.d.ts.map +1 -1
  57. package/types/domain/usecases/adapter-interfaces/LocalCommandRunner.d.ts +1 -1
  58. package/types/domain/usecases/adapter-interfaces/LocalCommandRunner.d.ts.map +1 -1
@@ -55,6 +55,7 @@ describe('RestIssueRepository', () => {
55
55
  isInProgress: false,
56
56
  isClosed: false,
57
57
  createdAt: new Date(),
58
+ author: '',
58
59
  };
59
60
 
60
61
  await restIssueRepository.updateLabels(issue, ['default']);
@@ -92,6 +93,7 @@ describe('RestIssueRepository', () => {
92
93
  isInProgress: false,
93
94
  isClosed: false,
94
95
  createdAt: new Date(),
96
+ author: '',
95
97
  };
96
98
 
97
99
  await restIssueRepository.updateLabels(issue, ['test', 'to-remove']);
@@ -130,6 +132,7 @@ describe('RestIssueRepository', () => {
130
132
  isInProgress: false,
131
133
  isClosed: false,
132
134
  createdAt: new Date(),
135
+ author: '',
133
136
  };
134
137
  await restIssueRepository.updateAssigneeList(issue, ['HiromiShikata']);
135
138
  const issueWithAssignee = await restIssueRepository.getIssue(issue.url);
@@ -23,4 +23,5 @@ export type Issue = {
23
23
  isInProgress: boolean;
24
24
  isClosed: boolean;
25
25
  createdAt: Date;
26
+ author: string;
26
27
  };
@@ -66,6 +66,7 @@ describe('GetStoryObjectMapUseCase', () => {
66
66
  isInProgress: false,
67
67
  isClosed: false,
68
68
  createdAt: new Date(),
69
+ author: '',
69
70
  ...overrides,
70
71
  });
71
72
 
@@ -73,8 +73,12 @@ export class HandleScheduledEventUseCase {
73
73
  awaitingWorkspaceStatus: string;
74
74
  preparationStatus: string;
75
75
  defaultAgentName: string;
76
- logFilePath?: string;
76
+ defaultLlmModelName?: string | null;
77
+ defaultLlmAgentName?: string | null;
78
+ configFilePath: string;
77
79
  maximumPreparingIssuesCount: number | null;
80
+ utilizationPercentageThreshold?: number;
81
+ allowedIssueAuthors?: string[] | null;
78
82
  preparationProcessCheckCommand?: string;
79
83
  } | null;
80
84
  notifyFinishedPreparation?: {
@@ -344,10 +348,14 @@ ${JSON.stringify(e)}
344
348
  awaitingWorkspaceStatus: input.startPreparation.awaitingWorkspaceStatus,
345
349
  preparationStatus: input.startPreparation.preparationStatus,
346
350
  defaultAgentName: input.startPreparation.defaultAgentName,
347
- logFilePath: input.startPreparation.logFilePath,
351
+ defaultLlmModelName: input.startPreparation.defaultLlmModelName ?? null,
352
+ defaultLlmAgentName: input.startPreparation.defaultLlmAgentName ?? null,
353
+ configFilePath: input.startPreparation.configFilePath,
348
354
  maximumPreparingIssuesCount:
349
355
  input.startPreparation.maximumPreparingIssuesCount,
350
- allowIssueCacheMinutes: input.allowIssueCacheMinutes,
356
+ utilizationPercentageThreshold:
357
+ input.startPreparation.utilizationPercentageThreshold ?? 90,
358
+ allowedIssueAuthors: input.startPreparation.allowedIssueAuthors ?? null,
351
359
  });
352
360
  }
353
361
  if (input.notifyFinishedPreparation) {