github-issue-tower-defence-management 1.166.1 → 1.166.3
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/bin/adapter/entry-points/console/consoleOperationApi.js +8 -1
- package/bin/adapter/entry-points/console/consoleOperationApi.js.map +1 -1
- package/bin/adapter/repositories/issue/ApiV3CheerioRestIssueRepository.js +100 -21
- package/bin/adapter/repositories/issue/ApiV3CheerioRestIssueRepository.js.map +1 -1
- package/package.json +1 -1
- package/src/adapter/entry-points/console/consoleOperationApi.test.ts +38 -0
- package/src/adapter/entry-points/console/consoleOperationApi.ts +7 -1
- package/src/adapter/entry-points/console/webServer.test.ts +65 -0
- package/src/adapter/repositories/issue/ApiV3CheerioRestIssueRepository.test.ts +213 -0
- package/src/adapter/repositories/issue/ApiV3CheerioRestIssueRepository.ts +152 -30
- package/types/adapter/entry-points/console/consoleOperationApi.d.ts.map +1 -1
- package/types/adapter/repositories/issue/ApiV3CheerioRestIssueRepository.d.ts +1 -0
- package/types/adapter/repositories/issue/ApiV3CheerioRestIssueRepository.d.ts.map +1 -1
|
@@ -489,6 +489,44 @@ describe('consoleOperationApi', () => {
|
|
|
489
489
|
);
|
|
490
490
|
});
|
|
491
491
|
|
|
492
|
+
it('merges the pull request when approvePullRequest returns HTTP 422', async () => {
|
|
493
|
+
issueRepository.getPullRequestDetail.mockResolvedValue(null);
|
|
494
|
+
issueRepository.approvePullRequest.mockRejectedValue(
|
|
495
|
+
new Error(
|
|
496
|
+
'Failed to approve PR https://github.com/o/r/pull/1: HTTP 422 Review Can not approve your own pull request',
|
|
497
|
+
),
|
|
498
|
+
);
|
|
499
|
+
const response = await handleReview(context, {
|
|
500
|
+
pjcode: 'acme',
|
|
501
|
+
action: 'approve_and_merge',
|
|
502
|
+
prUrl: 'https://github.com/o/r/pull/1',
|
|
503
|
+
projectItemId: 'PVTI_422',
|
|
504
|
+
});
|
|
505
|
+
expect(response.statusCode).toBe(200);
|
|
506
|
+
expect(issueRepository.mergePullRequest).toHaveBeenCalledWith(
|
|
507
|
+
'https://github.com/o/r/pull/1',
|
|
508
|
+
);
|
|
509
|
+
expect(issueRepository.updateStatus).toHaveBeenCalled();
|
|
510
|
+
});
|
|
511
|
+
|
|
512
|
+
it('re-throws errors other than HTTP 422 from approvePullRequest', async () => {
|
|
513
|
+
issueRepository.getPullRequestDetail.mockResolvedValue(null);
|
|
514
|
+
issueRepository.approvePullRequest.mockRejectedValue(
|
|
515
|
+
new Error(
|
|
516
|
+
'Failed to approve PR https://github.com/o/r/pull/1: HTTP 500 Internal Server Error',
|
|
517
|
+
),
|
|
518
|
+
);
|
|
519
|
+
await expect(
|
|
520
|
+
handleReview(context, {
|
|
521
|
+
pjcode: 'acme',
|
|
522
|
+
action: 'approve_and_merge',
|
|
523
|
+
prUrl: 'https://github.com/o/r/pull/1',
|
|
524
|
+
projectItemId: 'PVTI_500',
|
|
525
|
+
}),
|
|
526
|
+
).rejects.toThrow('HTTP 500');
|
|
527
|
+
expect(issueRepository.mergePullRequest).not.toHaveBeenCalled();
|
|
528
|
+
});
|
|
529
|
+
|
|
492
530
|
it('returns 400 when the pull request has a merge conflict', async () => {
|
|
493
531
|
issueRepository.getOpenPullRequest.mockResolvedValue({
|
|
494
532
|
url: 'https://github.com/o/r/pull/1',
|
|
@@ -345,7 +345,13 @@ export const handleReview = async (
|
|
|
345
345
|
const isSelfAuthored =
|
|
346
346
|
prDetail !== null && prDetail.author === authenticatedUser;
|
|
347
347
|
if (!isSelfAuthored) {
|
|
348
|
-
|
|
348
|
+
try {
|
|
349
|
+
await issueRepository.approvePullRequest(prUrl);
|
|
350
|
+
} catch (error) {
|
|
351
|
+
if (!(error instanceof Error && error.message.includes('HTTP 422'))) {
|
|
352
|
+
throw error;
|
|
353
|
+
}
|
|
354
|
+
}
|
|
349
355
|
}
|
|
350
356
|
await issueRepository.mergePullRequest(prUrl);
|
|
351
357
|
const failure = await updateStatusByName(
|
|
@@ -853,6 +853,71 @@ describe('webServer new routes integration', () => {
|
|
|
853
853
|
}
|
|
854
854
|
});
|
|
855
855
|
|
|
856
|
+
it('merges the pull request and returns 200 when approvePullRequest returns HTTP 422', async () => {
|
|
857
|
+
const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'console-server-'));
|
|
858
|
+
const issueRepository = mock<IssueRepository>();
|
|
859
|
+
issueRepository.get.mockResolvedValue({
|
|
860
|
+
...mock<Issue>(),
|
|
861
|
+
itemId: 'PVTI_loaded',
|
|
862
|
+
});
|
|
863
|
+
issueRepository.getOpenPullRequest.mockResolvedValue({
|
|
864
|
+
url: 'https://github.com/o/r/pull/1',
|
|
865
|
+
branchName: null,
|
|
866
|
+
createdAt: new Date(0),
|
|
867
|
+
isDraft: false,
|
|
868
|
+
isConflicted: false,
|
|
869
|
+
mergeable: 'MERGEABLE',
|
|
870
|
+
isPassedAllCiJob: true,
|
|
871
|
+
isCiStateSuccess: true,
|
|
872
|
+
isResolvedAllReviewComments: true,
|
|
873
|
+
isBranchOutOfDate: false,
|
|
874
|
+
missingRequiredCheckNames: [],
|
|
875
|
+
});
|
|
876
|
+
issueRepository.getPullRequestDetail.mockResolvedValue(null);
|
|
877
|
+
issueRepository.getAuthenticatedUserLogin.mockResolvedValue(
|
|
878
|
+
'authenticated-user',
|
|
879
|
+
);
|
|
880
|
+
issueRepository.approvePullRequest.mockRejectedValue(
|
|
881
|
+
new Error(
|
|
882
|
+
'Failed to approve PR https://github.com/o/r/pull/1: HTTP 422 Review Can not approve your own pull request',
|
|
883
|
+
),
|
|
884
|
+
);
|
|
885
|
+
const server = await startWebServer({
|
|
886
|
+
accessToken: testToken,
|
|
887
|
+
uiDistDir: path.join(tmpDir, 'ui-dist'),
|
|
888
|
+
consoleDataOutputDir: null,
|
|
889
|
+
inTmuxDataDir: null,
|
|
890
|
+
dashboardDir: null,
|
|
891
|
+
dashboardDataDir: null,
|
|
892
|
+
dashboardProjectNames: [],
|
|
893
|
+
issueRepository,
|
|
894
|
+
resolveProject: async (pjcode) =>
|
|
895
|
+
pjcode === 'acme' ? { pjcode, project: buildProject() } : null,
|
|
896
|
+
isPjcodeConfigured: (pjcode) => pjcode === 'acme',
|
|
897
|
+
port: 0,
|
|
898
|
+
});
|
|
899
|
+
try {
|
|
900
|
+
const response = await request(
|
|
901
|
+
server,
|
|
902
|
+
'POST',
|
|
903
|
+
`/api/review?k=${testToken}`,
|
|
904
|
+
{
|
|
905
|
+
pjcode: 'acme',
|
|
906
|
+
action: 'approve_and_merge',
|
|
907
|
+
prUrl: 'https://github.com/o/r/pull/1',
|
|
908
|
+
projectItemId: 'PVTI_op',
|
|
909
|
+
},
|
|
910
|
+
);
|
|
911
|
+
expect(response.statusCode).toBe(200);
|
|
912
|
+
expect(issueRepository.mergePullRequest).toHaveBeenCalledWith(
|
|
913
|
+
'https://github.com/o/r/pull/1',
|
|
914
|
+
);
|
|
915
|
+
} finally {
|
|
916
|
+
await closeServer(server);
|
|
917
|
+
fs.rmSync(tmpDir, { recursive: true, force: true });
|
|
918
|
+
}
|
|
919
|
+
});
|
|
920
|
+
|
|
856
921
|
it('returns 502 with the underlying error message when an operation rejects', async () => {
|
|
857
922
|
const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'console-server-'));
|
|
858
923
|
const issueRepository = mock<IssueRepository>();
|
|
@@ -2559,6 +2559,7 @@ describe('ApiV3CheerioRestIssueRepository', () => {
|
|
|
2559
2559
|
branchRules?: (url: string) => Response | object;
|
|
2560
2560
|
branchDetail?: (url: string) => Response | object;
|
|
2561
2561
|
checkRuns?: (url: string) => Response | object;
|
|
2562
|
+
checkSuites?: (url: string) => Response | object;
|
|
2562
2563
|
combinedStatus?: (url: string) => Response | object;
|
|
2563
2564
|
};
|
|
2564
2565
|
|
|
@@ -2661,6 +2662,13 @@ describe('ApiV3CheerioRestIssueRepository', () => {
|
|
|
2661
2662
|
routes.branchDetail ? routes.branchDetail(url) : {},
|
|
2662
2663
|
);
|
|
2663
2664
|
}
|
|
2665
|
+
if (url.includes('/check-suites') && !url.includes('/check-runs')) {
|
|
2666
|
+
return toResponse(
|
|
2667
|
+
routes.checkSuites
|
|
2668
|
+
? routes.checkSuites(url)
|
|
2669
|
+
: { total_count: 0, check_suites: [] },
|
|
2670
|
+
);
|
|
2671
|
+
}
|
|
2664
2672
|
if (url.includes('/check-runs')) {
|
|
2665
2673
|
return toResponse(
|
|
2666
2674
|
routes.checkRuns
|
|
@@ -4164,6 +4172,51 @@ describe('ApiV3CheerioRestIssueRepository', () => {
|
|
|
4164
4172
|
'https://github.com/HiromiShikata/repositories-management/pull/427',
|
|
4165
4173
|
);
|
|
4166
4174
|
});
|
|
4175
|
+
|
|
4176
|
+
it('includes the PR when commits/{sha}/check-runs returns 404 and check-suites fallback succeeds', async () => {
|
|
4177
|
+
mockFetchRoutes({
|
|
4178
|
+
timeline: () =>
|
|
4179
|
+
buildTimelineResponse([
|
|
4180
|
+
buildCrossReferencedEventNode({
|
|
4181
|
+
willCloseTarget: true,
|
|
4182
|
+
prUrl: 'https://github.com/HiromiShikata/secretary/pull/100',
|
|
4183
|
+
prState: 'OPEN',
|
|
4184
|
+
}),
|
|
4185
|
+
]),
|
|
4186
|
+
slimPullRequest: () =>
|
|
4187
|
+
buildSlimPullRequestResponse({
|
|
4188
|
+
url: 'https://github.com/HiromiShikata/secretary/pull/100',
|
|
4189
|
+
headRefOid: 'sha-fork-commit',
|
|
4190
|
+
}),
|
|
4191
|
+
checkRuns: (url) => {
|
|
4192
|
+
if (url.includes('/commits/sha-fork-commit/check-runs')) {
|
|
4193
|
+
return new Response(JSON.stringify({ message: 'Not Found' }), {
|
|
4194
|
+
status: 404,
|
|
4195
|
+
headers: { 'Content-Type': 'application/json' },
|
|
4196
|
+
});
|
|
4197
|
+
}
|
|
4198
|
+
return {
|
|
4199
|
+
total_count: 1,
|
|
4200
|
+
check_runs: [{ id: 1, name: 'ci', conclusion: 'success' }],
|
|
4201
|
+
};
|
|
4202
|
+
},
|
|
4203
|
+
checkSuites: () => ({
|
|
4204
|
+
total_count: 1,
|
|
4205
|
+
check_suites: [{ id: 55 }],
|
|
4206
|
+
}),
|
|
4207
|
+
});
|
|
4208
|
+
|
|
4209
|
+
const { repository } = createApiV3CheerioRestIssueRepository();
|
|
4210
|
+
const result = await repository.findRelatedOpenPRs(
|
|
4211
|
+
'https://github.com/HiromiShikata/secretary/issues/2380',
|
|
4212
|
+
);
|
|
4213
|
+
|
|
4214
|
+
expect(result).toHaveLength(1);
|
|
4215
|
+
expect(result[0].url).toBe(
|
|
4216
|
+
'https://github.com/HiromiShikata/secretary/pull/100',
|
|
4217
|
+
);
|
|
4218
|
+
expect(result[0].isPassedAllCiJob).toBe(true);
|
|
4219
|
+
});
|
|
4167
4220
|
});
|
|
4168
4221
|
|
|
4169
4222
|
describe('getOpenPullRequestCiStatus', () => {
|
|
@@ -4329,6 +4382,166 @@ describe('ApiV3CheerioRestIssueRepository', () => {
|
|
|
4329
4382
|
).toBeNull();
|
|
4330
4383
|
expect(fetchSpy).not.toHaveBeenCalled();
|
|
4331
4384
|
});
|
|
4385
|
+
|
|
4386
|
+
it('falls back to check-suites when commits/{sha}/check-runs returns 404', async () => {
|
|
4387
|
+
const warnSpy = jest.spyOn(console, 'warn').mockImplementation(() => {});
|
|
4388
|
+
jest
|
|
4389
|
+
.spyOn(global, 'fetch')
|
|
4390
|
+
.mockImplementation((input: RequestInfo | URL): Promise<Response> => {
|
|
4391
|
+
const url =
|
|
4392
|
+
typeof input === 'string'
|
|
4393
|
+
? input
|
|
4394
|
+
: input instanceof URL
|
|
4395
|
+
? input.href
|
|
4396
|
+
: input.url;
|
|
4397
|
+
if (url.includes('/pulls/42')) {
|
|
4398
|
+
return Promise.resolve(
|
|
4399
|
+
new Response(
|
|
4400
|
+
JSON.stringify({
|
|
4401
|
+
html_url: prUrl,
|
|
4402
|
+
state: 'open',
|
|
4403
|
+
draft: false,
|
|
4404
|
+
mergeable: true,
|
|
4405
|
+
head: { ref: 'feature/x', sha: 'sha-1' },
|
|
4406
|
+
base: { ref: 'main' },
|
|
4407
|
+
}),
|
|
4408
|
+
{
|
|
4409
|
+
status: 200,
|
|
4410
|
+
headers: { 'Content-Type': 'application/json' },
|
|
4411
|
+
},
|
|
4412
|
+
),
|
|
4413
|
+
);
|
|
4414
|
+
}
|
|
4415
|
+
if (url.includes('/rules/branches/')) {
|
|
4416
|
+
return Promise.resolve(
|
|
4417
|
+
new Response(JSON.stringify([]), {
|
|
4418
|
+
status: 200,
|
|
4419
|
+
headers: { 'Content-Type': 'application/json' },
|
|
4420
|
+
}),
|
|
4421
|
+
);
|
|
4422
|
+
}
|
|
4423
|
+
if (/\/branches\/[^/?]+$/.test(url)) {
|
|
4424
|
+
return Promise.resolve(
|
|
4425
|
+
new Response(JSON.stringify({}), {
|
|
4426
|
+
status: 200,
|
|
4427
|
+
headers: { 'Content-Type': 'application/json' },
|
|
4428
|
+
}),
|
|
4429
|
+
);
|
|
4430
|
+
}
|
|
4431
|
+
if (url.includes('/commits/sha-1/check-runs')) {
|
|
4432
|
+
return Promise.resolve(
|
|
4433
|
+
new Response(JSON.stringify({ message: 'Not Found' }), {
|
|
4434
|
+
status: 404,
|
|
4435
|
+
headers: { 'Content-Type': 'application/json' },
|
|
4436
|
+
}),
|
|
4437
|
+
);
|
|
4438
|
+
}
|
|
4439
|
+
if (url.includes('/commits/sha-1/check-suites')) {
|
|
4440
|
+
return Promise.resolve(
|
|
4441
|
+
new Response(
|
|
4442
|
+
JSON.stringify({
|
|
4443
|
+
total_count: 1,
|
|
4444
|
+
check_suites: [{ id: 99 }],
|
|
4445
|
+
}),
|
|
4446
|
+
{
|
|
4447
|
+
status: 200,
|
|
4448
|
+
headers: { 'Content-Type': 'application/json' },
|
|
4449
|
+
},
|
|
4450
|
+
),
|
|
4451
|
+
);
|
|
4452
|
+
}
|
|
4453
|
+
if (url.includes('/check-suites/99/check-runs')) {
|
|
4454
|
+
return Promise.resolve(
|
|
4455
|
+
new Response(
|
|
4456
|
+
JSON.stringify({
|
|
4457
|
+
total_count: 1,
|
|
4458
|
+
check_runs: [
|
|
4459
|
+
{ id: 1, name: 'unit-test', conclusion: 'success' },
|
|
4460
|
+
],
|
|
4461
|
+
}),
|
|
4462
|
+
{
|
|
4463
|
+
status: 200,
|
|
4464
|
+
headers: { 'Content-Type': 'application/json' },
|
|
4465
|
+
},
|
|
4466
|
+
),
|
|
4467
|
+
);
|
|
4468
|
+
}
|
|
4469
|
+
return Promise.reject(new Error(`unexpected request: ${url}`));
|
|
4470
|
+
});
|
|
4471
|
+
|
|
4472
|
+
const { repository } = createApiV3CheerioRestIssueRepository();
|
|
4473
|
+
const status = await repository.getOpenPullRequestCiStatus(prUrl);
|
|
4474
|
+
|
|
4475
|
+
expect(status).not.toBeNull();
|
|
4476
|
+
expect(status?.isPassedAllCiJob).toBe(true);
|
|
4477
|
+
expect(warnSpy).not.toHaveBeenCalled();
|
|
4478
|
+
});
|
|
4479
|
+
|
|
4480
|
+
it('logs a warning and treats as no check runs when both commits/{sha}/check-runs and commits/{sha}/check-suites return 404', async () => {
|
|
4481
|
+
const warnSpy = jest.spyOn(console, 'warn').mockImplementation(() => {});
|
|
4482
|
+
jest
|
|
4483
|
+
.spyOn(global, 'fetch')
|
|
4484
|
+
.mockImplementation((input: RequestInfo | URL): Promise<Response> => {
|
|
4485
|
+
const url =
|
|
4486
|
+
typeof input === 'string'
|
|
4487
|
+
? input
|
|
4488
|
+
: input instanceof URL
|
|
4489
|
+
? input.href
|
|
4490
|
+
: input.url;
|
|
4491
|
+
if (url.includes('/pulls/42')) {
|
|
4492
|
+
return Promise.resolve(
|
|
4493
|
+
new Response(
|
|
4494
|
+
JSON.stringify({
|
|
4495
|
+
html_url: prUrl,
|
|
4496
|
+
state: 'open',
|
|
4497
|
+
draft: false,
|
|
4498
|
+
mergeable: true,
|
|
4499
|
+
head: { ref: 'feature/x', sha: 'sha-1' },
|
|
4500
|
+
base: { ref: 'main' },
|
|
4501
|
+
}),
|
|
4502
|
+
{
|
|
4503
|
+
status: 200,
|
|
4504
|
+
headers: { 'Content-Type': 'application/json' },
|
|
4505
|
+
},
|
|
4506
|
+
),
|
|
4507
|
+
);
|
|
4508
|
+
}
|
|
4509
|
+
if (url.includes('/rules/branches/')) {
|
|
4510
|
+
return Promise.resolve(
|
|
4511
|
+
new Response(JSON.stringify([]), {
|
|
4512
|
+
status: 200,
|
|
4513
|
+
headers: { 'Content-Type': 'application/json' },
|
|
4514
|
+
}),
|
|
4515
|
+
);
|
|
4516
|
+
}
|
|
4517
|
+
if (/\/branches\/[^/?]+$/.test(url)) {
|
|
4518
|
+
return Promise.resolve(
|
|
4519
|
+
new Response(JSON.stringify({}), {
|
|
4520
|
+
status: 200,
|
|
4521
|
+
headers: { 'Content-Type': 'application/json' },
|
|
4522
|
+
}),
|
|
4523
|
+
);
|
|
4524
|
+
}
|
|
4525
|
+
if (url.includes('/check-runs') || url.includes('/check-suites')) {
|
|
4526
|
+
return Promise.resolve(
|
|
4527
|
+
new Response(JSON.stringify({ message: 'Not Found' }), {
|
|
4528
|
+
status: 404,
|
|
4529
|
+
headers: { 'Content-Type': 'application/json' },
|
|
4530
|
+
}),
|
|
4531
|
+
);
|
|
4532
|
+
}
|
|
4533
|
+
return Promise.reject(new Error(`unexpected request: ${url}`));
|
|
4534
|
+
});
|
|
4535
|
+
|
|
4536
|
+
const { repository } = createApiV3CheerioRestIssueRepository();
|
|
4537
|
+
const status = await repository.getOpenPullRequestCiStatus(prUrl);
|
|
4538
|
+
|
|
4539
|
+
expect(status).not.toBeNull();
|
|
4540
|
+
expect(status?.isCiStateSuccess).toBe(false);
|
|
4541
|
+
expect(warnSpy).toHaveBeenCalledWith(
|
|
4542
|
+
expect.stringContaining('check-suites returned 404'),
|
|
4543
|
+
);
|
|
4544
|
+
});
|
|
4332
4545
|
});
|
|
4333
4546
|
|
|
4334
4547
|
const createApiV3CheerioRestIssueRepository = () => {
|
|
@@ -211,6 +211,13 @@ type CheckRunsResponse = {
|
|
|
211
211
|
}>;
|
|
212
212
|
};
|
|
213
213
|
|
|
214
|
+
type CheckSuitesResponse = {
|
|
215
|
+
total_count: number;
|
|
216
|
+
check_suites: Array<{
|
|
217
|
+
id: number;
|
|
218
|
+
}>;
|
|
219
|
+
};
|
|
220
|
+
|
|
214
221
|
type CombinedStatusResponse = {
|
|
215
222
|
statuses: Array<{
|
|
216
223
|
context: string;
|
|
@@ -267,6 +274,11 @@ function isCheckRunsResponse(value: unknown): value is CheckRunsResponse {
|
|
|
267
274
|
return 'check_runs' in value && Array.isArray(value.check_runs);
|
|
268
275
|
}
|
|
269
276
|
|
|
277
|
+
function isCheckSuitesResponse(value: unknown): value is CheckSuitesResponse {
|
|
278
|
+
if (typeof value !== 'object' || value === null) return false;
|
|
279
|
+
return 'check_suites' in value && Array.isArray(value.check_suites);
|
|
280
|
+
}
|
|
281
|
+
|
|
270
282
|
function isCombinedStatusResponse(
|
|
271
283
|
value: unknown,
|
|
272
284
|
): value is CombinedStatusResponse {
|
|
@@ -1314,6 +1326,102 @@ export class ApiV3CheerioRestIssueRepository
|
|
|
1314
1326
|
return names;
|
|
1315
1327
|
};
|
|
1316
1328
|
|
|
1329
|
+
private getCheckRunsViaCheckSuitesFallback = async (
|
|
1330
|
+
owner: string,
|
|
1331
|
+
repo: string,
|
|
1332
|
+
commitSha: string,
|
|
1333
|
+
): Promise<CiContextNode[]> => {
|
|
1334
|
+
const ownerSegment = encodeURIComponent(owner);
|
|
1335
|
+
const repoSegment = encodeURIComponent(repo);
|
|
1336
|
+
const shaSegment = encodeURIComponent(commitSha);
|
|
1337
|
+
|
|
1338
|
+
const checkSuitesResponse = await this.fetchWithRateLimitRetry(() =>
|
|
1339
|
+
fetch(
|
|
1340
|
+
`https://api.github.com/repos/${ownerSegment}/${repoSegment}/commits/${shaSegment}/check-suites`,
|
|
1341
|
+
{
|
|
1342
|
+
method: 'GET',
|
|
1343
|
+
headers: {
|
|
1344
|
+
Authorization: `Bearer ${this.ghToken}`,
|
|
1345
|
+
Accept: 'application/vnd.github+json',
|
|
1346
|
+
},
|
|
1347
|
+
},
|
|
1348
|
+
),
|
|
1349
|
+
);
|
|
1350
|
+
|
|
1351
|
+
if (!checkSuitesResponse.ok) {
|
|
1352
|
+
if (checkSuitesResponse.status === 404) {
|
|
1353
|
+
console.warn(
|
|
1354
|
+
`ApiV3CheerioRestIssueRepository: commits/${commitSha}/check-suites returned 404 for ${owner}/${repo}, treating as no check runs.`,
|
|
1355
|
+
);
|
|
1356
|
+
return [];
|
|
1357
|
+
}
|
|
1358
|
+
const reason =
|
|
1359
|
+
await this.formatGitHubErrorWithStatus(checkSuitesResponse);
|
|
1360
|
+
throw new Error(
|
|
1361
|
+
`Failed to fetch check suites for ${owner}/${repo}@${commitSha}: ${reason}`,
|
|
1362
|
+
);
|
|
1363
|
+
}
|
|
1364
|
+
|
|
1365
|
+
const checkSuitesBody: unknown = await checkSuitesResponse.json();
|
|
1366
|
+
if (!isCheckSuitesResponse(checkSuitesBody)) {
|
|
1367
|
+
throw new Error(
|
|
1368
|
+
`Unexpected response shape when fetching check suites: ${owner}/${repo}@${commitSha}`,
|
|
1369
|
+
);
|
|
1370
|
+
}
|
|
1371
|
+
|
|
1372
|
+
const contexts: CiContextNode[] = [];
|
|
1373
|
+
const perPage = 100;
|
|
1374
|
+
for (const suite of checkSuitesBody.check_suites) {
|
|
1375
|
+
let page = 1;
|
|
1376
|
+
let hasMore = true;
|
|
1377
|
+
while (hasMore) {
|
|
1378
|
+
const runsResponse = await this.fetchWithRateLimitRetry(() =>
|
|
1379
|
+
fetch(
|
|
1380
|
+
`https://api.github.com/repos/${ownerSegment}/${repoSegment}/check-suites/${suite.id}/check-runs?per_page=${perPage}&page=${page}`,
|
|
1381
|
+
{
|
|
1382
|
+
method: 'GET',
|
|
1383
|
+
headers: {
|
|
1384
|
+
Authorization: `Bearer ${this.ghToken}`,
|
|
1385
|
+
Accept: 'application/vnd.github+json',
|
|
1386
|
+
},
|
|
1387
|
+
},
|
|
1388
|
+
),
|
|
1389
|
+
);
|
|
1390
|
+
if (!runsResponse.ok) {
|
|
1391
|
+
const reason = await this.formatGitHubErrorWithStatus(runsResponse);
|
|
1392
|
+
throw new Error(
|
|
1393
|
+
`Failed to fetch check runs for suite ${suite.id} in ${owner}/${repo}: ${reason}`,
|
|
1394
|
+
);
|
|
1395
|
+
}
|
|
1396
|
+
const runsBody: unknown = await runsResponse.json();
|
|
1397
|
+
if (!isCheckRunsResponse(runsBody)) {
|
|
1398
|
+
throw new Error(
|
|
1399
|
+
`Unexpected response shape when fetching check runs for suite ${suite.id}: ${owner}/${repo}@${commitSha}`,
|
|
1400
|
+
);
|
|
1401
|
+
}
|
|
1402
|
+
for (const checkRun of runsBody.check_runs) {
|
|
1403
|
+
contexts.push({
|
|
1404
|
+
__typename: 'CheckRun',
|
|
1405
|
+
name: checkRun.name,
|
|
1406
|
+
conclusion: checkRun.conclusion
|
|
1407
|
+
? checkRun.conclusion.toUpperCase()
|
|
1408
|
+
: null,
|
|
1409
|
+
databaseId: checkRun.id,
|
|
1410
|
+
});
|
|
1411
|
+
}
|
|
1412
|
+
if (
|
|
1413
|
+
runsBody.check_runs.length < perPage ||
|
|
1414
|
+
page * perPage >= runsBody.total_count
|
|
1415
|
+
) {
|
|
1416
|
+
hasMore = false;
|
|
1417
|
+
} else {
|
|
1418
|
+
page += 1;
|
|
1419
|
+
}
|
|
1420
|
+
}
|
|
1421
|
+
}
|
|
1422
|
+
return contexts;
|
|
1423
|
+
};
|
|
1424
|
+
|
|
1317
1425
|
private getCommitCiContexts = async (
|
|
1318
1426
|
owner: string,
|
|
1319
1427
|
repo: string,
|
|
@@ -1327,6 +1435,7 @@ export class ApiV3CheerioRestIssueRepository
|
|
|
1327
1435
|
const perPage = 100;
|
|
1328
1436
|
let page = 1;
|
|
1329
1437
|
let hasMore = true;
|
|
1438
|
+
let usedCheckSuitesFallback = false;
|
|
1330
1439
|
while (hasMore) {
|
|
1331
1440
|
const checkRunsResponse = await this.fetchWithRateLimitRetry(() =>
|
|
1332
1441
|
fetch(
|
|
@@ -1341,6 +1450,17 @@ export class ApiV3CheerioRestIssueRepository
|
|
|
1341
1450
|
),
|
|
1342
1451
|
);
|
|
1343
1452
|
if (!checkRunsResponse.ok) {
|
|
1453
|
+
if (checkRunsResponse.status === 404 && page === 1) {
|
|
1454
|
+
const fallbackContexts =
|
|
1455
|
+
await this.getCheckRunsViaCheckSuitesFallback(
|
|
1456
|
+
owner,
|
|
1457
|
+
repo,
|
|
1458
|
+
commitSha,
|
|
1459
|
+
);
|
|
1460
|
+
contexts.push(...fallbackContexts);
|
|
1461
|
+
usedCheckSuitesFallback = true;
|
|
1462
|
+
break;
|
|
1463
|
+
}
|
|
1344
1464
|
const reason =
|
|
1345
1465
|
await this.formatGitHubErrorWithStatus(checkRunsResponse);
|
|
1346
1466
|
throw new Error(
|
|
@@ -1373,38 +1493,40 @@ export class ApiV3CheerioRestIssueRepository
|
|
|
1373
1493
|
}
|
|
1374
1494
|
}
|
|
1375
1495
|
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1496
|
+
if (!usedCheckSuitesFallback) {
|
|
1497
|
+
const combinedStatusResponse = await this.fetchWithRateLimitRetry(() =>
|
|
1498
|
+
fetch(
|
|
1499
|
+
`https://api.github.com/repos/${ownerSegment}/${repoSegment}/commits/${shaSegment}/status?per_page=100`,
|
|
1500
|
+
{
|
|
1501
|
+
method: 'GET',
|
|
1502
|
+
headers: {
|
|
1503
|
+
Authorization: `Bearer ${this.ghToken}`,
|
|
1504
|
+
Accept: 'application/vnd.github+json',
|
|
1505
|
+
},
|
|
1384
1506
|
},
|
|
1385
|
-
|
|
1386
|
-
),
|
|
1387
|
-
);
|
|
1388
|
-
if (!combinedStatusResponse.ok) {
|
|
1389
|
-
const reason = await this.formatGitHubErrorWithStatus(
|
|
1390
|
-
combinedStatusResponse,
|
|
1391
|
-
);
|
|
1392
|
-
throw new Error(
|
|
1393
|
-
`Failed to fetch combined status for ${owner}/${repo}@${commitSha}: ${reason}`,
|
|
1394
|
-
);
|
|
1395
|
-
}
|
|
1396
|
-
const combinedStatusBody: unknown = await combinedStatusResponse.json();
|
|
1397
|
-
if (!isCombinedStatusResponse(combinedStatusBody)) {
|
|
1398
|
-
throw new Error(
|
|
1399
|
-
`Unexpected response shape when fetching combined status: ${owner}/${repo}@${commitSha}`,
|
|
1507
|
+
),
|
|
1400
1508
|
);
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1509
|
+
if (!combinedStatusResponse.ok) {
|
|
1510
|
+
const reason = await this.formatGitHubErrorWithStatus(
|
|
1511
|
+
combinedStatusResponse,
|
|
1512
|
+
);
|
|
1513
|
+
throw new Error(
|
|
1514
|
+
`Failed to fetch combined status for ${owner}/${repo}@${commitSha}: ${reason}`,
|
|
1515
|
+
);
|
|
1516
|
+
}
|
|
1517
|
+
const combinedStatusBody: unknown = await combinedStatusResponse.json();
|
|
1518
|
+
if (!isCombinedStatusResponse(combinedStatusBody)) {
|
|
1519
|
+
throw new Error(
|
|
1520
|
+
`Unexpected response shape when fetching combined status: ${owner}/${repo}@${commitSha}`,
|
|
1521
|
+
);
|
|
1522
|
+
}
|
|
1523
|
+
for (const status of combinedStatusBody.statuses) {
|
|
1524
|
+
contexts.push({
|
|
1525
|
+
__typename: 'StatusContext',
|
|
1526
|
+
context: status.context,
|
|
1527
|
+
state: status.state.toUpperCase(),
|
|
1528
|
+
});
|
|
1529
|
+
}
|
|
1408
1530
|
}
|
|
1409
1531
|
|
|
1410
1532
|
return contexts;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consoleOperationApi.d.ts","sourceRoot":"","sources":["../../../../src/adapter/entry-points/console/consoleOperationApi.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EAEhB,MAAM,6DAA6D,CAAC;AACrE,OAAO,EAAE,yBAAyB,EAAE,MAAM,uEAAuE,CAAC;AAClH,OAAO,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAU3D,eAAO,MAAM,8BAA8B,uBAAuB,CAAC;AACnE,eAAO,MAAM,4BAA4B,qBAAqB,CAAC;AAC/D,eAAO,MAAM,gBAAgB,UAAU,CAAC;AAExC,MAAM,MAAM,qBAAqB,GAAG;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG,CACnC,MAAM,EAAE,MAAM,KACX,OAAO,CAAC,qBAAqB,GAAG,IAAI,CAAC,CAAC;AAE3C,MAAM,MAAM,sBAAsB,GAAG,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC;AAEjE,MAAM,MAAM,8BAA8B,GAAG,CAC3C,qBAAqB,EAAE,MAAM,KAC1B,eAAe,CAAC;AAErB,MAAM,MAAM,uBAAuB,GAAG;IACpC,sBAAsB,EAAE,8BAA8B,CAAC;IACvD,cAAc,EAAE,sBAAsB,CAAC;IACvC,kBAAkB,EAAE,sBAAsB,CAAC;IAC3C,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,yBAAyB,EAAE,yBAAyB,GAAG,IAAI,CAAC;CAC7D,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG;IACrC,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,OAAO,CAAC;CACf,CAAC;AA8MF,eAAO,MAAM,YAAY,GACvB,SAAS,uBAAuB,EAChC,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAC5B,OAAO,CAAC,wBAAwB,
|
|
1
|
+
{"version":3,"file":"consoleOperationApi.d.ts","sourceRoot":"","sources":["../../../../src/adapter/entry-points/console/consoleOperationApi.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EAEhB,MAAM,6DAA6D,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AAa,GACxB,SAAS,uBAAuB,EAChC,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAC5B,OAAO,CAAC,wBAAwB,CA8BlC,CAAC;AAEF,eAAO,MAAM,sBAAsB,GACjC,SAAS,uBAAuB,EAChC,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAC5B,OAAO,CAAC,wBAAwB,CA2ClC,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAC5B,SAAS,uBAAuB,EAChC,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAC5B,OAAO,CAAC,wBAAwB,CA0DlC,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAC9B,SAAS,uBAAuB,EAChC,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAC5B,OAAO,CAAC,wBAAwB,CA6BlC,CAAC;AAEF,eAAO,MAAM,YAAY,GACvB,SAAS,uBAAuB,EAChC,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAC5B,OAAO,CAAC,wBAAwB,CAiClC,CAAC"}
|
|
@@ -87,6 +87,7 @@ export declare class ApiV3CheerioRestIssueRepository extends BaseGitHubRepositor
|
|
|
87
87
|
private prBodyContainsCrossRepoClosingKeyword;
|
|
88
88
|
private readonly requiredCheckNamesCache;
|
|
89
89
|
private getRequiredCheckNames;
|
|
90
|
+
private getCheckRunsViaCheckSuitesFallback;
|
|
90
91
|
private getCommitCiContexts;
|
|
91
92
|
private fetchSlimPullRequest;
|
|
92
93
|
private buildRelatedPullRequestFromSlim;
|
|
@@ -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,EAClB,uBAAuB,EACvB,YAAY,EACZ,iBAAiB,EAEjB,iBAAiB,EACjB,4BAA4B,EAC5B,+BAA+B,EAChC,MAAM,6DAA6D,CAAC;AACrE,OAAO,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAC3D,OAAO,EAAE,KAAK,EAAE,MAAM,gCAAgC,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D,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;AAO7E,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAG/D,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,+DAA+D,CAAC;AAClG,OAAO,EAAE,cAAc,EAAE,MAAM,4DAA4D,CAAC;AAC5F,OAAO,EACL,KAAK,EAKN,MAAM,wBAAwB,CAAC;AAEhC,eAAO,MAAM,4BAA4B,QAAiB,CAAC;AAC3D,eAAO,MAAM,gCAAgC,QAAgB,CAAC;AAC9D,eAAO,MAAM,4BAA4B,QAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"ApiV3CheerioRestIssueRepository.d.ts","sourceRoot":"","sources":["../../../../src/adapter/repositories/issue/ApiV3CheerioRestIssueRepository.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,kBAAkB,EAClB,uBAAuB,EACvB,YAAY,EACZ,iBAAiB,EAEjB,iBAAiB,EACjB,4BAA4B,EAC5B,+BAA+B,EAChC,MAAM,6DAA6D,CAAC;AACrE,OAAO,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAC3D,OA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