github-issue-tower-defence-management 1.70.0 → 1.71.1

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.
@@ -0,0 +1,196 @@
1
+ import { CheckIssueReviewReadinessUseCase } from './CheckIssueReviewReadinessUseCase';
2
+ import { Issue } from '../entities/Issue';
3
+ import { Project } from '../entities/Project';
4
+ import { RelatedPullRequest } from './adapter-interfaces/IssueRepository';
5
+
6
+ const createMockProject = (overrides: Partial<Project> = {}): Project => ({
7
+ id: 'project-1',
8
+ url: 'https://github.com/users/user/projects/1',
9
+ databaseId: 1,
10
+ name: 'Test Project',
11
+ status: {
12
+ name: 'Status',
13
+ fieldId: 'field-1',
14
+ statuses: [
15
+ {
16
+ id: 'preparation-id',
17
+ name: 'Preparation',
18
+ color: 'YELLOW',
19
+ description: '',
20
+ },
21
+ ],
22
+ },
23
+ nextActionDate: null,
24
+ nextActionHour: null,
25
+ story: null,
26
+ remainingEstimationMinutes: null,
27
+ dependedIssueUrlSeparatedByComma: null,
28
+ completionDate50PercentConfidence: null,
29
+ ...overrides,
30
+ });
31
+
32
+ const createMockIssue = (overrides: Partial<Issue> = {}): Issue => ({
33
+ nameWithOwner: 'user/repo',
34
+ number: 1,
35
+ title: 'Test Issue',
36
+ state: 'OPEN',
37
+ status: 'Preparation',
38
+ story: null,
39
+ nextActionDate: null,
40
+ nextActionHour: null,
41
+ estimationMinutes: null,
42
+ dependedIssueUrls: [],
43
+ completionDate50PercentConfidence: null,
44
+ url: 'https://github.com/user/repo/issues/1',
45
+ assignees: [],
46
+ labels: [],
47
+ org: 'user',
48
+ repo: 'repo',
49
+ body: '',
50
+ itemId: 'item-1',
51
+ isPr: false,
52
+ isInProgress: false,
53
+ isClosed: false,
54
+ createdAt: new Date('2000-01-01T00:00:00Z'),
55
+ author: 'test-user',
56
+ ...overrides,
57
+ });
58
+
59
+ const createReadyPr = (
60
+ overrides: Partial<RelatedPullRequest> = {},
61
+ ): RelatedPullRequest => ({
62
+ url: 'https://github.com/user/repo/pull/1',
63
+ branchName: 'feature-branch',
64
+ createdAt: new Date('2000-01-01T00:00:00Z'),
65
+ isDraft: false,
66
+ isConflicted: false,
67
+ isPassedAllCiJob: true,
68
+ isCiStateSuccess: true,
69
+ isResolvedAllReviewComments: true,
70
+ isBranchOutOfDate: false,
71
+ missingRequiredCheckNames: [],
72
+ ...overrides,
73
+ });
74
+
75
+ describe('CheckIssueReviewReadinessUseCase', () => {
76
+ let mockProjectRepository: { getByUrl: jest.Mock };
77
+ let mockIssueRepository: {
78
+ get: jest.Mock;
79
+ findRelatedOpenPRs: jest.Mock;
80
+ getOpenPullRequest: jest.Mock;
81
+ };
82
+ let useCase: CheckIssueReviewReadinessUseCase;
83
+ let mockProject: Project;
84
+
85
+ beforeEach(() => {
86
+ jest.resetAllMocks();
87
+
88
+ mockProject = createMockProject();
89
+
90
+ mockProjectRepository = {
91
+ getByUrl: jest.fn(),
92
+ };
93
+
94
+ mockIssueRepository = {
95
+ get: jest.fn(),
96
+ findRelatedOpenPRs: jest.fn(),
97
+ getOpenPullRequest: jest.fn(),
98
+ };
99
+
100
+ useCase = new CheckIssueReviewReadinessUseCase(
101
+ mockProjectRepository,
102
+ mockIssueRepository,
103
+ );
104
+ });
105
+
106
+ describe('run', () => {
107
+ it('should return reviewReady=true with empty rejections when the linked PR is ready', async () => {
108
+ const issue = createMockIssue();
109
+ mockProjectRepository.getByUrl.mockResolvedValue(mockProject);
110
+ mockIssueRepository.get.mockResolvedValue(issue);
111
+ mockIssueRepository.findRelatedOpenPRs.mockResolvedValue([
112
+ createReadyPr(),
113
+ ]);
114
+
115
+ const result = await useCase.run({
116
+ projectUrl: 'https://github.com/users/user/projects/1',
117
+ issueUrl: 'https://github.com/user/repo/issues/1',
118
+ });
119
+
120
+ expect(result.reviewReady).toBe(true);
121
+ expect(result.rejections).toEqual([]);
122
+ });
123
+
124
+ it('should return reviewReady=false with rejections when the linked PR has failing CI', async () => {
125
+ const issue = createMockIssue();
126
+ mockProjectRepository.getByUrl.mockResolvedValue(mockProject);
127
+ mockIssueRepository.get.mockResolvedValue(issue);
128
+ mockIssueRepository.findRelatedOpenPRs.mockResolvedValue([
129
+ createReadyPr({
130
+ isPassedAllCiJob: false,
131
+ isCiStateSuccess: false,
132
+ }),
133
+ ]);
134
+
135
+ const result = await useCase.run({
136
+ projectUrl: 'https://github.com/users/user/projects/1',
137
+ issueUrl: 'https://github.com/user/repo/issues/1',
138
+ });
139
+
140
+ expect(result.reviewReady).toBe(false);
141
+ expect(result.rejections).toHaveLength(1);
142
+ expect(result.rejections[0].type).toBe(
143
+ 'ANY_CI_JOB_FAILED_OR_IN_PROGRESS',
144
+ );
145
+ expect(result.rejections[0].detail).toContain(
146
+ 'https://github.com/user/repo/pull/1',
147
+ );
148
+ });
149
+
150
+ it('should return reviewReady=false with PULL_REQUEST_NOT_FOUND when no related PR exists', async () => {
151
+ const issue = createMockIssue();
152
+ mockProjectRepository.getByUrl.mockResolvedValue(mockProject);
153
+ mockIssueRepository.get.mockResolvedValue(issue);
154
+ mockIssueRepository.findRelatedOpenPRs.mockResolvedValue([]);
155
+
156
+ const result = await useCase.run({
157
+ projectUrl: 'https://github.com/users/user/projects/1',
158
+ issueUrl: 'https://github.com/user/repo/issues/1',
159
+ });
160
+
161
+ expect(result.reviewReady).toBe(false);
162
+ expect(result.rejections).toEqual([
163
+ { type: 'PULL_REQUEST_NOT_FOUND', detail: 'PULL_REQUEST_NOT_FOUND' },
164
+ ]);
165
+ });
166
+
167
+ it('should throw IssueNotFoundError when the issue does not exist', async () => {
168
+ mockProjectRepository.getByUrl.mockResolvedValue(mockProject);
169
+ mockIssueRepository.get.mockResolvedValue(null);
170
+
171
+ await expect(
172
+ useCase.run({
173
+ projectUrl: 'https://github.com/users/user/projects/1',
174
+ issueUrl: 'https://github.com/user/repo/issues/999',
175
+ }),
176
+ ).rejects.toThrow(
177
+ 'Issue not found: https://github.com/user/repo/issues/999',
178
+ );
179
+ });
180
+
181
+ it('should not call findRelatedOpenPRs nor mutate state when issue has a category label other than e2e', async () => {
182
+ const issue = createMockIssue({ labels: ['category:frontend'] });
183
+ mockProjectRepository.getByUrl.mockResolvedValue(mockProject);
184
+ mockIssueRepository.get.mockResolvedValue(issue);
185
+
186
+ const result = await useCase.run({
187
+ projectUrl: 'https://github.com/users/user/projects/1',
188
+ issueUrl: 'https://github.com/user/repo/issues/1',
189
+ });
190
+
191
+ expect(mockIssueRepository.findRelatedOpenPRs).not.toHaveBeenCalled();
192
+ expect(result.reviewReady).toBe(true);
193
+ expect(result.rejections).toEqual([]);
194
+ });
195
+ });
196
+ });
@@ -0,0 +1,45 @@
1
+ import { IssueRepository } from './adapter-interfaces/IssueRepository';
2
+ import { ProjectRepository } from './adapter-interfaces/ProjectRepository';
3
+ import {
4
+ IssueRejectionEvaluator,
5
+ PrRejectedReasonType,
6
+ } from './IssueRejectionEvaluator';
7
+ import { IssueNotFoundError } from './NotifyFinishedIssuePreparationUseCase';
8
+
9
+ export type IssueReviewReadinessResult = {
10
+ reviewReady: boolean;
11
+ rejections: { type: PrRejectedReasonType; detail: string }[];
12
+ };
13
+
14
+ export class CheckIssueReviewReadinessUseCase {
15
+ private readonly issueRejectionEvaluator: IssueRejectionEvaluator;
16
+
17
+ constructor(
18
+ private readonly projectRepository: Pick<ProjectRepository, 'getByUrl'>,
19
+ private readonly issueRepository: Pick<
20
+ IssueRepository,
21
+ 'get' | 'findRelatedOpenPRs' | 'getOpenPullRequest'
22
+ >,
23
+ ) {
24
+ this.issueRejectionEvaluator = new IssueRejectionEvaluator(issueRepository);
25
+ }
26
+
27
+ run = async (params: {
28
+ projectUrl: string;
29
+ issueUrl: string;
30
+ }): Promise<IssueReviewReadinessResult> => {
31
+ const project = await this.projectRepository.getByUrl(params.projectUrl);
32
+ const issue = await this.issueRepository.get(params.issueUrl, project);
33
+
34
+ if (!issue) {
35
+ throw new IssueNotFoundError(params.issueUrl);
36
+ }
37
+
38
+ const { rejections } = await this.issueRejectionEvaluator.evaluate(issue);
39
+
40
+ return {
41
+ reviewReady: rejections.length === 0,
42
+ rejections,
43
+ };
44
+ };
45
+ }
@@ -257,6 +257,75 @@ describe('NotifyFinishedIssuePreparationUseCase', () => {
257
257
  );
258
258
  });
