@gitkraken/core-gitlens 0.15.6 → 0.16.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 +22 -1
- package/dist/git/cache.d.ts +13 -0
- package/dist/git/cache.js +43 -6
- package/dist/git/cache.js.map +1 -1
- package/dist/git/features.d.ts +1 -1
- package/dist/git/features.js +1 -0
- package/dist/git/features.js.map +1 -1
- package/dist/git/models/issue.d.ts +14 -1
- package/dist/git/models/issue.js +3 -1
- package/dist/git/models/issue.js.map +1 -1
- package/dist/git/providers/branches.d.ts +29 -0
- package/dist/git/service.d.ts +4 -2
- package/dist/git/service.js +6 -4
- package/dist/git/service.js.map +1 -1
- package/dist/git/utils/issue.utils.js +4 -0
- package/dist/git/utils/issue.utils.js.map +1 -1
- package/dist/git/watching/worktreeSummary.d.ts +19 -4
- package/dist/git/watching/worktreeSummary.js +121 -36
- package/dist/git/watching/worktreeSummary.js.map +1 -1
- package/dist/git-cli/cliGitProvider.js +1 -1
- package/dist/git-cli/providers/branches.d.ts +50 -0
- package/dist/git-cli/providers/branches.js +280 -21
- package/dist/git-cli/providers/branches.js.map +1 -1
- package/dist/git-cli/providers/config.js +3 -2
- package/dist/git-cli/providers/config.js.map +1 -1
- package/dist/git-cli/providers/revision.js +1 -1
- package/dist/git-cli/providers/stash.js +1 -1
- package/dist/git-cli/providers/worktrees.js +23 -6
- package/dist/git-cli/providers/worktrees.js.map +1 -1
- package/dist/git-cli/service.d.ts +3 -0
- package/dist/git-cli/service.js +1 -0
- package/dist/git-cli/service.js.map +1 -1
- package/dist/plus/integrations/fieldPresence.d.ts +1 -1
- package/dist/plus/integrations/fieldPresence.js.map +1 -1
- package/dist/plus/integrations/models/integration.d.ts +18 -0
- package/dist/plus/integrations/models/integration.js +13 -1
- package/dist/plus/integrations/models/integration.js.map +1 -1
- package/dist/plus/integrations/providers/azure/azure.d.ts +7 -0
- package/dist/plus/integrations/providers/azure/azure.js +26 -4
- package/dist/plus/integrations/providers/azure/azure.js.map +1 -1
- package/dist/plus/integrations/providers/azure/models.d.ts +11 -3
- package/dist/plus/integrations/providers/azure/models.js +37 -23
- package/dist/plus/integrations/providers/azure/models.js.map +1 -1
- package/dist/plus/integrations/providers/azure/workItemStateCategories.d.ts +14 -4
- package/dist/plus/integrations/providers/azure/workItemStateCategories.js +31 -4
- package/dist/plus/integrations/providers/azure/workItemStateCategories.js.map +1 -1
- package/dist/plus/integrations/providers/issueSorts.d.ts +1 -0
- package/dist/plus/integrations/providers/models.d.ts +2 -1
- package/dist/plus/integrations/providers/models.js +9 -2
- package/dist/plus/integrations/providers/models.js.map +1 -1
- package/dist/plus/integrations/providers/providersApi.d.ts +6 -0
- package/dist/plus/integrations/providers/providersApi.js +20 -4
- package/dist/plus/integrations/providers/providersApi.js.map +1 -1
- package/dist/plus/integrations/reads/drains.d.ts +1 -0
- package/dist/plus/integrations/reads/etag.js +8 -3
- package/dist/plus/integrations/reads/etag.js.map +1 -1
- package/docs/integrations.md +15 -6
- package/package.json +2 -2
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Logger as _logger } from "../../../utils/logger.js";
|
|
1
2
|
import { mapSettledBounded } from "../../../utils/promise.js";
|
|
2
3
|
import { RequestNotFoundError } from "../../../git/errors.js";
|
|
3
4
|
import { base64 } from "../../../utils/base64.js";
|
|
@@ -8,13 +9,13 @@ import { isIncompleteCollection, toCollectionScopeFailure, withValidSkippedItems
|
|
|
8
9
|
import { toTokenWithInfo } from "../authentication/models.js";
|
|
9
10
|
import { collectProviderPagedResult, mergeCollectionMetadata, parsePageCursor, toPageCursor } from "./utils/providerPaging.js";
|
|
10
11
|
import { isRepoIdsInput, providersMetadata } from "./models.js";
|
|
11
|
-
import { azureIssueStateCategory, azureWorkItemEtagFieldNames, encodeAzurePathSegment, fromAzureWorkItemToProviderIssue } from "./azure/models.js";
|
|
12
|
-
import { AzureWorkItemStatesCache, getAzureWorkItemTypeStatesUrl, getAzureWorkItemTypesUrl } from "./azure/workItemStateCategories.js";
|
|
12
|
+
import { azureIssueStateCategory, azureWorkItemEtagFieldNames, encodeAzurePathSegment, fromAzureWorkItemToProviderIssue, toAzureWorkItemDescriptionFields } from "./azure/models.js";
|
|
13
|
+
import { AzureWorkItemStatesCache, getAzureWorkItemFieldsPath, getAzureWorkItemTypeStatesUrl, getAzureWorkItemTypesUrl } from "./azure/workItemStateCategories.js";
|
|
13
14
|
import { requestJiraIssueByKey, requestJiraIssuesEtagFields } from "./jiraIssueByKey.js";
|
|
14
15
|
import { requestLinearIssuesEtagFields } from "./linearIssuesEtag.js";
|
|
15
16
|
import { requestBitbucketServerProjects, requestBitbucketServerRepositories } from "./bitbucket-server/discovery.js";
|
|
16
17
|
import { countBitbucketServerPullRequests, searchBitbucketServerPullRequestsPage } from "./bitbucket-server/pullRequestSearch.js";
|
|
17
|
-
import ProviderApis, { GitIssueState } from "@gitkraken/provider-apis";
|
|
18
|
+
import ProviderApis, { GitIssueState, needsAzureWorkItemHtmlFields } from "@gitkraken/provider-apis";
|
|
18
19
|
//#region ../plus/integrations/src/providers/providersApi.ts
|
|
19
20
|
const createProviderApis = ProviderApis.default ?? ProviderApis;
|
|
20
21
|
const repoNotFoundMessage = /^Repository .+ not found$/i;
|
|
@@ -656,7 +657,8 @@ var ProvidersApi = class {
|
|
|
656
657
|
if (issue == null) throw new Error(`Azure DevOps returned no readable work item ${id}`);
|
|
657
658
|
const project = workItem?.fields?.["System.TeamProject"];
|
|
658
659
|
if (typeof project === "string" && project.toLowerCase() !== scope.project.toLowerCase()) throw new Error(`Azure DevOps work item ${id} is in project '${project}', not '${scope.project}'`);
|
|
659
|
-
await this.classifyAzureIssueStates([issue], tokenWithInfo, scope.namespace, scope.project, options);
|
|
660
|
+
const [htmlFields] = await Promise.all([needsAzureWorkItemHtmlFields(workItem?.fields) ? this.getAzureWorkItemHtmlFields(tokenWithInfo, scope.namespace, options) : void 0, this.classifyAzureIssueStates([issue], tokenWithInfo, scope.namespace, scope.project, options)]);
|
|
661
|
+
if (htmlFields != null) Object.assign(issue, toAzureWorkItemDescriptionFields(workItem?.fields, htmlFields));
|
|
660
662
|
return issue;
|
|
661
663
|
}
|
|
662
664
|
/**
|
|
@@ -1187,6 +1189,20 @@ var ProvidersApi = class {
|
|
|
1187
1189
|
return this.handleProviderError(token, ex);
|
|
1188
1190
|
}
|
|
1189
1191
|
}
|
|
1192
|
+
/**
|
|
1193
|
+
* The organization's rich text fields a work item's description may come from, as provider-apis reads them for
|
|
1194
|
+
* its list rows. Best-effort: `undefined` on any failure, which leaves the description to the built-in fields
|
|
1195
|
+
* rather than failing the work item. Logged for every failure, a body that isn't a catalog included.
|
|
1196
|
+
*/
|
|
1197
|
+
async getAzureWorkItemHtmlFields(token, namespace, options) {
|
|
1198
|
+
const scope = this.azureStatesScope(token, namespace, "", options);
|
|
1199
|
+
try {
|
|
1200
|
+
return await this.azureWorkItemTypeStates.getHtmlFields(scope, () => this.readAzureStatesMetadata(token, `${scope.baseUrl.replace(/\/$/, "")}/${getAzureWorkItemFieldsPath(namespace)}`, scope.isPAT));
|
|
1201
|
+
} catch (ex) {
|
|
1202
|
+
_logger.warn(`Unable to read the Azure DevOps field catalog of '${namespace}': ${String(ex)}`);
|
|
1203
|
+
return;
|
|
1204
|
+
}
|
|
1205
|
+
}
|
|
1190
1206
|
getAzureTypeStates(token, scope, type) {
|
|
1191
1207
|
return this.azureWorkItemTypeStates.getStates(scope, type, () => this.readAzureStatesMetadata(token, getAzureWorkItemTypeStatesUrl(scope.baseUrl, scope.namespace, scope.project, type), scope.isPAT));
|
|
1192
1208
|
}
|