github-issue-tower-defence-management 1.120.0 → 1.121.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 +6 -8
- package/bin/adapter/entry-points/cli/index.js +8 -14
- package/bin/adapter/entry-points/cli/index.js.map +1 -1
- package/bin/adapter/entry-points/cli/projectConfig.js +0 -6
- package/bin/adapter/entry-points/cli/projectConfig.js.map +1 -1
- package/bin/adapter/entry-points/handlers/GetStoryObjectMapUseCaseHandler.js +6 -12
- package/bin/adapter/entry-points/handlers/GetStoryObjectMapUseCaseHandler.js.map +1 -1
- package/bin/adapter/entry-points/handlers/HandleScheduledEventUseCaseHandler.js +3 -10
- package/bin/adapter/entry-points/handlers/HandleScheduledEventUseCaseHandler.js.map +1 -1
- package/bin/adapter/entry-points/handlers/machineStatusWriter.js +23 -19
- package/bin/adapter/entry-points/handlers/machineStatusWriter.js.map +1 -1
- package/bin/adapter/entry-points/handlers/situationFileWriter.js.map +1 -1
- package/bin/adapter/entry-points/handlers/staleTmuxSessionCleaner.js +1 -2
- package/bin/adapter/entry-points/handlers/staleTmuxSessionCleaner.js.map +1 -1
- package/bin/adapter/repositories/LocalStorageCacheRepository.js +25 -0
- package/bin/adapter/repositories/LocalStorageCacheRepository.js.map +1 -1
- package/bin/adapter/repositories/ProcHostMetricsRepository.js +10 -5
- package/bin/adapter/repositories/ProcHostMetricsRepository.js.map +1 -1
- package/bin/adapter/repositories/issue/ApiV3CheerioRestIssueRepository.js +119 -59
- package/bin/adapter/repositories/issue/ApiV3CheerioRestIssueRepository.js.map +1 -1
- package/bin/adapter/repositories/issue/GraphqlProjectItemRepository.js +12 -3
- package/bin/adapter/repositories/issue/GraphqlProjectItemRepository.js.map +1 -1
- package/bin/domain/usecases/GetStoryObjectMapUseCase.js +1 -1
- package/bin/domain/usecases/GetStoryObjectMapUseCase.js.map +1 -1
- package/bin/domain/usecases/HandleScheduledEventUseCase.js +1 -8
- package/bin/domain/usecases/HandleScheduledEventUseCase.js.map +1 -1
- package/bin/domain/usecases/NotifyFinishedIssuePreparationUseCase.js +2 -2
- package/bin/domain/usecases/NotifyFinishedIssuePreparationUseCase.js.map +1 -1
- package/bin/domain/usecases/RevertNotReadyReviewQueueIssueUseCase.js +1 -1
- package/bin/domain/usecases/RevertNotReadyReviewQueueIssueUseCase.js.map +1 -1
- package/bin/domain/usecases/RevertOrphanedPreparationUseCase.js +1 -1
- package/bin/domain/usecases/RevertOrphanedPreparationUseCase.js.map +1 -1
- package/bin/domain/usecases/SetupTowerDefenceProjectUseCase.js +1 -1
- package/bin/domain/usecases/SetupTowerDefenceProjectUseCase.js.map +1 -1
- package/bin/domain/usecases/StaleTmuxSessionKillUseCase.js +1 -1
- package/bin/domain/usecases/StaleTmuxSessionKillUseCase.js.map +1 -1
- package/bin/domain/usecases/StartPreparationUseCase.js +1 -1
- package/bin/domain/usecases/StartPreparationUseCase.js.map +1 -1
- package/package.json +1 -1
- package/src/adapter/entry-points/cli/index.test.ts +0 -5
- package/src/adapter/entry-points/cli/index.ts +16 -17
- package/src/adapter/entry-points/cli/projectConfig.ts +0 -8
- package/src/adapter/entry-points/handlers/GetStoryObjectMapUseCaseHandler.test.ts +4 -25
- package/src/adapter/entry-points/handlers/GetStoryObjectMapUseCaseHandler.ts +4 -7
- package/src/adapter/entry-points/handlers/HandleScheduledEventUseCaseHandler.test.ts +2 -25
- package/src/adapter/entry-points/handlers/HandleScheduledEventUseCaseHandler.ts +2 -4
- package/src/adapter/entry-points/handlers/machineStatusWriter.test.ts +29 -11
- package/src/adapter/entry-points/handlers/machineStatusWriter.ts +30 -19
- package/src/adapter/entry-points/handlers/situationFileWriter.test.ts +0 -5
- package/src/adapter/entry-points/handlers/situationFileWriter.ts +0 -1
- package/src/adapter/entry-points/handlers/staleTmuxSessionCleaner.test.ts +0 -5
- package/src/adapter/entry-points/handlers/staleTmuxSessionCleaner.ts +1 -9
- package/src/adapter/repositories/LocalStorageCacheRepository.test.ts +75 -0
- package/src/adapter/repositories/LocalStorageCacheRepository.ts +24 -0
- package/src/adapter/repositories/ProcHostMetricsRepository.test.ts +29 -8
- package/src/adapter/repositories/ProcHostMetricsRepository.ts +10 -6
- package/src/adapter/repositories/issue/ApiV3CheerioRestIssueRepository.test.ts +198 -47
- package/src/adapter/repositories/issue/ApiV3CheerioRestIssueRepository.ts +160 -81
- package/src/adapter/repositories/issue/GraphqlProjectItemRepository.ts +23 -3
- package/src/domain/usecases/GetStoryObjectMapUseCase.test.ts +7 -12
- package/src/domain/usecases/GetStoryObjectMapUseCase.ts +1 -5
- package/src/domain/usecases/HandleScheduledEventUseCase.test.ts +8 -24
- package/src/domain/usecases/HandleScheduledEventUseCase.ts +6 -17
- package/src/domain/usecases/NotifyFinishedIssuePreparationUseCase.ts +4 -8
- package/src/domain/usecases/RevertNotReadyReviewQueueIssueUseCase.test.ts +35 -42
- package/src/domain/usecases/RevertNotReadyReviewQueueIssueUseCase.ts +1 -5
- package/src/domain/usecases/RevertOrphanedPreparationUseCase.test.ts +32 -32
- package/src/domain/usecases/RevertOrphanedPreparationUseCase.ts +1 -5
- package/src/domain/usecases/SetupTowerDefenceProjectUseCase.test.ts +17 -4
- package/src/domain/usecases/SetupTowerDefenceProjectUseCase.ts +1 -4
- package/src/domain/usecases/StaleTmuxSessionKillUseCase.test.ts +1 -7
- package/src/domain/usecases/StaleTmuxSessionKillUseCase.ts +1 -5
- package/src/domain/usecases/StartPreparationUseCase.test.ts +1 -94
- package/src/domain/usecases/StartPreparationUseCase.ts +2 -5
- package/src/domain/usecases/adapter-interfaces/IssueRepository.ts +3 -10
- package/types/adapter/entry-points/cli/projectConfig.d.ts +0 -1
- package/types/adapter/entry-points/cli/projectConfig.d.ts.map +1 -1
- package/types/adapter/entry-points/function/getStoryObjectMap.d.ts +1 -1
- package/types/adapter/entry-points/handlers/GetStoryObjectMapUseCaseHandler.d.ts +1 -1
- package/types/adapter/entry-points/handlers/GetStoryObjectMapUseCaseHandler.d.ts.map +1 -1
- package/types/adapter/entry-points/handlers/HandleScheduledEventUseCaseHandler.d.ts.map +1 -1
- package/types/adapter/entry-points/handlers/machineStatusWriter.d.ts +1 -0
- package/types/adapter/entry-points/handlers/machineStatusWriter.d.ts.map +1 -1
- package/types/adapter/entry-points/handlers/situationFileWriter.d.ts +0 -1
- package/types/adapter/entry-points/handlers/situationFileWriter.d.ts.map +1 -1
- package/types/adapter/entry-points/handlers/staleTmuxSessionCleaner.d.ts +0 -1
- package/types/adapter/entry-points/handlers/staleTmuxSessionCleaner.d.ts.map +1 -1
- package/types/adapter/repositories/LocalStorageCacheRepository.d.ts +2 -0
- package/types/adapter/repositories/LocalStorageCacheRepository.d.ts.map +1 -1
- package/types/adapter/repositories/ProcHostMetricsRepository.d.ts +1 -1
- package/types/adapter/repositories/ProcHostMetricsRepository.d.ts.map +1 -1
- package/types/adapter/repositories/issue/ApiV3CheerioRestIssueRepository.d.ts +22 -7
- package/types/adapter/repositories/issue/ApiV3CheerioRestIssueRepository.d.ts.map +1 -1
- package/types/adapter/repositories/issue/GraphqlProjectItemRepository.d.ts +2 -1
- package/types/adapter/repositories/issue/GraphqlProjectItemRepository.d.ts.map +1 -1
- package/types/domain/usecases/GetStoryObjectMapUseCase.d.ts +0 -1
- package/types/domain/usecases/GetStoryObjectMapUseCase.d.ts.map +1 -1
- package/types/domain/usecases/HandleScheduledEventUseCase.d.ts +0 -1
- package/types/domain/usecases/HandleScheduledEventUseCase.d.ts.map +1 -1
- package/types/domain/usecases/NotifyFinishedIssuePreparationUseCase.d.ts.map +1 -1
- package/types/domain/usecases/RevertNotReadyReviewQueueIssueUseCase.d.ts +0 -1
- package/types/domain/usecases/RevertNotReadyReviewQueueIssueUseCase.d.ts.map +1 -1
- package/types/domain/usecases/RevertOrphanedPreparationUseCase.d.ts +0 -1
- package/types/domain/usecases/RevertOrphanedPreparationUseCase.d.ts.map +1 -1
- package/types/domain/usecases/SetupTowerDefenceProjectUseCase.d.ts.map +1 -1
- package/types/domain/usecases/StaleTmuxSessionKillUseCase.d.ts +0 -1
- package/types/domain/usecases/StaleTmuxSessionKillUseCase.d.ts.map +1 -1
- package/types/domain/usecases/StartPreparationUseCase.d.ts +0 -1
- package/types/domain/usecases/StartPreparationUseCase.d.ts.map +1 -1
- package/types/domain/usecases/adapter-interfaces/IssueRepository.d.ts +4 -3
- package/types/domain/usecases/adapter-interfaces/IssueRepository.d.ts.map +1 -1
|
@@ -138,6 +138,7 @@ const linkRelatedOpenPrsToIssue = (
|
|
|
138
138
|
}),
|
|
139
139
|
);
|
|
140
140
|
mockIssueRepository.getAllIssues.mockResolvedValue({
|
|
141
|
+
project: createMockProject(),
|
|
141
142
|
issues: [issue, ...prItems],
|
|
142
143
|
cacheUsed: false,
|
|
143
144
|
});
|
|
@@ -179,9 +180,11 @@ describe('RevertNotReadyReviewQueueIssueUseCase', () => {
|
|
|
179
180
|
};
|
|
180
181
|
|
|
181
182
|
mockIssueRepository = {
|
|
182
|
-
getAllIssues: jest
|
|
183
|
-
|
|
184
|
-
|
|
183
|
+
getAllIssues: jest.fn().mockResolvedValue({
|
|
184
|
+
project: mockProject,
|
|
185
|
+
issues: [],
|
|
186
|
+
cacheUsed: false,
|
|
187
|
+
}),
|
|
185
188
|
updateStatus: jest.fn().mockResolvedValue(undefined),
|
|
186
189
|
updateStory: jest.fn().mockResolvedValue(undefined),
|
|
187
190
|
findRelatedOpenPRs: jest.fn().mockResolvedValue([]),
|
|
@@ -205,6 +208,7 @@ describe('RevertNotReadyReviewQueueIssueUseCase', () => {
|
|
|
205
208
|
describe('Awaiting Quality Check processing', () => {
|
|
206
209
|
it('should do nothing when there are no Awaiting Quality Check issues', async () => {
|
|
207
210
|
mockIssueRepository.getAllIssues.mockResolvedValue({
|
|
211
|
+
project: mockProject,
|
|
208
212
|
issues: [
|
|
209
213
|
createMockIssue({ status: 'Awaiting Workspace' }),
|
|
210
214
|
createMockIssue({ status: 'Preparation' }),
|
|
@@ -214,7 +218,6 @@ describe('RevertNotReadyReviewQueueIssueUseCase', () => {
|
|
|
214
218
|
|
|
215
219
|
await useCase.run({
|
|
216
220
|
projectUrl: 'https://github.com/users/user/projects/1',
|
|
217
|
-
allowIssueCacheMinutes: 10,
|
|
218
221
|
allowedIssueAuthors: ['owner'],
|
|
219
222
|
});
|
|
220
223
|
|
|
@@ -228,13 +231,13 @@ describe('RevertNotReadyReviewQueueIssueUseCase', () => {
|
|
|
228
231
|
labels: ['llm-agent'],
|
|
229
232
|
});
|
|
230
233
|
mockIssueRepository.getAllIssues.mockResolvedValue({
|
|
234
|
+
project: mockProject,
|
|
231
235
|
issues: [issue],
|
|
232
236
|
cacheUsed: false,
|
|
233
237
|
});
|
|
234
238
|
|
|
235
239
|
await useCase.run({
|
|
236
240
|
projectUrl: 'https://github.com/users/user/projects/1',
|
|
237
|
-
allowIssueCacheMinutes: 10,
|
|
238
241
|
allowedIssueAuthors: ['owner'],
|
|
239
242
|
});
|
|
240
243
|
|
|
@@ -247,13 +250,13 @@ describe('RevertNotReadyReviewQueueIssueUseCase', () => {
|
|
|
247
250
|
status: 'Awaiting Quality Check',
|
|
248
251
|
});
|
|
249
252
|
mockIssueRepository.getAllIssues.mockResolvedValue({
|
|
253
|
+
project: mockProject,
|
|
250
254
|
issues: [issue],
|
|
251
255
|
cacheUsed: false,
|
|
252
256
|
});
|
|
253
257
|
|
|
254
258
|
await useCase.run({
|
|
255
259
|
projectUrl: 'https://github.com/users/user/projects/1',
|
|
256
|
-
allowIssueCacheMinutes: 10,
|
|
257
260
|
allowedIssueAuthors: ['owner'],
|
|
258
261
|
});
|
|
259
262
|
|
|
@@ -278,13 +281,13 @@ describe('RevertNotReadyReviewQueueIssueUseCase', () => {
|
|
|
278
281
|
labels: ['story'],
|
|
279
282
|
});
|
|
280
283
|
mockIssueRepository.getAllIssues.mockResolvedValue({
|
|
284
|
+
project: mockProject,
|
|
281
285
|
issues: [issue],
|
|
282
286
|
cacheUsed: false,
|
|
283
287
|
});
|
|
284
288
|
|
|
285
289
|
await useCase.run({
|
|
286
290
|
projectUrl: 'https://github.com/users/user/projects/1',
|
|
287
|
-
allowIssueCacheMinutes: 10,
|
|
288
291
|
labelsAsLlmAgentName: ['story', 'chore', 'accounting'],
|
|
289
292
|
allowedIssueAuthors: ['owner'],
|
|
290
293
|
});
|
|
@@ -299,13 +302,13 @@ describe('RevertNotReadyReviewQueueIssueUseCase', () => {
|
|
|
299
302
|
labels: ['chore'],
|
|
300
303
|
});
|
|
301
304
|
mockIssueRepository.getAllIssues.mockResolvedValue({
|
|
305
|
+
project: mockProject,
|
|
302
306
|
issues: [issue],
|
|
303
307
|
cacheUsed: false,
|
|
304
308
|
});
|
|
305
309
|
|
|
306
310
|
await useCase.run({
|
|
307
311
|
projectUrl: 'https://github.com/users/user/projects/1',
|
|
308
|
-
allowIssueCacheMinutes: 10,
|
|
309
312
|
labelsAsLlmAgentName: ['story', 'chore'],
|
|
310
313
|
allowedIssueAuthors: ['owner'],
|
|
311
314
|
});
|
|
@@ -320,13 +323,13 @@ describe('RevertNotReadyReviewQueueIssueUseCase', () => {
|
|
|
320
323
|
labels: ['story'],
|
|
321
324
|
});
|
|
322
325
|
mockIssueRepository.getAllIssues.mockResolvedValue({
|
|
326
|
+
project: mockProject,
|
|
323
327
|
issues: [issue],
|
|
324
328
|
cacheUsed: false,
|
|
325
329
|
});
|
|
326
330
|
|
|
327
331
|
await useCase.run({
|
|
328
332
|
projectUrl: 'https://github.com/users/user/projects/1',
|
|
329
|
-
allowIssueCacheMinutes: 10,
|
|
330
333
|
allowedIssueAuthors: ['owner'],
|
|
331
334
|
});
|
|
332
335
|
|
|
@@ -347,13 +350,13 @@ describe('RevertNotReadyReviewQueueIssueUseCase', () => {
|
|
|
347
350
|
labels: ['story'],
|
|
348
351
|
});
|
|
349
352
|
mockIssueRepository.getAllIssues.mockResolvedValue({
|
|
353
|
+
project: mockProject,
|
|
350
354
|
issues: [issue],
|
|
351
355
|
cacheUsed: false,
|
|
352
356
|
});
|
|
353
357
|
|
|
354
358
|
await useCase.run({
|
|
355
359
|
projectUrl: 'https://github.com/users/user/projects/1',
|
|
356
|
-
allowIssueCacheMinutes: 10,
|
|
357
360
|
labelsAsLlmAgentName: null,
|
|
358
361
|
allowedIssueAuthors: ['owner'],
|
|
359
362
|
});
|
|
@@ -373,7 +376,6 @@ describe('RevertNotReadyReviewQueueIssueUseCase', () => {
|
|
|
373
376
|
|
|
374
377
|
await useCase.run({
|
|
375
378
|
projectUrl: 'https://github.com/users/user/projects/1',
|
|
376
|
-
allowIssueCacheMinutes: 10,
|
|
377
379
|
allowedIssueAuthors: ['owner'],
|
|
378
380
|
});
|
|
379
381
|
|
|
@@ -391,7 +393,6 @@ describe('RevertNotReadyReviewQueueIssueUseCase', () => {
|
|
|
391
393
|
|
|
392
394
|
await useCase.run({
|
|
393
395
|
projectUrl: 'https://github.com/users/user/projects/1',
|
|
394
|
-
allowIssueCacheMinutes: 10,
|
|
395
396
|
allowedIssueAuthors: ['owner'],
|
|
396
397
|
});
|
|
397
398
|
|
|
@@ -424,7 +425,6 @@ describe('RevertNotReadyReviewQueueIssueUseCase', () => {
|
|
|
424
425
|
|
|
425
426
|
await useCase.run({
|
|
426
427
|
projectUrl: 'https://github.com/users/user/projects/1',
|
|
427
|
-
allowIssueCacheMinutes: 10,
|
|
428
428
|
allowedIssueAuthors: ['owner'],
|
|
429
429
|
});
|
|
430
430
|
|
|
@@ -453,7 +453,6 @@ describe('RevertNotReadyReviewQueueIssueUseCase', () => {
|
|
|
453
453
|
|
|
454
454
|
await useCase.run({
|
|
455
455
|
projectUrl: 'https://github.com/users/user/projects/1',
|
|
456
|
-
allowIssueCacheMinutes: 10,
|
|
457
456
|
allowedIssueAuthors: ['owner'],
|
|
458
457
|
});
|
|
459
458
|
|
|
@@ -482,7 +481,6 @@ describe('RevertNotReadyReviewQueueIssueUseCase', () => {
|
|
|
482
481
|
|
|
483
482
|
await useCase.run({
|
|
484
483
|
projectUrl: 'https://github.com/users/user/projects/1',
|
|
485
|
-
allowIssueCacheMinutes: 10,
|
|
486
484
|
allowedIssueAuthors: ['owner'],
|
|
487
485
|
});
|
|
488
486
|
|
|
@@ -512,7 +510,6 @@ describe('RevertNotReadyReviewQueueIssueUseCase', () => {
|
|
|
512
510
|
|
|
513
511
|
await useCase.run({
|
|
514
512
|
projectUrl: 'https://github.com/users/user/projects/1',
|
|
515
|
-
allowIssueCacheMinutes: 10,
|
|
516
513
|
allowedIssueAuthors: ['owner'],
|
|
517
514
|
});
|
|
518
515
|
|
|
@@ -546,7 +543,6 @@ describe('RevertNotReadyReviewQueueIssueUseCase', () => {
|
|
|
546
543
|
|
|
547
544
|
await useCase.run({
|
|
548
545
|
projectUrl: 'https://github.com/users/user/projects/1',
|
|
549
|
-
allowIssueCacheMinutes: 10,
|
|
550
546
|
allowedIssueAuthors: ['owner'],
|
|
551
547
|
});
|
|
552
548
|
|
|
@@ -589,6 +585,7 @@ describe('RevertNotReadyReviewQueueIssueUseCase', () => {
|
|
|
589
585
|
closingIssueReferenceUrls: ['https://github.com/user/repo/issues/2'],
|
|
590
586
|
});
|
|
591
587
|
mockIssueRepository.getAllIssues.mockResolvedValue({
|
|
588
|
+
project: mockProject,
|
|
592
589
|
issues: [readyIssue, notReadyIssue, readyPrItem, conflictedPrItem],
|
|
593
590
|
cacheUsed: false,
|
|
594
591
|
});
|
|
@@ -609,7 +606,6 @@ describe('RevertNotReadyReviewQueueIssueUseCase', () => {
|
|
|
609
606
|
|
|
610
607
|
await useCase.run({
|
|
611
608
|
projectUrl: 'https://github.com/users/user/projects/1',
|
|
612
|
-
allowIssueCacheMinutes: 10,
|
|
613
609
|
allowedIssueAuthors: ['owner'],
|
|
614
610
|
});
|
|
615
611
|
|
|
@@ -645,6 +641,7 @@ describe('RevertNotReadyReviewQueueIssueUseCase', () => {
|
|
|
645
641
|
closingIssueReferenceUrls: ['https://github.com/user/repo/issues/42'],
|
|
646
642
|
});
|
|
647
643
|
mockIssueRepository.getAllIssues.mockResolvedValue({
|
|
644
|
+
project: mockProject,
|
|
648
645
|
issues: [prItem, issue],
|
|
649
646
|
cacheUsed: false,
|
|
650
647
|
});
|
|
@@ -654,7 +651,6 @@ describe('RevertNotReadyReviewQueueIssueUseCase', () => {
|
|
|
654
651
|
|
|
655
652
|
await useCase.run({
|
|
656
653
|
projectUrl: 'https://github.com/users/user/projects/1',
|
|
657
|
-
allowIssueCacheMinutes: 10,
|
|
658
654
|
allowedIssueAuthors: ['owner'],
|
|
659
655
|
});
|
|
660
656
|
|
|
@@ -680,13 +676,13 @@ describe('RevertNotReadyReviewQueueIssueUseCase', () => {
|
|
|
680
676
|
closingIssueReferenceUrls: ['https://github.com/user/repo/issues/9'],
|
|
681
677
|
});
|
|
682
678
|
mockIssueRepository.getAllIssues.mockResolvedValue({
|
|
679
|
+
project: mockProject,
|
|
683
680
|
issues: [issue, closedPrItem],
|
|
684
681
|
cacheUsed: false,
|
|
685
682
|
});
|
|
686
683
|
|
|
687
684
|
await useCase.run({
|
|
688
685
|
projectUrl: 'https://github.com/users/user/projects/1',
|
|
689
|
-
allowIssueCacheMinutes: 10,
|
|
690
686
|
allowedIssueAuthors: ['owner'],
|
|
691
687
|
});
|
|
692
688
|
|
|
@@ -718,7 +714,6 @@ describe('RevertNotReadyReviewQueueIssueUseCase', () => {
|
|
|
718
714
|
const runCycle = () =>
|
|
719
715
|
useCase.run({
|
|
720
716
|
projectUrl: 'https://github.com/users/user/projects/1',
|
|
721
|
-
allowIssueCacheMinutes: 10,
|
|
722
717
|
allowedIssueAuthors: ['owner'],
|
|
723
718
|
});
|
|
724
719
|
|
|
@@ -918,7 +913,6 @@ describe('RevertNotReadyReviewQueueIssueUseCase', () => {
|
|
|
918
913
|
|
|
919
914
|
await useCase.run({
|
|
920
915
|
projectUrl: 'https://github.com/users/user/projects/1',
|
|
921
|
-
allowIssueCacheMinutes: 10,
|
|
922
916
|
allowedIssueAuthors: ['owner'],
|
|
923
917
|
changeTargetPathAliases: {
|
|
924
918
|
adapters: 'src/domain/usecases/adapter-interfaces',
|
|
@@ -938,7 +932,6 @@ describe('RevertNotReadyReviewQueueIssueUseCase', () => {
|
|
|
938
932
|
|
|
939
933
|
await useCase.run({
|
|
940
934
|
projectUrl: 'https://github.com/users/user/projects/1',
|
|
941
|
-
allowIssueCacheMinutes: 10,
|
|
942
935
|
allowedIssueAuthors: ['owner'],
|
|
943
936
|
changeTargetPathAliases: {
|
|
944
937
|
adapters: 'src/domain/usecases/adapter-interfaces',
|
|
@@ -953,6 +946,7 @@ describe('RevertNotReadyReviewQueueIssueUseCase', () => {
|
|
|
953
946
|
describe('Unread pull request processing', () => {
|
|
954
947
|
it('should do nothing when there are no Unread pull requests', async () => {
|
|
955
948
|
mockIssueRepository.getAllIssues.mockResolvedValue({
|
|
949
|
+
project: mockProject,
|
|
956
950
|
issues: [
|
|
957
951
|
createMockPullRequest({ status: 'Awaiting Workspace' }),
|
|
958
952
|
createMockPullRequest({ status: 'Preparation' }),
|
|
@@ -962,7 +956,6 @@ describe('RevertNotReadyReviewQueueIssueUseCase', () => {
|
|
|
962
956
|
|
|
963
957
|
await useCase.run({
|
|
964
958
|
projectUrl: 'https://github.com/users/user/projects/1',
|
|
965
|
-
allowIssueCacheMinutes: 10,
|
|
966
959
|
allowedIssueAuthors: ['owner'],
|
|
967
960
|
});
|
|
968
961
|
|
|
@@ -978,13 +971,13 @@ describe('RevertNotReadyReviewQueueIssueUseCase', () => {
|
|
|
978
971
|
url: 'https://github.com/user/repo/issues/1',
|
|
979
972
|
});
|
|
980
973
|
mockIssueRepository.getAllIssues.mockResolvedValue({
|
|
974
|
+
project: mockProject,
|
|
981
975
|
issues: [issue],
|
|
982
976
|
cacheUsed: false,
|
|
983
977
|
});
|
|
984
978
|
|
|
985
979
|
await useCase.run({
|
|
986
980
|
projectUrl: 'https://github.com/users/user/projects/1',
|
|
987
|
-
allowIssueCacheMinutes: 10,
|
|
988
981
|
allowedIssueAuthors: ['owner'],
|
|
989
982
|
});
|
|
990
983
|
|
|
@@ -999,13 +992,13 @@ describe('RevertNotReadyReviewQueueIssueUseCase', () => {
|
|
|
999
992
|
labels: ['llm-agent'],
|
|
1000
993
|
});
|
|
1001
994
|
mockIssueRepository.getAllIssues.mockResolvedValue({
|
|
995
|
+
project: mockProject,
|
|
1002
996
|
issues: [pullRequest],
|
|
1003
997
|
cacheUsed: false,
|
|
1004
998
|
});
|
|
1005
999
|
|
|
1006
1000
|
await useCase.run({
|
|
1007
1001
|
projectUrl: 'https://github.com/users/user/projects/1',
|
|
1008
|
-
allowIssueCacheMinutes: 10,
|
|
1009
1002
|
allowedIssueAuthors: ['owner'],
|
|
1010
1003
|
});
|
|
1011
1004
|
|
|
@@ -1019,6 +1012,7 @@ describe('RevertNotReadyReviewQueueIssueUseCase', () => {
|
|
|
1019
1012
|
status: 'Unread',
|
|
1020
1013
|
});
|
|
1021
1014
|
mockIssueRepository.getAllIssues.mockResolvedValue({
|
|
1015
|
+
project: mockProject,
|
|
1022
1016
|
issues: [pullRequest],
|
|
1023
1017
|
cacheUsed: false,
|
|
1024
1018
|
});
|
|
@@ -1026,7 +1020,6 @@ describe('RevertNotReadyReviewQueueIssueUseCase', () => {
|
|
|
1026
1020
|
|
|
1027
1021
|
await useCase.run({
|
|
1028
1022
|
projectUrl: 'https://github.com/users/user/projects/1',
|
|
1029
|
-
allowIssueCacheMinutes: 10,
|
|
1030
1023
|
allowedIssueAuthors: ['owner'],
|
|
1031
1024
|
});
|
|
1032
1025
|
|
|
@@ -1040,6 +1033,7 @@ describe('RevertNotReadyReviewQueueIssueUseCase', () => {
|
|
|
1040
1033
|
status: 'Unread',
|
|
1041
1034
|
});
|
|
1042
1035
|
mockIssueRepository.getAllIssues.mockResolvedValue({
|
|
1036
|
+
project: mockProject,
|
|
1043
1037
|
issues: [pullRequest],
|
|
1044
1038
|
cacheUsed: false,
|
|
1045
1039
|
});
|
|
@@ -1050,7 +1044,6 @@ describe('RevertNotReadyReviewQueueIssueUseCase', () => {
|
|
|
1050
1044
|
|
|
1051
1045
|
await useCase.run({
|
|
1052
1046
|
projectUrl: 'https://github.com/users/user/projects/1',
|
|
1053
|
-
allowIssueCacheMinutes: 10,
|
|
1054
1047
|
allowedIssueAuthors: ['owner'],
|
|
1055
1048
|
});
|
|
1056
1049
|
|
|
@@ -1079,6 +1072,7 @@ describe('RevertNotReadyReviewQueueIssueUseCase', () => {
|
|
|
1079
1072
|
status: 'Unread',
|
|
1080
1073
|
});
|
|
1081
1074
|
mockIssueRepository.getAllIssues.mockResolvedValue({
|
|
1075
|
+
project: mockProject,
|
|
1082
1076
|
issues: [pullRequest],
|
|
1083
1077
|
cacheUsed: false,
|
|
1084
1078
|
});
|
|
@@ -1090,7 +1084,6 @@ describe('RevertNotReadyReviewQueueIssueUseCase', () => {
|
|
|
1090
1084
|
|
|
1091
1085
|
await useCase.run({
|
|
1092
1086
|
projectUrl: 'https://github.com/users/user/projects/1',
|
|
1093
|
-
allowIssueCacheMinutes: 10,
|
|
1094
1087
|
allowedIssueAuthors: ['owner'],
|
|
1095
1088
|
});
|
|
1096
1089
|
|
|
@@ -1115,6 +1108,7 @@ describe('RevertNotReadyReviewQueueIssueUseCase', () => {
|
|
|
1115
1108
|
status: 'Unread',
|
|
1116
1109
|
});
|
|
1117
1110
|
mockIssueRepository.getAllIssues.mockResolvedValue({
|
|
1111
|
+
project: mockProject,
|
|
1118
1112
|
issues: [pullRequest],
|
|
1119
1113
|
cacheUsed: false,
|
|
1120
1114
|
});
|
|
@@ -1125,7 +1119,6 @@ describe('RevertNotReadyReviewQueueIssueUseCase', () => {
|
|
|
1125
1119
|
|
|
1126
1120
|
await useCase.run({
|
|
1127
1121
|
projectUrl: 'https://github.com/users/user/projects/1',
|
|
1128
|
-
allowIssueCacheMinutes: 10,
|
|
1129
1122
|
allowedIssueAuthors: ['owner'],
|
|
1130
1123
|
});
|
|
1131
1124
|
|
|
@@ -1150,6 +1143,7 @@ describe('RevertNotReadyReviewQueueIssueUseCase', () => {
|
|
|
1150
1143
|
status: 'Unread',
|
|
1151
1144
|
});
|
|
1152
1145
|
mockIssueRepository.getAllIssues.mockResolvedValue({
|
|
1146
|
+
project: mockProject,
|
|
1153
1147
|
issues: [pullRequest],
|
|
1154
1148
|
cacheUsed: false,
|
|
1155
1149
|
});
|
|
@@ -1162,7 +1156,6 @@ describe('RevertNotReadyReviewQueueIssueUseCase', () => {
|
|
|
1162
1156
|
|
|
1163
1157
|
await useCase.run({
|
|
1164
1158
|
projectUrl: 'https://github.com/users/user/projects/1',
|
|
1165
|
-
allowIssueCacheMinutes: 10,
|
|
1166
1159
|
allowedIssueAuthors: ['owner'],
|
|
1167
1160
|
});
|
|
1168
1161
|
|
|
@@ -1187,6 +1180,7 @@ describe('RevertNotReadyReviewQueueIssueUseCase', () => {
|
|
|
1187
1180
|
status: 'Unread',
|
|
1188
1181
|
});
|
|
1189
1182
|
mockIssueRepository.getAllIssues.mockResolvedValue({
|
|
1183
|
+
project: mockProject,
|
|
1190
1184
|
issues: [pullRequest],
|
|
1191
1185
|
cacheUsed: false,
|
|
1192
1186
|
});
|
|
@@ -1197,7 +1191,6 @@ describe('RevertNotReadyReviewQueueIssueUseCase', () => {
|
|
|
1197
1191
|
|
|
1198
1192
|
await useCase.run({
|
|
1199
1193
|
projectUrl: 'https://github.com/users/user/projects/1',
|
|
1200
|
-
allowIssueCacheMinutes: 10,
|
|
1201
1194
|
allowedIssueAuthors: ['owner'],
|
|
1202
1195
|
});
|
|
1203
1196
|
|
|
@@ -1222,6 +1215,7 @@ describe('RevertNotReadyReviewQueueIssueUseCase', () => {
|
|
|
1222
1215
|
status: 'Unread',
|
|
1223
1216
|
});
|
|
1224
1217
|
mockIssueRepository.getAllIssues.mockResolvedValue({
|
|
1218
|
+
project: mockProject,
|
|
1225
1219
|
issues: [pullRequest],
|
|
1226
1220
|
cacheUsed: false,
|
|
1227
1221
|
});
|
|
@@ -1229,7 +1223,6 @@ describe('RevertNotReadyReviewQueueIssueUseCase', () => {
|
|
|
1229
1223
|
|
|
1230
1224
|
await useCase.run({
|
|
1231
1225
|
projectUrl: 'https://github.com/users/user/projects/1',
|
|
1232
|
-
allowIssueCacheMinutes: 10,
|
|
1233
1226
|
allowedIssueAuthors: ['owner'],
|
|
1234
1227
|
});
|
|
1235
1228
|
|
|
@@ -1257,6 +1250,7 @@ describe('RevertNotReadyReviewQueueIssueUseCase', () => {
|
|
|
1257
1250
|
status: 'Unread',
|
|
1258
1251
|
});
|
|
1259
1252
|
mockIssueRepository.getAllIssues.mockResolvedValue({
|
|
1253
|
+
project: mockProject,
|
|
1260
1254
|
issues: [pullRequest],
|
|
1261
1255
|
cacheUsed: false,
|
|
1262
1256
|
});
|
|
@@ -1267,7 +1261,6 @@ describe('RevertNotReadyReviewQueueIssueUseCase', () => {
|
|
|
1267
1261
|
|
|
1268
1262
|
await useCase.run({
|
|
1269
1263
|
projectUrl: 'https://github.com/users/user/projects/1',
|
|
1270
|
-
allowIssueCacheMinutes: 10,
|
|
1271
1264
|
allowedIssueAuthors: ['owner'],
|
|
1272
1265
|
});
|
|
1273
1266
|
|
|
@@ -1306,13 +1299,13 @@ describe('RevertNotReadyReviewQueueIssueUseCase', () => {
|
|
|
1306
1299
|
status: 'Unread',
|
|
1307
1300
|
});
|
|
1308
1301
|
mockIssueRepository.getAllIssues.mockResolvedValue({
|
|
1302
|
+
project: mockProject,
|
|
1309
1303
|
issues: [pullRequest],
|
|
1310
1304
|
cacheUsed: false,
|
|
1311
1305
|
});
|
|
1312
1306
|
|
|
1313
1307
|
await useCase.run({
|
|
1314
1308
|
projectUrl: 'https://github.com/users/user/projects/1',
|
|
1315
|
-
allowIssueCacheMinutes: 10,
|
|
1316
1309
|
allowedIssueAuthors: ['owner'],
|
|
1317
1310
|
});
|
|
1318
1311
|
|
|
@@ -1328,6 +1321,7 @@ describe('RevertNotReadyReviewQueueIssueUseCase', () => {
|
|
|
1328
1321
|
author: 'outside-contributor',
|
|
1329
1322
|
});
|
|
1330
1323
|
mockIssueRepository.getAllIssues.mockResolvedValue({
|
|
1324
|
+
project: mockProject,
|
|
1331
1325
|
issues: [pullRequest],
|
|
1332
1326
|
cacheUsed: false,
|
|
1333
1327
|
});
|
|
@@ -1338,7 +1332,6 @@ describe('RevertNotReadyReviewQueueIssueUseCase', () => {
|
|
|
1338
1332
|
|
|
1339
1333
|
await useCase.run({
|
|
1340
1334
|
projectUrl: 'https://github.com/users/user/projects/1',
|
|
1341
|
-
allowIssueCacheMinutes: 10,
|
|
1342
1335
|
allowedIssueAuthors: ['owner'],
|
|
1343
1336
|
});
|
|
1344
1337
|
|
|
@@ -1353,6 +1346,7 @@ describe('RevertNotReadyReviewQueueIssueUseCase', () => {
|
|
|
1353
1346
|
author: 'owner',
|
|
1354
1347
|
});
|
|
1355
1348
|
mockIssueRepository.getAllIssues.mockResolvedValue({
|
|
1349
|
+
project: mockProject,
|
|
1356
1350
|
issues: [pullRequest],
|
|
1357
1351
|
cacheUsed: false,
|
|
1358
1352
|
});
|
|
@@ -1363,7 +1357,6 @@ describe('RevertNotReadyReviewQueueIssueUseCase', () => {
|
|
|
1363
1357
|
|
|
1364
1358
|
await useCase.run({
|
|
1365
1359
|
projectUrl: 'https://github.com/users/user/projects/1',
|
|
1366
|
-
allowIssueCacheMinutes: 10,
|
|
1367
1360
|
allowedIssueAuthors: ['owner'],
|
|
1368
1361
|
});
|
|
1369
1362
|
|
|
@@ -1389,6 +1382,7 @@ describe('RevertNotReadyReviewQueueIssueUseCase', () => {
|
|
|
1389
1382
|
author: 'dependabot[bot]',
|
|
1390
1383
|
});
|
|
1391
1384
|
mockIssueRepository.getAllIssues.mockResolvedValue({
|
|
1385
|
+
project: mockProject,
|
|
1392
1386
|
issues: [pullRequest],
|
|
1393
1387
|
cacheUsed: false,
|
|
1394
1388
|
});
|
|
@@ -1399,7 +1393,6 @@ describe('RevertNotReadyReviewQueueIssueUseCase', () => {
|
|
|
1399
1393
|
|
|
1400
1394
|
await useCase.run({
|
|
1401
1395
|
projectUrl: 'https://github.com/users/user/projects/1',
|
|
1402
|
-
allowIssueCacheMinutes: 10,
|
|
1403
1396
|
allowedIssueAuthors: ['owner'],
|
|
1404
1397
|
});
|
|
1405
1398
|
|
|
@@ -1414,6 +1407,7 @@ describe('RevertNotReadyReviewQueueIssueUseCase', () => {
|
|
|
1414
1407
|
author: 'dependabot[bot]',
|
|
1415
1408
|
});
|
|
1416
1409
|
mockIssueRepository.getAllIssues.mockResolvedValue({
|
|
1410
|
+
project: mockProject,
|
|
1417
1411
|
issues: [pullRequest],
|
|
1418
1412
|
cacheUsed: false,
|
|
1419
1413
|
});
|
|
@@ -1424,7 +1418,6 @@ describe('RevertNotReadyReviewQueueIssueUseCase', () => {
|
|
|
1424
1418
|
|
|
1425
1419
|
await useCase.run({
|
|
1426
1420
|
projectUrl: 'https://github.com/users/user/projects/1',
|
|
1427
|
-
allowIssueCacheMinutes: 10,
|
|
1428
1421
|
allowedIssueAuthors: ['owner', 'dependabot[bot]'],
|
|
1429
1422
|
});
|
|
1430
1423
|
|
|
@@ -1445,6 +1438,7 @@ describe('RevertNotReadyReviewQueueIssueUseCase', () => {
|
|
|
1445
1438
|
author: 'outside-contributor',
|
|
1446
1439
|
});
|
|
1447
1440
|
mockIssueRepository.getAllIssues.mockResolvedValue({
|
|
1441
|
+
project: mockProject,
|
|
1448
1442
|
issues: [pullRequest],
|
|
1449
1443
|
cacheUsed: false,
|
|
1450
1444
|
});
|
|
@@ -1455,7 +1449,6 @@ describe('RevertNotReadyReviewQueueIssueUseCase', () => {
|
|
|
1455
1449
|
|
|
1456
1450
|
await useCase.run({
|
|
1457
1451
|
projectUrl: 'https://github.com/users/user/projects/1',
|
|
1458
|
-
allowIssueCacheMinutes: 10,
|
|
1459
1452
|
allowedIssueAuthors: null,
|
|
1460
1453
|
});
|
|
1461
1454
|
|
|
@@ -1470,6 +1463,7 @@ describe('RevertNotReadyReviewQueueIssueUseCase', () => {
|
|
|
1470
1463
|
author: 'owner',
|
|
1471
1464
|
});
|
|
1472
1465
|
mockIssueRepository.getAllIssues.mockResolvedValue({
|
|
1466
|
+
project: mockProject,
|
|
1473
1467
|
issues: [pullRequest],
|
|
1474
1468
|
cacheUsed: false,
|
|
1475
1469
|
});
|
|
@@ -1480,7 +1474,6 @@ describe('RevertNotReadyReviewQueueIssueUseCase', () => {
|
|
|
1480
1474
|
|
|
1481
1475
|
await useCase.run({
|
|
1482
1476
|
projectUrl: 'https://github.com/users/user/projects/1',
|
|
1483
|
-
allowIssueCacheMinutes: 10,
|
|
1484
1477
|
});
|
|
1485
1478
|
|
|
1486
1479
|
expect(mockIssueRepository.updateStatus).not.toHaveBeenCalled();
|
|
@@ -1494,6 +1487,7 @@ describe('RevertNotReadyReviewQueueIssueUseCase', () => {
|
|
|
1494
1487
|
author: 'owner',
|
|
1495
1488
|
});
|
|
1496
1489
|
mockIssueRepository.getAllIssues.mockResolvedValue({
|
|
1490
|
+
project: mockProject,
|
|
1497
1491
|
issues: [pullRequest],
|
|
1498
1492
|
cacheUsed: false,
|
|
1499
1493
|
});
|
|
@@ -1504,7 +1498,6 @@ describe('RevertNotReadyReviewQueueIssueUseCase', () => {
|
|
|
1504
1498
|
|
|
1505
1499
|
await useCase.run({
|
|
1506
1500
|
projectUrl: 'https://github.com/users/user/projects/1',
|
|
1507
|
-
allowIssueCacheMinutes: 10,
|
|
1508
1501
|
allowedIssueAuthors: [],
|
|
1509
1502
|
});
|
|
1510
1503
|
|
|
@@ -56,7 +56,6 @@ export class RevertNotReadyReviewQueueIssueUseCase {
|
|
|
56
56
|
|
|
57
57
|
run = async (params: {
|
|
58
58
|
projectUrl: string;
|
|
59
|
-
allowIssueCacheMinutes: number;
|
|
60
59
|
labelsAsLlmAgentName?: string[] | null;
|
|
61
60
|
changeTargetPathAliases?: Record<string, string> | null;
|
|
62
61
|
allowedIssueAuthors?: string[] | null;
|
|
@@ -82,10 +81,7 @@ export class RevertNotReadyReviewQueueIssueUseCase {
|
|
|
82
81
|
return;
|
|
83
82
|
}
|
|
84
83
|
|
|
85
|
-
const { issues } = await this.issueRepository.getAllIssues(
|
|
86
|
-
projectId,
|
|
87
|
-
params.allowIssueCacheMinutes,
|
|
88
|
-
);
|
|
84
|
+
const { issues } = await this.issueRepository.getAllIssues(projectId);
|
|
89
85
|
|
|
90
86
|
const awaitingQualityCheckIssues = issues.filter(
|
|
91
87
|
(issue) => issue.status === AWAITING_QUALITY_CHECK_STATUS_NAME,
|