@gitkraken/core-gitlens 0.4.100 → 0.4.101
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 +4 -1
- package/dist/plus/integrations/errors.d.ts.map +1 -1
- package/dist/plus/integrations/errors.js +6 -2
- package/dist/plus/integrations/errors.js.map +1 -1
- package/dist/plus/integrations/integrationService.d.ts +8 -5
- package/dist/plus/integrations/integrationService.d.ts.map +1 -1
- package/dist/plus/integrations/integrationService.js +20 -652
- package/dist/plus/integrations/integrationService.js.map +1 -1
- package/dist/plus/integrations/models/gitHostIntegration.d.ts +10 -17
- package/dist/plus/integrations/models/gitHostIntegration.d.ts.map +1 -1
- package/dist/plus/integrations/models/gitHostIntegration.js +38 -88
- package/dist/plus/integrations/models/gitHostIntegration.js.map +1 -1
- package/dist/plus/integrations/models/issuesIntegration.d.ts +4 -21
- package/dist/plus/integrations/models/issuesIntegration.d.ts.map +1 -1
- package/dist/plus/integrations/models/issuesIntegration.js +5 -47
- package/dist/plus/integrations/models/issuesIntegration.js.map +1 -1
- package/dist/plus/integrations/providers/azureDevOps.js.map +1 -1
- package/dist/plus/integrations/reads/broaden.d.ts +20 -0
- package/dist/plus/integrations/reads/broaden.d.ts.map +1 -0
- package/dist/plus/integrations/reads/broaden.js +326 -0
- package/dist/plus/integrations/reads/broaden.js.map +1 -0
- package/dist/plus/integrations/reads/context.d.ts +22 -0
- package/dist/plus/integrations/reads/context.d.ts.map +1 -1
- package/dist/plus/integrations/reads/hierarchy.d.ts +1 -1
- package/dist/plus/integrations/reads/hierarchy.d.ts.map +1 -1
- package/dist/plus/integrations/reads/hierarchy.js +109 -137
- package/dist/plus/integrations/reads/hierarchy.js.map +1 -1
- package/dist/plus/integrations/reads/hierarchy.utils.d.ts +25 -1
- package/dist/plus/integrations/reads/hierarchy.utils.d.ts.map +1 -1
- package/dist/plus/integrations/reads/hierarchy.utils.js +43 -0
- package/dist/plus/integrations/reads/hierarchy.utils.js.map +1 -1
- package/dist/plus/integrations/reads/issueTracker.d.ts +1 -1
- package/dist/plus/integrations/reads/issueTracker.d.ts.map +1 -1
- package/dist/plus/integrations/reads/issueTracker.js +13 -25
- package/dist/plus/integrations/reads/issueTracker.js.map +1 -1
- package/dist/plus/integrations/reads/issues.d.ts +2 -2
- package/dist/plus/integrations/reads/issues.d.ts.map +1 -1
- package/dist/plus/integrations/reads/issues.js.map +1 -1
- package/dist/plus/integrations/reads/pullRequests.d.ts +1 -1
- package/dist/plus/integrations/reads/pullRequests.d.ts.map +1 -1
- package/dist/plus/integrations/reads/pullRequests.js +1 -1
- package/dist/plus/integrations/reads/pullRequests.js.map +1 -1
- package/dist/plus/integrations/reads/resolveRepository.d.ts +25 -0
- package/dist/plus/integrations/reads/resolveRepository.d.ts.map +1 -0
- package/dist/plus/integrations/reads/resolveRepository.js +235 -0
- package/dist/plus/integrations/reads/resolveRepository.js.map +1 -0
- package/dist/plus/integrations/reads/sweeps.d.ts +11 -0
- package/dist/plus/integrations/reads/sweeps.d.ts.map +1 -0
- package/dist/plus/integrations/reads/sweeps.js +125 -0
- package/dist/plus/integrations/reads/sweeps.js.map +1 -0
- package/package.json +1 -1
- package/src/plus/integrations/errors.ts +6 -2
- package/src/plus/integrations/integrationService.ts +27 -801
- package/src/plus/integrations/models/gitHostIntegration.ts +71 -93
- package/src/plus/integrations/models/issuesIntegration.ts +5 -52
- package/src/plus/integrations/providers/azureDevOps.ts +1 -1
- package/src/plus/integrations/reads/broaden.ts +452 -0
- package/src/plus/integrations/reads/context.ts +24 -0
- package/src/plus/integrations/reads/hierarchy.ts +133 -153
- package/src/plus/integrations/reads/hierarchy.utils.ts +50 -1
- package/src/plus/integrations/reads/issueTracker.ts +15 -27
- package/src/plus/integrations/reads/issues.ts +4 -2
- package/src/plus/integrations/reads/pullRequests.ts +2 -9
- package/src/plus/integrations/reads/resolveRepository.ts +272 -0
- package/src/plus/integrations/reads/sweeps.ts +185 -0
|
@@ -6,7 +6,7 @@ import { toProviderRepositoryShape } from '../providers/models.js';
|
|
|
6
6
|
import { appendDedupedWarning } from '../results.js';
|
|
7
7
|
import { isGitHostIntegration, isIssuesHostIntegrationId, warnOnMissingSessionForDomain, } from '../utils/integration.utils.js';
|
|
8
8
|
import { runCaptured } from './drains.js';
|
|
9
|
-
import { assertHierarchyReadTarget, orgForProject, resourceMatchesOrg, resourceToOrg, withProviderContext, } from './hierarchy.utils.js';
|
|
9
|
+
import { assertHierarchyReadTarget, mergeHierarchyResults, orgForProject, resourceMatchesOrg, resourceToOrg, withProviderContext, } from './hierarchy.utils.js';
|
|
10
10
|
import { pageToCursor, refusedPage, resolveContinuation, resolveCurrentPage, toProviderPageInfo } from './paging.js';
|
|
11
11
|
import { gitHostOnlySurfaceWarning, otherWarning } from './warnings.js';
|
|
12
12
|
export async function listOrgs(ctx, options) {
|
|
@@ -78,24 +78,7 @@ export async function listOrgs(ctx, options) {
|
|
|
78
78
|
}
|
|
79
79
|
return { items: items, warnings: warnings, fetchFailed: fetchFailed };
|
|
80
80
|
});
|
|
81
|
-
|
|
82
|
-
const warnings = [];
|
|
83
|
-
let fetchFailed = false;
|
|
84
|
-
for (const result of results) {
|
|
85
|
-
if (result == null) {
|
|
86
|
-
continue;
|
|
87
|
-
}
|
|
88
|
-
items.push(...result.items);
|
|
89
|
-
// Dedupe across the multi-provider fan-out (matches listProjects): a warning that repeats verbatim
|
|
90
|
-
// across scopes — e.g. the same account surfaced under two ids — shouldn't be reported twice.
|
|
91
|
-
for (const w of result.warnings) {
|
|
92
|
-
appendDedupedWarning(warnings, w);
|
|
93
|
-
}
|
|
94
|
-
if (result.fetchFailed) {
|
|
95
|
-
fetchFailed = true;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
return { items: items, warnings: warnings, fetchFailed: fetchFailed || undefined };
|
|
81
|
+
return mergeHierarchyResults(results);
|
|
99
82
|
}
|
|
100
83
|
export async function listProjects(ctx, options) {
|
|
101
84
|
assertHierarchyReadTarget('listProjects', options);
|
|
@@ -185,22 +168,7 @@ export async function listProjects(ctx, options) {
|
|
|
185
168
|
}
|
|
186
169
|
return { items: items, warnings: warnings, fetchFailed: fetchFailed };
|
|
187
170
|
});
|
|
188
|
-
|
|
189
|
-
const warnings = [];
|
|
190
|
-
let fetchFailed = false;
|
|
191
|
-
for (const result of results) {
|
|
192
|
-
if (result == null) {
|
|
193
|
-
continue;
|
|
194
|
-
}
|
|
195
|
-
items.push(...result.items);
|
|
196
|
-
for (const w of result.warnings) {
|
|
197
|
-
appendDedupedWarning(warnings, w);
|
|
198
|
-
}
|
|
199
|
-
if (result.fetchFailed) {
|
|
200
|
-
fetchFailed = true;
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
return { items: items, warnings: warnings, fetchFailed: fetchFailed || undefined };
|
|
171
|
+
return mergeHierarchyResults(results);
|
|
204
172
|
}
|
|
205
173
|
export async function listRepos(ctx, options) {
|
|
206
174
|
const page = Math.max(1, options.page ?? 1);
|
|
@@ -234,114 +202,118 @@ export async function listRepos(ctx, options) {
|
|
|
234
202
|
], true);
|
|
235
203
|
}
|
|
236
204
|
const org = options.org;
|
|
237
|
-
const
|
|
238
|
-
const
|
|
239
|
-
? integration.getRepositoriesForUserResult({
|
|
240
|
-
cursor: cursor,
|
|
241
|
-
connectionId: options.connectionId,
|
|
242
|
-
})
|
|
205
|
+
const warnOnMissingSession = warnOnMissingSessionForDomain(options.providerId, options.domain);
|
|
206
|
+
const readPage = (cursor) => runCaptured(options.providerId, domain, options.connectionId, () => org == null
|
|
207
|
+
? integration.getRepositoriesForUserResult({ cursor: cursor, connectionId: options.connectionId })
|
|
243
208
|
: integration.getRepositoriesForOrgResult(org, {
|
|
244
209
|
project: options.project,
|
|
245
210
|
cursor: cursor,
|
|
246
211
|
connectionId: options.connectionId,
|
|
247
|
-
}), { warnOnMissingSession:
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
const
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
//
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
212
|
+
}), { warnOnMissingSession: warnOnMissingSession });
|
|
213
|
+
/**
|
|
214
|
+
* Builds one page's result from what the provider returned. Shared by the initial read and by every round of
|
|
215
|
+
* the cursor walk below, so a walked page N is described by exactly the same rules as a directly-requested one
|
|
216
|
+
* (position, continuation, truncation) rather than by a second copy of them.
|
|
217
|
+
*/
|
|
218
|
+
const toResult = ({ value, warning }, requestedPage, suppliedCursor) => {
|
|
219
|
+
const items = value?.values ?? [];
|
|
220
|
+
const warnings = warning != null ? [warning] : [];
|
|
221
|
+
// The repos read core is cursor-only and can't accept a page size, so don't echo the requested
|
|
222
|
+
// `itemsPerPage` as if it were applied — report what the provider returned (its own pageSize when
|
|
223
|
+
// available, else the actual item count).
|
|
224
|
+
const paged = toProviderPageInfo(items.length, value?.paging);
|
|
225
|
+
// Convert the SDK collection metadata into scope-aware warnings + failure/truncation flags, appending
|
|
226
|
+
// them to any captured thrown-error warning without discarding the partial result's items.
|
|
227
|
+
const assessment = mergeAssessmentInto(warnings, options.providerId, domain, options.connectionId, value?.metadata);
|
|
228
|
+
// Whether this read honors a page NUMBER, decided from what the provider actually reported rather than
|
|
229
|
+
// guessed from the absence of a cursor. A numbered-page repos host reports its position (`paging.page`)
|
|
230
|
+
// and/or its successor (`paging.nextPage`) — Bitbucket's workspace walk consumes `page` as a real 1-based
|
|
231
|
+
// page and reports `nextPage` without echoing `currentPage`, so both signals have to count. Every wired
|
|
232
|
+
// cursor-based repos read (GitHub's org/user walks, GitLab's user walk, Bitbucket's cursor read) reports
|
|
233
|
+
// neither. Keying off `paged.cursor == null` instead read the paging layer's "reported another page,
|
|
234
|
+
// handed back no continuation" sentinel as evidence of a numbered host, which is exactly backwards.
|
|
235
|
+
const pageAdvanceable = value?.paging?.page != null || value?.paging?.nextPage != null;
|
|
236
|
+
// Numbered-page hosts that don't echo `currentPage` may still be advanced by the requested `page` (initial
|
|
237
|
+
// read) or by the cursor the caller threaded back. A cursor-only host ignores an UNTHREADED `page`
|
|
238
|
+
// request, so its page-less first page is page 1.
|
|
239
|
+
const currentPage = resolveCurrentPage({
|
|
240
|
+
providerPage: paged.page.currentPage,
|
|
241
|
+
requestedPage: requestedPage,
|
|
242
|
+
suppliedCursor: suppliedCursor,
|
|
243
|
+
pageAdvanceable: pageAdvanceable,
|
|
244
|
+
});
|
|
245
|
+
// Never advertise `hasMore` without a continuation the caller can act on — the same contract
|
|
246
|
+
// `listPullRequestsPage`, `listIssuesPage` and `broadenIssues` hold, via the same helper. A provider that
|
|
247
|
+
// reports another page but hands back neither `endCursor` nor `nextPage` (surfaced as the `'{}'` sentinel,
|
|
248
|
+
// which `toProviderPageInfo` drops) is terminal-but-incomplete: `hasMore: false` + `page.truncated`.
|
|
249
|
+
// Synthesizing a page-number cursor for a cursor-only host instead — which is what this read used to do
|
|
250
|
+
// unconditionally — handed back a continuation the provider ignores, so it answered with its FIRST page
|
|
251
|
+
// again while still reporting `hasMore: true`. A consumer draining until `hasMore` clears (Kepler's repo
|
|
252
|
+
// drain does exactly that) then looped to its own page cap, accumulating a duplicate copy of every repo
|
|
253
|
+
// per round, and never saw a truncation signal.
|
|
254
|
+
const continuation = resolveContinuation(paged, pageAdvanceable ? currentPage + 1 : undefined);
|
|
255
|
+
// The org-hierarchy read can also stop at a defensive backstop with more repos unlisted and no cursor to
|
|
256
|
+
// resume (top-level `truncated`, or `paging.truncated` on a single-page read). Metadata incompleteness and
|
|
257
|
+
// a demoted continuation are two further, independent sources of the same signal.
|
|
258
|
+
const truncated = (value?.truncated ?? false) ||
|
|
259
|
+
(value?.paging?.truncated ?? false) ||
|
|
260
|
+
assessment.truncated ||
|
|
261
|
+
continuation.truncated;
|
|
262
|
+
return {
|
|
263
|
+
// Normalize the raw provider-apis repos to the GitLens-owned shape at the surface boundary.
|
|
264
|
+
items: items.map(toProviderRepositoryShape),
|
|
265
|
+
warnings: warnings,
|
|
266
|
+
page: { ...paged.page, currentPage: currentPage, truncated: truncated || undefined },
|
|
267
|
+
hasMore: continuation.hasMore,
|
|
268
|
+
cursor: continuation.cursor,
|
|
269
|
+
fetchFailed: assessment.fetchFailed || (warning != null && value == null) || undefined,
|
|
270
|
+
};
|
|
299
271
|
};
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
//
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
page: currentPage,
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
}
|
|
343
|
-
previous = requested;
|
|
272
|
+
const first = await readPage(options.cursor ?? pageToCursor(page));
|
|
273
|
+
const result = toResult(first, page, options.cursor);
|
|
274
|
+
// A numbered-page host honored the synthesized cursor, so this IS page N; a cursor-only host ignored it and
|
|
275
|
+
// answered with page 1, which the walk below advances. Decided from the provider's own paging metadata rather
|
|
276
|
+
// than assumed, hence after the read.
|
|
277
|
+
const pageAdvanceable = first.value?.paging?.page != null || first.value?.paging?.nextPage != null;
|
|
278
|
+
if (options.cursor != null || page === 1 || pageAdvanceable)
|
|
279
|
+
return result;
|
|
280
|
+
// Walk the provider's real continuations to the requested page. Only the last page's items are kept — pages
|
|
281
|
+
// 1..N returned as "page N" would duplicate items for a normal paged consumer — while warnings, truncation,
|
|
282
|
+
// and failure accumulate across the whole walked prefix, since an earlier round's problem still means this
|
|
283
|
+
// result isn't authoritative. The provider read is re-issued per round, but the integration is resolved once:
|
|
284
|
+
// re-entering this function per page would repeat its auth resolution N times for page N.
|
|
285
|
+
const walkedWarnings = [...result.warnings];
|
|
286
|
+
let walkedFetchFailed = result.fetchFailed === true;
|
|
287
|
+
let walkedTruncated = result.page.truncated === true;
|
|
288
|
+
let previous = result;
|
|
289
|
+
for (let currentPage = 2; currentPage <= page; currentPage++) {
|
|
290
|
+
if (!previous.hasMore || previous.cursor == null) {
|
|
291
|
+
// The requested page lies past the provider's terminal cursor: an EMPTY page N, never the last
|
|
292
|
+
// available page relabeled (see ProviderPageInfo.currentPage).
|
|
293
|
+
return {
|
|
294
|
+
items: [],
|
|
295
|
+
warnings: walkedWarnings,
|
|
296
|
+
page: { currentPage: page, itemsPerPage: 0, truncated: walkedTruncated || undefined },
|
|
297
|
+
hasMore: false,
|
|
298
|
+
fetchFailed: walkedFetchFailed || undefined,
|
|
299
|
+
};
|
|
300
|
+
}
|
|
301
|
+
const suppliedCursor = previous.cursor;
|
|
302
|
+
const requested = toResult(await readPage(suppliedCursor), currentPage, suppliedCursor);
|
|
303
|
+
for (const warning of requested.warnings) {
|
|
304
|
+
appendDedupedWarning(walkedWarnings, warning);
|
|
305
|
+
}
|
|
306
|
+
walkedFetchFailed ||= requested.fetchFailed === true;
|
|
307
|
+
walkedTruncated ||= requested.page.truncated === true;
|
|
308
|
+
if (currentPage === page) {
|
|
309
|
+
return {
|
|
310
|
+
...requested,
|
|
311
|
+
warnings: walkedWarnings,
|
|
312
|
+
page: { ...requested.page, truncated: walkedTruncated || undefined },
|
|
313
|
+
fetchFailed: walkedFetchFailed || undefined,
|
|
314
|
+
};
|
|
344
315
|
}
|
|
316
|
+
previous = requested;
|
|
345
317
|
}
|
|
346
318
|
return result;
|
|
347
319
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hierarchy.js","sourceRoot":"","sources":["../../../../src/plus/integrations/reads/hierarchy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EACN,yBAAyB,EACzB,+BAA+B,EAE/B,yBAAyB,EACzB,mCAAmC,EACnC,yCAAyC,GACzC,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AAQnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EACN,oBAAoB,EACpB,yBAAyB,EACzB,6BAA6B,GAC7B,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EACN,yBAAyB,EACzB,aAAa,EACb,kBAAkB,EAClB,aAAa,EACb,mBAAmB,GACnB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACrH,OAAO,EAAE,yBAAyB,EAAE,YAAY,EAAE,MAAM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models/resourceDescriptor.js';
|
|
2
2
|
import type { IntegrationIds } from '../constants.js';
|
|
3
|
-
import type { ProviderOrganization } from '../results.js';
|
|
3
|
+
import type { ProviderOrganization, ProviderResult, ProviderWarning } from '../results.js';
|
|
4
4
|
/**
|
|
5
5
|
* Mapping of a provider's own hierarchy vocabulary onto the single {@link ProviderOrganization} shape the facade
|
|
6
6
|
* publishes.
|
|
@@ -19,6 +19,18 @@ import type { ProviderOrganization } from '../results.js';
|
|
|
19
19
|
export declare function resourceLabel(resource: ResourceDescriptor): string;
|
|
20
20
|
/** Whether `org` addresses this resource by any of the identifiers a caller could reasonably have. */
|
|
21
21
|
export declare function resourceMatchesOrg(resource: ResourceDescriptor, org: string): boolean;
|
|
22
|
+
/**
|
|
23
|
+
* The id of the RESOURCE a project belongs to, used to look up which account (and therefore which user) that
|
|
24
|
+
* project's issues should be scoped to. Falls back through the project's own identifiers because some providers
|
|
25
|
+
* (and test doubles) return project descriptors without naming their parent.
|
|
26
|
+
*/
|
|
27
|
+
export declare function resourceIdForProject(project: ResourceDescriptor): string | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* A stable identity for one project across facade pages, for the retry/completed bookkeeping an issue-tracker
|
|
30
|
+
* cursor carries. All three identifiers are included rather than one preferred value: two trackers can reuse the
|
|
31
|
+
* same project id, so keying on a single field would collapse them into one entry.
|
|
32
|
+
*/
|
|
33
|
+
export declare function projectKey(project: ResourceDescriptor): string;
|
|
22
34
|
/**
|
|
23
35
|
* Maps an issue-tracker resource descriptor to the unified {@link ProviderOrganization} org shape. `url` is
|
|
24
36
|
* synthesized when the descriptor carries none, rather than widening the shared `ProviderOrganization.url` to
|
|
@@ -39,6 +51,18 @@ export declare function orgForProject(providerId: IntegrationIds, project: Resou
|
|
|
39
51
|
* client serves several — so the fan-out attributes it here.
|
|
40
52
|
*/
|
|
41
53
|
export declare function withProviderContext(providerId: IntegrationIds, item: ProviderOrganization): ProviderOrganization;
|
|
54
|
+
/**
|
|
55
|
+
* Merges the per-provider slices of a hierarchy fan-out into one flat result.
|
|
56
|
+
*
|
|
57
|
+
* `ProviderResult` has no page object, so `fetchFailed` is its only non-authoritative signal — any slice that
|
|
58
|
+
* failed or came back incomplete has to set it, or a caller would treat a short list as the whole account.
|
|
59
|
+
* Warnings are deduped because the same account can surface under two ids in one fan-out.
|
|
60
|
+
*/
|
|
61
|
+
export declare function mergeHierarchyResults<T>(results: readonly ({
|
|
62
|
+
items: T[];
|
|
63
|
+
warnings: ProviderWarning[];
|
|
64
|
+
fetchFailed: boolean;
|
|
65
|
+
} | undefined)[]): ProviderResult<T>;
|
|
42
66
|
/**
|
|
43
67
|
* Rejects a hierarchy read whose scoped selectors have no provider to apply to. `connectionId` and `domain`
|
|
44
68
|
* both select among the connections OF a provider, so either one without `providerId` is ambiguous rather than
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hierarchy.utils.d.ts","sourceRoot":"","sources":["../../../../src/plus/integrations/reads/hierarchy.utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAA2B,kBAAkB,EAAE,MAAM,2CAA2C,CAAC;AAE7G,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"hierarchy.utils.d.ts","sourceRoot":"","sources":["../../../../src/plus/integrations/reads/hierarchy.utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAA2B,kBAAkB,EAAE,MAAM,2CAA2C,CAAC;AAE7G,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,KAAK,EAAE,oBAAoB,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAG3F;;;;;;;;;;;;;GAaG;AAEH,oGAAoG;AACpG,wBAAgB,aAAa,CAAC,QAAQ,EAAE,kBAAkB,GAAG,MAAM,CAGlE;AAED,sGAAsG;AACtG,w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|
+
import { appendDedupedWarning } from '../results.js';
|
|
2
3
|
/**
|
|
3
4
|
* Mapping of a provider's own hierarchy vocabulary onto the single {@link ProviderOrganization} shape the facade
|
|
4
5
|
* publishes.
|
|
@@ -23,6 +24,24 @@ export function resourceMatchesOrg(resource, org) {
|
|
|
23
24
|
const typed = resource;
|
|
24
25
|
return resource.key === org || typed.id === org || typed.name === org;
|
|
25
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
* The id of the RESOURCE a project belongs to, used to look up which account (and therefore which user) that
|
|
29
|
+
* project's issues should be scoped to. Falls back through the project's own identifiers because some providers
|
|
30
|
+
* (and test doubles) return project descriptors without naming their parent.
|
|
31
|
+
*/
|
|
32
|
+
export function resourceIdForProject(project) {
|
|
33
|
+
const typed = project;
|
|
34
|
+
return typed.resourceId ?? typed.id ?? project.key;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* A stable identity for one project across facade pages, for the retry/completed bookkeeping an issue-tracker
|
|
38
|
+
* cursor carries. All three identifiers are included rather than one preferred value: two trackers can reuse the
|
|
39
|
+
* same project id, so keying on a single field would collapse them into one entry.
|
|
40
|
+
*/
|
|
41
|
+
export function projectKey(project) {
|
|
42
|
+
const typed = project;
|
|
43
|
+
return JSON.stringify([typed.resourceId ?? '', typed.id ?? '', project.key]);
|
|
44
|
+
}
|
|
26
45
|
/**
|
|
27
46
|
* Maps an issue-tracker resource descriptor to the unified {@link ProviderOrganization} org shape. `url` is
|
|
28
47
|
* synthesized when the descriptor carries none, rather than widening the shared `ProviderOrganization.url` to
|
|
@@ -71,6 +90,30 @@ export function withProviderContext(providerId, item) {
|
|
|
71
90
|
...(item.org != null ? { org: item.org } : {}),
|
|
72
91
|
};
|
|
73
92
|
}
|
|
93
|
+
/**
|
|
94
|
+
* Merges the per-provider slices of a hierarchy fan-out into one flat result.
|
|
95
|
+
*
|
|
96
|
+
* `ProviderResult` has no page object, so `fetchFailed` is its only non-authoritative signal — any slice that
|
|
97
|
+
* failed or came back incomplete has to set it, or a caller would treat a short list as the whole account.
|
|
98
|
+
* Warnings are deduped because the same account can surface under two ids in one fan-out.
|
|
99
|
+
*/
|
|
100
|
+
export function mergeHierarchyResults(results) {
|
|
101
|
+
const items = [];
|
|
102
|
+
const warnings = [];
|
|
103
|
+
let fetchFailed = false;
|
|
104
|
+
for (const result of results) {
|
|
105
|
+
if (result == null)
|
|
106
|
+
continue;
|
|
107
|
+
items.push(...result.items);
|
|
108
|
+
for (const warning of result.warnings) {
|
|
109
|
+
appendDedupedWarning(warnings, warning);
|
|
110
|
+
}
|
|
111
|
+
if (result.fetchFailed) {
|
|
112
|
+
fetchFailed = true;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
return { items: items, warnings: warnings, fetchFailed: fetchFailed || undefined };
|
|
116
|
+
}
|
|
74
117
|
/**
|
|
75
118
|
* Rejects a hierarchy read whose scoped selectors have no provider to apply to. `connectionId` and `domain`
|
|
76
119
|
* both select among the connections OF a provider, so either one without `providerId` is ambiguous rather than
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hierarchy.utils.js","sourceRoot":"","sources":["../../../../src/plus/integrations/reads/hierarchy.utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,4BAA4B,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"hierarchy.utils.js","sourceRoot":"","sources":["../../../../src/plus/integrations/reads/hierarchy.utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,4BAA4B,EAAE,MAAM,iBAAiB,CAAC;AAG/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAErD;;;;;;;;;;;;;GAaG;AAEH,oGAAoG;AACpG,MAAM,UAAU,aAAa,CAAC,QAA4B;IACzD,MAAM,KAAK,GAAG,QAAmC,CAAC;IAClD,OAAO,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,EAAE,IAAI,QAAQ,CAAC,GAAG,CAAC;AAC/C,CAAC;AAED,sGAAsG;A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S;QAE7B,KAAK,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;QAC5B,KAAK,MAAM,OAAO,IAAI,MAAM,CAAC,QAAQ,EAAE,CAAC;YACvC,oBAAoB,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;QACzC,CAAC;QACD,IAAI,MAAM,CAAC,WAAW,EAAE,CAAC;YACxB,WAAW,GAAG,IAAI,CAAC;QACpB,CAAC;IACF,CAAC;IAED,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAE,WAAW,IAAI,SAAS,EAAE,CAAC;AACpF,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,yBAAyB,CACxC,MAAmC,EACnC,OAA4F;IAE5F,IAAI,OAAO,EAAE,UAAU,IAAI,IAAI,IAAI,CAAC,OAAO,EAAE,YAAY,IAAI,IAAI,IAAI,OAAO,EAAE,MAAM,IAAI,IAAI,CAAC,EAAE,CAAC;QAC/F,MAAM,IAAI,SAAS,CAAC,IAAI,MAAM,qEAAqE,CAAC,CAAC;IACtG,CAAC;AACF,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { IssueShape } from '../../../git/models/issue.js';
|
|
2
|
-
import {
|
|
2
|
+
import type { IntegrationIds } from '../constants.js';
|
|
3
3
|
import { IssueFilter } from '../providers/models.js';
|
|
4
4
|
import type { ProviderPagedResult } from '../results.js';
|
|
5
5
|
import type { ProviderReadContext } from './context.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"issueTracker.d.ts","sourceRoot":"","sources":["../../../../src/plus/integrations/reads/issueTracker.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAI/D,OAAO,
|
|
1
|
+
{"version":3,"file":"issueTracker.d.ts","sourceRoot":"","sources":["../../../../src/plus/integrations/reads/issueTracker.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAI/D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAGtD,OAAO,EAAE,WAAW,EAAqB,MAAM,wBAAwB,CAAC;AAExE,OAAO,KAAK,EAAE,mBAAmB,EAAmB,MAAM,eAAe,CAAC;AAE1E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAMxD,wBAAsB,0BAA0B,CAC/C,GAAG,EAAE,mBAAmB,EACxB,OAAO,EAAE;IACR,UAAU,EAAE,cAAc,CAAC;IAC3B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,WAAW,EAAE,CAAC;IACxB,wFAAwF;IACxF,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;CACtB,GACC,OAAO,CAAC,mBAAmB,CAAC,UAAU,CAAC,CAAC,CAkb1C"}
|
|
@@ -7,7 +7,7 @@ import { mergeCollectionMetadata, parsePageCursor } from '../providers/utils/pro
|
|
|
7
7
|
import { isIssuesHostIntegrationId } from '../utils/integration.utils.js';
|
|
8
8
|
import { parseIssueTrackerPageCursor, toIssueTrackerPageCursor } from './cursors.js';
|
|
9
9
|
import { runCaptured } from './drains.js';
|
|
10
|
-
import { resourceMatchesOrg } from './hierarchy.utils.js';
|
|
10
|
+
import { projectKey, resourceIdForProject, resourceLabel, resourceMatchesOrg } from './hierarchy.utils.js';
|
|
11
11
|
import { issueTrackerOnlySurfaceWarning, otherWarning } from './warnings.js';
|
|
12
12
|
export async function listIssueTrackerIssuesPage(ctx, options) {
|
|
13
13
|
// Pagination is opt-in: only window the projects when the caller actually asked to page. A caller that
|
|
@@ -127,18 +127,6 @@ export async function listIssueTrackerIssuesPage(ctx, options) {
|
|
|
127
127
|
warnings.push(otherWarning(options.providerId, domain, options.connectionId, `\`includeAllAssignees\` cannot be combined with an author/mention filter for '${options.providerId}' (those filters require a user scope).`));
|
|
128
128
|
return emptyPage(true);
|
|
129
129
|
}
|
|
130
|
-
const resourceIdForProject = (project) => {
|
|
131
|
-
const issueProject = project;
|
|
132
|
-
return issueProject.resourceId ?? issueProject.id ?? issueProject.key;
|
|
133
|
-
};
|
|
134
|
-
const retryKeyForProject = (project) => {
|
|
135
|
-
const issueProject = project;
|
|
136
|
-
return JSON.stringify([issueProject.resourceId ?? '', issueProject.id ?? '', issueProject.key]);
|
|
137
|
-
};
|
|
138
|
-
const labelForResource = (resource) => {
|
|
139
|
-
const issueResource = resource;
|
|
140
|
-
return issueResource.name ?? issueResource.id ?? issueResource.key;
|
|
141
|
-
};
|
|
142
130
|
// Scope to the current user's assigned issues unless the caller broadens to all assignees. Resolve the
|
|
143
131
|
// handle from each resource's own account (multi-account safe), capturing any error so its kind
|
|
144
132
|
// (e.g. auth) is preserved rather than collapsed to a generic warning.
|
|
@@ -157,7 +145,7 @@ export async function listIssueTrackerIssuesPage(ctx, options) {
|
|
|
157
145
|
continue;
|
|
158
146
|
}
|
|
159
147
|
warnings.push(accountWarning ??
|
|
160
|
-
otherWarning(options.providerId, domain, options.connectionId, `Could not resolve the current user for '${
|
|
148
|
+
otherWarning(options.providerId, domain, options.connectionId, `Could not resolve the current user for '${resourceLabel(resource)}'; skipping that resource to avoid returning issues assigned to others.`));
|
|
161
149
|
accountLookupFailed = true;
|
|
162
150
|
}
|
|
163
151
|
}
|
|
@@ -185,21 +173,21 @@ export async function listIssueTrackerIssuesPage(ctx, options) {
|
|
|
185
173
|
? matchedProjects.filter(project => {
|
|
186
174
|
if (userForProject(project) != null)
|
|
187
175
|
return true;
|
|
188
|
-
const
|
|
189
|
-
retryProjectKeys.add(
|
|
190
|
-
completedProjectKeys.delete(
|
|
176
|
+
const key = projectKey(project);
|
|
177
|
+
retryProjectKeys.add(key);
|
|
178
|
+
completedProjectKeys.delete(key);
|
|
191
179
|
return false;
|
|
192
180
|
})
|
|
193
181
|
: matchedProjects;
|
|
194
182
|
// Select the untouched window plus any earlier windows/projects that explicitly need retrying. Keys
|
|
195
183
|
// include the parent resource so two trackers can reuse the same project id without collapsing.
|
|
196
|
-
const projectsByRetryKey = new Map(scopedProjectsWithUsers.map(project => [
|
|
184
|
+
const projectsByRetryKey = new Map(scopedProjectsWithUsers.map(project => [projectKey(project), project]));
|
|
197
185
|
const scopedProjectsByKey = new Map();
|
|
198
186
|
const addScopedProject = (project) => {
|
|
199
|
-
const
|
|
200
|
-
if (completedProjectKeys.has(
|
|
187
|
+
const key = projectKey(project);
|
|
188
|
+
if (completedProjectKeys.has(key))
|
|
201
189
|
return;
|
|
202
|
-
scopedProjectsByKey.set(
|
|
190
|
+
scopedProjectsByKey.set(key, project);
|
|
203
191
|
};
|
|
204
192
|
for (const retryProject of priorRetryProjects) {
|
|
205
193
|
const project = projectsByRetryKey.get(retryProject);
|
|
@@ -277,7 +265,7 @@ export async function listIssueTrackerIssuesPage(ctx, options) {
|
|
|
277
265
|
let projectTruncated = projectDiscoveryTruncated;
|
|
278
266
|
let drainMetadata;
|
|
279
267
|
for (const { project, value: result, warning } of perProject) {
|
|
280
|
-
const
|
|
268
|
+
const key = projectKey(project);
|
|
281
269
|
const retryProject = result == null;
|
|
282
270
|
if (warning != null) {
|
|
283
271
|
warnings.push(warning);
|
|
@@ -299,14 +287,14 @@ export async function listIssueTrackerIssuesPage(ctx, options) {
|
|
|
299
287
|
}
|
|
300
288
|
}
|
|
301
289
|
if (retryProject) {
|
|
302
|
-
retryProjectKeys.add(
|
|
303
|
-
completedProjectKeys.delete(
|
|
290
|
+
retryProjectKeys.add(key);
|
|
291
|
+
completedProjectKeys.delete(key);
|
|
304
292
|
}
|
|
305
293
|
else {
|
|
306
294
|
// A usable partial/truncated project is emitted once and remains structurally incomplete.
|
|
307
295
|
// Re-running the same project cursor would normally return the same prefix and duplicate it
|
|
308
296
|
// across facade pages; only a project that returned no value is safe to retry automatically.
|
|
309
|
-
completedProjectKeys.add(
|
|
297
|
+
completedProjectKeys.add(key);
|
|
310
298
|
}
|
|
311
299
|
}
|
|
312
300
|
const drainAssessment = mergeAssessmentInto(warnings, options.providerId, domain, options.connectionId, drainMetadata);
|