259
259
 
260
+ it('should throw IssueNotFoundError when a pull request URL has no backing project item (no silent skip)', async () => {
261
+ mockProjectRepository.getByUrl.mockResolvedValue(mockProject);
262
+ mockIssueRepository.get.mockResolvedValue(null);
263
+
264
+ await expect(
265
+ useCase.run({
266
+ projectUrl: 'https://github.com/users/user/projects/1',
267
+ issueUrl: 'https://github.com/user/repo/pull/999',
268
+ thresholdForAutoReject: 3,
269
+ workflowBlockerResolvedWebhookUrl: null,
270
+ allowedIssueAuthors: null,
271
+ }),
272
+ ).rejects.toThrow('Issue not found: https://github.com/user/repo/pull/999');
273
+ expect(mockIssueRepository.update).not.toHaveBeenCalled();
274
+ expect(mockIssueRepository.updateStatus).not.toHaveBeenCalled();
275
+ });
276
+
277
+ it('should process a pull request URL the same as an issue URL when the project item resolves', async () => {
278
+ const prIssue = createMockIssue({
279
+ url: 'https://github.com/user/repo/pull/77',
280
+ number: 77,
281
+ status: 'Preparation',
282
+ isPr: true,
283
+ });
284
+
285
+ mockProjectRepository.getByUrl.mockResolvedValue(mockProject);
286
+ mockIssueRepository.get.mockResolvedValue(prIssue);
287
+ mockIssueCommentRepository.getCommentsFromIssue.mockResolvedValue([
288
+ createMockComment({ content: 'From: :robot: Agent report' }),
289
+ ]);
290
+ mockIssueRepository.getOpenPullRequest.mockResolvedValue({
291
+ url: 'https://github.com/user/repo/pull/77',
292
+ isConflicted: false,
293
+ isPassedAllCiJob: true,
294
+ isCiStateSuccess: true,
295
+ isResolvedAllReviewComments: true,
296
+ isBranchOutOfDate: false,
297
+ missingRequiredCheckNames: [],
298
+ });
299
+
300
+ await useCase.run({
301
+ projectUrl: 'https://github.com/users/user/projects/1',
302
+ issueUrl: 'https://github.com/user/repo/pull/77',
303
+ thresholdForAutoReject: 3,
304
+ workflowBlockerResolvedWebhookUrl: null,
305
+ allowedIssueAuthors: null,
306
+ });
307
+
308
+ expect(mockIssueRepository.get).toHaveBeenCalledWith(
309
+ 'https://github.com/user/repo/pull/77',
310
+ mockProject,
311
+ );
312
+ expect(mockIssueRepository.update).toHaveBeenCalledWith(
313
+ expect.objectContaining({
314
+ url: 'https://github.com/user/repo/pull/77',
315
+ status: 'Awaiting Quality Check',
316
+ }),
317
+ mockProject,
318
+ );
319
+ expect(mockIssueRepository.updateStatus).toHaveBeenCalledWith(
320
+ mockProject,
321
+ expect.objectContaining({
322
+ url: 'https://github.com/user/repo/pull/77',
323
+ status: 'Awaiting Quality Check',
324
+ }),
325
+ 'awaiting-quality-check-id',
326
+ );
327
+ });
328
+
260
329
  it('should throw IllegalIssueStatusError when issue status is not Preparation', async () => {
261
330
  const issue = createMockIssue({
262
331
  url: 'https://github.com/user/repo/issues/1',
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/adapter/entry-points/cli/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EACL,UAAU,EACV,cAAc,EACd,wBAAwB,EACxB,YAAY,EACZ,kBAAkB,GACnB,MAAM,iBAAiB,CAAC;AA6DzB,eAAO,MAAM,OAAO,SAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/adapter/entry-points/cli/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EACL,UAAU,EACV,cAAc,EACd,wBAAwB,EACxB,YAAY,EACZ,kBAAkB,GACnB,MAAM,iBAAiB,CAAC;AAoEzB,eAAO,MAAM,OAAO,SAAgB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"GraphqlProjectItemRepository.d.ts","sourceRoot":"","sources":["../../../../src/adapter/repositories/issue/GraphqlProjectItem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,gBAAgB,MAAM,EACtB,aAAa,MAAM,KAClB,OAAO,CACR;QACE,SAAS,EAAE,MAAM,CAAC;QAClB,UAAU,EAAE,MAAM,CAAC;KACpB,EAAE,CACJ,CAqJC;IACF,qBAAqB,GACnB,UAAU,MAAM,KACf,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,CA2L5B;IACF,iBAAiB,GAAI,OAAO,MAAM,KAAG,MAAM,GAAG,QAAQ,GAAG,QAAQ,CAQ/D;IAEF,kBAAkB,GAChB,WAAW,MAAM,EACjB,SAAS,MAAM,EACf,QAAQ,MAAM,EACd,OACI;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,GAChB;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,GAClB;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,GAChB;QAAE,oBAAoB,EAAE,MAAM,CAAA;KAAE,KACnC,OAAO,CAAC,IAAI,CAAC,CAgCd;IAEF,iBAAiB,GACf,WAAW,MAAM,EACjB,SAAS,MAAM,EACf,QAAQ,MAAM,KACb,OAAO,CAAC,IAAI,CAAC,CA+Bd;IACF,sBAAsB,GACpB,SAAS,OAAO,CAAC,IAAI,CAAC,EACtB,SAAS,MAAM,EACf,OAAO,KAAK,CAAC,QAAQ,CAAC,EACtB,MAAM,MAAM,KACX,OAAO,CAAC,IAAI,CAAC,CAEd;IAEF,qBAAqB,GACnB,WAAW,MAAM,EACjB,QAAQ,MAAM,KACb,OAAO,CAAC,IAAI,CAAC,CAgCd;IAEF,+BAA+B,GAC7B,UAAU,MAAM,EAChB,WAAW,MAAM,KAChB,OAAO,CAAC,IAAI,CAAC,CASd;IAEF,iBAAiB,GACf,WAAW,MAAM,EACjB,UAAU,MAAM,KACf,OAAO,CAAC,IAAI,CAAC,CA4Dd;CACH"}
1
+ {"version":3,"file":"GraphqlProjectItemRepository.d.ts","sourceRoot":"","sources":["../../../../src/adapter/repositories/issue/GraphqlProjectItemRepository.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,o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AAO,CACR;QACE,SAAS,EAAE,MAAM,CAAC;QAClB,UAAU,EAAE,MAAM,CAAC;KACpB,EAAE,CACJ,CAqJC;IACF,qBAAqB,GACnB,UAAU,MAAM,KACf,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,CA0P5B;IACF,iBAAiB,GAAI,OAAO,MAAM,KAAG,MAAM,GAAG,QAAQ,GAAG,QAAQ,CAQ/D;IAEF,kBAAkB,GAChB,WAAW,MAAM,EACjB,SAAS,MAAM,EACf,QAAQ,MAAM,EACd,OACI;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,GAChB;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,GAClB;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,GAChB;QAAE,oBAAoB,EAAE,MAAM,CAAA;KAAE,KACnC,OAAO,CAAC,IAAI,CAAC,CAgCd;IAEF,iBAAiB,GACf,WAAW,MAAM,EACjB,SAAS,MAAM,EACf,QAAQ,MAAM,KACb,OAAO,CAAC,IAAI,CAAC,CA+Bd;IACF,sBAAsB,GACpB,SAAS,OAAO,CAAC,IAAI,CAAC,EACtB,SAAS,MAAM,EACf,OAAO,KAAK,CAAC,QAAQ,CAAC,EACtB,MAAM,MAAM,KACX,OAAO,CAAC,IAAI,CAAC,CAEd;IAEF,qBAAqB,GACnB,WAAW,MAAM,EACjB,QAAQ,MAAM,KACb,OAAO,CAAC,IAAI,CAAC,CAgCd;IAEF,+BAA+B,GAC7B,UAAU,MAAM,EAChB,WAAW,MAAM,KAChB,OAAO,CAAC,IAAI,CAAC,CASd;IAEF,iBAAiB,GACf,WAAW,MAAM,EACjB,UAAU,MAAM,KACf,OAAO,CAAC,IAAI,CAAC,CA4Dd;CACH"}
@@ -0,0 +1,21 @@
1
+ import { IssueRepository } from './adapter-interfaces/IssueRepository';
2
+ import { ProjectRepository } from './adapter-interfaces/ProjectRepository';
3
+ import { PrRejectedReasonType } from './IssueRejectionEvaluator';
4
+ export type IssueReviewReadinessResult = {
5
+ reviewReady: boolean;
6
+ rejections: {
7
+ type: PrRejectedReasonType;
8
+ detail: string;
9
+ }[];
10
+ };
11
+ export declare class CheckIssueReviewReadinessUseCase {
12
+ private readonly projectRepository;
13
+ private readonly issueRepository;
14
+ private readonly issueRejectionEvaluator;
15
+ constructor(projectRepository: Pick<ProjectRepository, 'getByUrl'>, issueRepository: Pick<IssueRepository, 'get' | 'findRelatedOpenPRs' | 'getOpenPullRequest'>);
16
+ run: (params: {
17
+ projectUrl: string;
18
+ issueUrl: string;
19
+ }) => Promise<IssueReviewReadinessResult>;
20
+ }
21
+ //# sourceMappingURL=CheckIssueReviewReadinessUseCase.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CheckIssueReviewReadinessUseCase.d.ts","sourceRoot":"","sources":["../../../src/domain/usecases/CheckIssueReviewReadinessUseCase.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AACvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAC3E,OAAO,EAEL,oBAAoB,EACrB,MAAM,2BAA2B,CAAC;AAGnC,MAAM,MAAM,0BAA0B,GAAG;IACvC,WAAW,EAAE,OAAO,CAAC;IACrB,UAAU,EAAE;QAAE,IAAI,EAAE,oBAAoB,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CAC9D,CAAC;AAEF,qBAAa,gCAAgC;IAIzC,OAAO,CAAC,QAAQ,CAAC,iBAAiB;IAClC,OAAO,CAAC,QAAQ,CAAC,eAAe;IAJlC,OAAO,CAAC,QAAQ,CAAC,uBAAuB,CAA0B;gBAG/C,iBAAiB,EAAE,IAAI,CAAC,iBAAiB,EAAE,UAAU,CAAC,EACtD,eAAe,EAAE,IAAI,CACpC,eAAe,EACf,KAAK,GAAG,oBAAoB,GAAG,oBAAoB,CACpD;IAKH,GAAG,GAAU,QAAQ;QACnB,UAAU,EAAE,MAAM,CAAC;QACnB,QAAQ,EAAE,MAAM,CAAC;KAClB,KAAG,OAAO,CAAC,0BAA0B,CAAC,CAcrC;CACH"}