@gitkraken/core-gitlens 0.39.0 → 0.41.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +29 -1
- package/dist/git/models/pullRequest.d.ts +55 -1
- package/dist/git/models/pullRequest.js +5 -1
- package/dist/git/models/pullRequest.js.map +1 -1
- package/dist/git/models/pullRequestActivity.d.ts +55 -0
- package/dist/git/models/pullRequestActivity.js +0 -0
- package/dist/git/utils/pullRequest.utils.js +3 -1
- package/dist/git/utils/pullRequest.utils.js.map +1 -1
- package/dist/git/watching/worktreeSummary.d.ts +1 -0
- package/dist/git/watching/worktreeSummary.js +34 -2
- package/dist/git/watching/worktreeSummary.js.map +1 -1
- package/dist/plus/git-github/api/aliasedQuery.d.ts +19 -0
- package/dist/plus/git-github/api/aliasedQuery.js +21 -0
- package/dist/plus/git-github/api/aliasedQuery.js.map +1 -0
- package/dist/plus/git-github/api/cancellation.d.ts +4 -0
- package/dist/plus/git-github/api/cancellation.js +9 -0
- package/dist/plus/git-github/api/cancellation.js.map +1 -0
- package/dist/plus/git-github/api/checkRunLogs.d.ts +31 -0
- package/dist/plus/git-github/api/checkRunLogs.js +252 -0
- package/dist/plus/git-github/api/checkRunLogs.js.map +1 -0
- package/dist/plus/git-github/api/checkRuns.d.ts +26 -0
- package/dist/plus/git-github/api/checkRuns.js +191 -0
- package/dist/plus/git-github/api/checkRuns.js.map +1 -0
- package/dist/plus/git-github/api/github.d.ts +25 -2
- package/dist/plus/git-github/api/github.js +169 -37
- package/dist/plus/git-github/api/github.js.map +1 -1
- package/dist/plus/git-github/api/issueWrites.d.ts +51 -0
- package/dist/plus/git-github/api/issueWrites.js +192 -0
- package/dist/plus/git-github/api/issueWrites.js.map +1 -0
- package/dist/plus/git-github/api/pullRequestActivity.d.ts +19 -0
- package/dist/plus/git-github/api/pullRequestActivity.js +355 -0
- package/dist/plus/git-github/api/pullRequestActivity.js.map +1 -0
- package/dist/plus/git-github/models.d.ts +100 -4
- package/dist/plus/git-github/models.js +135 -3
- package/dist/plus/git-github/models.js.map +1 -1
- package/dist/plus/integrations/authentication/rejectedTokenTracker.d.ts +7 -8
- package/dist/plus/integrations/authentication/rejectedTokenTracker.js +7 -8
- package/dist/plus/integrations/authentication/rejectedTokenTracker.js.map +1 -1
- package/dist/plus/integrations/fieldPresence.d.ts +10 -5
- package/dist/plus/integrations/fieldPresence.js +46 -25
- package/dist/plus/integrations/fieldPresence.js.map +1 -1
- package/dist/plus/integrations/index.d.ts +6 -2
- package/dist/plus/integrations/index.js.map +1 -1
- package/dist/plus/integrations/integrationService.d.ts +31 -1
- package/dist/plus/integrations/integrationService.js +45 -0
- package/dist/plus/integrations/integrationService.js.map +1 -1
- package/dist/plus/integrations/manager.d.ts +86 -0
- package/dist/plus/integrations/models/gitHostIntegration.d.ts +31 -1
- package/dist/plus/integrations/models/gitHostIntegration.js +68 -0
- package/dist/plus/integrations/models/gitHostIntegration.js.map +1 -1
- package/dist/plus/integrations/models/integration.d.ts +26 -5
- package/dist/plus/integrations/models/integration.js +35 -10
- package/dist/plus/integrations/models/integration.js.map +1 -1
- package/dist/plus/integrations/providers/asana.d.ts +4 -5
- package/dist/plus/integrations/providers/asana.js +53 -12
- package/dist/plus/integrations/providers/asana.js.map +1 -1
- package/dist/plus/integrations/providers/github.d.ts +18 -3
- package/dist/plus/integrations/providers/github.js +90 -5
- package/dist/plus/integrations/providers/github.js.map +1 -1
- package/dist/plus/integrations/providers/linear.js +6 -6
- package/dist/plus/integrations/providers/linear.js.map +1 -1
- package/dist/plus/integrations/providers/models.d.ts +6 -15
- package/dist/plus/integrations/providers/models.js +1 -1
- package/dist/plus/integrations/providers/models.js.map +1 -1
- package/dist/plus/integrations/providers/providersApi.d.ts +1 -6
- package/dist/plus/integrations/providers/providersApi.js.map +1 -1
- package/dist/plus/integrations/reads/etag.js +20 -5
- package/dist/plus/integrations/reads/etag.js.map +1 -1
- package/dist/plus/integrations/reads/pullRequestActivity.d.ts +36 -0
- package/dist/plus/integrations/reads/pullRequestActivity.js +103 -0
- package/dist/plus/integrations/reads/pullRequestActivity.js.map +1 -0
- package/dist/plus/integrations/reads/pullRequestBatch.d.ts +4 -1
- package/dist/plus/integrations/reads/pullRequestBatch.js +5 -2
- package/dist/plus/integrations/reads/pullRequestBatch.js.map +1 -1
- package/dist/plus/integrations/reads/pullRequestBranches.d.ts +2 -0
- package/dist/plus/integrations/reads/pullRequestBranches.js +2 -1
- package/dist/plus/integrations/reads/pullRequestBranches.js.map +1 -1
- package/dist/plus/integrations/reads/pullRequestCheckLogs.d.ts +27 -0
- package/dist/plus/integrations/reads/pullRequestCheckLogs.js +92 -0
- package/dist/plus/integrations/reads/pullRequestCheckLogs.js.map +1 -0
- package/docs/integrations.md +115 -5
- package/package.json +2 -2
|
@@ -2,6 +2,7 @@ import { Event } from "../../utils/event.js";
|
|
|
2
2
|
import { RefSet } from "../../git/models/autolink.js";
|
|
3
3
|
import { IssueSearchCriteria, IssueShape, IssueSorting, IssueStateFilter } from "../../git/models/issue.js";
|
|
4
4
|
import { PullRequestFilter, PullRequestSearchCriteria, PullRequestShape, PullRequestStateFilter } from "../../git/models/pullRequest.js";
|
|
5
|
+
import { GitHubIssueDelete, GitHubIssueWrite, IssueWriteResult } from "../git-github/api/issueWrites.js";
|
|
5
6
|
import { ConfiguredIntegrationDescriptor } from "./authentication/models.js";
|
|
6
7
|
import { IntegrationIds, IssuesCloudHostIntegrationId, IssuesSelfManagedHostIntegrationId } from "./constants.js";
|
|
7
8
|
import { ConfiguredIntegrationsChangeEvent } from "./authentication/configuredIntegrationService.js";
|
|
@@ -12,9 +13,17 @@ import { IssueCountResult, IssueCountScope, PullRequestCountResult, PullRequestC
|
|
|
12
13
|
import { CurrentAccountResult } from "./reads/currentAccount.js";
|
|
13
14
|
import { SupportedFilters } from "./reads/filters.js";
|
|
14
15
|
import { IssueBatchResult, IssueBatchTarget } from "./reads/issueBatch.js";
|
|
16
|
+
import { PullRequestActivityResult, PullRequestActivityTarget } from "./reads/pullRequestActivity.js";
|
|
15
17
|
import { PullRequestBatchResult, PullRequestBatchTarget } from "./reads/pullRequestBatch.js";
|
|
16
18
|
import { PullRequestBranchResult, PullRequestBranchTarget } from "./reads/pullRequestBranches.js";
|
|
19
|
+
import { PullRequestCheckLogResult, PullRequestCheckLogTarget } from "./reads/pullRequestCheckLogs.js";
|
|
17
20
|
//#region ../plus/integrations/src/manager.d.ts
|
|
21
|
+
type IssueWriteConnection = {
|
|
22
|
+
providerId: IntegrationIds;
|
|
23
|
+
connectionId: string;
|
|
24
|
+
};
|
|
25
|
+
export type IssueWriteOptions = IssueWriteConnection & GitHubIssueWrite;
|
|
26
|
+
export type IssueDeleteOptions = IssueWriteConnection & GitHubIssueDelete;
|
|
18
27
|
/** Neutral repository input accepted by repo-scoped provider reads. */
|
|
19
28
|
export interface ProviderRepositoryInput {
|
|
20
29
|
namespace: string;
|
|
@@ -846,6 +855,15 @@ export interface IntegrationManager {
|
|
|
846
855
|
* rate-limit request per row, in the cheap check as well as the full read.
|
|
847
856
|
*/
|
|
848
857
|
mergeQueue?: boolean;
|
|
858
|
+
/**
|
|
859
|
+
* GitHub and GitHub Enterprise: `true` reads each row's head check results (`checkRuns`, `checkRunsTruncated`),
|
|
860
|
+
* in the cheap check and the full read alike. Off by default; every other provider ignores it. Each check's
|
|
861
|
+
* id, kind, name, status and conclusion become etag inputs, hashed into one fixed-length term, and a read that
|
|
862
|
+
* selects them adds a marker to every etag it computes, so changing this reads each held target in full once.
|
|
863
|
+
* `required` is read on GitHub.com only. A head with more than 100 checks costs both reads a request per
|
|
864
|
+
* further 100, up to 500.
|
|
865
|
+
*/
|
|
866
|
+
checkRuns?: boolean;
|
|
849
867
|
}): Promise<ProviderResult<PullRequestBatchResult>>;
|
|
850
868
|
/**
|
|
851
869
|
* Finds, for each branch, every pull request whose head is that branch — in any state (open, closed or merged),
|
|
@@ -898,7 +916,73 @@ export interface IntegrationManager {
|
|
|
898
916
|
* Selecting it costs a rate-limit request per row (a 25-branch chunk 13 points instead of 10 without).
|
|
899
917
|
*/
|
|
900
918
|
mergeQueue?: boolean;
|
|
919
|
+
/**
|
|
920
|
+
* GitHub and GitHub Enterprise: `true` reads each row's head check results (`checkRuns`, `checkRunsTruncated`).
|
|
921
|
+
* Off by default; every other provider ignores it. This read never sets `required`, since the by-name query
|
|
922
|
+
* can't ask for it. A head with more than 100 checks costs a request per further 100, up to 500.
|
|
923
|
+
*/
|
|
924
|
+
checkRuns?: boolean;
|
|
901
925
|
}): Promise<ProviderResult<PullRequestBranchResult>>;
|
|
926
|
+
/**
|
|
927
|
+
* The tail of each check's log, by the opaque `PullRequestCheckRun.id` a batch pull request read returned
|
|
928
|
+
* (`checkRuns: true`). GitHub and GitHub Enterprise only; every other provider refuses (`unsupported` warning +
|
|
929
|
+
* `fetchFailed`).
|
|
930
|
+
*
|
|
931
|
+
* Same result contract as {@link getPullRequestsBatch}, echoed under the caller's own `key`:
|
|
932
|
+
* - `{ key, log }` — the log's last `tailLines` lines. `source` says whether it is an Actions job's log or another
|
|
933
|
+
* check run's output (its title, summary and text). Raw and untrusted: an Actions log keeps its timestamps and
|
|
934
|
+
* `##[group]` markers.
|
|
935
|
+
* - `{ key, unavailable }` — the check has no log to read: `'no-log'` (a commit status, a check run without
|
|
936
|
+
* output, a job that never ran), `'log-not-ready'` (the job is still running), `'log-expired'` (the job finished
|
|
937
|
+
* and its log is gone) or `'log-too-large'` (the host would only serve the whole log, and it is over 20 MiB).
|
|
938
|
+
* - No item for a key, with `fetchFailed` and a warning naming it in `targetKeys` — the read could not check (auth,
|
|
939
|
+
* rate limit, network, an unmappable response).
|
|
940
|
+
*
|
|
941
|
+
* A duplicate key, an id no pull request read returned, an empty owner or repo, or a `tailLines` outside 1..2000
|
|
942
|
+
* refuses the whole call. Targets are read in chunks of 25, up to 6 at once. Request cost: a commit status costs
|
|
943
|
+
* nothing; a chunk's other check runs cost one GraphQL request; an Actions job costs one REST request plus two
|
|
944
|
+
* unauthenticated storage requests downloading at most 256 KiB (a web host streams the whole log instead), at most
|
|
945
|
+
* 4 at a time in a chunk.
|
|
946
|
+
*/
|
|
947
|
+
getPullRequestCheckLogs(options: {
|
|
948
|
+
providerId: IntegrationIds;
|
|
949
|
+
connectionId?: string;
|
|
950
|
+
/** Self-managed host domain fallback; see {@link ProviderSweepTarget.domain}. */
|
|
951
|
+
domain?: string;
|
|
952
|
+
/** Each `key` must be unique — a duplicate refuses the whole call, since keys identify results. */
|
|
953
|
+
targets: readonly PullRequestCheckLogTarget[];
|
|
954
|
+
/** How many lines to keep from the end of each log: an integer from 1 to 2000. Defaults to 200. */
|
|
955
|
+
tailLines?: number;
|
|
956
|
+
}): Promise<ProviderResult<PullRequestCheckLogResult>>;
|
|
957
|
+
/**
|
|
958
|
+
* New reviews, inline review comments and conversation comments on each pull request after the target's
|
|
959
|
+
* `cursor`, in GitHub's timeline order. GitHub and GitHub Enterprise only; every other provider refuses
|
|
960
|
+
* (`unsupported` warning + `fetchFailed`).
|
|
961
|
+
*
|
|
962
|
+
* Same result contract as {@link getPullRequestsBatch}, echoed under the caller's own `key`:
|
|
963
|
+
* - `{ key, items, cursor, hasMore }` — the activity published after the cursor; with no cursor, the newest
|
|
964
|
+
* `limit` items as a baseline (`hasMore` false). Each review is followed by its inline comments. `cursor` is
|
|
965
|
+
* always set; send it back on the next read. `hasMore` means more items already follow; read again with
|
|
966
|
+
* `cursor`.
|
|
967
|
+
* - `{ key, notFound: true, items: [], cursor }` — the pull request or its repository does not exist or is not
|
|
968
|
+
* visible to this connection; `cursor` is the one sent, or `''`.
|
|
969
|
+
* - No item for a key, with `fetchFailed` and a warning naming it in `targetKeys` — the read could not check.
|
|
970
|
+
*
|
|
971
|
+
* Edits are not seen: an item is returned once, when it is published. Pending reviews (the viewer's own drafts)
|
|
972
|
+
* are skipped. A duplicate key, an empty owner or repo, a non-positive `number`, a cursor no read returned, or a
|
|
973
|
+
* `limit` outside 1..100 refuses the whole call. Request cost: one GraphQL request per 25 targets, up to 6 at once,
|
|
974
|
+
* estimated at about 1 point per pull request at the defaults.
|
|
975
|
+
*/
|
|
976
|
+
getPullRequestActivity(options: {
|
|
977
|
+
providerId: IntegrationIds;
|
|
978
|
+
connectionId?: string;
|
|
979
|
+
/** Self-managed host domain fallback; see {@link ProviderSweepTarget.domain}. */
|
|
980
|
+
domain?: string;
|
|
981
|
+
/** Each `key` must be unique — a duplicate refuses the whole call, since keys identify results. */
|
|
982
|
+
targets: readonly PullRequestActivityTarget[];
|
|
983
|
+
/** Timeline items (reviews and conversation comments) per target: an integer from 1 to 100. Defaults to 30. */
|
|
984
|
+
limit?: number;
|
|
985
|
+
}): Promise<ProviderResult<PullRequestActivityResult>>;
|
|
902
986
|
/**
|
|
903
987
|
* How many pull requests match each scope — the PR twin of {@link countIssues}, behind a "this will fetch ~N pull
|
|
904
988
|
* requests" preview and a live count next to an unapplied filter. Same per-scope isolation, `key`-echo, and
|
|
@@ -988,6 +1072,8 @@ export interface IntegrationManager {
|
|
|
988
1072
|
cursor?: string;
|
|
989
1073
|
forceSync?: boolean;
|
|
990
1074
|
}): Promise<ProviderBroadenResult<IssueShape>>;
|
|
1075
|
+
writeIssue(options: IssueWriteOptions): Promise<IssueWriteResult>;
|
|
1076
|
+
deleteIssue(options: IssueDeleteOptions): Promise<IssueWriteResult>;
|
|
991
1077
|
resolveRepository(options: {
|
|
992
1078
|
providerId?: IntegrationIds;
|
|
993
1079
|
remoteUrl: string;
|
|
@@ -2,9 +2,10 @@ import { PagedResult } from "../../../utils/paging.js";
|
|
|
2
2
|
import { ResourceDescriptor } from "../../../git/models/resourceDescriptor.js";
|
|
3
3
|
import { IssueOrPullRequestState } from "../../../git/models/issueOrPullRequest.js";
|
|
4
4
|
import { IssueSearchCriteria, IssueShape } from "../../../git/models/issue.js";
|
|
5
|
-
import { PullRequest, PullRequestFilter, PullRequestMergeMethod, PullRequestMergeQueueActionResult, PullRequestMergeQueueEntry, PullRequestSearchCriteria, PullRequestShape, PullRequestStackInfo, PullRequestStackLayers, PullRequestStateFilter } from "../../../git/models/pullRequest.js";
|
|
5
|
+
import { PullRequest, PullRequestCheckLog, PullRequestFilter, PullRequestMergeMethod, PullRequestMergeQueueActionResult, PullRequestMergeQueueEntry, PullRequestSearchCriteria, PullRequestShape, PullRequestStackInfo, PullRequestStackLayers, PullRequestStateFilter } from "../../../git/models/pullRequest.js";
|
|
6
6
|
import { Account as Account$1, UnidentifiedAuthor } from "../../../git/models/author.js";
|
|
7
7
|
import { DefaultBranch } from "../../../git/models/defaultBranch.js";
|
|
8
|
+
import { PullRequestActivityPage } from "../../../git/models/pullRequestActivity.js";
|
|
8
9
|
import { RepositoryMetadata } from "../../../git/models/repositoryMetadata.js";
|
|
9
10
|
import { PullRequestUrlIdentity } from "../../../git/utils/pullRequest.utils.js";
|
|
10
11
|
import { ProviderAuthenticationSession } from "../authentication/models.js";
|
|
@@ -64,6 +65,17 @@ export type RepositoryCoordinate = {
|
|
|
64
65
|
repo: string;
|
|
65
66
|
project?: string;
|
|
66
67
|
};
|
|
68
|
+
export type PullRequestCheckLogCoordinate = {
|
|
69
|
+
owner: string;
|
|
70
|
+
repo: string;
|
|
71
|
+
checkRunId: string;
|
|
72
|
+
};
|
|
73
|
+
export type PullRequestActivityCoordinate = {
|
|
74
|
+
owner: string;
|
|
75
|
+
repo: string;
|
|
76
|
+
number: number;
|
|
77
|
+
cursor?: string;
|
|
78
|
+
};
|
|
67
79
|
/**
|
|
68
80
|
* Repository scopes as the host settled them ({@link GitHostIntegration.resolveRepositoryScopes}), with the `unsettled`
|
|
69
81
|
* flag of each, in order. A repo-scoped read given these reads them as given rather than settling them again.
|
|
@@ -628,6 +640,7 @@ export declare abstract class GitHostIntegration<ID extends IntegrationIds = Int
|
|
|
628
640
|
username?: string;
|
|
629
641
|
};
|
|
630
642
|
mergeQueue?: boolean;
|
|
643
|
+
checkRuns?: boolean;
|
|
631
644
|
}, cancellation?: AbortSignal, connectionId?: string): Promise<IntegrationResult<BatchSlot<PullRequestShape | undefined>[] | undefined>>;
|
|
632
645
|
/**
|
|
633
646
|
* OPTIONAL: resolves several coordinates, returning one settled slot per input coordinate, in order, in the
|
|
@@ -650,7 +663,20 @@ export declare abstract class GitHostIntegration<ID extends IntegrationIds = Int
|
|
|
650
663
|
username?: string;
|
|
651
664
|
};
|
|
652
665
|
mergeQueue?: boolean;
|
|
666
|
+
checkRuns?: boolean;
|
|
653
667
|
} | undefined, cancellation?: AbortSignal): Promise<PromiseSettledResult<PullRequestShape | undefined>[] | undefined>;
|
|
668
|
+
getPullRequestCheckLogsResult(targets: readonly PullRequestCheckLogCoordinate[], options: {
|
|
669
|
+
tailLines: number;
|
|
670
|
+
}, cancellation?: AbortSignal, connectionId?: string): Promise<IntegrationResult<BatchSlot<PullRequestCheckLog>[] | undefined>>;
|
|
671
|
+
protected getProviderPullRequestCheckLogs?(session: ProviderAuthenticationSession, targets: readonly PullRequestCheckLogCoordinate[], options: {
|
|
672
|
+
tailLines: number;
|
|
673
|
+
}, cancellation?: AbortSignal): Promise<PromiseSettledResult<PullRequestCheckLog>[] | undefined>;
|
|
674
|
+
getPullRequestActivityResult(targets: readonly PullRequestActivityCoordinate[], options: {
|
|
675
|
+
limit: number;
|
|
676
|
+
}, cancellation?: AbortSignal, connectionId?: string): Promise<IntegrationResult<BatchSlot<PullRequestActivityPage | undefined>[] | undefined>>;
|
|
677
|
+
protected getProviderPullRequestActivity?(session: ProviderAuthenticationSession, targets: readonly PullRequestActivityCoordinate[], options: {
|
|
678
|
+
limit: number;
|
|
679
|
+
}, cancellation?: AbortSignal): Promise<PromiseSettledResult<PullRequestActivityPage | undefined>[] | undefined>;
|
|
654
680
|
/**
|
|
655
681
|
* Result-returning wrapper for the cheap check behind the batch issue read's etags: each coordinate's change
|
|
656
682
|
* state ({@link IssueEtagFields}), plus the inputs of each of `options.etagIncludes`, in ONE call to
|
|
@@ -704,6 +730,7 @@ export declare abstract class GitHostIntegration<ID extends IntegrationIds = Int
|
|
|
704
730
|
}[], options: {
|
|
705
731
|
etagIncludes?: readonly PullRequestEtagInclude[];
|
|
706
732
|
mergeQueue?: boolean;
|
|
733
|
+
checkRuns?: boolean;
|
|
707
734
|
}, cancellation?: AbortSignal, connectionId?: string): Promise<IntegrationResult<BatchSlot<PullRequestEtagFields | undefined>[] | undefined>>;
|
|
708
735
|
/**
|
|
709
736
|
* OPTIONAL: the cheap check behind the batch pull request read's etags — one settled slot per input coordinate,
|
|
@@ -720,6 +747,7 @@ export declare abstract class GitHostIntegration<ID extends IntegrationIds = Int
|
|
|
720
747
|
}[], options: {
|
|
721
748
|
etagIncludes?: readonly PullRequestEtagInclude[];
|
|
722
749
|
mergeQueue?: boolean;
|
|
750
|
+
checkRuns?: boolean;
|
|
723
751
|
}, cancellation?: AbortSignal): Promise<PromiseSettledResult<PullRequestEtagFields | undefined>[] | undefined>;
|
|
724
752
|
/**
|
|
725
753
|
* Result-returning wrapper for the pull-requests-by-branch read: for each target, every pull request whose head
|
|
@@ -749,6 +777,7 @@ export declare abstract class GitHostIntegration<ID extends IntegrationIds = Int
|
|
|
749
777
|
};
|
|
750
778
|
limit: number;
|
|
751
779
|
mergeQueue?: boolean;
|
|
780
|
+
checkRuns?: boolean;
|
|
752
781
|
}, cancellation?: AbortSignal, connectionId?: string): Promise<IntegrationResult<BatchSlot<{
|
|
753
782
|
pullRequests: PullRequestShape[];
|
|
754
783
|
truncated: boolean;
|
|
@@ -778,6 +807,7 @@ export declare abstract class GitHostIntegration<ID extends IntegrationIds = Int
|
|
|
778
807
|
};
|
|
779
808
|
limit: number;
|
|
780
809
|
mergeQueue?: boolean;
|
|
810
|
+
checkRuns?: boolean;
|
|
781
811
|
}, cancellation?: AbortSignal): Promise<PromiseSettledResult<{
|
|
782
812
|
pullRequests: PullRequestShape[];
|
|
783
813
|
truncated: boolean;
|
|
@@ -1510,6 +1510,74 @@ var GitHostIntegration = class extends IntegrationBase {
|
|
|
1510
1510
|
};
|
|
1511
1511
|
}
|
|
1512
1512
|
}
|
|
1513
|
+
async getPullRequestCheckLogsResult(targets, options, cancellation, connectionId) {
|
|
1514
|
+
const scope = getScopedLogger();
|
|
1515
|
+
const session = await this.resolveReadSession(connectionId, scope);
|
|
1516
|
+
if (session == null || isReadSessionFailure(session)) return session && { error: session.error };
|
|
1517
|
+
const start = performance.now();
|
|
1518
|
+
let slots;
|
|
1519
|
+
try {
|
|
1520
|
+
slots = await this.getProviderPullRequestCheckLogs?.(session, targets, options, cancellation);
|
|
1521
|
+
if (slots == null) {
|
|
1522
|
+
this.resetRequestExceptionCount("getPullRequestCheckLogs", connectionId);
|
|
1523
|
+
return {
|
|
1524
|
+
value: void 0,
|
|
1525
|
+
duration: performance.now() - start
|
|
1526
|
+
};
|
|
1527
|
+
}
|
|
1528
|
+
const settled = await this.settleBatchRefusals(session, targets, slots);
|
|
1529
|
+
this.resetRequestExceptionCount("getPullRequestCheckLogs", connectionId);
|
|
1530
|
+
this.reportDeferredRequestFailures(settled, false, connectionId);
|
|
1531
|
+
return {
|
|
1532
|
+
value: settled,
|
|
1533
|
+
duration: performance.now() - start
|
|
1534
|
+
};
|
|
1535
|
+
} catch (ex) {
|
|
1536
|
+
const struck = this.handleProviderException("getPullRequestCheckLogs", ex, {
|
|
1537
|
+
scope,
|
|
1538
|
+
connectionId
|
|
1539
|
+
});
|
|
1540
|
+
this.reportDeferredRequestFailures(slots, !struck, connectionId);
|
|
1541
|
+
return {
|
|
1542
|
+
error: toError(ex),
|
|
1543
|
+
duration: performance.now() - start
|
|
1544
|
+
};
|
|
1545
|
+
}
|
|
1546
|
+
}
|
|
1547
|
+
async getPullRequestActivityResult(targets, options, cancellation, connectionId) {
|
|
1548
|
+
const scope = getScopedLogger();
|
|
1549
|
+
const session = await this.resolveReadSession(connectionId, scope);
|
|
1550
|
+
if (session == null || isReadSessionFailure(session)) return session && { error: session.error };
|
|
1551
|
+
const start = performance.now();
|
|
1552
|
+
let slots;
|
|
1553
|
+
try {
|
|
1554
|
+
slots = await this.getProviderPullRequestActivity?.(session, targets, options, cancellation);
|
|
1555
|
+
if (slots == null) {
|
|
1556
|
+
this.resetRequestExceptionCount("getPullRequestActivity", connectionId);
|
|
1557
|
+
return {
|
|
1558
|
+
value: void 0,
|
|
1559
|
+
duration: performance.now() - start
|
|
1560
|
+
};
|
|
1561
|
+
}
|
|
1562
|
+
const settled = await this.settleBatchRefusals(session, targets, slots);
|
|
1563
|
+
this.resetRequestExceptionCount("getPullRequestActivity", connectionId);
|
|
1564
|
+
this.reportDeferredRequestFailures(settled, false, connectionId);
|
|
1565
|
+
return {
|
|
1566
|
+
value: settled,
|
|
1567
|
+
duration: performance.now() - start
|
|
1568
|
+
};
|
|
1569
|
+
} catch (ex) {
|
|
1570
|
+
const struck = this.handleProviderException("getPullRequestActivity", ex, {
|
|
1571
|
+
scope,
|
|
1572
|
+
connectionId
|
|
1573
|
+
});
|
|
1574
|
+
this.reportDeferredRequestFailures(slots, !struck, connectionId);
|
|
1575
|
+
return {
|
|
1576
|
+
error: toError(ex),
|
|
1577
|
+
duration: performance.now() - start
|
|
1578
|
+
};
|
|
1579
|
+
}
|
|
1580
|
+
}
|
|
1513
1581
|
/**
|
|
1514
1582
|
* Result-returning wrapper for the cheap check behind the batch issue read's etags: each coordinate's change
|
|
1515
1583
|
* state ({@link IssueEtagFields}), plus the inputs of each of `options.etagIncludes`, in ONE call to
|