@gitkraken/core-gitlens 0.3.1 → 0.4.100
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 +83 -1
- package/README.md +22 -12
- package/dist/git/cache.d.ts +29 -2
- package/dist/git/cache.d.ts.map +1 -1
- package/dist/git/cache.js +67 -7
- package/dist/git/cache.js.map +1 -1
- package/dist/git/context.d.ts +4 -3
- package/dist/git/context.d.ts.map +1 -1
- package/dist/git/context.js.map +1 -1
- package/dist/git/errors.d.ts +31 -1
- package/dist/git/errors.d.ts.map +1 -1
- package/dist/git/errors.js +29 -0
- package/dist/git/errors.js.map +1 -1
- package/dist/git/models/author.d.ts.map +1 -1
- package/dist/git/models/author.js.map +1 -1
- package/dist/git/models/autolink.d.ts.map +1 -1
- package/dist/git/models/autolink.js.map +1 -1
- package/dist/git/models/blame.d.ts.map +1 -1
- package/dist/git/models/blame.js.map +1 -1
- package/dist/git/models/branch.d.ts.map +1 -1
- package/dist/git/models/branch.js.map +1 -1
- package/dist/git/models/commit.d.ts.map +1 -1
- package/dist/git/models/commit.js +1 -1
- package/dist/git/models/commit.js.map +1 -1
- package/dist/git/models/contributor.d.ts.map +1 -1
- package/dist/git/models/contributor.js.map +1 -1
- package/dist/git/models/defaultBranch.d.ts.map +1 -1
- package/dist/git/models/defaultBranch.js.map +1 -1
- package/dist/git/models/diff.d.ts.map +1 -1
- package/dist/git/models/diff.js.map +1 -1
- package/dist/git/models/file.d.ts.map +1 -1
- package/dist/git/models/file.js.map +1 -1
- package/dist/git/models/fileChange.d.ts.map +1 -1
- package/dist/git/models/fileChange.js.map +1 -1
- package/dist/git/models/fileStatus.d.ts +22 -22
- package/dist/git/models/fileStatus.d.ts.map +1 -1
- package/dist/git/models/fileStatus.js.map +1 -1
- package/dist/git/models/graph.d.ts +122 -1
- package/dist/git/models/graph.d.ts.map +1 -1
- package/dist/git/models/graph.js +4 -0
- package/dist/git/models/graph.js.map +1 -1
- package/dist/git/models/graphSearch.d.ts.map +1 -1
- package/dist/git/models/graphSearch.js.map +1 -1
- package/dist/git/models/graphSession.d.ts +177 -0
- package/dist/git/models/graphSession.d.ts.map +1 -0
- package/dist/git/models/graphSession.js +7 -0
- package/dist/git/models/graphSession.js.map +1 -0
- package/dist/git/models/issue.d.ts +12 -2
- package/dist/git/models/issue.d.ts.map +1 -1
- package/dist/git/models/issue.js +3 -1
- package/dist/git/models/issue.js.map +1 -1
- package/dist/git/models/issueOrPullRequest.d.ts.map +1 -1
- package/dist/git/models/issueOrPullRequest.js.map +1 -1
- package/dist/git/models/lineRange.d.ts.map +1 -1
- package/dist/git/models/lineRange.js.map +1 -1
- package/dist/git/models/log.d.ts.map +1 -1
- package/dist/git/models/log.js.map +1 -1
- package/dist/git/models/mergeConflicts.d.ts.map +1 -1
- package/dist/git/models/mergeConflicts.js.map +1 -1
- package/dist/git/models/patch.d.ts.map +1 -1
- package/dist/git/models/patch.js.map +1 -1
- package/dist/git/models/pausedOperationStatus.d.ts.map +1 -1
- package/dist/git/models/pausedOperationStatus.js.map +1 -1
- package/dist/git/models/pullRequest.d.ts +27 -2
- package/dist/git/models/pullRequest.d.ts.map +1 -1
- package/dist/git/models/pullRequest.js +7 -1
- package/dist/git/models/pullRequest.js.map +1 -1
- package/dist/git/models/rebase.d.ts.map +1 -1
- package/dist/git/models/rebase.js.map +1 -1
- package/dist/git/models/reference.d.ts.map +1 -1
- package/dist/git/models/reference.js.map +1 -1
- package/dist/git/models/reflog.d.ts.map +1 -1
- package/dist/git/models/reflog.js.map +1 -1
- package/dist/git/models/remote.d.ts.map +1 -1
- package/dist/git/models/remote.js.map +1 -1
- package/dist/git/models/remoteProvider.d.ts.map +1 -1
- package/dist/git/models/remoteProvider.js.map +1 -1
- package/dist/git/models/remoteResource.d.ts.map +1 -1
- package/dist/git/models/remoteResource.js.map +1 -1
- package/dist/git/models/repository.d.ts +20 -2
- package/dist/git/models/repository.d.ts.map +1 -1
- package/dist/git/models/repository.js +19 -0
- package/dist/git/models/repository.js.map +1 -1
- package/dist/git/models/repositoryChangeEvent.d.ts.map +1 -1
- package/dist/git/models/repositoryChangeEvent.js.map +1 -1
- package/dist/git/models/repositoryIdentities.d.ts.map +1 -1
- package/dist/git/models/repositoryIdentities.js.map +1 -1
- package/dist/git/models/repositoryMetadata.d.ts.map +1 -1
- package/dist/git/models/repositoryMetadata.js.map +1 -1
- package/dist/git/models/resourceDescriptor.d.ts +16 -0
- package/dist/git/models/resourceDescriptor.d.ts.map +1 -1
- package/dist/git/models/resourceDescriptor.js.map +1 -1
- package/dist/git/models/revision.d.ts.map +1 -1
- package/dist/git/models/revision.js.map +1 -1
- package/dist/git/models/search.d.ts.map +1 -1
- package/dist/git/models/search.js.map +1 -1
- package/dist/git/models/shortlog.d.ts.map +1 -1
- package/dist/git/models/shortlog.js.map +1 -1
- package/dist/git/models/signature.d.ts +14 -0
- package/dist/git/models/signature.d.ts.map +1 -1
- package/dist/git/models/signature.js.map +1 -1
- package/dist/git/models/staging.d.ts.map +1 -1
- package/dist/git/models/staging.js.map +1 -1
- package/dist/git/models/stash.d.ts.map +1 -1
- package/dist/git/models/stash.js.map +1 -1
- package/dist/git/models/status.d.ts.map +1 -1
- package/dist/git/models/status.js.map +1 -1
- package/dist/git/models/statusFile.d.ts.map +1 -1
- package/dist/git/models/statusFile.js.map +1 -1
- package/dist/git/models/tag.d.ts +11 -1
- package/dist/git/models/tag.d.ts.map +1 -1
- package/dist/git/models/tag.js +9 -2
- package/dist/git/models/tag.js.map +1 -1
- package/dist/git/models/tree.d.ts.map +1 -1
- package/dist/git/models/tree.js.map +1 -1
- package/dist/git/models/user.d.ts.map +1 -1
- package/dist/git/models/user.js.map +1 -1
- package/dist/git/models/worktree.d.ts.map +1 -1
- package/dist/git/models/worktree.js.map +1 -1
- package/dist/git/parsers/diffParser.d.ts.map +1 -1
- package/dist/git/parsers/diffParser.js +1 -1
- package/dist/git/parsers/diffParser.js.map +1 -1
- package/dist/git/parsers/rebaseTodoParser.d.ts.map +1 -1
- package/dist/git/parsers/rebaseTodoParser.js.map +1 -1
- package/dist/git/providers/blame.d.ts.map +1 -1
- package/dist/git/providers/blame.js.map +1 -1
- package/dist/git/providers/branches.d.ts +8 -1
- package/dist/git/providers/branches.d.ts.map +1 -1
- package/dist/git/providers/branches.js.map +1 -1
- package/dist/git/providers/commits.d.ts +6 -1
- package/dist/git/providers/commits.d.ts.map +1 -1
- package/dist/git/providers/commits.js.map +1 -1
- package/dist/git/providers/config.d.ts +6 -2
- package/dist/git/providers/config.d.ts.map +1 -1
- package/dist/git/providers/config.js.map +1 -1
- package/dist/git/providers/contributors.d.ts.map +1 -1
- package/dist/git/providers/contributors.js.map +1 -1
- package/dist/git/providers/diff.d.ts.map +1 -1
- package/dist/git/providers/diff.js.map +1 -1
- package/dist/git/providers/graph.d.ts +55 -1
- package/dist/git/providers/graph.d.ts.map +1 -1
- package/dist/git/providers/graph.js.map +1 -1
- package/dist/git/providers/operations.d.ts +1 -0
- package/dist/git/providers/operations.d.ts.map +1 -1
- package/dist/git/providers/operations.js.map +1 -1
- package/dist/git/providers/patch.d.ts.map +1 -1
- package/dist/git/providers/patch.js.map +1 -1
- package/dist/git/providers/pausedOperations.d.ts.map +1 -1
- package/dist/git/providers/pausedOperations.js.map +1 -1
- package/dist/git/providers/provider.d.ts.map +1 -1
- package/dist/git/providers/provider.js.map +1 -1
- package/dist/git/providers/refs.d.ts.map +1 -1
- package/dist/git/providers/refs.js.map +1 -1
- package/dist/git/providers/remotes.d.ts.map +1 -1
- package/dist/git/providers/remotes.js.map +1 -1
- package/dist/git/providers/revision.d.ts.map +1 -1
- package/dist/git/providers/revision.js.map +1 -1
- package/dist/git/providers/shared/remotes.d.ts.map +1 -1
- package/dist/git/providers/shared/remotes.js.map +1 -1
- package/dist/git/providers/staging.d.ts.map +1 -1
- package/dist/git/providers/staging.js.map +1 -1
- package/dist/git/providers/stash.d.ts.map +1 -1
- package/dist/git/providers/stash.js.map +1 -1
- package/dist/git/providers/status.d.ts +1 -0
- package/dist/git/providers/status.d.ts.map +1 -1
- package/dist/git/providers/status.js.map +1 -1
- package/dist/git/providers/tags.d.ts.map +1 -1
- package/dist/git/providers/tags.js.map +1 -1
- package/dist/git/providers/types.d.ts.map +1 -1
- package/dist/git/providers/types.js.map +1 -1
- package/dist/git/providers/worktrees.d.ts +5 -1
- package/dist/git/providers/worktrees.d.ts.map +1 -1
- package/dist/git/providers/worktrees.js.map +1 -1
- package/dist/git/remotes/azure-devops.d.ts.map +1 -1
- package/dist/git/remotes/azure-devops.js +27 -31
- package/dist/git/remotes/azure-devops.js.map +1 -1
- package/dist/git/remotes/bitbucket-server.d.ts.map +1 -1
- package/dist/git/remotes/bitbucket-server.js +21 -23
- package/dist/git/remotes/bitbucket-server.js.map +1 -1
- package/dist/git/remotes/bitbucket.d.ts.map +1 -1
- package/dist/git/remotes/bitbucket.js +21 -23
- package/dist/git/remotes/bitbucket.js.map +1 -1
- package/dist/git/remotes/custom.d.ts.map +1 -1
- package/dist/git/remotes/custom.js.map +1 -1
- package/dist/git/remotes/gerrit.d.ts.map +1 -1
- package/dist/git/remotes/gerrit.js +11 -13
- package/dist/git/remotes/gerrit.js.map +1 -1
- package/dist/git/remotes/gitea.d.ts.map +1 -1
- package/dist/git/remotes/gitea.js +12 -14
- package/dist/git/remotes/gitea.js.map +1 -1
- package/dist/git/remotes/github.d.ts.map +1 -1
- package/dist/git/remotes/github.js +54 -56
- package/dist/git/remotes/github.js.map +1 -1
- package/dist/git/remotes/gitlab.d.ts.map +1 -1
- package/dist/git/remotes/gitlab.js +93 -95
- package/dist/git/remotes/gitlab.js.map +1 -1
- package/dist/git/remotes/google-source.d.ts.map +1 -1
- package/dist/git/remotes/google-source.js.map +1 -1
- package/dist/git/remotes/matcher.d.ts.map +1 -1
- package/dist/git/remotes/matcher.js.map +1 -1
- package/dist/git/run.types.d.ts +62 -3
- package/dist/git/run.types.d.ts.map +1 -1
- package/dist/git/service.d.ts.map +1 -1
- package/dist/git/utils/autolink.utils.d.ts.map +1 -1
- package/dist/git/utils/autolink.utils.js.map +1 -1
- package/dist/git/utils/blame.utils.d.ts.map +1 -1
- package/dist/git/utils/blame.utils.js.map +1 -1
- package/dist/git/utils/branch.utils.d.ts.map +1 -1
- package/dist/git/utils/branch.utils.js +12 -1
- package/dist/git/utils/branch.utils.js.map +1 -1
- package/dist/git/utils/commit.utils.d.ts.map +1 -1
- package/dist/git/utils/commit.utils.js.map +1 -1
- package/dist/git/utils/conflictResolution.utils.d.ts +32 -0
- package/dist/git/utils/conflictResolution.utils.d.ts.map +1 -1
- package/dist/git/utils/conflictResolution.utils.js +95 -0
- package/dist/git/utils/conflictResolution.utils.js.map +1 -1
- package/dist/git/utils/contributor.utils.d.ts +1 -1
- package/dist/git/utils/contributor.utils.d.ts.map +1 -1
- package/dist/git/utils/contributor.utils.js +1 -2
- package/dist/git/utils/contributor.utils.js.map +1 -1
- package/dist/git/utils/fetch.utils.d.ts.map +1 -1
- package/dist/git/utils/fetch.utils.js.map +1 -1
- package/dist/git/utils/fileStatus.utils.d.ts +7 -0
- package/dist/git/utils/fileStatus.utils.d.ts.map +1 -1
- package/dist/git/utils/fileStatus.utils.js +6 -0
- package/dist/git/utils/fileStatus.utils.js.map +1 -1
- package/dist/git/utils/graph.utils.d.ts +20 -0
- package/dist/git/utils/graph.utils.d.ts.map +1 -0
- package/dist/git/utils/graph.utils.js +40 -0
- package/dist/git/utils/graph.utils.js.map +1 -0
- package/dist/git/utils/issue.utils.d.ts.map +1 -1
- package/dist/git/utils/issue.utils.js +1 -0
- package/dist/git/utils/issue.utils.js.map +1 -1
- package/dist/git/utils/issueOrPullRequest.utils.d.ts.map +1 -1
- package/dist/git/utils/issueOrPullRequest.utils.js.map +1 -1
- package/dist/git/utils/mergeConflicts.utils.d.ts.map +1 -1
- package/dist/git/utils/mergeConflicts.utils.js.map +1 -1
- package/dist/git/utils/pausedOperationStatus.utils.d.ts +13 -13
- package/dist/git/utils/pausedOperationStatus.utils.d.ts.map +1 -1
- package/dist/git/utils/pausedOperationStatus.utils.js.map +1 -1
- package/dist/git/utils/pullRequest.utils.d.ts.map +1 -1
- package/dist/git/utils/pullRequest.utils.js +9 -0
- package/dist/git/utils/pullRequest.utils.js.map +1 -1
- package/dist/git/utils/reachability.utils.d.ts +20 -2
- package/dist/git/utils/reachability.utils.d.ts.map +1 -1
- package/dist/git/utils/reachability.utils.js +68 -7
- package/dist/git/utils/reachability.utils.js.map +1 -1
- package/dist/git/utils/rebase.utils.d.ts.map +1 -1
- package/dist/git/utils/rebase.utils.js.map +1 -1
- package/dist/git/utils/reference.utils.d.ts.map +1 -1
- package/dist/git/utils/reference.utils.js.map +1 -1
- package/dist/git/utils/remote.utils.d.ts.map +1 -1
- package/dist/git/utils/remote.utils.js.map +1 -1
- package/dist/git/utils/repository.utils.d.ts.map +1 -1
- package/dist/git/utils/repository.utils.js.map +1 -1
- package/dist/git/utils/resourceDescriptor.utils.d.ts.map +1 -1
- package/dist/git/utils/resourceDescriptor.utils.js.map +1 -1
- package/dist/git/utils/revision.utils.d.ts.map +1 -1
- package/dist/git/utils/revision.utils.js.map +1 -1
- package/dist/git/utils/search.utils.d.ts.map +1 -1
- package/dist/git/utils/search.utils.js.map +1 -1
- package/dist/git/utils/sorting.d.ts.map +1 -1
- package/dist/git/utils/sorting.js.map +1 -1
- package/dist/git/utils/sshKey.utils.d.ts +7 -0
- package/dist/git/utils/sshKey.utils.d.ts.map +1 -0
- package/dist/git/utils/sshKey.utils.js +25 -0
- package/dist/git/utils/sshKey.utils.js.map +1 -0
- package/dist/git/utils/status.utils.d.ts.map +1 -1
- package/dist/git/utils/status.utils.js.map +1 -1
- package/dist/git/utils/statusFile.utils.d.ts.map +1 -1
- package/dist/git/utils/statusFile.utils.js.map +1 -1
- package/dist/git/utils/tag.utils.d.ts.map +1 -1
- package/dist/git/utils/tag.utils.js.map +1 -1
- package/dist/git/utils/tooltip.utils.d.ts.map +1 -1
- package/dist/git/utils/tooltip.utils.js.map +1 -1
- package/dist/git/utils/uriAuthority.d.ts.map +1 -1
- package/dist/git/utils/uriAuthority.js.map +1 -1
- package/dist/git/utils/user.utils.d.ts.map +1 -1
- package/dist/git/utils/user.utils.js.map +1 -1
- package/dist/git/utils/worktree.utils.d.ts.map +1 -1
- package/dist/git/utils/worktree.utils.js.map +1 -1
- package/dist/git/watching/changeEvent.d.ts.map +1 -1
- package/dist/git/watching/changeEvent.js.map +1 -1
- package/dist/git/watching/classifyChange.d.ts.map +1 -1
- package/dist/git/watching/classifyChange.js.map +1 -1
- package/dist/git/watching/gitIgnoreFilter.d.ts.map +1 -1
- package/dist/git/watching/gitIgnoreFilter.js.map +1 -1
- package/dist/git/watching/initWatcher.d.ts.map +1 -1
- package/dist/git/watching/initWatcher.js.map +1 -1
- package/dist/git/watching/provider.d.ts.map +1 -1
- package/dist/git/watching/provider.js.map +1 -1
- package/dist/git/watching/watchGroup.d.ts.map +1 -1
- package/dist/git/watching/watchGroup.js.map +1 -1
- package/dist/git/watching/watchService.d.ts +4 -0
- package/dist/git/watching/watchService.d.ts.map +1 -1
- package/dist/git/watching/watchService.js +15 -1
- package/dist/git/watching/watchService.js.map +1 -1
- package/dist/git/watching/watchSession.d.ts +7 -0
- package/dist/git/watching/watchSession.d.ts.map +1 -1
- package/dist/git/watching/watchSession.js +14 -2
- package/dist/git/watching/watchSession.js.map +1 -1
- package/dist/git/watching/watcherPatterns.d.ts.map +1 -1
- package/dist/git/watching/watcherPatterns.js.map +1 -1
- package/dist/git-cli/cliGitProvider.d.ts.map +1 -1
- package/dist/git-cli/exec/exec.d.ts.map +1 -1
- package/dist/git-cli/exec/exec.errors.d.ts.map +1 -1
- package/dist/git-cli/exec/exec.errors.js.map +1 -1
- package/dist/git-cli/exec/exec.js.map +1 -1
- package/dist/git-cli/exec/exec.types.d.ts.map +1 -1
- package/dist/git-cli/exec/exec.types.js.map +1 -1
- package/dist/git-cli/exec/features.d.ts.map +1 -1
- package/dist/git-cli/exec/features.js.map +1 -1
- package/dist/git-cli/exec/git.d.ts +19 -27
- package/dist/git-cli/exec/git.d.ts.map +1 -1
- package/dist/git-cli/exec/git.js +126 -34
- package/dist/git-cli/exec/git.js.map +1 -1
- package/dist/git-cli/exec/gitQueue.d.ts.map +1 -1
- package/dist/git-cli/exec/gitQueue.js.map +1 -1
- package/dist/git-cli/exec/locator.d.ts.map +1 -1
- package/dist/git-cli/exec/locator.js.map +1 -1
- package/dist/git-cli/parsers/blameParser.d.ts.map +1 -1
- package/dist/git-cli/parsers/blameParser.js.map +1 -1
- package/dist/git-cli/parsers/indexParser.d.ts.map +1 -1
- package/dist/git-cli/parsers/indexParser.js.map +1 -1
- package/dist/git-cli/parsers/logParser.d.ts +9 -1
- package/dist/git-cli/parsers/logParser.d.ts.map +1 -1
- package/dist/git-cli/parsers/logParser.js +141 -60
- package/dist/git-cli/parsers/logParser.js.map +1 -1
- package/dist/git-cli/parsers/mergeTreeParser.d.ts.map +1 -1
- package/dist/git-cli/parsers/mergeTreeParser.js.map +1 -1
- package/dist/git-cli/parsers/refParser.d.ts.map +1 -1
- package/dist/git-cli/parsers/refParser.js.map +1 -1
- package/dist/git-cli/parsers/reflogParser.d.ts.map +1 -1
- package/dist/git-cli/parsers/reflogParser.js.map +1 -1
- package/dist/git-cli/parsers/remoteParser.d.ts.map +1 -1
- package/dist/git-cli/parsers/remoteParser.js.map +1 -1
- package/dist/git-cli/parsers/shortlogParser.d.ts.map +1 -1
- package/dist/git-cli/parsers/shortlogParser.js.map +1 -1
- package/dist/git-cli/parsers/signatureParser.d.ts.map +1 -1
- package/dist/git-cli/parsers/signatureParser.js.map +1 -1
- package/dist/git-cli/parsers/sshSignatureParser.d.ts +21 -0
- package/dist/git-cli/parsers/sshSignatureParser.d.ts.map +1 -0
- package/dist/git-cli/parsers/sshSignatureParser.js +78 -0
- package/dist/git-cli/parsers/sshSignatureParser.js.map +1 -0
- package/dist/git-cli/parsers/statusParser.d.ts.map +1 -1
- package/dist/git-cli/parsers/statusParser.js.map +1 -1
- package/dist/git-cli/parsers/treeParser.d.ts.map +1 -1
- package/dist/git-cli/parsers/treeParser.js.map +1 -1
- package/dist/git-cli/parsers/worktreeParser.d.ts.map +1 -1
- package/dist/git-cli/parsers/worktreeParser.js +5 -7
- package/dist/git-cli/parsers/worktreeParser.js.map +1 -1
- package/dist/git-cli/providers/blame.d.ts.map +1 -1
- package/dist/git-cli/providers/blame.js.map +1 -1
- package/dist/git-cli/providers/branches.d.ts +1 -0
- package/dist/git-cli/providers/branches.d.ts.map +1 -1
- package/dist/git-cli/providers/branches.js +51 -32
- package/dist/git-cli/providers/branches.js.map +1 -1
- package/dist/git-cli/providers/commitFilesetUtils.d.ts.map +1 -1
- package/dist/git-cli/providers/commitFilesetUtils.js.map +1 -1
- package/dist/git-cli/providers/commits.d.ts +12 -1
- package/dist/git-cli/providers/commits.d.ts.map +1 -1
- package/dist/git-cli/providers/commits.js +89 -8
- package/dist/git-cli/providers/commits.js.map +1 -1
- package/dist/git-cli/providers/config.d.ts.map +1 -1
- package/dist/git-cli/providers/config.js.map +1 -1
- package/dist/git-cli/providers/contributors.d.ts.map +1 -1
- package/dist/git-cli/providers/contributors.js.map +1 -1
- package/dist/git-cli/providers/diff.d.ts.map +1 -1
- package/dist/git-cli/providers/diff.js.map +1 -1
- package/dist/git-cli/providers/graph.d.ts +35 -1
- package/dist/git-cli/providers/graph.d.ts.map +1 -1
- package/dist/git-cli/providers/graph.js +1434 -330
- package/dist/git-cli/providers/graph.js.map +1 -1
- package/dist/git-cli/providers/operations.d.ts +1 -0
- package/dist/git-cli/providers/operations.d.ts.map +1 -1
- package/dist/git-cli/providers/operations.js +22 -1
- package/dist/git-cli/providers/operations.js.map +1 -1
- package/dist/git-cli/providers/patch.d.ts.map +1 -1
- package/dist/git-cli/providers/patch.js.map +1 -1
- package/dist/git-cli/providers/pausedOperations.d.ts.map +1 -1
- package/dist/git-cli/providers/pausedOperations.js +3 -3
- package/dist/git-cli/providers/pausedOperations.js.map +1 -1
- package/dist/git-cli/providers/refs.d.ts.map +1 -1
- package/dist/git-cli/providers/refs.js.map +1 -1
- package/dist/git-cli/providers/remotes.d.ts.map +1 -1
- package/dist/git-cli/providers/remotes.js.map +1 -1
- package/dist/git-cli/providers/revision.d.ts +1 -0
- package/dist/git-cli/providers/revision.d.ts.map +1 -1
- package/dist/git-cli/providers/revision.js +33 -0
- package/dist/git-cli/providers/revision.js.map +1 -1
- package/dist/git-cli/providers/staging.d.ts.map +1 -1
- package/dist/git-cli/providers/staging.js.map +1 -1
- package/dist/git-cli/providers/stash.d.ts.map +1 -1
- package/dist/git-cli/providers/stash.js.map +1 -1
- package/dist/git-cli/providers/status.d.ts +28 -0
- package/dist/git-cli/providers/status.d.ts.map +1 -1
- package/dist/git-cli/providers/status.js +240 -154
- package/dist/git-cli/providers/status.js.map +1 -1
- package/dist/git-cli/providers/tags.d.ts.map +1 -1
- package/dist/git-cli/providers/tags.js +2 -1
- package/dist/git-cli/providers/tags.js.map +1 -1
- package/dist/git-cli/providers/worktrees.d.ts +4 -1
- package/dist/git-cli/providers/worktrees.d.ts.map +1 -1
- package/dist/git-cli/providers/worktrees.js +31 -3
- package/dist/git-cli/providers/worktrees.js.map +1 -1
- package/dist/git-cli/service.d.ts.map +1 -1
- package/dist/git-cli/service.js +8 -0
- package/dist/git-cli/service.js.map +1 -1
- package/dist/ipc/ipcServer.d.ts.map +1 -1
- package/dist/ipc/ipcServer.js +1 -1
- package/dist/ipc/ipcServer.js.map +1 -1
- package/dist/plus/agents/providers/claudeCodeProvider.d.ts +6 -1
- package/dist/plus/agents/providers/claudeCodeProvider.d.ts.map +1 -1
- package/dist/plus/agents/providers/claudeCodeProvider.js +19 -0
- package/dist/plus/agents/providers/claudeCodeProvider.js.map +1 -1
- package/dist/plus/agents/providers/claudeCodeTranscript.d.ts +68 -0
- package/dist/plus/agents/providers/claudeCodeTranscript.d.ts.map +1 -1
- package/dist/plus/agents/providers/claudeCodeTranscript.js +262 -8
- package/dist/plus/agents/providers/claudeCodeTranscript.js.map +1 -1
- package/dist/plus/agents/types.d.ts +36 -2
- package/dist/plus/agents/types.d.ts.map +1 -1
- package/dist/plus/ai/constants.d.ts +1 -2
- package/dist/plus/ai/constants.d.ts.map +1 -1
- package/dist/plus/ai/constants.js +1 -8
- package/dist/plus/ai/constants.js.map +1 -1
- package/dist/plus/ai/errors.d.ts.map +1 -1
- package/dist/plus/ai/errors.js.map +1 -1
- package/dist/plus/ai/models/conversation.d.ts.map +1 -1
- package/dist/plus/ai/models/conversation.js.map +1 -1
- package/dist/plus/ai/models/model.d.ts +2 -1
- package/dist/plus/ai/models/model.d.ts.map +1 -1
- package/dist/plus/ai/models/model.js +50 -1
- package/dist/plus/ai/models/model.js.map +1 -1
- package/dist/plus/ai/models/promptTemplates.d.ts +5 -2
- package/dist/plus/ai/models/promptTemplates.d.ts.map +1 -1
- package/dist/plus/ai/models/promptTemplates.js.map +1 -1
- package/dist/plus/ai/models/provider.d.ts.map +1 -1
- package/dist/plus/ai/models/provider.js.map +1 -1
- package/dist/plus/ai/models/results.d.ts.map +1 -1
- package/dist/plus/ai/models/results.js.map +1 -1
- package/dist/plus/ai/prompts.d.ts +1 -1
- package/dist/plus/ai/prompts.d.ts.map +1 -1
- package/dist/plus/ai/prompts.js +15 -47
- package/dist/plus/ai/prompts.js.map +1 -1
- package/dist/plus/ai/providers/anthropicProvider.d.ts +5 -0
- package/dist/plus/ai/providers/anthropicProvider.d.ts.map +1 -1
- package/dist/plus/ai/providers/anthropicProvider.js +40 -3
- package/dist/plus/ai/providers/anthropicProvider.js.map +1 -1
- package/dist/plus/ai/providers/azureProvider.d.ts.map +1 -1
- package/dist/plus/ai/providers/azureProvider.js.map +1 -1
- package/dist/plus/ai/providers/context.d.ts.map +1 -1
- package/dist/plus/ai/providers/context.js.map +1 -1
- package/dist/plus/ai/providers/deepSeekProvider.d.ts.map +1 -1
- package/dist/plus/ai/providers/deepSeekProvider.js +17 -1
- package/dist/plus/ai/providers/deepSeekProvider.js.map +1 -1
- package/dist/plus/ai/providers/geminiProvider.d.ts.map +1 -1
- package/dist/plus/ai/providers/geminiProvider.js +25 -6
- package/dist/plus/ai/providers/geminiProvider.js.map +1 -1
- package/dist/plus/ai/providers/gitkrakenProvider.d.ts.map +1 -1
- package/dist/plus/ai/providers/gitkrakenProvider.js +1 -0
- package/dist/plus/ai/providers/gitkrakenProvider.js.map +1 -1
- package/dist/plus/ai/providers/huggingFaceProvider.d.ts +1 -1
- package/dist/plus/ai/providers/huggingFaceProvider.d.ts.map +1 -1
- package/dist/plus/ai/providers/huggingFaceProvider.js +21 -18
- package/dist/plus/ai/providers/huggingFaceProvider.js.map +1 -1
- package/dist/plus/ai/providers/mistralProvider.d.ts.map +1 -1
- package/dist/plus/ai/providers/mistralProvider.js.map +1 -1
- package/dist/plus/ai/providers/ollamaProvider.d.ts.map +1 -1
- package/dist/plus/ai/providers/ollamaProvider.js.map +1 -1
- package/dist/plus/ai/providers/openAICompatibleProvider.d.ts.map +1 -1
- package/dist/plus/ai/providers/openAICompatibleProvider.js.map +1 -1
- package/dist/plus/ai/providers/openAICompatibleProviderBase.d.ts +10 -1
- package/dist/plus/ai/providers/openAICompatibleProviderBase.d.ts.map +1 -1
- package/dist/plus/ai/providers/openAICompatibleProviderBase.js +9 -1
- package/dist/plus/ai/providers/openAICompatibleProviderBase.js.map +1 -1
- package/dist/plus/ai/providers/openRouterProvider.d.ts.map +1 -1
- package/dist/plus/ai/providers/openRouterProvider.js.map +1 -1
- package/dist/plus/ai/providers/openaiProvider.d.ts.map +1 -1
- package/dist/plus/ai/providers/openaiProvider.js.map +1 -1
- package/dist/plus/ai/providers/xaiProvider.d.ts.map +1 -1
- package/dist/plus/ai/providers/xaiProvider.js +14 -1
- package/dist/plus/ai/providers/xaiProvider.js.map +1 -1
- package/dist/plus/ai/utils/ai.utils.d.ts.map +1 -1
- package/dist/plus/ai/utils/ai.utils.js +5 -7
- package/dist/plus/ai/utils/ai.utils.js.map +1 -1
- package/dist/plus/ai/utils/results.utils.d.ts +3 -0
- package/dist/plus/ai/utils/results.utils.d.ts.map +1 -1
- package/dist/plus/ai/utils/results.utils.js +26 -0
- package/dist/plus/ai/utils/results.utils.js.map +1 -1
- package/dist/plus/ai/utils/truncation.utils.d.ts +1 -1
- package/dist/plus/ai/utils/truncation.utils.d.ts.map +1 -1
- package/dist/plus/ai/utils/truncation.utils.js.map +1 -1
- package/dist/plus/git-github/api/config.d.ts.map +1 -1
- package/dist/plus/git-github/api/config.js.map +1 -1
- package/dist/plus/git-github/api/github.d.ts +71 -15
- package/dist/plus/git-github/api/github.d.ts.map +1 -1
- package/dist/plus/git-github/api/github.js +350 -84
- package/dist/plus/git-github/api/github.js.map +1 -1
- package/dist/plus/git-github/api/github.utils.d.ts.map +1 -1
- package/dist/plus/git-github/api/github.utils.js.map +1 -1
- package/dist/plus/git-github/api/token.d.ts.map +1 -1
- package/dist/plus/git-github/api/token.js.map +1 -1
- package/dist/plus/git-github/api/tokenUtils.d.ts.map +1 -1
- package/dist/plus/git-github/api/tokenUtils.js.map +1 -1
- package/dist/plus/git-github/api/types.d.ts.map +1 -1
- package/dist/plus/git-github/api/types.js.map +1 -1
- package/dist/plus/git-github/context.d.ts.map +1 -1
- package/dist/plus/git-github/models.d.ts +5 -0
- package/dist/plus/git-github/models.d.ts.map +1 -1
- package/dist/plus/git-github/models.js +27 -2
- package/dist/plus/git-github/models.js.map +1 -1
- package/dist/plus/git-github/providers/github/blame.d.ts.map +1 -1
- package/dist/plus/git-github/providers/github/blame.js.map +1 -1
- package/dist/plus/git-github/providers/github/branches.d.ts +2 -1
- package/dist/plus/git-github/providers/github/branches.d.ts.map +1 -1
- package/dist/plus/git-github/providers/github/branches.js +7 -3
- package/dist/plus/git-github/providers/github/branches.js.map +1 -1
- package/dist/plus/git-github/providers/github/commits.d.ts.map +1 -1
- package/dist/plus/git-github/providers/github/commits.js.map +1 -1
- package/dist/plus/git-github/providers/github/config.d.ts.map +1 -1
- package/dist/plus/git-github/providers/github/config.js.map +1 -1
- package/dist/plus/git-github/providers/github/contributors.d.ts.map +1 -1
- package/dist/plus/git-github/providers/github/contributors.js.map +1 -1
- package/dist/plus/git-github/providers/github/diff.d.ts.map +1 -1
- package/dist/plus/git-github/providers/github/diff.js +2 -2
- package/dist/plus/git-github/providers/github/diff.js.map +1 -1
- package/dist/plus/git-github/providers/github/graph.d.ts +12 -1
- package/dist/plus/git-github/providers/github/graph.d.ts.map +1 -1
- package/dist/plus/git-github/providers/github/graph.js +85 -0
- package/dist/plus/git-github/providers/github/graph.js.map +1 -1
- package/dist/plus/git-github/providers/github/refs.d.ts.map +1 -1
- package/dist/plus/git-github/providers/github/refs.js.map +1 -1
- package/dist/plus/git-github/providers/github/remotes.d.ts.map +1 -1
- package/dist/plus/git-github/providers/github/remotes.js.map +1 -1
- package/dist/plus/git-github/providers/github/revision.d.ts.map +1 -1
- package/dist/plus/git-github/providers/github/revision.js.map +1 -1
- package/dist/plus/git-github/providers/github/status.d.ts.map +1 -1
- package/dist/plus/git-github/providers/github/status.js.map +1 -1
- package/dist/plus/git-github/providers/github/tags.d.ts.map +1 -1
- package/dist/plus/git-github/providers/github/tags.js +3 -1
- package/dist/plus/git-github/providers/github/tags.js.map +1 -1
- package/dist/plus/git-github/providers/githubGitProvider.d.ts.map +1 -1
- package/dist/plus/git-github/providers/githubGitProvider.js.map +1 -1
- package/dist/plus/git-github/providers/githubProvider.d.ts.map +1 -1
- package/dist/plus/git-github/providers/githubProvider.js.map +1 -1
- package/dist/plus/integrations/authentication/cloudIntegrationService.d.ts +30 -0
- package/dist/plus/integrations/authentication/cloudIntegrationService.d.ts.map +1 -0
- package/dist/plus/integrations/authentication/cloudIntegrationService.js +214 -0
- package/dist/plus/integrations/authentication/cloudIntegrationService.js.map +1 -0
- package/dist/plus/integrations/authentication/configuredIntegrationService.d.ts +114 -0
- package/dist/plus/integrations/authentication/configuredIntegrationService.d.ts.map +1 -0
- package/dist/plus/integrations/authentication/configuredIntegrationService.js +497 -0
- package/dist/plus/integrations/authentication/configuredIntegrationService.js.map +1 -0
- package/dist/plus/integrations/authentication/integrationAuthenticationProvider.d.ts +112 -0
- package/dist/plus/integrations/authentication/integrationAuthenticationProvider.d.ts.map +1 -0
- package/dist/plus/integrations/authentication/integrationAuthenticationProvider.js +217 -0
- package/dist/plus/integrations/authentication/integrationAuthenticationProvider.js.map +1 -0
- package/dist/plus/integrations/authentication/integrationAuthenticationService.d.ts +62 -0
- package/dist/plus/integrations/authentication/integrationAuthenticationService.d.ts.map +1 -0
- package/dist/plus/integrations/authentication/integrationAuthenticationService.js +126 -0
- package/dist/plus/integrations/authentication/integrationAuthenticationService.js.map +1 -0
- package/dist/plus/integrations/authentication/manualTokenProvider.d.ts +16 -0
- package/dist/plus/integrations/authentication/manualTokenProvider.d.ts.map +1 -0
- package/dist/plus/integrations/authentication/manualTokenProvider.js +53 -0
- package/dist/plus/integrations/authentication/manualTokenProvider.js.map +1 -0
- package/dist/plus/integrations/authentication/models.d.ts +120 -0
- package/dist/plus/integrations/authentication/models.d.ts.map +1 -0
- package/dist/plus/integrations/authentication/models.js +64 -0
- package/dist/plus/integrations/authentication/models.js.map +1 -0
- package/dist/plus/integrations/collectionMetadata.d.ts +21 -0
- package/dist/plus/integrations/collectionMetadata.d.ts.map +1 -0
- package/dist/plus/integrations/collectionMetadata.js +121 -0
- package/dist/plus/integrations/collectionMetadata.js.map +1 -0
- package/dist/plus/integrations/constants.d.ts +57 -0
- package/dist/plus/integrations/constants.d.ts.map +1 -0
- package/dist/plus/integrations/constants.js +138 -0
- package/dist/plus/integrations/constants.js.map +1 -0
- package/dist/plus/integrations/context.d.ts +358 -0
- package/dist/plus/integrations/context.d.ts.map +1 -0
- package/dist/plus/integrations/context.js +2 -0
- package/dist/plus/integrations/context.js.map +1 -0
- package/dist/plus/integrations/errors.d.ts +79 -0
- package/dist/plus/integrations/errors.d.ts.map +1 -0
- package/dist/plus/integrations/errors.js +150 -0
- package/dist/plus/integrations/errors.js.map +1 -0
- package/dist/plus/integrations/index.d.ts +77 -0
- package/dist/plus/integrations/index.d.ts.map +1 -0
- package/dist/plus/integrations/index.js +64 -0
- package/dist/plus/integrations/index.js.map +1 -0
- package/dist/plus/integrations/integrationService.d.ts +379 -0
- package/dist/plus/integrations/integrationService.d.ts.map +1 -0
- package/dist/plus/integrations/integrationService.js +1895 -0
- package/dist/plus/integrations/integrationService.js.map +1 -0
- package/dist/plus/integrations/lite.d.ts +47 -0
- package/dist/plus/integrations/lite.d.ts.map +1 -0
- package/dist/plus/integrations/lite.js +141 -0
- package/dist/plus/integrations/lite.js.map +1 -0
- package/dist/plus/integrations/manager.d.ts +332 -0
- package/dist/plus/integrations/manager.d.ts.map +1 -0
- package/dist/plus/integrations/manager.js +2 -0
- package/dist/plus/integrations/manager.js.map +1 -0
- package/dist/plus/integrations/models/gitHostIntegration.d.ts +341 -0
- package/dist/plus/integrations/models/gitHostIntegration.d.ts.map +1 -0
- package/dist/plus/integrations/models/gitHostIntegration.js +1146 -0
- package/dist/plus/integrations/models/gitHostIntegration.js.map +1 -0
- package/dist/plus/integrations/models/integration.d.ts +212 -0
- package/dist/plus/integrations/models/integration.d.ts.map +1 -0
- package/dist/plus/integrations/models/integration.js +627 -0
- package/dist/plus/integrations/models/integration.js.map +1 -0
- package/dist/plus/integrations/models/issuesIntegration.d.ts +108 -0
- package/dist/plus/integrations/models/issuesIntegration.d.ts.map +1 -0
- package/dist/plus/integrations/models/issuesIntegration.js +216 -0
- package/dist/plus/integrations/models/issuesIntegration.js.map +1 -0
- package/dist/plus/integrations/providerFilters.d.ts +12 -0
- package/dist/plus/integrations/providerFilters.d.ts.map +1 -0
- package/dist/plus/integrations/providerFilters.js +14 -0
- package/dist/plus/integrations/providerFilters.js.map +1 -0
- package/dist/plus/integrations/providers/apiClients.d.ts +25 -0
- package/dist/plus/integrations/providers/apiClients.d.ts.map +1 -0
- package/dist/plus/integrations/providers/apiClients.js +39 -0
- package/dist/plus/integrations/providers/apiClients.js.map +1 -0
- package/dist/plus/integrations/providers/apiConfig.d.ts +52 -0
- package/dist/plus/integrations/providers/apiConfig.d.ts.map +1 -0
- package/dist/plus/integrations/providers/apiConfig.js +19 -0
- package/dist/plus/integrations/providers/apiConfig.js.map +1 -0
- package/dist/plus/integrations/providers/azure/azure.d.ts +59 -0
- package/dist/plus/integrations/providers/azure/azure.d.ts.map +1 -0
- package/dist/plus/integrations/providers/azure/azure.js +519 -0
- package/dist/plus/integrations/providers/azure/azure.js.map +1 -0
- package/dist/plus/integrations/providers/azure/models.d.ts +302 -0
- package/dist/plus/integrations/providers/azure/models.d.ts.map +1 -0
- package/dist/plus/integrations/providers/azure/models.js +203 -0
- package/dist/plus/integrations/providers/azure/models.js.map +1 -0
- package/dist/plus/integrations/providers/azureDevOps.d.ts +141 -0
- package/dist/plus/integrations/providers/azureDevOps.d.ts.map +1 -0
- package/dist/plus/integrations/providers/azureDevOps.js +925 -0
- package/dist/plus/integrations/providers/azureDevOps.js.map +1 -0
- package/dist/plus/integrations/providers/bitbucket/bitbucket.d.ts +53 -0
- package/dist/plus/integrations/providers/bitbucket/bitbucket.d.ts.map +1 -0
- package/dist/plus/integrations/providers/bitbucket/bitbucket.js +589 -0
- package/dist/plus/integrations/providers/bitbucket/bitbucket.js.map +1 -0
- package/dist/plus/integrations/providers/bitbucket/models.d.ts +222 -0
- package/dist/plus/integrations/providers/bitbucket/models.d.ts.map +1 -0
- package/dist/plus/integrations/providers/bitbucket/models.js +158 -0
- package/dist/plus/integrations/providers/bitbucket/models.js.map +1 -0
- package/dist/plus/integrations/providers/bitbucket-server/models.d.ts +138 -0
- package/dist/plus/integrations/providers/bitbucket-server/models.d.ts.map +1 -0
- package/dist/plus/integrations/providers/bitbucket-server/models.js +130 -0
- package/dist/plus/integrations/providers/bitbucket-server/models.js.map +1 -0
- package/dist/plus/integrations/providers/bitbucket-server.d.ts +84 -0
- package/dist/plus/integrations/providers/bitbucket-server.d.ts.map +1 -0
- package/dist/plus/integrations/providers/bitbucket-server.js +242 -0
- package/dist/plus/integrations/providers/bitbucket-server.js.map +1 -0
- package/dist/plus/integrations/providers/bitbucket.d.ts +84 -0
- package/dist/plus/integrations/providers/bitbucket.d.ts.map +1 -0
- package/dist/plus/integrations/providers/bitbucket.js +477 -0
- package/dist/plus/integrations/providers/bitbucket.js.map +1 -0
- package/dist/plus/integrations/providers/github/github.d.ts +5 -0
- package/dist/plus/integrations/providers/github/github.d.ts.map +1 -0
- package/dist/plus/integrations/providers/github/github.js +47 -0
- package/dist/plus/integrations/providers/github/github.js.map +1 -0
- package/dist/plus/integrations/providers/github/github.utils.d.ts +11 -0
- package/dist/plus/integrations/providers/github/github.utils.d.ts.map +1 -0
- package/dist/plus/integrations/providers/github/github.utils.js +6 -0
- package/dist/plus/integrations/providers/github/github.utils.js.map +1 -0
- package/dist/plus/integrations/providers/github/models.d.ts +3 -0
- package/dist/plus/integrations/providers/github/models.d.ts.map +1 -0
- package/dist/plus/integrations/providers/github/models.js +2 -0
- package/dist/plus/integrations/providers/github/models.js.map +1 -0
- package/dist/plus/integrations/providers/github.d.ts +116 -0
- package/dist/plus/integrations/providers/github.d.ts.map +1 -0
- package/dist/plus/integrations/providers/github.js +445 -0
- package/dist/plus/integrations/providers/github.js.map +1 -0
- package/dist/plus/integrations/providers/gitlab/gitlab.d.ts +71 -0
- package/dist/plus/integrations/providers/gitlab/gitlab.d.ts.map +1 -0
- package/dist/plus/integrations/providers/gitlab/gitlab.js +902 -0
- package/dist/plus/integrations/providers/gitlab/gitlab.js.map +1 -0
- package/dist/plus/integrations/providers/gitlab/gitlab.utils.d.ts +27 -0
- package/dist/plus/integrations/providers/gitlab/gitlab.utils.d.ts.map +1 -0
- package/dist/plus/integrations/providers/gitlab/gitlab.utils.js +53 -0
- package/dist/plus/integrations/providers/gitlab/gitlab.utils.js.map +1 -0
- package/dist/plus/integrations/providers/gitlab/models.d.ts +138 -0
- package/dist/plus/integrations/providers/gitlab/models.d.ts.map +1 -0
- package/dist/plus/integrations/providers/gitlab/models.js +99 -0
- package/dist/plus/integrations/providers/gitlab/models.js.map +1 -0
- package/dist/plus/integrations/providers/gitlab.d.ts +124 -0
- package/dist/plus/integrations/providers/gitlab.d.ts.map +1 -0
- package/dist/plus/integrations/providers/gitlab.js +519 -0
- package/dist/plus/integrations/providers/gitlab.js.map +1 -0
- package/dist/plus/integrations/providers/jira.d.ts +57 -0
- package/dist/plus/integrations/providers/jira.d.ts.map +1 -0
- package/dist/plus/integrations/providers/jira.js +425 -0
- package/dist/plus/integrations/providers/jira.js.map +1 -0
- package/dist/plus/integrations/providers/linear.d.ts +58 -0
- package/dist/plus/integrations/providers/linear.d.ts.map +1 -0
- package/dist/plus/integrations/providers/linear.js +304 -0
- package/dist/plus/integrations/providers/linear.js.map +1 -0
- package/dist/plus/integrations/providers/models.d.ts +712 -0
- package/dist/plus/integrations/providers/models.d.ts.map +1 -0
- package/dist/plus/integrations/providers/models.js +850 -0
- package/dist/plus/integrations/providers/models.js.map +1 -0
- package/dist/plus/integrations/providers/providersApi.d.ts +262 -0
- package/dist/plus/integrations/providers/providersApi.d.ts.map +1 -0
- package/dist/plus/integrations/providers/providersApi.js +1033 -0
- package/dist/plus/integrations/providers/providersApi.js.map +1 -0
- package/dist/plus/integrations/providers/trello.d.ts +47 -0
- package/dist/plus/integrations/providers/trello.d.ts.map +1 -0
- package/dist/plus/integrations/providers/trello.js +141 -0
- package/dist/plus/integrations/providers/trello.js.map +1 -0
- package/dist/plus/integrations/providers/utils/providerPaging.d.ts +29 -0
- package/dist/plus/integrations/providers/utils/providerPaging.d.ts.map +1 -0
- package/dist/plus/integrations/providers/utils/providerPaging.js +154 -0
- package/dist/plus/integrations/providers/utils/providerPaging.js.map +1 -0
- package/dist/plus/integrations/providers/utils.d.ts +75 -0
- package/dist/plus/integrations/providers/utils.d.ts.map +1 -0
- package/dist/plus/integrations/providers/utils.js +313 -0
- package/dist/plus/integrations/providers/utils.js.map +1 -0
- package/dist/plus/integrations/reads/context.d.ts +52 -0
- package/dist/plus/integrations/reads/context.d.ts.map +1 -0
- package/dist/plus/integrations/reads/context.js +2 -0
- package/dist/plus/integrations/reads/context.js.map +1 -0
- package/dist/plus/integrations/reads/cursors.d.ts +66 -0
- package/dist/plus/integrations/reads/cursors.d.ts.map +1 -0
- package/dist/plus/integrations/reads/cursors.js +133 -0
- package/dist/plus/integrations/reads/cursors.js.map +1 -0
- package/dist/plus/integrations/reads/drains.d.ts +60 -0
- package/dist/plus/integrations/reads/drains.d.ts.map +1 -0
- package/dist/plus/integrations/reads/drains.js +255 -0
- package/dist/plus/integrations/reads/drains.js.map +1 -0
- package/dist/plus/integrations/reads/filters.d.ts +81 -0
- package/dist/plus/integrations/reads/filters.d.ts.map +1 -0
- package/dist/plus/integrations/reads/filters.js +87 -0
- package/dist/plus/integrations/reads/filters.js.map +1 -0
- package/dist/plus/integrations/reads/hierarchy.d.ts +17 -0
- package/dist/plus/integrations/reads/hierarchy.d.ts.map +1 -0
- package/dist/plus/integrations/reads/hierarchy.js +348 -0
- package/dist/plus/integrations/reads/hierarchy.js.map +1 -0
- package/dist/plus/integrations/reads/hierarchy.utils.d.ts +53 -0
- package/dist/plus/integrations/reads/hierarchy.utils.d.ts.map +1 -0
- package/dist/plus/integrations/reads/hierarchy.utils.js +85 -0
- package/dist/plus/integrations/reads/hierarchy.utils.js.map +1 -0
- package/dist/plus/integrations/reads/issueTracker.d.ts +19 -0
- package/dist/plus/integrations/reads/issueTracker.d.ts.map +1 -0
- package/dist/plus/integrations/reads/issueTracker.js +346 -0
- package/dist/plus/integrations/reads/issueTracker.js.map +1 -0
- package/dist/plus/integrations/reads/issues.d.ts +34 -0
- package/dist/plus/integrations/reads/issues.d.ts.map +1 -0
- package/dist/plus/integrations/reads/issues.js +244 -0
- package/dist/plus/integrations/reads/issues.js.map +1 -0
- package/dist/plus/integrations/reads/paging.d.ts +136 -0
- package/dist/plus/integrations/reads/paging.d.ts.map +1 -0
- package/dist/plus/integrations/reads/paging.js +221 -0
- package/dist/plus/integrations/reads/paging.js.map +1 -0
- package/dist/plus/integrations/reads/pullRequests.d.ts +32 -0
- package/dist/plus/integrations/reads/pullRequests.d.ts.map +1 -0
- package/dist/plus/integrations/reads/pullRequests.js +151 -0
- package/dist/plus/integrations/reads/pullRequests.js.map +1 -0
- package/dist/plus/integrations/reads/warnings.d.ts +47 -0
- package/dist/plus/integrations/reads/warnings.d.ts.map +1 -0
- package/dist/plus/integrations/reads/warnings.js +81 -0
- package/dist/plus/integrations/reads/warnings.js.map +1 -0
- package/dist/plus/integrations/results.d.ts +189 -0
- package/dist/plus/integrations/results.d.ts.map +1 -0
- package/dist/plus/integrations/results.js +62 -0
- package/dist/plus/integrations/results.js.map +1 -0
- package/dist/plus/integrations/telemetry.d.ts +26 -0
- package/dist/plus/integrations/telemetry.d.ts.map +1 -0
- package/dist/plus/integrations/telemetry.js +11 -0
- package/dist/plus/integrations/telemetry.js.map +1 -0
- package/dist/plus/integrations/utils/domain.utils.d.ts +5 -0
- package/dist/plus/integrations/utils/domain.utils.d.ts.map +1 -0
- package/dist/plus/integrations/utils/domain.utils.js +27 -0
- package/dist/plus/integrations/utils/domain.utils.js.map +1 -0
- package/dist/plus/integrations/utils/integration.utils.d.ts +40 -0
- package/dist/plus/integrations/utils/integration.utils.d.ts.map +1 -0
- package/dist/plus/integrations/utils/integration.utils.js +182 -0
- package/dist/plus/integrations/utils/integration.utils.js.map +1 -0
- package/dist/utils/array.d.ts.map +1 -1
- package/dist/utils/array.js.map +1 -1
- package/dist/utils/brand.d.ts.map +1 -1
- package/dist/utils/cancellation.d.ts +13 -0
- package/dist/utils/cancellation.d.ts.map +1 -1
- package/dist/utils/cancellation.js +52 -7
- package/dist/utils/cancellation.js.map +1 -1
- package/dist/utils/charCode.d.ts.map +1 -1
- package/dist/utils/coalescedRun.d.ts +16 -0
- package/dist/utils/coalescedRun.d.ts.map +1 -0
- package/dist/utils/coalescedRun.js +43 -0
- package/dist/utils/coalescedRun.js.map +1 -0
- package/dist/utils/color.d.ts.map +1 -1
- package/dist/utils/color.js +3 -3
- package/dist/utils/color.js.map +1 -1
- package/dist/utils/date.d.ts +24 -0
- package/dist/utils/date.d.ts.map +1 -1
- package/dist/utils/date.js +62 -0
- package/dist/utils/date.js.map +1 -1
- package/dist/utils/debounce.js +1 -1
- package/dist/utils/debounce.js.map +1 -1
- package/dist/utils/decorators/debounce.d.ts.map +1 -1
- package/dist/utils/decorators/debounce.js.map +1 -1
- package/dist/utils/decorators/gate.d.ts.map +1 -1
- package/dist/utils/decorators/gate.js +2 -2
- package/dist/utils/decorators/gate.js.map +1 -1
- package/dist/utils/decorators/log.d.ts.map +1 -1
- package/dist/utils/decorators/log.js +5 -5
- package/dist/utils/decorators/log.js.map +1 -1
- package/dist/utils/decorators/memoize.d.ts.map +1 -1
- package/dist/utils/decorators/memoize.js +2 -2
- package/dist/utils/decorators/memoize.js.map +1 -1
- package/dist/utils/decorators/resolver.d.ts.map +1 -1
- package/dist/utils/decorators/resolver.js.map +1 -1
- package/dist/utils/decorators/sequentialize.d.ts.map +1 -1
- package/dist/utils/decorators/sequentialize.js +2 -2
- package/dist/utils/decorators/sequentialize.js.map +1 -1
- package/dist/utils/decorators/serializable.d.ts.map +1 -1
- package/dist/utils/decorators/serializable.js +1 -1
- package/dist/utils/decorators/serializable.js.map +1 -1
- package/dist/utils/dedupedAsyncCache.d.ts.map +1 -1
- package/dist/utils/disposable.d.ts +15 -2
- package/dist/utils/disposable.d.ts.map +1 -1
- package/dist/utils/disposable.js.map +1 -1
- package/dist/utils/env/browser/base64.d.ts.map +1 -1
- package/dist/utils/env/browser/base64.js.map +1 -1
- package/dist/utils/env/browser/crypto.d.ts.map +1 -1
- package/dist/utils/env/browser/crypto.js.map +1 -1
- package/dist/utils/env/browser/fs.d.ts.map +1 -1
- package/dist/utils/env/browser/fs.js.map +1 -1
- package/dist/utils/env/browser/hex.d.ts.map +1 -1
- package/dist/utils/env/browser/hex.js.map +1 -1
- package/dist/utils/env/browser/hrtime.d.ts.map +1 -1
- package/dist/utils/env/browser/hrtime.js.map +1 -1
- package/dist/utils/env/browser/logScope.d.ts.map +1 -1
- package/dist/utils/env/browser/logScope.js.map +1 -1
- package/dist/utils/env/browser/md5.d.ts.map +1 -1
- package/dist/utils/env/browser/md5.js.map +1 -1
- package/dist/utils/env/browser/platform.d.ts.map +1 -1
- package/dist/utils/env/browser/platform.js.map +1 -1
- package/dist/utils/env/node/base64.d.ts.map +1 -1
- package/dist/utils/env/node/base64.js.map +1 -1
- package/dist/utils/env/node/crypto.d.ts.map +1 -1
- package/dist/utils/env/node/crypto.js.map +1 -1
- package/dist/utils/env/node/exec.d.ts +9 -1
- package/dist/utils/env/node/exec.d.ts.map +1 -1
- package/dist/utils/env/node/exec.js +11 -4
- package/dist/utils/env/node/exec.js.map +1 -1
- package/dist/utils/env/node/fs.d.ts.map +1 -1
- package/dist/utils/env/node/fs.js.map +1 -1
- package/dist/utils/env/node/hex.d.ts.map +1 -1
- package/dist/utils/env/node/hex.js.map +1 -1
- package/dist/utils/env/node/hrtime.d.ts.map +1 -1
- package/dist/utils/env/node/hrtime.js.map +1 -1
- package/dist/utils/env/node/logScope.d.ts.map +1 -1
- package/dist/utils/env/node/logScope.js.map +1 -1
- package/dist/utils/env/node/platform.d.ts.map +1 -1
- package/dist/utils/env/node/platform.js.map +1 -1
- package/dist/utils/event.d.ts.map +1 -1
- package/dist/utils/event.js +18 -22
- package/dist/utils/event.js.map +1 -1
- package/dist/utils/formatter.d.ts.map +1 -1
- package/dist/utils/formatter.js.map +1 -1
- package/dist/utils/function.d.ts.map +1 -1
- package/dist/utils/function.js +3 -3
- package/dist/utils/function.js.map +1 -1
- package/dist/utils/hash.js.map +1 -1
- package/dist/utils/iterable.d.ts.map +1 -1
- package/dist/utils/iterable.js +2 -6
- package/dist/utils/iterable.js.map +1 -1
- package/dist/utils/lazy.d.ts.map +1 -1
- package/dist/utils/lazy.js.map +1 -1
- package/dist/utils/logger.d.ts.map +1 -1
- package/dist/utils/logger.js +1 -1
- package/dist/utils/logger.js.map +1 -1
- package/dist/utils/logger.scoped.js +1 -1
- package/dist/utils/logger.scoped.js.map +1 -1
- package/dist/utils/lruMap.d.ts.map +1 -1
- package/dist/utils/lruMap.js.map +1 -1
- package/dist/utils/mru.d.ts.map +1 -1
- package/dist/utils/mru.js.map +1 -1
- package/dist/utils/object.js.map +1 -1
- package/dist/utils/paging.d.ts +29 -0
- package/dist/utils/paging.d.ts.map +1 -1
- package/dist/utils/paging.js +18 -0
- package/dist/utils/paging.js.map +1 -1
- package/dist/utils/path.js.map +1 -1
- package/dist/utils/promise.d.ts +10 -0
- package/dist/utils/promise.d.ts.map +1 -1
- package/dist/utils/promise.js +26 -3
- package/dist/utils/promise.js.map +1 -1
- package/dist/utils/promiseCache.d.ts +12 -2
- package/dist/utils/promiseCache.d.ts.map +1 -1
- package/dist/utils/promiseCache.js +80 -50
- package/dist/utils/promiseCache.js.map +1 -1
- package/dist/utils/searchTree.d.ts.map +1 -1
- package/dist/utils/searchTree.js +4 -1
- package/dist/utils/searchTree.js.map +1 -1
- package/dist/utils/stopwatch.d.ts.map +1 -1
- package/dist/utils/string.js +1 -1
- package/dist/utils/string.js.map +1 -1
- package/dist/utils/subscriptionManager.d.ts.map +1 -1
- package/dist/utils/subscriptionManager.js.map +1 -1
- package/dist/utils/trie.d.ts.map +1 -1
- package/dist/utils/trie.js +1 -0
- package/dist/utils/trie.js.map +1 -1
- package/docs/integrations.md +372 -0
- package/docs/kepler-read-api-parity.md +112 -0
- package/package.json +238 -172
- package/src/git/cache.ts +75 -8
- package/src/git/context.ts +4 -3
- package/src/git/errors.ts +36 -1
- package/src/git/models/commit.ts +1 -1
- package/src/git/models/graph.ts +147 -0
- package/src/git/models/graphSession.ts +205 -0
- package/src/git/models/issue.ts +12 -1
- package/src/git/models/pullRequest.ts +27 -1
- package/src/git/models/repository.ts +24 -1
- package/src/git/models/resourceDescriptor.ts +17 -0
- package/src/git/models/signature.ts +16 -0
- package/src/git/models/tag.ts +6 -1
- package/src/git/parsers/diffParser.ts +1 -1
- package/src/git/providers/branches.ts +6 -1
- package/src/git/providers/commits.ts +6 -1
- package/src/git/providers/config.ts +5 -1
- package/src/git/providers/graph.ts +69 -2
- package/src/git/providers/operations.ts +1 -1
- package/src/git/providers/status.ts +1 -1
- package/src/git/providers/worktrees.ts +17 -3
- package/src/git/remotes/azure-devops.ts +29 -33
- package/src/git/remotes/bitbucket-server.ts +23 -25
- package/src/git/remotes/bitbucket.ts +23 -25
- package/src/git/remotes/gerrit.ts +12 -14
- package/src/git/remotes/gitea.ts +13 -15
- package/src/git/remotes/github.ts +56 -58
- package/src/git/remotes/gitlab.ts +102 -104
- package/src/git/run.types.ts +54 -4
- package/src/git/utils/branch.utils.ts +12 -1
- package/src/git/utils/conflictResolution.utils.ts +126 -0
- package/src/git/utils/contributor.utils.ts +1 -1
- package/src/git/utils/fileStatus.utils.ts +7 -0
- package/src/git/utils/graph.utils.ts +46 -0
- package/src/git/utils/issue.utils.ts +1 -0
- package/src/git/utils/pullRequest.utils.ts +9 -0
- package/src/git/utils/reachability.utils.ts +79 -8
- package/src/git/utils/sshKey.utils.ts +30 -0
- package/src/git/watching/watchService.ts +16 -1
- package/src/git/watching/watchSession.ts +20 -2
- package/src/git-cli/exec/git.ts +144 -42
- package/src/git-cli/parsers/logParser.ts +83 -1
- package/src/git-cli/parsers/sshSignatureParser.ts +85 -0
- package/src/git-cli/parsers/worktreeParser.ts +5 -7
- package/src/git-cli/providers/branches.ts +60 -38
- package/src/git-cli/providers/commits.ts +102 -9
- package/src/git-cli/providers/graph.ts +1771 -393
- package/src/git-cli/providers/operations.ts +22 -2
- package/src/git-cli/providers/pausedOperations.ts +3 -3
- package/src/git-cli/providers/revision.ts +42 -0
- package/src/git-cli/providers/status.ts +333 -178
- package/src/git-cli/providers/tags.ts +2 -0
- package/src/git-cli/providers/worktrees.ts +57 -6
- package/src/git-cli/service.ts +9 -0
- package/src/ipc/ipcServer.ts +1 -1
- package/src/plus/agents/providers/claudeCodeProvider.ts +25 -0
- package/src/plus/agents/providers/claudeCodeTranscript.ts +320 -8
- package/src/plus/agents/types.ts +34 -0
- package/src/plus/ai/constants.ts +1 -9
- package/src/plus/ai/models/model.ts +53 -2
- package/src/plus/ai/models/promptTemplates.ts +9 -2
- package/src/plus/ai/prompts.ts +16 -48
- package/src/plus/ai/providers/anthropicProvider.ts +45 -3
- package/src/plus/ai/providers/deepSeekProvider.ts +17 -1
- package/src/plus/ai/providers/geminiProvider.ts +25 -6
- package/src/plus/ai/providers/gitkrakenProvider.ts +2 -0
- package/src/plus/ai/providers/huggingFaceProvider.ts +28 -21
- package/src/plus/ai/providers/openAICompatibleProviderBase.ts +16 -1
- package/src/plus/ai/providers/xaiProvider.ts +14 -1
- package/src/plus/ai/utils/ai.utils.ts +5 -7
- package/src/plus/ai/utils/results.utils.ts +32 -0
- package/src/plus/ai/utils/truncation.utils.ts +0 -1
- package/src/plus/git-github/api/github.ts +497 -129
- package/src/plus/git-github/models.ts +33 -0
- package/src/plus/git-github/providers/github/branches.ts +6 -3
- package/src/plus/git-github/providers/github/diff.ts +1 -1
- package/src/plus/git-github/providers/github/graph.ts +131 -0
- package/src/plus/git-github/providers/github/tags.ts +2 -0
- package/src/plus/integrations/authentication/cloudIntegrationService.ts +292 -0
- package/src/plus/integrations/authentication/configuredIntegrationService.ts +651 -0
- package/src/plus/integrations/authentication/integrationAuthenticationProvider.ts +363 -0
- package/src/plus/integrations/authentication/integrationAuthenticationService.ts +148 -0
- package/src/plus/integrations/authentication/manualTokenProvider.ts +79 -0
- package/src/plus/integrations/authentication/models.ts +202 -0
- package/src/plus/integrations/collectionMetadata.ts +143 -0
- package/src/plus/integrations/constants.ts +190 -0
- package/src/plus/integrations/context.ts +382 -0
- package/src/plus/integrations/errors.ts +184 -0
- package/src/plus/integrations/index.ts +216 -0
- package/src/plus/integrations/integrationService.ts +2589 -0
- package/src/plus/integrations/lite.ts +233 -0
- package/src/plus/integrations/manager.ts +359 -0
- package/src/plus/integrations/models/gitHostIntegration.ts +1631 -0
- package/src/plus/integrations/models/integration.ts +926 -0
- package/src/plus/integrations/models/issuesIntegration.ts +264 -0
- package/src/plus/integrations/providerFilters.ts +12 -0
- package/src/plus/integrations/providers/apiClients.ts +69 -0
- package/src/plus/integrations/providers/apiConfig.ts +71 -0
- package/src/plus/integrations/providers/azure/azure.ts +822 -0
- package/src/plus/integrations/providers/azure/models.ts +618 -0
- package/src/plus/integrations/providers/azureDevOps.ts +1342 -0
- package/src/plus/integrations/providers/bitbucket/bitbucket.ts +904 -0
- package/src/plus/integrations/providers/bitbucket/models.ts +445 -0
- package/src/plus/integrations/providers/bitbucket-server/models.ts +283 -0
- package/src/plus/integrations/providers/bitbucket-server.ts +447 -0
- package/src/plus/integrations/providers/bitbucket.ts +794 -0
- package/src/plus/integrations/providers/github/github.ts +64 -0
- package/src/plus/integrations/providers/github/github.utils.ts +23 -0
- package/src/plus/integrations/providers/github/models.ts +29 -0
- package/src/plus/integrations/providers/github.ts +750 -0
- package/src/plus/integrations/providers/gitlab/gitlab.ts +1320 -0
- package/src/plus/integrations/providers/gitlab/gitlab.utils.ts +80 -0
- package/src/plus/integrations/providers/gitlab/models.ts +271 -0
- package/src/plus/integrations/providers/gitlab.ts +832 -0
- package/src/plus/integrations/providers/jira.ts +564 -0
- package/src/plus/integrations/providers/linear.ts +402 -0
- package/src/plus/integrations/providers/models.ts +1622 -0
- package/src/plus/integrations/providers/providersApi.ts +1889 -0
- package/src/plus/integrations/providers/trello.ts +205 -0
- package/src/plus/integrations/providers/utils/providerPaging.ts +177 -0
- package/src/plus/integrations/providers/utils.ts +419 -0
- package/src/plus/integrations/reads/context.ts +75 -0
- package/src/plus/integrations/reads/cursors.ts +224 -0
- package/src/plus/integrations/reads/drains.ts +343 -0
- package/src/plus/integrations/reads/filters.ts +124 -0
- package/src/plus/integrations/reads/hierarchy.ts +493 -0
- package/src/plus/integrations/reads/hierarchy.utils.ts +106 -0
- package/src/plus/integrations/reads/issueTracker.ts +480 -0
- package/src/plus/integrations/reads/issues.ts +407 -0
- package/src/plus/integrations/reads/paging.ts +277 -0
- package/src/plus/integrations/reads/pullRequests.ts +267 -0
- package/src/plus/integrations/reads/warnings.ts +170 -0
- package/src/plus/integrations/results.ts +275 -0
- package/src/plus/integrations/telemetry.ts +29 -0
- package/src/plus/integrations/utils/domain.utils.ts +26 -0
- package/src/plus/integrations/utils/integration.utils.ts +215 -0
- package/src/utils/brand.ts +0 -2
- package/src/utils/cancellation.ts +56 -7
- package/src/utils/coalescedRun.ts +45 -0
- package/src/utils/color.ts +3 -3
- package/src/utils/date.ts +72 -0
- package/src/utils/debounce.ts +1 -1
- package/src/utils/decorators/gate.ts +2 -2
- package/src/utils/decorators/log.ts +5 -5
- package/src/utils/decorators/memoize.ts +2 -2
- package/src/utils/decorators/sequentialize.ts +2 -2
- package/src/utils/decorators/serializable.ts +1 -1
- package/src/utils/disposable.ts +15 -2
- package/src/utils/env/node/exec.ts +20 -5
- package/src/utils/event.ts +19 -25
- package/src/utils/function.ts +3 -3
- package/src/utils/iterable.ts +2 -6
- package/src/utils/logger.scoped.ts +1 -1
- package/src/utils/logger.ts +1 -1
- package/src/utils/paging.ts +46 -0
- package/src/utils/promise.ts +33 -3
- package/src/utils/promiseCache.ts +81 -51
- package/src/utils/searchTree.ts +4 -2
- package/src/utils/string.ts +1 -1
- package/src/utils/trie.ts +1 -0
- package/dist/plus/ai/providers/githubModelsProvider.d.ts +0 -19
- package/dist/plus/ai/providers/githubModelsProvider.d.ts.map +0 -1
- package/dist/plus/ai/providers/githubModelsProvider.js +0 -51
- package/dist/plus/ai/providers/githubModelsProvider.js.map +0 -1
- package/src/plus/ai/providers/githubModelsProvider.ts +0 -92
|
@@ -0,0 +1,832 @@
|
|
|
1
|
+
import type { CollectionMetadata, CollectionScopeFailure } from '@gitkraken/provider-apis';
|
|
2
|
+
import type { Account } from '../../../git/models/author.js';
|
|
3
|
+
import type { DefaultBranch } from '../../../git/models/defaultBranch.js';
|
|
4
|
+
import type { Issue, IssueShape } from '../../../git/models/issue.js';
|
|
5
|
+
import type { IssueOrPullRequest } from '../../../git/models/issueOrPullRequest.js';
|
|
6
|
+
import type {
|
|
7
|
+
PullRequest,
|
|
8
|
+
PullRequestMergeMethod,
|
|
9
|
+
PullRequestState,
|
|
10
|
+
PullRequestStateFilter,
|
|
11
|
+
} from '../../../git/models/pullRequest.js';
|
|
12
|
+
import type { RepositoryMetadata } from '../../../git/models/repositoryMetadata.js';
|
|
13
|
+
import type { RepositoryDescriptor } from '../../../git/models/resourceDescriptor.js';
|
|
14
|
+
import type { PullRequestUrlIdentity } from '../../../git/utils/pullRequest.utils.js';
|
|
15
|
+
import { CancellationError } from '../../../utils/cancellation.js';
|
|
16
|
+
import type { Emitter } from '../../../utils/event.js';
|
|
17
|
+
import { uniqueBy } from '../../../utils/iterable.js';
|
|
18
|
+
import { batch } from '../../../utils/promise.js';
|
|
19
|
+
import type { IntegrationAuthenticationProviderDescriptor } from '../authentication/integrationAuthenticationProvider.js';
|
|
20
|
+
import type { IntegrationAuthenticationService } from '../authentication/integrationAuthenticationService.js';
|
|
21
|
+
import type { ProviderAuthenticationSession } from '../authentication/models.js';
|
|
22
|
+
import { toTokenWithInfo } from '../authentication/models.js';
|
|
23
|
+
import { toCollectionScopeFailure } from '../collectionMetadata.js';
|
|
24
|
+
import { GitCloudHostIntegrationId, GitSelfManagedHostIntegrationId } from '../constants.js';
|
|
25
|
+
import type { IntegrationServiceContext } from '../context.js';
|
|
26
|
+
import type { IntegrationConnectionChangeEvent } from '../integrationService.js';
|
|
27
|
+
import type { SearchMyPullRequestsOptions } from '../models/gitHostIntegration.js';
|
|
28
|
+
import { GitHostIntegration } from '../models/gitHostIntegration.js';
|
|
29
|
+
import type { AccountWideIssuesResult, SearchMyIssuesOptions } from '../models/integration.js';
|
|
30
|
+
import type { GitLabIntegrationIds } from './gitlab/gitlab.utils.js';
|
|
31
|
+
import { getGitLabPullRequestIdentityFromMaybeUrl, matchesGitLabOrgNamespace } from './gitlab/gitlab.utils.js';
|
|
32
|
+
import { fromGitLabMergeRequestProvidersApi } from './gitlab/models.js';
|
|
33
|
+
import type {
|
|
34
|
+
ProviderApiPagedResult,
|
|
35
|
+
ProviderHierarchyResult,
|
|
36
|
+
ProviderOrganization,
|
|
37
|
+
ProviderPullRequest,
|
|
38
|
+
ProviderRepository,
|
|
39
|
+
} from './models.js';
|
|
40
|
+
import {
|
|
41
|
+
getProviderPullRequestIdentity,
|
|
42
|
+
IssueFilter,
|
|
43
|
+
ProviderPullRequestReviewState,
|
|
44
|
+
providersMetadata,
|
|
45
|
+
PullRequestFilter,
|
|
46
|
+
toIssueShape,
|
|
47
|
+
toProviderPullRequestStates,
|
|
48
|
+
} from './models.js';
|
|
49
|
+
import type { ProvidersApi } from './providersApi.js';
|
|
50
|
+
import { collectProviderPagedResult, mergeCollectionMetadata } from './utils/providerPaging.js';
|
|
51
|
+
|
|
52
|
+
const metadata = providersMetadata[GitCloudHostIntegrationId.GitLab];
|
|
53
|
+
const authProvider: IntegrationAuthenticationProviderDescriptor = Object.freeze({
|
|
54
|
+
id: metadata.id,
|
|
55
|
+
scopes: metadata.scopes,
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
const cloudEnterpriseMetadata = providersMetadata[GitSelfManagedHostIntegrationId.CloudGitLabSelfHosted];
|
|
59
|
+
const cloudEnterpriseAuthProvider: IntegrationAuthenticationProviderDescriptor = Object.freeze({
|
|
60
|
+
id: cloudEnterpriseMetadata.id,
|
|
61
|
+
scopes: cloudEnterpriseMetadata.scopes,
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
type GitLabPullRequestAssociation = 'assigned' | 'authored' | 'reviewRequested';
|
|
65
|
+
type GitLabPullRequestFacetCursor = Partial<Record<GitLabPullRequestAssociation, string>>;
|
|
66
|
+
|
|
67
|
+
const gitLabAssociationForFilter: Record<
|
|
68
|
+
Exclude<PullRequestFilter, PullRequestFilter.Mention>,
|
|
69
|
+
GitLabPullRequestAssociation
|
|
70
|
+
> = {
|
|
71
|
+
[PullRequestFilter.Assignee]: 'assigned',
|
|
72
|
+
[PullRequestFilter.Author]: 'authored',
|
|
73
|
+
[PullRequestFilter.ReviewRequested]: 'reviewRequested',
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
function parseGitLabPullRequestFacetCursor(cursor: string | undefined): GitLabPullRequestFacetCursor {
|
|
77
|
+
if (!cursor) return {};
|
|
78
|
+
|
|
79
|
+
try {
|
|
80
|
+
const parsed = JSON.parse(cursor) as { type?: unknown; cursors?: unknown };
|
|
81
|
+
if (parsed.type !== 'gitlab-associations' || parsed.cursors == null || typeof parsed.cursors !== 'object') {
|
|
82
|
+
return {};
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
const cursors = parsed.cursors as Record<string, unknown>;
|
|
86
|
+
return Object.fromEntries(
|
|
87
|
+
(['assigned', 'authored', 'reviewRequested'] as const)
|
|
88
|
+
.filter(association => typeof cursors[association] === 'string' && cursors[association] !== '')
|
|
89
|
+
.map(association => [association, cursors[association] as string]),
|
|
90
|
+
);
|
|
91
|
+
} catch {
|
|
92
|
+
return {};
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export type GitLabRepositoryDescriptor = RepositoryDescriptor;
|
|
97
|
+
|
|
98
|
+
/** How many SSH signing-key lookups (account resolve + keys fetch) to run concurrently, to avoid a request burst. */
|
|
99
|
+
const sshSigningKeyResolveBatchSize = 10;
|
|
100
|
+
|
|
101
|
+
abstract class GitLabIntegrationBase<ID extends GitLabIntegrationIds> extends GitHostIntegration<
|
|
102
|
+
ID,
|
|
103
|
+
GitLabRepositoryDescriptor
|
|
104
|
+
> {
|
|
105
|
+
protected abstract get apiBaseUrl(): string;
|
|
106
|
+
|
|
107
|
+
/** Self-hosted GitLab uses PAT semantics and a domain-based API base; gitlab.com does not. */
|
|
108
|
+
protected get isEnterprise(): boolean {
|
|
109
|
+
return this.id === GitSelfManagedHostIntegrationId.CloudGitLabSelfHosted;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
protected override async getProviderAccountForCommit(
|
|
113
|
+
session: ProviderAuthenticationSession,
|
|
114
|
+
repo: GitLabRepositoryDescriptor,
|
|
115
|
+
rev: string,
|
|
116
|
+
options?: {
|
|
117
|
+
avatarSize?: number;
|
|
118
|
+
},
|
|
119
|
+
): Promise<Account | undefined> {
|
|
120
|
+
return (await this.authenticationService.apis.gitlab)?.getAccountForCommit(
|
|
121
|
+
this,
|
|
122
|
+
toTokenWithInfo(this.id, session),
|
|
123
|
+
repo.owner,
|
|
124
|
+
repo.name,
|
|
125
|
+
rev,
|
|
126
|
+
{
|
|
127
|
+
...options,
|
|
128
|
+
baseUrl: this.apiBaseUrl,
|
|
129
|
+
},
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
protected override async getProviderAccountForEmail(
|
|
134
|
+
session: ProviderAuthenticationSession,
|
|
135
|
+
repo: GitLabRepositoryDescriptor,
|
|
136
|
+
email: string,
|
|
137
|
+
options?: {
|
|
138
|
+
avatarSize?: number;
|
|
139
|
+
},
|
|
140
|
+
): Promise<Account | undefined> {
|
|
141
|
+
return (await this.authenticationService.apis.gitlab)?.getAccountForEmail(
|
|
142
|
+
this,
|
|
143
|
+
toTokenWithInfo(this.id, session),
|
|
144
|
+
repo.owner,
|
|
145
|
+
repo.name,
|
|
146
|
+
email,
|
|
147
|
+
{
|
|
148
|
+
...options,
|
|
149
|
+
baseUrl: this.apiBaseUrl,
|
|
150
|
+
},
|
|
151
|
+
);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
protected override async getProviderSshSigningKeysForEmails(
|
|
155
|
+
session: ProviderAuthenticationSession,
|
|
156
|
+
repo: GitLabRepositoryDescriptor,
|
|
157
|
+
emails: string[],
|
|
158
|
+
): Promise<Map<string, string[]>> {
|
|
159
|
+
const result = new Map<string, string[]>();
|
|
160
|
+
|
|
161
|
+
const api = await this.authenticationService.apis.gitlab;
|
|
162
|
+
if (api == null) return result;
|
|
163
|
+
|
|
164
|
+
const token = toTokenWithInfo(this.id, session);
|
|
165
|
+
|
|
166
|
+
// GitLab resolves users one email at a time (no batch search). Run them in bounded batches rather than firing all
|
|
167
|
+
// (up to providerVerifyLimit) account + key lookups at once, to avoid a request burst that trips rate limiting.
|
|
168
|
+
await batch(emails, sshSigningKeyResolveBatchSize, async email => {
|
|
169
|
+
const account = await this.getProviderAccountForEmail(session, repo, email);
|
|
170
|
+
if (account?.id == null) return;
|
|
171
|
+
|
|
172
|
+
const keys = await api.getUserSigningKeys(this, token, account.id, { baseUrl: this.apiBaseUrl });
|
|
173
|
+
result.set(
|
|
174
|
+
email.toLowerCase(),
|
|
175
|
+
keys.map(k => k.key),
|
|
176
|
+
);
|
|
177
|
+
});
|
|
178
|
+
|
|
179
|
+
return result;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
protected override async getProviderDefaultBranch(
|
|
183
|
+
session: ProviderAuthenticationSession,
|
|
184
|
+
repo: GitLabRepositoryDescriptor,
|
|
185
|
+
): Promise<DefaultBranch | undefined> {
|
|
186
|
+
return (await this.authenticationService.apis.gitlab)?.getDefaultBranch(
|
|
187
|
+
this,
|
|
188
|
+
toTokenWithInfo(this.id, session),
|
|
189
|
+
repo.owner,
|
|
190
|
+
repo.name,
|
|
191
|
+
{
|
|
192
|
+
baseUrl: this.apiBaseUrl,
|
|
193
|
+
},
|
|
194
|
+
);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
protected override async getProviderLinkedIssueOrPullRequest(
|
|
198
|
+
session: ProviderAuthenticationSession,
|
|
199
|
+
repo: GitLabRepositoryDescriptor,
|
|
200
|
+
{ id }: { id: string; key: string },
|
|
201
|
+
): Promise<IssueOrPullRequest | undefined> {
|
|
202
|
+
return (await this.authenticationService.apis.gitlab)?.getIssueOrPullRequest(
|
|
203
|
+
this,
|
|
204
|
+
toTokenWithInfo(this.id, session),
|
|
205
|
+
repo.owner,
|
|
206
|
+
repo.name,
|
|
207
|
+
Number(id),
|
|
208
|
+
{
|
|
209
|
+
baseUrl: this.apiBaseUrl,
|
|
210
|
+
},
|
|
211
|
+
);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
protected override async getProviderIssue(
|
|
215
|
+
session: ProviderAuthenticationSession,
|
|
216
|
+
repo: GitLabRepositoryDescriptor,
|
|
217
|
+
id: string,
|
|
218
|
+
): Promise<Issue | undefined> {
|
|
219
|
+
const api = await this.authenticationService.apis.gitlab;
|
|
220
|
+
const providerApi = await this.getProvidersApi();
|
|
221
|
+
if (!api || !repo || !id) {
|
|
222
|
+
return undefined;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
const repoId = await api.getProjectId(
|
|
226
|
+
this,
|
|
227
|
+
toTokenWithInfo(this.id, session),
|
|
228
|
+
repo.owner,
|
|
229
|
+
repo.name,
|
|
230
|
+
this.apiBaseUrl,
|
|
231
|
+
undefined,
|
|
232
|
+
);
|
|
233
|
+
if (!repoId) {
|
|
234
|
+
return undefined;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
const apiResult = await providerApi.getIssue(
|
|
238
|
+
toTokenWithInfo(this.id, session),
|
|
239
|
+
{ namespace: repo.owner, name: repo.name, number: id },
|
|
240
|
+
{
|
|
241
|
+
isPAT: this.isEnterprise,
|
|
242
|
+
baseUrl: this.isEnterprise ? `https://${this.domain}` : undefined,
|
|
243
|
+
},
|
|
244
|
+
);
|
|
245
|
+
const issue = apiResult != null ? toIssueShape(apiResult, this) : undefined;
|
|
246
|
+
return issue != null ? { ...issue, type: 'issue' } : undefined;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
protected override async getProviderPullRequestForBranch(
|
|
250
|
+
session: ProviderAuthenticationSession,
|
|
251
|
+
repo: GitLabRepositoryDescriptor,
|
|
252
|
+
branch: string,
|
|
253
|
+
options?: {
|
|
254
|
+
avatarSize?: number;
|
|
255
|
+
include?: PullRequestState[];
|
|
256
|
+
},
|
|
257
|
+
): Promise<PullRequest | undefined> {
|
|
258
|
+
const { include, ...opts } = options ?? {};
|
|
259
|
+
|
|
260
|
+
const toGitLabMergeRequestState = (await import(/* webpackChunkName: "integrations" */ './gitlab/models.js'))
|
|
261
|
+
.toGitLabMergeRequestState;
|
|
262
|
+
return (await this.authenticationService.apis.gitlab)?.getPullRequestForBranch(
|
|
263
|
+
this,
|
|
264
|
+
toTokenWithInfo(this.id, session),
|
|
265
|
+
repo.owner,
|
|
266
|
+
repo.name,
|
|
267
|
+
branch,
|
|
268
|
+
{
|
|
269
|
+
...opts,
|
|
270
|
+
include: include?.map(s => toGitLabMergeRequestState(s)),
|
|
271
|
+
baseUrl: this.apiBaseUrl,
|
|
272
|
+
},
|
|
273
|
+
);
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
protected override async getProviderPullRequestForCommit(
|
|
277
|
+
session: ProviderAuthenticationSession,
|
|
278
|
+
repo: GitLabRepositoryDescriptor,
|
|
279
|
+
rev: string,
|
|
280
|
+
): Promise<PullRequest | undefined> {
|
|
281
|
+
return (await this.authenticationService.apis.gitlab)?.getPullRequestForCommit(
|
|
282
|
+
this,
|
|
283
|
+
toTokenWithInfo(this.id, session),
|
|
284
|
+
repo.owner,
|
|
285
|
+
repo.name,
|
|
286
|
+
rev,
|
|
287
|
+
{
|
|
288
|
+
baseUrl: this.apiBaseUrl,
|
|
289
|
+
},
|
|
290
|
+
);
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
protected override async getProviderPullRequest(
|
|
294
|
+
session: ProviderAuthenticationSession,
|
|
295
|
+
resource: GitLabRepositoryDescriptor,
|
|
296
|
+
id: string,
|
|
297
|
+
): Promise<PullRequest | undefined> {
|
|
298
|
+
return (await this.authenticationService.apis.gitlab)?.getPullRequest(
|
|
299
|
+
this,
|
|
300
|
+
toTokenWithInfo(this.id, session),
|
|
301
|
+
resource.owner,
|
|
302
|
+
resource.name,
|
|
303
|
+
parseInt(id, 10),
|
|
304
|
+
{
|
|
305
|
+
baseUrl: this.apiBaseUrl,
|
|
306
|
+
},
|
|
307
|
+
);
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
public override async getRepoInfo(repo: {
|
|
311
|
+
owner: string;
|
|
312
|
+
name: string;
|
|
313
|
+
project?: string;
|
|
314
|
+
connectionId?: string;
|
|
315
|
+
}): Promise<ProviderRepository | undefined> {
|
|
316
|
+
const api = await this.getProvidersApi();
|
|
317
|
+
// `connectionId` targets a specific account (multi-account); omitted reads the primary.
|
|
318
|
+
const session = await this.resolveReadSession(repo.connectionId, undefined);
|
|
319
|
+
if (session == null) return undefined;
|
|
320
|
+
|
|
321
|
+
return api.getRepo(toTokenWithInfo(this.id, session), repo.owner, repo.name, repo.project, {
|
|
322
|
+
isPAT: this.isEnterprise,
|
|
323
|
+
baseUrl: this.isEnterprise ? `https://${this.domain}` : undefined,
|
|
324
|
+
});
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
protected override async getProviderRepositoryMetadata(
|
|
328
|
+
session: ProviderAuthenticationSession,
|
|
329
|
+
repo: GitLabRepositoryDescriptor,
|
|
330
|
+
cancellation?: AbortSignal,
|
|
331
|
+
): Promise<RepositoryMetadata | undefined> {
|
|
332
|
+
return (await this.authenticationService.apis.gitlab)?.getRepositoryMetadata(
|
|
333
|
+
this,
|
|
334
|
+
toTokenWithInfo(this.id, session),
|
|
335
|
+
repo.owner,
|
|
336
|
+
repo.name,
|
|
337
|
+
{
|
|
338
|
+
baseUrl: this.apiBaseUrl,
|
|
339
|
+
},
|
|
340
|
+
cancellation,
|
|
341
|
+
);
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
protected override async getProviderOrganizationsForUser(
|
|
345
|
+
session: ProviderAuthenticationSession,
|
|
346
|
+
): Promise<ProviderHierarchyResult<ProviderOrganization> | undefined> {
|
|
347
|
+
const api = await this.getProvidersApi();
|
|
348
|
+
const result = await api.getGitlabGroupsForCurrentUser(toTokenWithInfo(this.id, session), {
|
|
349
|
+
isPAT: this.isEnterprise,
|
|
350
|
+
baseUrl: this.isEnterprise ? `https://${this.domain}` : undefined,
|
|
351
|
+
});
|
|
352
|
+
return {
|
|
353
|
+
values: result.values.map(g => ({ id: g.id, providerId: this.id, name: g.fullPath, url: g.webUrl })),
|
|
354
|
+
...(result.truncated ? { truncated: true } : {}),
|
|
355
|
+
...(result.metadata != null ? { metadata: result.metadata } : {}),
|
|
356
|
+
};
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
/**
|
|
360
|
+
* GitLab has no group-scoped repos endpoint, so each page is a page of the current user's member repos
|
|
361
|
+
* across all namespaces, filtered to `org` and its subgroups (mirroring gkcli's `gitlabOrgMatches`).
|
|
362
|
+
* Follow `paging.cursor` to page the full list; repos the user isn't a member of aren't returned.
|
|
363
|
+
* Because the filter is applied per page, a page can come back with `values: []` while
|
|
364
|
+
* `paging.more` is still `true` (e.g. a page full of repos outside `org`) — don't treat an empty
|
|
365
|
+
* page as the end of pagination, only `paging.more`/`collectPagedResults` reaching exhaustion.
|
|
366
|
+
*/
|
|
367
|
+
protected override async getProviderRepositoriesForOrg(
|
|
368
|
+
session: ProviderAuthenticationSession,
|
|
369
|
+
org: string,
|
|
370
|
+
options?: { cursor?: string },
|
|
371
|
+
): Promise<ProviderHierarchyResult<ProviderRepository> | undefined> {
|
|
372
|
+
const api = await this.getProvidersApi();
|
|
373
|
+
const result = await api.getReposForCurrentUser(toTokenWithInfo(this.id, session), {
|
|
374
|
+
isPAT: this.isEnterprise,
|
|
375
|
+
baseUrl: this.isEnterprise ? `https://${this.domain}` : undefined,
|
|
376
|
+
cursor: options?.cursor,
|
|
377
|
+
});
|
|
378
|
+
return {
|
|
379
|
+
values: result.values.filter(r => matchesGitLabOrgNamespace(r.namespace, org)),
|
|
380
|
+
...(result.paging != null ? { paging: result.paging } : {}),
|
|
381
|
+
};
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
protected override async getProviderRepositoriesForUser(
|
|
385
|
+
session: ProviderAuthenticationSession,
|
|
386
|
+
options?: { cursor?: string },
|
|
387
|
+
): Promise<ProviderHierarchyResult<ProviderRepository> | undefined> {
|
|
388
|
+
const api = await this.getProvidersApi();
|
|
389
|
+
// GitLab's membership read is already user-affiliated, so the account-wide walk is the unfiltered
|
|
390
|
+
// version of the per-org read above (which pages the same source and filters by namespace).
|
|
391
|
+
return api.getReposForCurrentUser(toTokenWithInfo(this.id, session), {
|
|
392
|
+
isPAT: this.isEnterprise,
|
|
393
|
+
baseUrl: this.isEnterprise ? `https://${this.domain}` : undefined,
|
|
394
|
+
cursor: options?.cursor,
|
|
395
|
+
});
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
protected override async searchProviderMyPullRequests(
|
|
399
|
+
session: ProviderAuthenticationSession,
|
|
400
|
+
repos?: GitLabRepositoryDescriptor[],
|
|
401
|
+
_cancellation?: AbortSignal,
|
|
402
|
+
_silent?: boolean,
|
|
403
|
+
state?: PullRequestStateFilter,
|
|
404
|
+
_options?: SearchMyPullRequestsOptions,
|
|
405
|
+
): Promise<PullRequest[] | undefined> {
|
|
406
|
+
const api = await this.getProvidersApi();
|
|
407
|
+
// Resolve the username from THIS session's token (multi-account: `session` may be a non-primary
|
|
408
|
+
// connection); `getCurrentAccount()` would use the primary `_session` and filter by the wrong user.
|
|
409
|
+
const username = (await this.getProviderCurrentAccount(session))?.username;
|
|
410
|
+
if (!username) {
|
|
411
|
+
return Promise.resolve([]);
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
const apiResult = await api.getPullRequestsForUser(toTokenWithInfo(this.id, session), username, {
|
|
415
|
+
isPAT: this.isEnterprise,
|
|
416
|
+
baseUrl: this.isEnterprise ? `https://${this.domain}` : undefined,
|
|
417
|
+
states: toProviderPullRequestStates(state),
|
|
418
|
+
});
|
|
419
|
+
|
|
420
|
+
if (apiResult == null) {
|
|
421
|
+
return Promise.resolve([]);
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
// now I'm going to filter prs from the result according to the repos parameter
|
|
425
|
+
let prs;
|
|
426
|
+
if (repos != null) {
|
|
427
|
+
const repoMap = new Map<string, GitLabRepositoryDescriptor>();
|
|
428
|
+
for (const repo of repos) {
|
|
429
|
+
repoMap.set(`${repo.owner}/${repo.name}`, repo);
|
|
430
|
+
}
|
|
431
|
+
prs = apiResult.values.filter(pr => {
|
|
432
|
+
const repo = repoMap.get(`${pr.repository.owner.login}/${pr.repository.name}`);
|
|
433
|
+
return repo != null;
|
|
434
|
+
});
|
|
435
|
+
} else {
|
|
436
|
+
prs = apiResult.values;
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
const results: IterableIterator<PullRequest> = uniqueBy(
|
|
440
|
+
[
|
|
441
|
+
...prs
|
|
442
|
+
.filter(pr => {
|
|
443
|
+
const isAssignee = pr.assignees?.some(a => a.username === username);
|
|
444
|
+
const isRequestedReviewer = pr.reviews?.some(
|
|
445
|
+
// Match only reviews assigned to the current user; a bare `state === ReviewRequested`
|
|
446
|
+
// check would also match reviews requested from OTHER people, leaking their MRs in.
|
|
447
|
+
review =>
|
|
448
|
+
review.reviewer?.username === username &&
|
|
449
|
+
review.state === ProviderPullRequestReviewState.ReviewRequested,
|
|
450
|
+
);
|
|
451
|
+
const isAuthor = pr.author?.username === username;
|
|
452
|
+
// It seems like GitLab doesn't give us mentioned PRs.
|
|
453
|
+
// const isMentioned = ???;
|
|
454
|
+
|
|
455
|
+
return isAssignee || isRequestedReviewer || isAuthor;
|
|
456
|
+
})
|
|
457
|
+
.map(pr => fromGitLabMergeRequestProvidersApi(pr, this)),
|
|
458
|
+
],
|
|
459
|
+
r => r.url,
|
|
460
|
+
(original, _current) => original,
|
|
461
|
+
);
|
|
462
|
+
|
|
463
|
+
return [...results];
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
protected override async getProviderMyPullRequestsForUser(
|
|
467
|
+
session: ProviderAuthenticationSession,
|
|
468
|
+
options?: { state?: PullRequestStateFilter[]; cursor?: string; filters?: PullRequestFilter[] },
|
|
469
|
+
): Promise<ProviderApiPagedResult<ProviderPullRequest> | undefined> {
|
|
470
|
+
// Resolve the username from THIS session's token (multi-account safe) to scope the account-wide read.
|
|
471
|
+
const username = (await this.getProviderCurrentAccount(session))?.username;
|
|
472
|
+
if (username == null) return undefined;
|
|
473
|
+
|
|
474
|
+
const api = await this.getProvidersApi();
|
|
475
|
+
const requested = options?.filters?.length ? new Set(options.filters) : undefined;
|
|
476
|
+
const associations: GitLabPullRequestAssociation[] =
|
|
477
|
+
requested == null
|
|
478
|
+
? ['authored', 'assigned', 'reviewRequested']
|
|
479
|
+
: [...requested]
|
|
480
|
+
.filter(
|
|
481
|
+
(filter): filter is Exclude<PullRequestFilter, PullRequestFilter.Mention> =>
|
|
482
|
+
filter !== PullRequestFilter.Mention,
|
|
483
|
+
)
|
|
484
|
+
.map(filter => gitLabAssociationForFilter[filter]);
|
|
485
|
+
const cursors = parseGitLabPullRequestFacetCursor(options?.cursor);
|
|
486
|
+
const resumable = associations.filter(association => cursors[association] != null);
|
|
487
|
+
const associationsToQuery = options?.cursor != null && resumable.length > 0 ? resumable : associations;
|
|
488
|
+
const tokenWithInfo = toTokenWithInfo(this.id, session);
|
|
489
|
+
const settled = await Promise.allSettled(
|
|
490
|
+
associationsToQuery.map(async association => ({
|
|
491
|
+
association: association,
|
|
492
|
+
result: await api.getGitLabPullRequestsForUserAssociation(tokenWithInfo, username, association, {
|
|
493
|
+
isPAT: this.isEnterprise,
|
|
494
|
+
baseUrl: this.isEnterprise ? `https://${this.domain}` : undefined,
|
|
495
|
+
states: toProviderPullRequestStates(options?.state),
|
|
496
|
+
cursor: cursors[association],
|
|
497
|
+
}),
|
|
498
|
+
})),
|
|
499
|
+
);
|
|
500
|
+
if (settled.every(outcome => outcome.status === 'rejected')) {
|
|
501
|
+
const first = settled[0];
|
|
502
|
+
if (first?.status === 'rejected') throw first.reason;
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
const values = new Map<string, ProviderPullRequest>();
|
|
506
|
+
const nextCursors: GitLabPullRequestFacetCursor = {};
|
|
507
|
+
const failures: CollectionScopeFailure[] = [];
|
|
508
|
+
let aggregateMetadata: CollectionMetadata | undefined;
|
|
509
|
+
let truncated = false;
|
|
510
|
+
let unkeyedPullRequest = 0;
|
|
511
|
+
for (let index = 0; index < settled.length; index++) {
|
|
512
|
+
const outcome = settled[index];
|
|
513
|
+
const association = associationsToQuery[index];
|
|
514
|
+
if (outcome == null || association == null) continue;
|
|
515
|
+
if (outcome.status === 'rejected') {
|
|
516
|
+
const failure = toCollectionScopeFailure({ providerId: this.id }, outcome.reason);
|
|
517
|
+
failures.push({
|
|
518
|
+
...failure,
|
|
519
|
+
message: `GitLab ${association} pull requests could not be read${
|
|
520
|
+
failure.message != null ? `: ${failure.message}` : ''
|
|
521
|
+
}`,
|
|
522
|
+
});
|
|
523
|
+
truncated = true;
|
|
524
|
+
continue;
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
const result = outcome.value.result;
|
|
528
|
+
aggregateMetadata = mergeCollectionMetadata(aggregateMetadata, result.metadata);
|
|
529
|
+
truncated ||=
|
|
530
|
+
result.paging?.truncated === true ||
|
|
531
|
+
(result.metadata != null && result.metadata.completeness !== 'complete');
|
|
532
|
+
for (const pr of result.values) {
|
|
533
|
+
const identity = getProviderPullRequestIdentity(pr) ?? `unkeyed:${unkeyedPullRequest++}`;
|
|
534
|
+
if (!values.has(identity)) {
|
|
535
|
+
values.set(identity, pr);
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
if (result.paging?.more && result.paging.cursor != null && result.paging.cursor !== '{}') {
|
|
539
|
+
nextCursors[association] = result.paging.cursor;
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
aggregateMetadata = mergeCollectionMetadata(
|
|
544
|
+
aggregateMetadata,
|
|
545
|
+
failures.length > 0 ? { completeness: 'partial', failures: failures } : undefined,
|
|
546
|
+
);
|
|
547
|
+
const hasMore = Object.keys(nextCursors).length > 0;
|
|
548
|
+
return {
|
|
549
|
+
values: [...values.values()],
|
|
550
|
+
paging: {
|
|
551
|
+
more: hasMore,
|
|
552
|
+
cursor: hasMore ? JSON.stringify({ type: 'gitlab-associations', cursors: nextCursors }) : '{}',
|
|
553
|
+
truncated: truncated || undefined,
|
|
554
|
+
},
|
|
555
|
+
...(aggregateMetadata != null ? { metadata: aggregateMetadata } : {}),
|
|
556
|
+
};
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
protected override async searchProviderMyIssues(
|
|
560
|
+
session: ProviderAuthenticationSession,
|
|
561
|
+
repos?: GitLabRepositoryDescriptor[],
|
|
562
|
+
): Promise<IssueShape[] | undefined> {
|
|
563
|
+
const api = await this.authenticationService.apis.gitlab;
|
|
564
|
+
const providerApi = await this.getProvidersApi();
|
|
565
|
+
if (!api || !repos) {
|
|
566
|
+
return undefined;
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
const repoIdsResult = await Promise.allSettled(
|
|
570
|
+
repos.map(
|
|
571
|
+
(r: GitLabRepositoryDescriptor): Promise<string | undefined> =>
|
|
572
|
+
api.getProjectId(
|
|
573
|
+
this,
|
|
574
|
+
toTokenWithInfo(this.id, session),
|
|
575
|
+
r.owner,
|
|
576
|
+
r.name,
|
|
577
|
+
this.apiBaseUrl,
|
|
578
|
+
undefined,
|
|
579
|
+
),
|
|
580
|
+
) ?? [],
|
|
581
|
+
);
|
|
582
|
+
const repoInput = repoIdsResult
|
|
583
|
+
.map(result => (result.status === 'fulfilled' ? result.value : undefined))
|
|
584
|
+
.filter((r): r is string => r != null);
|
|
585
|
+
const apiResult = await providerApi.getIssuesForRepos(toTokenWithInfo(this.id, session), repoInput, {
|
|
586
|
+
isPAT: this.isEnterprise,
|
|
587
|
+
baseUrl: this.isEnterprise ? `https://${this.domain}` : undefined,
|
|
588
|
+
});
|
|
589
|
+
|
|
590
|
+
return apiResult.values
|
|
591
|
+
.map(issue => toIssueShape(issue, this))
|
|
592
|
+
.filter((result): result is IssueShape => result != null);
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
/**
|
|
596
|
+
* Account-wide "my issues" for GitLab. GitLab's repo-scoped issue read bails without repos, and GitLab has
|
|
597
|
+
* no GraphQL cross-project issue field, so this goes through the SDK's REST `GET /issues` read
|
|
598
|
+
* ({@link ProvidersApi.getIssuesForCurrentUser}). Open issues only (matching GitHub's baked `is:open`).
|
|
599
|
+
*
|
|
600
|
+
* Default scope is the current user's assigned issues; `includeAllAssignees` broadens to `scope=all` (every
|
|
601
|
+
* visible issue, any assignee). The read is numbered-paged, so each page is drained to exhaustion, bounded by
|
|
602
|
+
* a defensive backstop — a hit backstop is reported as `truncated` so the facade surfaces an incomplete read
|
|
603
|
+
* rather than publishing a partial list as complete.
|
|
604
|
+
*
|
|
605
|
+
* `options.filters` selects which relationships to read: `Assignee` (the default when omitted) and `Author`,
|
|
606
|
+
* each its own drain, unioned by url — see the comment on `passes` for why they can't be one request. Mention
|
|
607
|
+
* is absent because GitLab's REST read exposes no first-class mention filter, and approximating it via `search`
|
|
608
|
+
* would return a different set than asked for; the facade refuses it
|
|
609
|
+
* (see `ProviderMetadata.supportedAccountWideIssueFilters`).
|
|
610
|
+
*/
|
|
611
|
+
protected override async searchProviderMyIssuesWithTruncation(
|
|
612
|
+
session: ProviderAuthenticationSession,
|
|
613
|
+
_resources?: GitLabRepositoryDescriptor[],
|
|
614
|
+
cancellation?: AbortSignal,
|
|
615
|
+
options?: SearchMyIssuesOptions,
|
|
616
|
+
): Promise<AccountWideIssuesResult | undefined> {
|
|
617
|
+
if (cancellation?.aborted) throw new CancellationError();
|
|
618
|
+
|
|
619
|
+
const api = await this.getProvidersApi();
|
|
620
|
+
|
|
621
|
+
// Resolve the username from THIS session's token (multi-account safe), matching the PR account-wide read.
|
|
622
|
+
// Only needed to scope the default (assigned-to-me) read; the all-assignees broaden drops it.
|
|
623
|
+
const username = options?.includeAllAssignees
|
|
624
|
+
? undefined
|
|
625
|
+
: (await this.getProviderCurrentAccount(session))?.username;
|
|
626
|
+
if (!options?.includeAllAssignees && username == null) return undefined;
|
|
627
|
+
if (cancellation?.aborted) throw new CancellationError();
|
|
628
|
+
|
|
629
|
+
const baseUrl = this.isEnterprise ? `https://${this.domain}` : undefined;
|
|
630
|
+
const maxPages = 20;
|
|
631
|
+
// Dedupe by `url`, not `IssueShape.id`: for GitLab `id` is the per-project `iid`, which collides across
|
|
632
|
+
// projects in an account-wide read (two repos both have issue `#1`), so an id-keyed map would silently
|
|
633
|
+
// drop distinct issues. `url` is globally unique. Matches the GitHub/GitLab account-wide PR reads.
|
|
634
|
+
const issuesByUrl = new Map<string, IssueShape>();
|
|
635
|
+
let truncated = false;
|
|
636
|
+
let collectionMetadata: CollectionMetadata | undefined;
|
|
637
|
+
|
|
638
|
+
// One drain PER requested relationship, unioned by url. The account-wide filter contract is a union
|
|
639
|
+
// (`authored ∪ assigned`, matching GitHub's three searches and Azure's two drains), and GitLab can express
|
|
640
|
+
// only one relationship per REST call: `assignee_username` and `author_username` on the same request
|
|
641
|
+
// compose with AND, so a single combined call would return the intersection — issues the user both opened
|
|
642
|
+
// and is assigned to — instead of either set. Overlap between the passes is collapsed by the url map.
|
|
643
|
+
const passes: { scope: 'assigned_to_me' | 'all'; assigneeUsername?: string; authorUsername?: string }[] = [];
|
|
644
|
+
if (options?.includeAllAssignees) {
|
|
645
|
+
// Broadens past "mine" entirely: every visible issue, any assignee. Contradicts `filters`, which the
|
|
646
|
+
// facade refuses before reaching here.
|
|
647
|
+
passes.push({ scope: 'all' });
|
|
648
|
+
} else {
|
|
649
|
+
const filters = options?.filters;
|
|
650
|
+
// Assignee is this read's default relationship, so it runs unless the caller narrowed to author alone.
|
|
651
|
+
if (filters == null || filters.length === 0 || filters.includes(IssueFilter.Assignee)) {
|
|
652
|
+
passes.push({ scope: 'assigned_to_me', assigneeUsername: username });
|
|
653
|
+
}
|
|
654
|
+
// `scope: 'all'` is required for the author axis: paired with `assigned_to_me` GitLab would intersect
|
|
655
|
+
// the two rather than read authored issues.
|
|
656
|
+
if (filters?.includes(IssueFilter.Author)) {
|
|
657
|
+
passes.push({ scope: 'all', authorUsername: username });
|
|
658
|
+
}
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
for (const pass of passes) {
|
|
662
|
+
const result = await collectProviderPagedResult(
|
|
663
|
+
async cursor => {
|
|
664
|
+
if (cancellation?.aborted) throw new CancellationError();
|
|
665
|
+
|
|
666
|
+
const page = await api.getIssuesForCurrentUser(toTokenWithInfo(this.id, session), {
|
|
667
|
+
...pass,
|
|
668
|
+
isPAT: this.isEnterprise,
|
|
669
|
+
baseUrl: baseUrl,
|
|
670
|
+
cursor: cursor,
|
|
671
|
+
});
|
|
672
|
+
if (cancellation?.aborted) throw new CancellationError();
|
|
673
|
+
return page;
|
|
674
|
+
},
|
|
675
|
+
maxPages,
|
|
676
|
+
{ providerId: this.id },
|
|
677
|
+
);
|
|
678
|
+
|
|
679
|
+
for (const issue of result.values) {
|
|
680
|
+
const shape = toIssueShape(issue, this);
|
|
681
|
+
if (shape != null && !issuesByUrl.has(shape.url)) {
|
|
682
|
+
issuesByUrl.set(shape.url, shape);
|
|
683
|
+
}
|
|
684
|
+
}
|
|
685
|
+
truncated ||= result.truncated === true;
|
|
686
|
+
collectionMetadata = mergeCollectionMetadata(collectionMetadata, result.metadata);
|
|
687
|
+
}
|
|
688
|
+
|
|
689
|
+
return {
|
|
690
|
+
values: [...issuesByUrl.values()],
|
|
691
|
+
truncated: truncated,
|
|
692
|
+
...(collectionMetadata != null ? { metadata: collectionMetadata } : {}),
|
|
693
|
+
};
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
protected override async searchProviderPullRequests(
|
|
697
|
+
session: ProviderAuthenticationSession,
|
|
698
|
+
searchQuery: string,
|
|
699
|
+
repos?: GitLabRepositoryDescriptor[],
|
|
700
|
+
cancellation?: AbortSignal,
|
|
701
|
+
options?: { include?: PullRequestState[] },
|
|
702
|
+
): Promise<PullRequest[] | undefined> {
|
|
703
|
+
const api = await this.authenticationService.apis.gitlab;
|
|
704
|
+
if (!api) {
|
|
705
|
+
return undefined;
|
|
706
|
+
}
|
|
707
|
+
|
|
708
|
+
return api.searchPullRequests(
|
|
709
|
+
this,
|
|
710
|
+
toTokenWithInfo(this.id, session),
|
|
711
|
+
{
|
|
712
|
+
search: searchQuery,
|
|
713
|
+
repos: repos?.map(r => `${r.owner}/${r.name}`),
|
|
714
|
+
baseUrl: this.apiBaseUrl,
|
|
715
|
+
include: options?.include,
|
|
716
|
+
},
|
|
717
|
+
cancellation,
|
|
718
|
+
);
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
protected override async mergeProviderPullRequest(
|
|
722
|
+
session: ProviderAuthenticationSession,
|
|
723
|
+
pr: PullRequest,
|
|
724
|
+
options?: {
|
|
725
|
+
mergeMethod?: PullRequestMergeMethod;
|
|
726
|
+
},
|
|
727
|
+
): Promise<boolean> {
|
|
728
|
+
if (!this.isPullRequest(pr)) return false;
|
|
729
|
+
|
|
730
|
+
const api = await this.getProvidersApi();
|
|
731
|
+
try {
|
|
732
|
+
const res = await api.mergePullRequest(toTokenWithInfo(this.id, session), pr, {
|
|
733
|
+
...options,
|
|
734
|
+
isPAT: this.isEnterprise,
|
|
735
|
+
baseUrl: this.isEnterprise ? `https://${this.domain}` : undefined,
|
|
736
|
+
});
|
|
737
|
+
return res;
|
|
738
|
+
} catch (ex) {
|
|
739
|
+
void this.showMergeErrorMessage(ex);
|
|
740
|
+
return false;
|
|
741
|
+
}
|
|
742
|
+
}
|
|
743
|
+
|
|
744
|
+
private async showMergeErrorMessage(ex: Error) {
|
|
745
|
+
// Unfortunately, providers-api does not let us know the exact reason for the error,
|
|
746
|
+
// so we show the same message to everything.
|
|
747
|
+
// When we update the library, we can improve the error handling here.
|
|
748
|
+
const reauthenticate = await this.ctx.hooks?.onReauthenticationRequired?.(
|
|
749
|
+
`${ex.message}. Would you like to try reauthenticating to provide additional access? Your token needs to have the 'api' scope to perform merge.`,
|
|
750
|
+
);
|
|
751
|
+
|
|
752
|
+
if (reauthenticate) {
|
|
753
|
+
await this.reauthenticate();
|
|
754
|
+
}
|
|
755
|
+
}
|
|
756
|
+
|
|
757
|
+
private isPullRequest(pr: PullRequest | { id: string; headRefSha: string }): pr is PullRequest {
|
|
758
|
+
return (pr as PullRequest).refs != null;
|
|
759
|
+
}
|
|
760
|
+
|
|
761
|
+
protected override async getProviderCurrentAccount(
|
|
762
|
+
session: ProviderAuthenticationSession,
|
|
763
|
+
): Promise<Account | undefined> {
|
|
764
|
+
const api = await this.getProvidersApi();
|
|
765
|
+
const currentUser = await api.getCurrentUser(toTokenWithInfo(this.id, session), {
|
|
766
|
+
isPAT: this.isEnterprise,
|
|
767
|
+
baseUrl: this.isEnterprise ? `https://${this.domain}` : undefined,
|
|
768
|
+
});
|
|
769
|
+
if (currentUser == null) return undefined;
|
|
770
|
+
|
|
771
|
+
return {
|
|
772
|
+
provider: {
|
|
773
|
+
id: this.id,
|
|
774
|
+
name: this.name,
|
|
775
|
+
domain: this.domain,
|
|
776
|
+
icon: this.icon,
|
|
777
|
+
},
|
|
778
|
+
id: currentUser.id,
|
|
779
|
+
name: currentUser.name || undefined,
|
|
780
|
+
email: currentUser.email || undefined,
|
|
781
|
+
avatarUrl: currentUser.avatarUrl || undefined,
|
|
782
|
+
username: currentUser.username || undefined,
|
|
783
|
+
};
|
|
784
|
+
}
|
|
785
|
+
|
|
786
|
+
protected override getProviderPullRequestIdentityFromMaybeUrl(search: string): PullRequestUrlIdentity | undefined {
|
|
787
|
+
return getGitLabPullRequestIdentityFromMaybeUrl(search, this.id);
|
|
788
|
+
}
|
|
789
|
+
}
|
|
790
|
+
|
|
791
|
+
export class GitLabIntegration extends GitLabIntegrationBase<GitCloudHostIntegrationId.GitLab> {
|
|
792
|
+
readonly authProvider = authProvider;
|
|
793
|
+
readonly id = GitCloudHostIntegrationId.GitLab;
|
|
794
|
+
protected readonly key = this.id;
|
|
795
|
+
readonly name: string = 'GitLab';
|
|
796
|
+
get domain(): string {
|
|
797
|
+
return metadata.domain;
|
|
798
|
+
}
|
|
799
|
+
|
|
800
|
+
protected get apiBaseUrl(): string {
|
|
801
|
+
return 'https://gitlab.com/api';
|
|
802
|
+
}
|
|
803
|
+
|
|
804
|
+
override access(): Promise<boolean> {
|
|
805
|
+
// Always allow GitHub cloud integration access
|
|
806
|
+
return Promise.resolve(true);
|
|
807
|
+
}
|
|
808
|
+
}
|
|
809
|
+
|
|
810
|
+
export class GitLabSelfHostedIntegration extends GitLabIntegrationBase<GitSelfManagedHostIntegrationId.CloudGitLabSelfHosted> {
|
|
811
|
+
readonly authProvider = cloudEnterpriseAuthProvider;
|
|
812
|
+
readonly id = GitSelfManagedHostIntegrationId.CloudGitLabSelfHosted;
|
|
813
|
+
protected readonly key;
|
|
814
|
+
readonly name = 'GitLab Self-Hosted';
|
|
815
|
+
get domain(): string {
|
|
816
|
+
return this._domain;
|
|
817
|
+
}
|
|
818
|
+
protected override get apiBaseUrl(): string {
|
|
819
|
+
return `https://${this._domain}/api`;
|
|
820
|
+
}
|
|
821
|
+
|
|
822
|
+
constructor(
|
|
823
|
+
ctx: IntegrationServiceContext,
|
|
824
|
+
authenticationService: IntegrationAuthenticationService,
|
|
825
|
+
getProvidersApi: () => Promise<ProvidersApi>,
|
|
826
|
+
didChangeConnection: Emitter<IntegrationConnectionChangeEvent>,
|
|
827
|
+
private readonly _domain: string,
|
|
828
|
+
) {
|
|
829
|
+
super(ctx, authenticationService, getProvidersApi, didChangeConnection);
|
|
830
|
+
this.key = `${this.id}:${this.domain}` as const;
|
|
831
|
+
}
|
|
832
|
+
}
|