github-issue-tower-defence-management 1.156.4 → 1.158.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 +14 -0
- package/README.md +3 -3
- package/bin/adapter/entry-points/cli/index.js +6 -1
- package/bin/adapter/entry-points/cli/index.js.map +1 -1
- package/bin/adapter/entry-points/cli/projectConfig.js +6 -0
- package/bin/adapter/entry-points/cli/projectConfig.js.map +1 -1
- package/bin/adapter/entry-points/console/consoleDataDelivery.js +3 -10
- package/bin/adapter/entry-points/console/consoleDataDelivery.js.map +1 -1
- package/bin/adapter/entry-points/console/consoleTabNames.js +32 -0
- package/bin/adapter/entry-points/console/consoleTabNames.js.map +1 -0
- package/bin/adapter/entry-points/console/ui-dist/assets/{index-Bipk5Crz.css → index-BbUBeonj.css} +1 -1
- package/bin/adapter/entry-points/console/ui-dist/assets/{index-B1p4TjZG.js → index-DmsQyXek.js} +1 -1
- package/bin/adapter/entry-points/console/ui-dist/index.html +2 -2
- package/bin/adapter/entry-points/console/webServer.js +1 -1
- package/bin/adapter/entry-points/console/webServer.js.map +1 -1
- package/bin/adapter/entry-points/handlers/FileSystemConsoleTabsRepository.js +82 -0
- package/bin/adapter/entry-points/handlers/FileSystemConsoleTabsRepository.js.map +1 -0
- package/bin/adapter/entry-points/handlers/consoleListsWriter.js +2 -10
- package/bin/adapter/entry-points/handlers/consoleListsWriter.js.map +1 -1
- package/bin/domain/usecases/NotifyFinishedIssuePreparationUseCase.js +49 -1
- package/bin/domain/usecases/NotifyFinishedIssuePreparationUseCase.js.map +1 -1
- package/bin/domain/usecases/adapter-interfaces/ConsoleTabsRepository.js +3 -0
- package/bin/domain/usecases/adapter-interfaces/ConsoleTabsRepository.js.map +1 -0
- package/package.json +1 -1
- package/src/adapter/entry-points/cli/index.ts +8 -0
- package/src/adapter/entry-points/cli/projectConfig.test.ts +56 -0
- package/src/adapter/entry-points/cli/projectConfig.ts +8 -0
- package/src/adapter/entry-points/console/consoleDataDelivery.ts +3 -10
- package/src/adapter/entry-points/console/consoleTabNames.test.ts +51 -0
- package/src/adapter/entry-points/console/consoleTabNames.ts +37 -0
- package/src/adapter/entry-points/console/ui/src/features/console/components/detail/ConsoleItemDetail.stories.tsx +109 -0
- package/src/adapter/entry-points/console/ui/src/features/console/components/detail/ConsoleItemDetail.test.tsx +95 -0
- package/src/adapter/entry-points/console/ui/src/features/console/components/detail/ConsoleItemDetail.tsx +25 -4
- package/src/adapter/entry-points/console/ui/src/index.css +11 -0
- package/src/adapter/entry-points/console/ui-dist/assets/{index-Bipk5Crz.css → index-BbUBeonj.css} +1 -1
- package/src/adapter/entry-points/console/ui-dist/assets/{index-B1p4TjZG.js → index-DmsQyXek.js} +1 -1
- package/src/adapter/entry-points/console/ui-dist/index.html +2 -2
- package/src/adapter/entry-points/console/webServer.ts +1 -1
- package/src/adapter/entry-points/handlers/FileSystemConsoleTabsRepository.test.ts +217 -0
- package/src/adapter/entry-points/handlers/FileSystemConsoleTabsRepository.ts +113 -0
- package/src/adapter/entry-points/handlers/consoleListsWriter.ts +2 -12
- package/src/domain/usecases/NotifyFinishedIssuePreparationUseCase.test.ts +159 -0
- package/src/domain/usecases/NotifyFinishedIssuePreparationUseCase.ts +59 -0
- package/src/domain/usecases/adapter-interfaces/ConsoleTabsRepository.ts +12 -0
- package/types/adapter/entry-points/cli/index.d.ts.map +1 -1
- package/types/adapter/entry-points/cli/projectConfig.d.ts +1 -0
- package/types/adapter/entry-points/cli/projectConfig.d.ts.map +1 -1
- package/types/adapter/entry-points/console/consoleDataDelivery.d.ts +2 -1
- package/types/adapter/entry-points/console/consoleDataDelivery.d.ts.map +1 -1
- package/types/adapter/entry-points/console/consoleTabNames.d.ts +4 -0
- package/types/adapter/entry-points/console/consoleTabNames.d.ts.map +1 -0
- package/types/adapter/entry-points/handlers/FileSystemConsoleTabsRepository.d.ts +13 -0
- package/types/adapter/entry-points/handlers/FileSystemConsoleTabsRepository.d.ts.map +1 -0
- package/types/adapter/entry-points/handlers/consoleListsWriter.d.ts.map +1 -1
- package/types/domain/usecases/NotifyFinishedIssuePreparationUseCase.d.ts +5 -1
- package/types/domain/usecases/NotifyFinishedIssuePreparationUseCase.d.ts.map +1 -1
- package/types/domain/usecases/adapter-interfaces/ConsoleTabsRepository.d.ts +9 -0
- package/types/domain/usecases/adapter-interfaces/ConsoleTabsRepository.d.ts.map +1 -0
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import fs from 'fs';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
import type {
|
|
4
|
+
ConsoleListItem,
|
|
5
|
+
ConsoleTabName,
|
|
6
|
+
} from '../../../domain/usecases/console/GenerateConsoleListsUseCase';
|
|
7
|
+
import type { ConsoleTabsRepository } from '../../../domain/usecases/adapter-interfaces/ConsoleTabsRepository';
|
|
8
|
+
import {
|
|
9
|
+
CONSOLE_LIST_TAB_NAMES,
|
|
10
|
+
sortByStoryOrder,
|
|
11
|
+
} from '../console/consoleTabNames';
|
|
12
|
+
|
|
13
|
+
const isRecord = (value: unknown): value is Record<string, unknown> =>
|
|
14
|
+
value !== null && typeof value === 'object' && !Array.isArray(value);
|
|
15
|
+
|
|
16
|
+
const writeJsonAtomic = (filePath: string, data: unknown): void => {
|
|
17
|
+
fs.mkdirSync(path.dirname(filePath), { recursive: true });
|
|
18
|
+
const tmpPath = `${filePath}.tmp`;
|
|
19
|
+
fs.writeFileSync(tmpPath, JSON.stringify(data));
|
|
20
|
+
fs.renameSync(tmpPath, filePath);
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
const readTabListJson = (filePath: string): Record<string, unknown> | null => {
|
|
24
|
+
try {
|
|
25
|
+
const raw = fs.readFileSync(filePath, 'utf-8');
|
|
26
|
+
const parsed: unknown = JSON.parse(raw);
|
|
27
|
+
if (!isRecord(parsed) || !Array.isArray(parsed.items)) {
|
|
28
|
+
return null;
|
|
29
|
+
}
|
|
30
|
+
return parsed;
|
|
31
|
+
} catch {
|
|
32
|
+
return null;
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
const clearProjectItemIdFromDoneJson = (
|
|
37
|
+
doneFilePath: string,
|
|
38
|
+
projectItemId: string,
|
|
39
|
+
): void => {
|
|
40
|
+
let existingIds: string[] = [];
|
|
41
|
+
try {
|
|
42
|
+
const raw = fs.readFileSync(doneFilePath, 'utf-8');
|
|
43
|
+
const parsed: unknown = JSON.parse(raw);
|
|
44
|
+
if (isRecord(parsed)) {
|
|
45
|
+
const rawIds = parsed.projectItemIds;
|
|
46
|
+
if (Array.isArray(rawIds)) {
|
|
47
|
+
existingIds = rawIds.filter(
|
|
48
|
+
(id): id is string => typeof id === 'string',
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
} catch {
|
|
53
|
+
// File does not exist; start with empty list
|
|
54
|
+
}
|
|
55
|
+
writeJsonAtomic(doneFilePath, {
|
|
56
|
+
projectItemIds: existingIds.filter((id) => id !== projectItemId),
|
|
57
|
+
});
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
export class FileSystemConsoleTabsRepository implements ConsoleTabsRepository {
|
|
61
|
+
constructor(
|
|
62
|
+
private readonly consoleDataOutputDir: string,
|
|
63
|
+
private readonly pjcode: string,
|
|
64
|
+
) {}
|
|
65
|
+
|
|
66
|
+
patchIssueTabTransition(params: {
|
|
67
|
+
projectItemId: string;
|
|
68
|
+
item: ConsoleListItem;
|
|
69
|
+
targetTabName: ConsoleTabName | null;
|
|
70
|
+
}): void {
|
|
71
|
+
const { projectItemId, item, targetTabName } = params;
|
|
72
|
+
|
|
73
|
+
for (const tabName of CONSOLE_LIST_TAB_NAMES) {
|
|
74
|
+
const filePath = path.join(
|
|
75
|
+
this.consoleDataOutputDir,
|
|
76
|
+
this.pjcode,
|
|
77
|
+
tabName,
|
|
78
|
+
'list.json',
|
|
79
|
+
);
|
|
80
|
+
const existing = readTabListJson(filePath);
|
|
81
|
+
if (existing === null) {
|
|
82
|
+
continue;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
const rawItems = existing.items;
|
|
86
|
+
const items: unknown[] = Array.isArray(rawItems) ? rawItems : [];
|
|
87
|
+
const withoutThisItem = items.filter(
|
|
88
|
+
(i) => !(isRecord(i) && i.projectItemId === projectItemId),
|
|
89
|
+
);
|
|
90
|
+
|
|
91
|
+
if (tabName === targetTabName) {
|
|
92
|
+
const rawStoryOrder = existing.storyOrder;
|
|
93
|
+
const storyOrder = Array.isArray(rawStoryOrder)
|
|
94
|
+
? rawStoryOrder.filter((s): s is string => typeof s === 'string')
|
|
95
|
+
: [];
|
|
96
|
+
const newItems = sortByStoryOrder(
|
|
97
|
+
[...withoutThisItem, item],
|
|
98
|
+
storyOrder,
|
|
99
|
+
);
|
|
100
|
+
writeJsonAtomic(filePath, { ...existing, items: newItems });
|
|
101
|
+
const doneFilePath = path.join(
|
|
102
|
+
this.consoleDataOutputDir,
|
|
103
|
+
this.pjcode,
|
|
104
|
+
tabName,
|
|
105
|
+
'.done.json',
|
|
106
|
+
);
|
|
107
|
+
clearProjectItemIdFromDoneJson(doneFilePath, projectItemId);
|
|
108
|
+
} else if (withoutThisItem.length !== items.length) {
|
|
109
|
+
writeJsonAtomic(filePath, { ...existing, items: withoutThisItem });
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
@@ -4,10 +4,10 @@ import type { Issue } from '../../../domain/entities/Issue';
|
|
|
4
4
|
import type { Project } from '../../../domain/entities/Project';
|
|
5
5
|
import {
|
|
6
6
|
ConsoleLists,
|
|
7
|
-
ConsoleTabName,
|
|
8
7
|
GenerateConsoleListsUseCase,
|
|
9
8
|
} from '../../../domain/usecases/console/GenerateConsoleListsUseCase';
|
|
10
9
|
import { resetDoneProjectItemIdsAcrossTabs } from '../console/consoleDoneStore';
|
|
10
|
+
import { CONSOLE_LIST_TAB_NAMES } from '../console/consoleTabNames';
|
|
11
11
|
|
|
12
12
|
export type ConsoleListsWriterParams = {
|
|
13
13
|
consoleDataOutputDir: string | null | undefined;
|
|
@@ -19,16 +19,6 @@ export type ConsoleListsWriterParams = {
|
|
|
19
19
|
generatedAt?: string;
|
|
20
20
|
};
|
|
21
21
|
|
|
22
|
-
const CONSOLE_TAB_NAMES: ConsoleTabName[] = [
|
|
23
|
-
'workflow-blocker',
|
|
24
|
-
'prs',
|
|
25
|
-
'triage',
|
|
26
|
-
'unread',
|
|
27
|
-
'failed-preparation',
|
|
28
|
-
'todo-by-human',
|
|
29
|
-
'todo-by-agent',
|
|
30
|
-
];
|
|
31
|
-
|
|
32
22
|
export const formatConsoleGeneratedAt = (date: Date): string =>
|
|
33
23
|
date.toISOString().replace(/\.\d{3}Z$/, 'Z');
|
|
34
24
|
|
|
@@ -57,7 +47,7 @@ export const writeConsoleLists = (params: ConsoleListsWriterParams): void => {
|
|
|
57
47
|
workflowBlockerStoryName: params.workflowBlockerStoryName ?? null,
|
|
58
48
|
});
|
|
59
49
|
|
|
60
|
-
for (const tab of
|
|
50
|
+
for (const tab of CONSOLE_LIST_TAB_NAMES) {
|
|
61
51
|
writeJsonAtomic(
|
|
62
52
|
path.join(consoleDataOutputDir, pjcode, tab, 'list.json'),
|
|
63
53
|
lists[tab],
|
|
@@ -3363,4 +3363,163 @@ describe('NotifyFinishedIssuePreparationUseCase', () => {
|
|
|
3363
3363
|
expect(mockIssueRepository.approvePullRequest).not.toHaveBeenCalled();
|
|
3364
3364
|
});
|
|
3365
3365
|
});
|
|
3366
|
+
|
|
3367
|
+
describe('consoleTabsRepository integration', () => {
|
|
3368
|
+
let mockConsoleTabsRepository: {
|
|
3369
|
+
patchIssueTabTransition: jest.Mock;
|
|
3370
|
+
};
|
|
3371
|
+
|
|
3372
|
+
beforeEach(() => {
|
|
3373
|
+
mockConsoleTabsRepository = {
|
|
3374
|
+
patchIssueTabTransition: jest.fn(),
|
|
3375
|
+
};
|
|
3376
|
+
useCase = new NotifyFinishedIssuePreparationUseCase(
|
|
3377
|
+
mockProjectRepository,
|
|
3378
|
+
mockIssueRepository,
|
|
3379
|
+
mockIssueCommentRepository,
|
|
3380
|
+
mockWebhookRepository,
|
|
3381
|
+
mockConsoleTabsRepository,
|
|
3382
|
+
);
|
|
3383
|
+
});
|
|
3384
|
+
|
|
3385
|
+
it('calls patchIssueTabTransition with prs tab when issue transitions to Awaiting Quality Check', async () => {
|
|
3386
|
+
const issue = createMockIssue({
|
|
3387
|
+
status: 'Preparation',
|
|
3388
|
+
itemId: 'item-1',
|
|
3389
|
+
});
|
|
3390
|
+
mockProjectRepository.getByUrl.mockResolvedValue(mockProject);
|
|
3391
|
+
mockIssueRepository.get.mockResolvedValue(issue);
|
|
3392
|
+
mockIssueCommentRepository.getCommentsFromIssue.mockResolvedValue([
|
|
3393
|
+
createMockComment({ content: 'From: :robot: report' }),
|
|
3394
|
+
]);
|
|
3395
|
+
mockIssueRepository.findRelatedOpenPRs.mockResolvedValue([
|
|
3396
|
+
{
|
|
3397
|
+
url: 'https://github.com/user/repo/pull/1',
|
|
3398
|
+
isConflicted: false,
|
|
3399
|
+
isPassedAllCiJob: true,
|
|
3400
|
+
isCiStateSuccess: true,
|
|
3401
|
+
isResolvedAllReviewComments: true,
|
|
3402
|
+
isBranchOutOfDate: false,
|
|
3403
|
+
missingRequiredCheckNames: [],
|
|
3404
|
+
},
|
|
3405
|
+
]);
|
|
3406
|
+
|
|
3407
|
+
await useCase.run({
|
|
3408
|
+
projectUrl: 'https://github.com/users/user/projects/1',
|
|
3409
|
+
issueUrl: 'https://github.com/user/repo/issues/1',
|
|
3410
|
+
thresholdForAutoReject: 3,
|
|
3411
|
+
workflowBlockerResolvedWebhookUrl: null,
|
|
3412
|
+
allowedIssueAuthors: null,
|
|
3413
|
+
});
|
|
3414
|
+
|
|
3415
|
+
expect(
|
|
3416
|
+
mockConsoleTabsRepository.patchIssueTabTransition,
|
|
3417
|
+
).toHaveBeenCalledWith(
|
|
3418
|
+
expect.objectContaining({
|
|
3419
|
+
projectItemId: 'item-1',
|
|
3420
|
+
targetTabName: 'prs',
|
|
3421
|
+
}),
|
|
3422
|
+
);
|
|
3423
|
+
});
|
|
3424
|
+
|
|
3425
|
+
it('calls patchIssueTabTransition with null tab when issue transitions to Awaiting Workspace', async () => {
|
|
3426
|
+
const issue = createMockIssue({
|
|
3427
|
+
status: 'Preparation',
|
|
3428
|
+
itemId: 'item-2',
|
|
3429
|
+
dependedIssueUrls: ['https://github.com/user/repo/issues/99'],
|
|
3430
|
+
});
|
|
3431
|
+
mockProjectRepository.getByUrl.mockResolvedValue(mockProject);
|
|
3432
|
+
mockIssueRepository.get.mockResolvedValue(issue);
|
|
3433
|
+
|
|
3434
|
+
await useCase.run({
|
|
3435
|
+
projectUrl: 'https://github.com/users/user/projects/1',
|
|
3436
|
+
issueUrl: 'https://github.com/user/repo/issues/1',
|
|
3437
|
+
thresholdForAutoReject: 3,
|
|
3438
|
+
workflowBlockerResolvedWebhookUrl: null,
|
|
3439
|
+
allowedIssueAuthors: null,
|
|
3440
|
+
});
|
|
3441
|
+
|
|
3442
|
+
expect(
|
|
3443
|
+
mockConsoleTabsRepository.patchIssueTabTransition,
|
|
3444
|
+
).toHaveBeenCalledWith(
|
|
3445
|
+
expect.objectContaining({
|
|
3446
|
+
projectItemId: 'item-2',
|
|
3447
|
+
targetTabName: null,
|
|
3448
|
+
}),
|
|
3449
|
+
);
|
|
3450
|
+
});
|
|
3451
|
+
|
|
3452
|
+
it('passes relatedOpenPullRequestUrls from findRelatedOpenPRs into the prs tab item', async () => {
|
|
3453
|
+
const issue = createMockIssue({
|
|
3454
|
+
status: 'Preparation',
|
|
3455
|
+
itemId: 'item-1',
|
|
3456
|
+
isPr: false,
|
|
3457
|
+
});
|
|
3458
|
+
mockProjectRepository.getByUrl.mockResolvedValue(mockProject);
|
|
3459
|
+
mockIssueRepository.get.mockResolvedValue(issue);
|
|
3460
|
+
mockIssueCommentRepository.getCommentsFromIssue.mockResolvedValue([
|
|
3461
|
+
createMockComment({ content: 'From: :robot: report' }),
|
|
3462
|
+
]);
|
|
3463
|
+
mockIssueRepository.findRelatedOpenPRs.mockResolvedValue([
|
|
3464
|
+
{
|
|
3465
|
+
url: 'https://github.com/user/repo/pull/42',
|
|
3466
|
+
isConflicted: false,
|
|
3467
|
+
isPassedAllCiJob: true,
|
|
3468
|
+
isCiStateSuccess: true,
|
|
3469
|
+
isResolvedAllReviewComments: true,
|
|
3470
|
+
isBranchOutOfDate: false,
|
|
3471
|
+
missingRequiredCheckNames: [],
|
|
3472
|
+
},
|
|
3473
|
+
]);
|
|
3474
|
+
let capturedArg: unknown = undefined;
|
|
3475
|
+
mockConsoleTabsRepository.patchIssueTabTransition.mockImplementation(
|
|
3476
|
+
(arg: unknown) => {
|
|
3477
|
+
capturedArg = arg;
|
|
3478
|
+
},
|
|
3479
|
+
);
|
|
3480
|
+
|
|
3481
|
+
await useCase.run({
|
|
3482
|
+
projectUrl: 'https://github.com/users/user/projects/1',
|
|
3483
|
+
issueUrl: 'https://github.com/user/repo/issues/1',
|
|
3484
|
+
thresholdForAutoReject: 3,
|
|
3485
|
+
workflowBlockerResolvedWebhookUrl: null,
|
|
3486
|
+
allowedIssueAuthors: null,
|
|
3487
|
+
});
|
|
3488
|
+
|
|
3489
|
+
expect(capturedArg).toMatchObject({
|
|
3490
|
+
targetTabName: 'prs',
|
|
3491
|
+
item: {
|
|
3492
|
+
relatedOpenPullRequestUrls: ['https://github.com/user/repo/pull/42'],
|
|
3493
|
+
},
|
|
3494
|
+
});
|
|
3495
|
+
});
|
|
3496
|
+
|
|
3497
|
+
it('does not call patchIssueTabTransition when consoleTabsRepository is not provided', async () => {
|
|
3498
|
+
useCase = new NotifyFinishedIssuePreparationUseCase(
|
|
3499
|
+
mockProjectRepository,
|
|
3500
|
+
mockIssueRepository,
|
|
3501
|
+
mockIssueCommentRepository,
|
|
3502
|
+
mockWebhookRepository,
|
|
3503
|
+
);
|
|
3504
|
+
const issue = createMockIssue({
|
|
3505
|
+
status: 'Preparation',
|
|
3506
|
+
dependedIssueUrls: ['https://github.com/user/repo/issues/99'],
|
|
3507
|
+
});
|
|
3508
|
+
mockProjectRepository.getByUrl.mockResolvedValue(mockProject);
|
|
3509
|
+
mockIssueRepository.get.mockResolvedValue(issue);
|
|
3510
|
+
|
|
3511
|
+
await expect(
|
|
3512
|
+
useCase.run({
|
|
3513
|
+
projectUrl: 'https://github.com/users/user/projects/1',
|
|
3514
|
+
issueUrl: 'https://github.com/user/repo/issues/1',
|
|
3515
|
+
thresholdForAutoReject: 3,
|
|
3516
|
+
workflowBlockerResolvedWebhookUrl: null,
|
|
3517
|
+
allowedIssueAuthors: null,
|
|
3518
|
+
}),
|
|
3519
|
+
).resolves.not.toThrow();
|
|
3520
|
+
expect(
|
|
3521
|
+
mockConsoleTabsRepository.patchIssueTabTransition,
|
|
3522
|
+
).not.toHaveBeenCalled();
|
|
3523
|
+
});
|
|
3524
|
+
});
|
|
3366
3525
|
});
|
|
@@ -2,6 +2,7 @@ import { IssueRepository } from './adapter-interfaces/IssueRepository';
|
|
|
2
2
|
import { ProjectRepository } from './adapter-interfaces/ProjectRepository';
|
|
3
3
|
import { IssueCommentRepository } from './adapter-interfaces/IssueCommentRepository';
|
|
4
4
|
import { WebhookRepository } from './adapter-interfaces/WebhookRepository';
|
|
5
|
+
import { ConsoleTabsRepository } from './adapter-interfaces/ConsoleTabsRepository';
|
|
5
6
|
import {
|
|
6
7
|
AWAITING_QUALITY_CHECK_STATUS_NAME,
|
|
7
8
|
AWAITING_WORKSPACE_STATUS_NAME,
|
|
@@ -19,6 +20,11 @@ import {
|
|
|
19
20
|
RETURNED_TO_AWAITING_WORKSPACE_MESSAGE,
|
|
20
21
|
RETURNED_TO_AWAITING_WORKSPACE_MESSAGE_HEAD,
|
|
21
22
|
} from './returnedToAwaitingWorkspaceMessage';
|
|
23
|
+
import {
|
|
24
|
+
ConsoleListItem,
|
|
25
|
+
ConsoleTabName,
|
|
26
|
+
} from './console/GenerateConsoleListsUseCase';
|
|
27
|
+
import { Issue } from '../entities/Issue';
|
|
22
28
|
|
|
23
29
|
export class IssueNotFoundError extends Error {
|
|
24
30
|
constructor(issueUrl: string) {
|
|
@@ -68,6 +74,7 @@ export class NotifyFinishedIssuePreparationUseCase {
|
|
|
68
74
|
WebhookRepository,
|
|
69
75
|
'sendGetRequest'
|
|
70
76
|
>,
|
|
77
|
+
private readonly consoleTabsRepository?: ConsoleTabsRepository | null,
|
|
71
78
|
) {
|
|
72
79
|
this.issueRejectionEvaluator = new IssueRejectionEvaluator(issueRepository);
|
|
73
80
|
this.changeTargetPullRequestApprover = new ChangeTargetPullRequestApprover(
|
|
@@ -156,6 +163,7 @@ export class NotifyFinishedIssuePreparationUseCase {
|
|
|
156
163
|
issue,
|
|
157
164
|
awaitingWorkspaceStatusOption.id,
|
|
158
165
|
);
|
|
166
|
+
await this.patchConsoleTab(issue);
|
|
159
167
|
await this.issueCommentRepository.createComment(
|
|
160
168
|
issue,
|
|
161
169
|
`Issue has dependent issue URLs:\n${issue.dependedIssueUrls.map((url) => `- ${url}`).join('\n')}`,
|
|
@@ -171,6 +179,7 @@ export class NotifyFinishedIssuePreparationUseCase {
|
|
|
171
179
|
issue,
|
|
172
180
|
awaitingWorkspaceStatusOption.id,
|
|
173
181
|
);
|
|
182
|
+
await this.patchConsoleTab(issue);
|
|
174
183
|
await this.issueCommentRepository.createComment(
|
|
175
184
|
issue,
|
|
176
185
|
`Issue has next action date or hour set: nextActionDate=${issue.nextActionDate?.toISOString() ?? 'null'}, nextActionHour=${issue.nextActionHour ?? 'null'}`,
|
|
@@ -221,6 +230,7 @@ export class NotifyFinishedIssuePreparationUseCase {
|
|
|
221
230
|
issue,
|
|
222
231
|
failedPreparationStatusOption.id,
|
|
223
232
|
);
|
|
233
|
+
await this.patchConsoleTab(issue);
|
|
224
234
|
await this.setDependedIssueUrlForAllOpenPRs(
|
|
225
235
|
issue,
|
|
226
236
|
params.issueUrl,
|
|
@@ -256,6 +266,7 @@ export class NotifyFinishedIssuePreparationUseCase {
|
|
|
256
266
|
issue,
|
|
257
267
|
awaitingWorkspaceStatusOption.id,
|
|
258
268
|
);
|
|
269
|
+
await this.patchConsoleTab(issue);
|
|
259
270
|
await this.issueCommentRepository.createComment(
|
|
260
271
|
issue,
|
|
261
272
|
RETURNED_TO_AWAITING_WORKSPACE_MESSAGE,
|
|
@@ -276,6 +287,7 @@ export class NotifyFinishedIssuePreparationUseCase {
|
|
|
276
287
|
issue,
|
|
277
288
|
awaitingQualityCheckStatusOption.id,
|
|
278
289
|
);
|
|
290
|
+
await this.patchConsoleTab(issue);
|
|
279
291
|
await this.setDependedIssueUrlForAllOpenPRs(
|
|
280
292
|
issue,
|
|
281
293
|
params.issueUrl,
|
|
@@ -296,6 +308,7 @@ export class NotifyFinishedIssuePreparationUseCase {
|
|
|
296
308
|
issue,
|
|
297
309
|
awaitingWorkspaceStatusOption.id,
|
|
298
310
|
);
|
|
311
|
+
await this.patchConsoleTab(issue);
|
|
299
312
|
|
|
300
313
|
await this.setDependedIssueUrlForAllOpenPRs(
|
|
301
314
|
issue,
|
|
@@ -457,4 +470,50 @@ export class NotifyFinishedIssuePreparationUseCase {
|
|
|
457
470
|
console.warn('Failed to send workflow blocker notification:', error);
|
|
458
471
|
}
|
|
459
472
|
};
|
|
473
|
+
|
|
474
|
+
private resolveConsoleTargetTab = (status: string): ConsoleTabName | null => {
|
|
475
|
+
const lower = status.toLowerCase();
|
|
476
|
+
if (lower === AWAITING_QUALITY_CHECK_STATUS_NAME.toLowerCase())
|
|
477
|
+
return 'prs';
|
|
478
|
+
if (lower === FAILED_PREPARATION_STATUS_NAME.toLowerCase())
|
|
479
|
+
return 'failed-preparation';
|
|
480
|
+
return null;
|
|
481
|
+
};
|
|
482
|
+
|
|
483
|
+
private patchConsoleTab = async (issue: Issue): Promise<void> => {
|
|
484
|
+
if (!this.consoleTabsRepository) return;
|
|
485
|
+
const targetTabName = this.resolveConsoleTargetTab(issue.status ?? '');
|
|
486
|
+
const relatedOpenPullRequestUrls: string[] =
|
|
487
|
+
!issue.isPr && targetTabName !== null
|
|
488
|
+
? (await this.issueRepository.findRelatedOpenPRs(issue.url)).map(
|
|
489
|
+
(pr) => pr.url,
|
|
490
|
+
)
|
|
491
|
+
: [];
|
|
492
|
+
const item: ConsoleListItem = {
|
|
493
|
+
number: issue.number,
|
|
494
|
+
title: issue.title,
|
|
495
|
+
url: issue.url,
|
|
496
|
+
repo: issue.nameWithOwner,
|
|
497
|
+
nameWithOwner: issue.nameWithOwner,
|
|
498
|
+
projectItemId: issue.itemId,
|
|
499
|
+
itemId: issue.itemId,
|
|
500
|
+
isPr: issue.isPr,
|
|
501
|
+
story: issue.story ?? '',
|
|
502
|
+
status: issue.status,
|
|
503
|
+
nextActionDate:
|
|
504
|
+
issue.nextActionDate === null
|
|
505
|
+
? null
|
|
506
|
+
: issue.nextActionDate.toISOString(),
|
|
507
|
+
nextActionHour: issue.nextActionHour,
|
|
508
|
+
dependedIssueUrls: issue.dependedIssueUrls,
|
|
509
|
+
labels: issue.labels,
|
|
510
|
+
createdAt: issue.createdAt.toISOString(),
|
|
511
|
+
relatedOpenPullRequestUrls,
|
|
512
|
+
};
|
|
513
|
+
this.consoleTabsRepository.patchIssueTabTransition({
|
|
514
|
+
projectItemId: issue.itemId,
|
|
515
|
+
item,
|
|
516
|
+
targetTabName,
|
|
517
|
+
});
|
|
518
|
+
};
|
|
460
519
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ConsoleListItem,
|
|
3
|
+
ConsoleTabName,
|
|
4
|
+
} from '../console/GenerateConsoleListsUseCase';
|
|
5
|
+
|
|
6
|
+
export interface ConsoleTabsRepository {
|
|
7
|
+
patchIssueTabTransition(params: {
|
|
8
|
+
projectItemId: string;
|
|
9
|
+
item: ConsoleListItem;
|
|
10
|
+
targetTabName: ConsoleTabName | null;
|
|
11
|
+
}): void;
|
|
12
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/adapter/entry-points/cli/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EACL,UAAU,EACV,cAAc,EACd,wBAAwB,EACxB,YAAY,EACZ,kBAAkB,GACnB,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/adapter/entry-points/cli/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EACL,UAAU,EACV,cAAc,EACd,wBAAwB,EACxB,YAAY,EACZ,kBAAkB,GACnB,MAAM,iBAAiB,CAAC;AA8LzB,eAAO,MAAM,OAAO,SAAgB,CAAC;AA4gCrC,eAAO,MAAM,uBAAuB,GAAI,OAAO,OAAO,KAAG,IAGxD,CAAC;AAEF,eAAO,MAAM,aAAa,GACxB,MAAM,MAAM,EAAE,EACd,kBAAkB,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,KACzC,OAAO,CAAC,IAAI,CAMd,CAAC"}
|
|
@@ -20,6 +20,7 @@ export type ConfigFile = {
|
|
|
20
20
|
labelsAsLlmAgentName?: string[];
|
|
21
21
|
labelsNotRequiringPullRequest?: string[];
|
|
22
22
|
changeTargetPathAliases?: Record<string, string>;
|
|
23
|
+
consoleDataOutputDir?: string;
|
|
23
24
|
consoleAccessToken?: string;
|
|
24
25
|
consoleProjects?: Record<string, string>;
|
|
25
26
|
consoleGithubTokenFilesByRepositoryOwner?: Record<string, string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"projectConfig.d.ts","sourceRoot":"","sources":["../../../../src/adapter/entry-points/cli/projectConfig.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,UAAU,GAAG;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,gBAAgB,CAAC,EAAE,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M,MAAM,UAAU,GAAG;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAsDF,eAAO,MAAM,QAAQ,GAAI,OAAO,OAAO,KAAG,KAAK,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CACH,CAAC;AA+CvE,eAAO,MAAM,cAAc,GAAI,gBAAgB,MAAM,KAAG,UAwEvD,CAAC;AAEF,eAAO,MAAM,wBAAwB,GACnC,QAAQ,MAAM,EACd,aAAa,MAAM,KAClB,UA6EF,CAAC;AAEF,eAAO,MAAM,YAAY,GACvB,YAAY,UAAU,EACtB,cAAc,UAAU,EACxB,iBAAiB,UAAU,KAC1B,UAuFD,CAAC;AAkBH,eAAO,MAAM,kBAAkB,GAC7B,YAAY,MAAM,EAClB,OAAO,MAAM,KACZ,OAAO,CAAC,MAAM,GAAG,IAAI,CAoDvB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consoleDataDelivery.d.ts","sourceRoot":"","sources":["../../../../src/adapter/entry-points/console/consoleDataDelivery.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"consoleDataDelivery.d.ts","sourceRoot":"","sources":["../../../../src/adapter/entry-points/console/consoleDataDelivery.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAE3D,OAAO,EAAE,sBAAsB,EAAE,CAAC;AAElC,MAAM,MAAM,gBAAgB,GACxB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GAC7C;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GAC5D;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAA;CAAE,CAAC;AAO9D,eAAO,MAAM,qBAAqB,GAChC,aAAa,MAAM,KAClB,gBAAgB,GAAG,IAoCrB,CAAC;AA0CF,MAAM,MAAM,mBAAmB,GAAG;IAChC,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,eAAO,MAAM,wBAAwB,GACnC,sBAAsB,MAAM,EAC5B,OAAO,gBAAgB,KACtB,mBA6CF,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ConsoleTabName } from '../../../domain/usecases/console/GenerateConsoleListsUseCase';
|
|
2
|
+
export declare const CONSOLE_LIST_TAB_NAMES: ConsoleTabName[];
|
|
3
|
+
export declare const sortByStoryOrder: (items: unknown[], storyOrder: string[]) => unknown[];
|
|
4
|
+
//# sourceMappingURL=consoleTabNames.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consoleTabNames.d.ts","sourceRoot":"","sources":["../../../../src/adapter/entry-points/console/consoleTabNames.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8DAA8D,CAAC;AAEnG,eAAO,MAAM,sBAAsB,EAAE,cAAc,EAQlD,CAAC;AAOF,eAAO,MAAM,gBAAgB,GAC3B,OAAO,OAAO,EAAE,EAChB,YAAY,MAAM,EAAE,KACnB,OAAO,EAgBT,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ConsoleListItem, ConsoleTabName } from '../../../domain/usecases/console/GenerateConsoleListsUseCase';
|
|
2
|
+
import type { ConsoleTabsRepository } from '../../../domain/usecases/adapter-interfaces/ConsoleTabsRepository';
|
|
3
|
+
export declare class FileSystemConsoleTabsRepository implements ConsoleTabsRepository {
|
|
4
|
+
private readonly consoleDataOutputDir;
|
|
5
|
+
private readonly pjcode;
|
|
6
|
+
constructor(consoleDataOutputDir: string, pjcode: string);
|
|
7
|
+
patchIssueTabTransition(params: {
|
|
8
|
+
projectItemId: string;
|
|
9
|
+
item: ConsoleListItem;
|
|
10
|
+
targetTabName: ConsoleTabName | null;
|
|
11
|
+
}): void;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=FileSystemConsoleTabsRepository.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FileSystemConsoleTabsRepository.d.ts","sourceRoot":"","sources":["../../../../src/adapter/entry-points/handlers/FileSystemConsoleTabsRepository.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,eAAe,EACf,cAAc,EACf,MAAM,8DAA8D,CAAC;AACtE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mEAAmE,CAAC;AAqD/G,qBAAa,+BAAgC,YAAW,qBAAqB;IAEzE,OAAO,CAAC,QAAQ,CAAC,oBAAoB;IACrC,OAAO,CAAC,QAAQ,CAAC,MAAM;gBADN,oBAAoB,EAAE,MAAM,EAC5B,MAAM,EAAE,MAAM;IAGjC,uBAAuB,CAAC,MAAM,EAAE;QAC9B,aAAa,EAAE,MAAM,CAAC;QACtB,IAAI,EAAE,eAAe,CAAC;QACtB,aAAa,EAAE,cAAc,GAAG,IAAI,CAAC;KACtC,GAAG,IAAI;CA2CT"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consoleListsWriter.d.ts","sourceRoot":"","sources":["../../../../src/adapter/entry-points/handlers/consoleListsWriter.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAQhE,MAAM,MAAM,wBAAwB,GAAG;IACrC,oBAAoB,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAChD,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAClC,aAAa,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACzC,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,KAAK,EAAE,CAAC;IAChB,wBAAwB,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACrD,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;
|
|
1
|
+
{"version":3,"file":"consoleListsWriter.d.ts","sourceRoot":"","sources":["../../../../src/adapter/entry-points/handlers/consoleListsWriter.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAQhE,MAAM,MAAM,wBAAwB,GAAG;IACrC,oBAAoB,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAChD,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAClC,aAAa,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACzC,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,KAAK,EAAE,CAAC;IAChB,wBAAwB,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACrD,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,wBAAwB,GAAI,MAAM,IAAI,KAAG,MACR,CAAC;AAU/C,eAAO,MAAM,iBAAiB,GAAI,QAAQ,wBAAwB,KAAG,IAyBpE,CAAC"}
|
|
@@ -2,6 +2,7 @@ import { IssueRepository } from './adapter-interfaces/IssueRepository';
|
|
|
2
2
|
import { ProjectRepository } from './adapter-interfaces/ProjectRepository';
|
|
3
3
|
import { IssueCommentRepository } from './adapter-interfaces/IssueCommentRepository';
|
|
4
4
|
import { WebhookRepository } from './adapter-interfaces/WebhookRepository';
|
|
5
|
+
import { ConsoleTabsRepository } from './adapter-interfaces/ConsoleTabsRepository';
|
|
5
6
|
export declare class IssueNotFoundError extends Error {
|
|
6
7
|
constructor(issueUrl: string);
|
|
7
8
|
}
|
|
@@ -13,9 +14,10 @@ export declare class NotifyFinishedIssuePreparationUseCase {
|
|
|
13
14
|
private readonly issueRepository;
|
|
14
15
|
private readonly issueCommentRepository;
|
|
15
16
|
private readonly webhookRepository;
|
|
17
|
+
private readonly consoleTabsRepository?;
|
|
16
18
|
private readonly issueRejectionEvaluator;
|
|
17
19
|
private readonly changeTargetPullRequestApprover;
|
|
18
|
-
constructor(projectRepository: Pick<ProjectRepository, 'getByUrl'>, issueRepository: Pick<IssueRepository, 'get' | 'update' | 'updateStatus' | 'findRelatedOpenPRs' | 'getStoryObjectMap' | 'getOpenPullRequest' | 'getPullRequestChangedFilePaths' | 'approvePullRequest' | 'requestChangesWithInlineComment' | 'setDependedIssueUrl'>, issueCommentRepository: Pick<IssueCommentRepository, 'getCommentsFromIssue' | 'createComment'>, webhookRepository: Pick<WebhookRepository, 'sendGetRequest'
|
|
20
|
+
constructor(projectRepository: Pick<ProjectRepository, 'getByUrl'>, issueRepository: Pick<IssueRepository, 'get' | 'update' | 'updateStatus' | 'findRelatedOpenPRs' | 'getStoryObjectMap' | 'getOpenPullRequest' | 'getPullRequestChangedFilePaths' | 'approvePullRequest' | 'requestChangesWithInlineComment' | 'setDependedIssueUrl'>, issueCommentRepository: Pick<IssueCommentRepository, 'getCommentsFromIssue' | 'createComment'>, webhookRepository: Pick<WebhookRepository, 'sendGetRequest'>, consoleTabsRepository?: (ConsoleTabsRepository | null) | undefined);
|
|
19
21
|
run: (params: {
|
|
20
22
|
projectUrl: string;
|
|
21
23
|
issueUrl: string;
|
|
@@ -32,5 +34,7 @@ export declare class NotifyFinishedIssuePreparationUseCase {
|
|
|
32
34
|
private setDependedIssueUrlForAllOpenPRs;
|
|
33
35
|
private resolveOpenPrsForPrItem;
|
|
34
36
|
private sendWorkflowBlockerNotification;
|
|
37
|
+
private resolveConsoleTargetTab;
|
|
38
|
+
private patchConsoleTab;
|
|
35
39
|
}
|
|
36
40
|
//# sourceMappingURL=NotifyFinishedIssuePreparationUseCase.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotifyFinishedIssuePreparationUseCase.d.ts","sourceRoot":"","sources":["../../../src/domain/usecases/NotifyFinishedIssuePreparationUseCase.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AACvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAC3E,OAAO,EAAE,sBAAsB,EAAE,MAAM,6CAA6C,CAAC;AACrF,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;
|
|
1
|
+
{"version":3,"file":"NotifyFinishedIssuePreparationUseCase.d.ts","sourceRoot":"","sources":["../../../src/domain/usecases/NotifyFinishedIssuePreparationUseCase.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AACvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAC3E,OAAO,EAAE,sBAAsB,EAAE,MAAM,6CAA6C,CAAC;AACrF,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAC3E,OAAO,EAAE,qBAAqB,EAAE,MAAM,4CAA4C,CAAC;AAwBnF,qBAAa,kBAAmB,SAAQ,KAAK;gBAC/B,QAAQ,EAAE,MAAM;CAI7B;AACD,qBAAa,uBAAwB,SAAQ,KAAK;gBAE9C,QAAQ,EAAE,MAAM,EAChB,aAAa,EAAE,MAAM,GAAG,IAAI,EAC5B,cAAc,EAAE,MAAM,GAAG,IAAI;CAOhC;AAID,qBAAa,qCAAqC;IAK9C,OAAO,CAAC,QAAQ,CAAC,iBAAiB;IAClC,OAAO,CAAC,QAAQ,CAAC,eAAe;IAahC,OAAO,CAAC,QAAQ,CAAC,sBAAsB;IAIvC,OAAO,CAAC,QAAQ,CAAC,iBAAiB;IAIlC,OAAO,CAAC,QAAQ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AAuB,CAO7B;IAEF,OAAO,CAAC,eAAe,CAmCrB;CACH"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ConsoleListItem, ConsoleTabName } from '../console/GenerateConsoleListsUseCase';
|
|
2
|
+
export interface ConsoleTabsRepository {
|
|
3
|
+
patchIssueTabTransition(params: {
|
|
4
|
+
projectItemId: string;
|
|
5
|
+
item: ConsoleListItem;
|
|
6
|
+
targetTabName: ConsoleTabName | null;
|
|
7
|
+
}): void;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=ConsoleTabsRepository.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConsoleTabsRepository.d.ts","sourceRoot":"","sources":["../../../../src/domain/usecases/adapter-interfaces/ConsoleTabsRepository.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,cAAc,EACf,MAAM,wCAAwC,CAAC;AAEhD,MAAM,WAAW,qBAAqB;IACpC,uBAAuB,CAAC,MAAM,EAAE;QAC9B,aAAa,EAAE,MAAM,CAAC;QACtB,IAAI,EAAE,eAAe,CAAC;QACtB,aAAa,EAAE,cAAc,GAAG,IAAI,CAAC;KACtC,GAAG,IAAI,CAAC;CACV"}
|