@gitkraken/core-gitlens 0.43.0 → 0.44.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 +23 -1
- package/dist/git/errors.d.ts +1 -0
- package/dist/git/errors.js +7 -1
- package/dist/git/errors.js.map +1 -1
- package/dist/git-cli/providers/config.js +2 -2
- package/dist/git-cli/providers/pausedOperations.js +2 -2
- package/dist/git-cli/providers/pausedOperations.js.map +1 -1
- package/dist/git-cli/providers/staging.js +1 -1
- package/dist/ipc/discovery.js +1 -1
- package/dist/plus/agents/providers/claudeCodeTranscript.js +6 -6
- package/dist/plus/agents/providers/claudeCodeTranscript.js.map +1 -1
- package/dist/plus/ai/providers/openAICompatibleProviderBase.js +1 -1
- package/dist/plus/git-github/api/aliasedQuery.d.ts +3 -2
- package/dist/plus/git-github/api/aliasedQuery.js +7 -3
- package/dist/plus/git-github/api/aliasedQuery.js.map +1 -1
- package/dist/plus/git-github/api/github.d.ts +5 -0
- package/dist/plus/git-github/api/github.js +100 -12
- package/dist/plus/git-github/api/github.js.map +1 -1
- package/dist/plus/git-github/api/issueWrites.d.ts +4 -1
- package/dist/plus/git-github/api/issueWrites.js +9 -4
- package/dist/plus/git-github/api/issueWrites.js.map +1 -1
- package/dist/plus/integrations/collectionMetadata.js +2 -1
- package/dist/plus/integrations/collectionMetadata.js.map +1 -1
- package/dist/plus/integrations/context.d.ts +3 -3
- package/dist/plus/integrations/errors.d.ts +4 -0
- package/dist/plus/integrations/errors.js +8 -1
- package/dist/plus/integrations/errors.js.map +1 -1
- package/dist/plus/integrations/index.d.ts +2 -1
- package/dist/plus/integrations/index.js.map +1 -1
- package/dist/plus/integrations/integrationService.d.ts +16 -0
- package/dist/plus/integrations/integrationService.js +6 -1
- package/dist/plus/integrations/integrationService.js.map +1 -1
- package/dist/plus/integrations/lite.js +11 -1
- package/dist/plus/integrations/lite.js.map +1 -1
- package/dist/plus/integrations/manager.d.ts +87 -2
- package/dist/plus/integrations/models/gitHostIntegration.d.ts +21 -2
- package/dist/plus/integrations/models/gitHostIntegration.js +182 -14
- package/dist/plus/integrations/models/gitHostIntegration.js.map +1 -1
- package/dist/plus/integrations/models/integration.d.ts +9 -1
- package/dist/plus/integrations/models/integration.js +43 -3
- package/dist/plus/integrations/models/integration.js.map +1 -1
- package/dist/plus/integrations/providers/apiClients.d.ts +1 -0
- package/dist/plus/integrations/providers/apiClients.js +3 -0
- package/dist/plus/integrations/providers/apiClients.js.map +1 -1
- package/dist/plus/integrations/providers/azure/azure.d.ts +3 -0
- package/dist/plus/integrations/providers/azure/azure.js +110 -19
- package/dist/plus/integrations/providers/azure/azure.js.map +1 -1
- package/dist/plus/integrations/providers/azureDevOps.d.ts +12 -0
- package/dist/plus/integrations/providers/azureDevOps.js +22 -0
- package/dist/plus/integrations/providers/azureDevOps.js.map +1 -1
- package/dist/plus/integrations/providers/bitbucket/bitbucket.d.ts +21 -2
- package/dist/plus/integrations/providers/bitbucket/bitbucket.js +59 -19
- package/dist/plus/integrations/providers/bitbucket/bitbucket.js.map +1 -1
- package/dist/plus/integrations/providers/bitbucket-server.d.ts +2 -0
- package/dist/plus/integrations/providers/bitbucket-server.js +11 -3
- package/dist/plus/integrations/providers/bitbucket-server.js.map +1 -1
- package/dist/plus/integrations/providers/bitbucket.d.ts +14 -0
- package/dist/plus/integrations/providers/bitbucket.js +30 -2
- package/dist/plus/integrations/providers/bitbucket.js.map +1 -1
- package/dist/plus/integrations/providers/github.d.ts +7 -0
- package/dist/plus/integrations/providers/github.js +12 -1
- package/dist/plus/integrations/providers/github.js.map +1 -1
- package/dist/plus/integrations/providers/gitlab/gitlab.d.ts +19 -1
- package/dist/plus/integrations/providers/gitlab/gitlab.js +116 -17
- package/dist/plus/integrations/providers/gitlab/gitlab.js.map +1 -1
- package/dist/plus/integrations/providers/gitlab.d.ts +15 -2
- package/dist/plus/integrations/providers/gitlab.js +34 -4
- package/dist/plus/integrations/providers/gitlab.js.map +1 -1
- package/dist/plus/integrations/providers/issueSorts.d.ts +1 -0
- package/dist/plus/integrations/providers/providerErrors.d.ts +8 -0
- package/dist/plus/integrations/providers/providerErrors.js +15 -2
- package/dist/plus/integrations/providers/providerErrors.js.map +1 -1
- package/dist/plus/integrations/reads/drains.d.ts +1 -0
- package/dist/plus/integrations/reads/pullRequestsForCommits.d.ts +45 -0
- package/dist/plus/integrations/reads/pullRequestsForCommits.js +97 -0
- package/dist/plus/integrations/reads/pullRequestsForCommits.js.map +1 -0
- package/dist/plus/integrations/utils/domain.utils.d.ts +1 -0
- package/dist/plus/integrations/utils/domain.utils.js +5 -1
- package/dist/plus/integrations/utils/domain.utils.js.map +1 -1
- package/dist/plus/integrations/utils/failureBackoff.d.ts +13 -0
- package/dist/plus/integrations/utils/failureBackoff.js +47 -0
- package/dist/plus/integrations/utils/failureBackoff.js.map +1 -0
- package/dist/utils/env/node/exec.js +2 -2
- package/docs/integrations.md +90 -6
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,27 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [0.44.0] - 2026-11-23
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- Adds `intent: 'delete'` to `IntegrationManager.resolveIssueWriteTarget` for GitHub.com. The same read that validates the target also asks GitHub whether the connection may delete the issue, and answers `forbidden` when it may not, so a host can refuse before asking the user to confirm a deletion GitHub would reject. Without it the read is unchanged (plus/git-github, plus/integrations)
|
|
14
|
+
- Adds `issue` to a successful `IntegrationManager.resolveIssueWriteTarget` result: the issue as GitHub reports it in that read (owner, repository, number, node ID, URL, title, body and state), so a host can show what it resolved without a second read (plus/integrations)
|
|
15
|
+
- Adds `getPullRequestsForCommits` to `IntegrationManager`: the pull request each of several commits of one repository belongs to, so a host can map a history window to its pull requests in a few requests instead of one per commit. Takes `{ providerId, owner, repo, project?, shas, connectionId?, domain?, mergeQueue?, cancellation? }` and returns `{ sha, pullRequest? }` rows: a row without a `pullRequest` is a resolved none (the host answered; on Bitbucket Cloud a `404` only once another commit of the repository answered), safe to cache per SHA, while a SHA whose read failed has no row and sets `fetchFailed` with a warning naming it in `targetKeys`. Every SHA must be a full 40-character commit SHA, or the whole call is refused; the working tree's all-zero SHA is a resolved none and never sent. GitHub/GHE resolve up to 25 commits per request and Azure DevOps up to 100 per query plus one read per pull request found, while GitLab and Bitbucket cost one request per commit, with bounded concurrency; after a rate limit, a refused credential, or a `403` before any SHA answered (on every host but GitLab, which can't check the credential, a refusal scoped to the repository), and on Bitbucket Cloud an answer that the repository's links aren't indexed yet, the requests not yet sent are skipped and their SHAs fail with it. A credential refused after some SHAs answered fails the rest as the credential's failure, not as the repository's refusal. A commit with several pull requests resolves to the one `getPullRequestForCommit` picks, which differs by host. Uncached (plus/integrations, plus/git-github)
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
|
|
19
|
+
- Changes the integrations' single-commit pull request lookup (`getPullRequestForCommit`) and GitLab's project lookup to back off after a failure instead of asking again on every lookup: for 30 seconds after the first failure, doubling with each consecutive failure up to 10 minutes, or until a rate limit's reset time, a lookup sends no request, spends no disconnect strike and shows no notice, and answers `undefined` (with `throwOnError`, a `LookupBackedOffError`). A server error, network failure, lookup rejected with a timeout-reason cancellation, rate limit, Bitbucket Cloud's missing commit links app or links not indexed yet, failed GitLab project lookup, or API client that failed to load backs off the repository; any other failure backs off only that commit; a refused credential (`401`) and any other cancellation never back off, except that a `401` of GitLab's project lookup backs off a commit's author read and the repository's issue reads, while the merge request lookup and the repository metadata read still ask so the credential's recovery runs. The backoff is kept per credential and host, cleared by a successful lookup and by a disconnect, reconnect or refresh, and bypassed by `expiryOverride: true`, which also bypasses it for the repository metadata read; `getPullRequestsForCommits` and the token-scoped read (`lite.js`) are not affected (plus/integrations)
|
|
20
|
+
|
|
21
|
+
### Fixed
|
|
22
|
+
|
|
23
|
+
- Fixes GitHub's single-commit pull request lookup (`getPullRequestForCommit`) comparing the repository owner with GitHub's login case-sensitively: an `owner` in another letter case dropped a pull request opened against the owner's own fork, and didn't prefer the owner's pull request over another's (plus/git-github)
|
|
24
|
+
- Fixes Bitbucket Cloud's single-commit pull request lookup (`getPullRequestForCommit`) losing the real error of a failed request. Its error handling re-read a response body that had already been read, so every `4xx` failed with a `TypeError` instead: a refused credential never reached session recovery, a rate limit wasn't recognized as one, and the notice that the Bitbucket pull request commit links app must be installed was never shown. A `5xx` or network failure was kept in the lookup's per-SHA cache as a commit without a pull request. Bitbucket answers `404` alike for a commit it doesn't have (an unpushed one) and for a missing repository, so a `404` now answers none only once another commit of the repository answered with the same token; before that it fails, costs no disconnect strike, and is backed off for that commit only. An answer without a list, or with `repo_indexed: false`, means the repository's pull request links aren't indexed yet: it fails rather than answering none. Every other failure, a commit refused for the missing app included, surfaces as a failure that isn't cached. A `401` reaches session recovery, while a `403` or another `4xx` neither spends a disconnect strike nor expires the session, as a refusal of one repository says nothing about the credential. The commit links notice shows again, once per workspace rather than for every commit looked up (plus/integrations)
|
|
25
|
+
- Fixes GitLab's project lookup keeping a failed request as a missing project until its cache was reset, so a commit's merge request and author, the repository's metadata and its issues all answered none for that repository: a failure is no longer kept, and a read asks again once the lookup's backoff has passed (see Changed); until then a read of the project answers as it does for a failed lookup, without asking. A read that shares a lookup another read started no longer fails as cancelled when that other read is cancelled. The single-commit merge request lookup (`getPullRequestForCommit`) now reports a failed project lookup as a failure rather than as a commit without a merge request, so its per-SHA cache doesn't keep it, and a refused credential still asks to re-authenticate only once rather than on every read. The repository metadata read (`getRepositoryMetadata`) no longer keeps a failed project lookup as a repository without metadata: it still answers `undefined` for it, but its cache doesn't keep that answer, and the token-scoped read (`createTokenScopedGitHostIntegration`) now rejects on a failed lookup instead of answering none (plus/integrations)
|
|
26
|
+
- Fixes Bitbucket Data Center's and Azure DevOps' single-commit pull request lookups (`getPullRequestForCommit`) keeping a failed request in the lookup's per-SHA cache as a commit without a pull request: Data Center did so for every failure and Azure DevOps for every failure but a refused credential, so a server error during a restart hid the commit's pull request for good. Now only a `404` answers none. A failure isn't cached and is asked again on the next lookup; a `401` reaches session recovery, while a `403` or another `4xx` neither spends a disconnect strike nor expires the session. A Data Center answer without a pull request list is a failure too (plus/integrations)
|
|
27
|
+
- Fixes the integrations' single-commit pull request lookups (`getPullRequestForCommit`) answering a commit without a pull request, which the lookup's per-SHA cache keeps, when the host's API client failed to load, and Azure DevOps' doing so when the pull request its query found reads back empty: both are now failures, which aren't cached and spend no disconnect strike (plus/integrations)
|
|
28
|
+
- Fixes the batch reads (`getPullRequestsBatch`, `getPullRequestsForBranches` and `getIssuesBatch`) reporting a credential that expired partway through a call as a repository refusing access: a `401` for a target of a repository another target of the same call answered from was published as that repository's scoped `auth` warning, the failure budget was reset, and the connection's recovery never ran. Such targets now fail under the connection's `auth` warning, as does every other `401` of that call, the recovery runs once for the call, and the budget isn't reset; a `401` beside answers from other repositories only, in a call without such a `401`, and every `403`, still settle as before (plus/integrations)
|
|
29
|
+
|
|
9
30
|
## [0.42.0] - 2026-11-21
|
|
10
31
|
|
|
11
32
|
### Added
|
|
@@ -1369,7 +1390,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
|
|
|
1369
1390
|
|
|
1370
1391
|
- Initial release. Bundles `@gitlens/utils`, `@gitlens/git`, `@gitlens/git-cli`, `@gitlens/ai`, and `@gitlens/git-github` into a single core npm package with subpath exports.
|
|
1371
1392
|
|
|
1372
|
-
[unreleased]: https://github.com/gitkraken/vscode-gitlens/compare/releases/core/v0.
|
|
1393
|
+
[unreleased]: https://github.com/gitkraken/vscode-gitlens/compare/releases/core/v0.44.0...HEAD
|
|
1394
|
+
[0.44.0]: https://github.com/gitkraken/vscode-gitlens/compare/releases/core/v0.43.0...gitkraken:releases/core/v0.44.0
|
|
1373
1395
|
[0.42.0]: https://github.com/gitkraken/vscode-gitlens/compare/releases/core/v0.41.0...gitkraken:releases/core/v0.42.0
|
|
1374
1396
|
[0.41.0]: https://github.com/gitkraken/vscode-gitlens/compare/releases/core/v0.40.0...gitkraken:releases/core/v0.41.0
|
|
1375
1397
|
[0.40.0]: https://github.com/gitkraken/vscode-gitlens/compare/releases/core/v0.39.0...gitkraken:releases/core/v0.40.0
|
package/dist/git/errors.d.ts
CHANGED
|
@@ -458,6 +458,7 @@ export declare class RequestRateLimitError extends Error {
|
|
|
458
458
|
export declare function reportRequestFailure(provider: Provider | undefined, ex: Error, notify: () => void, defer: boolean | undefined, connectionId: string | undefined): void;
|
|
459
459
|
/** The notice a failed request left to its batch read (see {@link reportRequestFailure}), if it left one. */
|
|
460
460
|
export declare function getDeferredRequestFailure(ex: unknown): (() => void) | undefined;
|
|
461
|
+
export declare function takeDeferredRequestFailure(ex: unknown): (() => void) | undefined;
|
|
461
462
|
export type SigningErrorReason = 'noKey' | 'gpgNotFound' | 'sshNotFound' | 'passphraseFailed' | 'unknown';
|
|
462
463
|
interface SigningErrorDetails {
|
|
463
464
|
reason?: SigningErrorReason;
|
package/dist/git/errors.js
CHANGED
|
@@ -981,6 +981,12 @@ function reportRequestFailure(provider, ex, notify, defer, connectionId) {
|
|
|
981
981
|
function getDeferredRequestFailure(ex) {
|
|
982
982
|
return ex instanceof Error ? deferredRequestFailures.get(ex) : void 0;
|
|
983
983
|
}
|
|
984
|
+
function takeDeferredRequestFailure(ex) {
|
|
985
|
+
if (!(ex instanceof Error)) return void 0;
|
|
986
|
+
const notify = deferredRequestFailures.get(ex);
|
|
987
|
+
deferredRequestFailures.delete(ex);
|
|
988
|
+
return notify;
|
|
989
|
+
}
|
|
984
990
|
var SigningError = class SigningError extends GitCommandError {
|
|
985
991
|
static is(ex, reason) {
|
|
986
992
|
return ex instanceof SigningError && (reason == null || ex.details.reason === reason);
|
|
@@ -996,6 +1002,6 @@ var SigningError = class SigningError extends GitCommandError {
|
|
|
996
1002
|
}
|
|
997
1003
|
};
|
|
998
1004
|
//#endregion
|
|
999
|
-
export { ApplyPatchCommitError, AuthenticationError, AuthenticationErrorReason, BlameIgnoreRevsFileBadRevisionError, BlameIgnoreRevsFileError, BranchError, CheckoutError, CherryPickError, CommitError, FetchError, GitCommandError, GitSearchError, GitWarnings, MergeError, PausedOperationAbortError, PausedOperationContinueError, PullError, PushError, RebaseError, ReferenceUpdateError, RequestClientError, RequestNotFoundError, RequestRateLimitError, ResetError, RevertError, ShowError, SigningError, StashApplyError, StashPushError, TagError, WorkspaceUntrustedError, WorktreeCreateError, WorktreeDeleteError, getDeferredRequestFailure, getGitWarning, reportRequestFailure, undefinedOnGitWarning };
|
|
1005
|
+
export { ApplyPatchCommitError, AuthenticationError, AuthenticationErrorReason, BlameIgnoreRevsFileBadRevisionError, BlameIgnoreRevsFileError, BranchError, CheckoutError, CherryPickError, CommitError, FetchError, GitCommandError, GitSearchError, GitWarnings, MergeError, PausedOperationAbortError, PausedOperationContinueError, PullError, PushError, RebaseError, ReferenceUpdateError, RequestClientError, RequestNotFoundError, RequestRateLimitError, ResetError, RevertError, ShowError, SigningError, StashApplyError, StashPushError, TagError, WorkspaceUntrustedError, WorktreeCreateError, WorktreeDeleteError, getDeferredRequestFailure, getGitWarning, reportRequestFailure, takeDeferredRequestFailure, undefinedOnGitWarning };
|
|
1000
1006
|
|
|
1001
1007
|
//# sourceMappingURL=errors.js.map
|