@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,750 @@
|
|
|
1
|
+
import type { Account, UnidentifiedAuthor } from '../../../git/models/author.js';
|
|
2
|
+
import type { DefaultBranch } from '../../../git/models/defaultBranch.js';
|
|
3
|
+
import type { Issue, IssueShape } from '../../../git/models/issue.js';
|
|
4
|
+
import type { IssueOrPullRequest } from '../../../git/models/issueOrPullRequest.js';
|
|
5
|
+
import type {
|
|
6
|
+
PullRequest,
|
|
7
|
+
PullRequestMergeMethod,
|
|
8
|
+
PullRequestState,
|
|
9
|
+
PullRequestStateFilter,
|
|
10
|
+
} from '../../../git/models/pullRequest.js';
|
|
11
|
+
import type { RepositoryMetadata } from '../../../git/models/repositoryMetadata.js';
|
|
12
|
+
import type { RepositoryDescriptor } from '../../../git/models/resourceDescriptor.js';
|
|
13
|
+
import { getGitHubNoReplyAddressParts } from '../../../git/remotes/github.js';
|
|
14
|
+
import type { PullRequestUrlIdentity } from '../../../git/utils/pullRequest.utils.js';
|
|
15
|
+
import type { Emitter } from '../../../utils/event.js';
|
|
16
|
+
import { batch } from '../../../utils/promise.js';
|
|
17
|
+
import type { IntegrationAuthenticationProviderDescriptor } from '../authentication/integrationAuthenticationProvider.js';
|
|
18
|
+
import type { IntegrationAuthenticationService } from '../authentication/integrationAuthenticationService.js';
|
|
19
|
+
import type { ProviderAuthenticationSession } from '../authentication/models.js';
|
|
20
|
+
import { toTokenWithInfo } from '../authentication/models.js';
|
|
21
|
+
import { toCollectionScopeFailure } from '../collectionMetadata.js';
|
|
22
|
+
import { GitCloudHostIntegrationId, GitSelfManagedHostIntegrationId } from '../constants.js';
|
|
23
|
+
import type { IntegrationServiceContext } from '../context.js';
|
|
24
|
+
import { IntegrationReadUnavailableError } from '../errors.js';
|
|
25
|
+
import type { IntegrationConnectionChangeEvent } from '../integrationService.js';
|
|
26
|
+
import type { SearchMyPullRequestsOptions } from '../models/gitHostIntegration.js';
|
|
27
|
+
import { GitHostIntegration } from '../models/gitHostIntegration.js';
|
|
28
|
+
import type { SearchMyIssuesOptions } from '../models/integration.js';
|
|
29
|
+
import type { GitHubIntegrationIds } from './github/github.utils.js';
|
|
30
|
+
import { getGitHubPullRequestIdentityFromMaybeUrl } from './github/github.utils.js';
|
|
31
|
+
import type {
|
|
32
|
+
ProviderApiPagedResult,
|
|
33
|
+
ProviderHierarchyResult,
|
|
34
|
+
ProviderOrganization,
|
|
35
|
+
ProviderPullRequest,
|
|
36
|
+
ProviderRepository,
|
|
37
|
+
} from './models.js';
|
|
38
|
+
import {
|
|
39
|
+
getProviderPullRequestIdentity,
|
|
40
|
+
IssueFilter,
|
|
41
|
+
providersMetadata,
|
|
42
|
+
PullRequestFilter,
|
|
43
|
+
toProviderPullRequest,
|
|
44
|
+
} from './models.js';
|
|
45
|
+
import type { ProvidersApi } from './providersApi.js';
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Page size for GitHub's account-wide search reads: the maximum GitHub's search connection accepts, and what
|
|
49
|
+
* `GitHubApi.searchMyPullRequestsPage` already caps itself to.
|
|
50
|
+
*
|
|
51
|
+
* Requested explicitly rather than left to the SDK's own fallback. That fallback is also 100 as of
|
|
52
|
+
* `@gitkraken/provider-apis` 0.54.0 (it was 15 before, which cost a drained sweep ~7x the round trips it needs),
|
|
53
|
+
* so this is now a pin rather than an override — it keeps the size this read is tuned for from silently tracking
|
|
54
|
+
* a shared SDK default that other reads may want smaller.
|
|
55
|
+
*/
|
|
56
|
+
const githubSearchMaxPageSize = 100;
|
|
57
|
+
|
|
58
|
+
type GitHubPullRequestFacetCursor = Record<string, string>;
|
|
59
|
+
|
|
60
|
+
function toPullRequestFacetCursor(value: unknown): GitHubPullRequestFacetCursor {
|
|
61
|
+
if (value == null || typeof value !== 'object' || Array.isArray(value)) return {};
|
|
62
|
+
|
|
63
|
+
return Object.fromEntries(
|
|
64
|
+
Object.entries(value).filter(
|
|
65
|
+
([key, cursor]) => key.length !== 0 && typeof cursor === 'string' && cursor.length !== 0,
|
|
66
|
+
),
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
function parsePullRequestFacetCursor(cursor: string | undefined): GitHubPullRequestFacetCursor {
|
|
71
|
+
if (!cursor) return {};
|
|
72
|
+
|
|
73
|
+
try {
|
|
74
|
+
const parsed = JSON.parse(cursor) as unknown;
|
|
75
|
+
if (parsed != null && typeof parsed === 'object' && !Array.isArray(parsed) && 'cursors' in parsed) {
|
|
76
|
+
const wrapped = parsed as { type?: unknown; cursors?: unknown };
|
|
77
|
+
if (wrapped.type === 'cursor') {
|
|
78
|
+
return toPullRequestFacetCursor(wrapped.cursors);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
return toPullRequestFacetCursor(parsed);
|
|
83
|
+
} catch {
|
|
84
|
+
return {};
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
const pullRequestRelationshipQualifier: Record<PullRequestFilter, string> = {
|
|
89
|
+
[PullRequestFilter.Author]: 'author:@me',
|
|
90
|
+
[PullRequestFilter.Assignee]: 'assignee:@me',
|
|
91
|
+
[PullRequestFilter.ReviewRequested]: 'review-requested:@me',
|
|
92
|
+
[PullRequestFilter.Mention]: 'mentions:@me',
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
const metadata = providersMetadata[GitCloudHostIntegrationId.GitHub];
|
|
96
|
+
const authProvider: IntegrationAuthenticationProviderDescriptor = Object.freeze({
|
|
97
|
+
id: metadata.id,
|
|
98
|
+
scopes: metadata.scopes,
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
const cloudEnterpriseMetadata = providersMetadata[GitSelfManagedHostIntegrationId.CloudGitHubEnterprise];
|
|
102
|
+
const cloudEnterpriseAuthProvider: IntegrationAuthenticationProviderDescriptor = Object.freeze({
|
|
103
|
+
id: cloudEnterpriseMetadata.id,
|
|
104
|
+
scopes: cloudEnterpriseMetadata.scopes,
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
export type GitHubRepositoryDescriptor = RepositoryDescriptor;
|
|
108
|
+
|
|
109
|
+
/** How many per-login SSH signing-key lookups to run concurrently, to avoid a request burst that trips rate limiting. */
|
|
110
|
+
const sshSigningKeyResolveBatchSize = 10;
|
|
111
|
+
|
|
112
|
+
abstract class GitHubIntegrationBase<ID extends GitHubIntegrationIds> extends GitHostIntegration<
|
|
113
|
+
ID,
|
|
114
|
+
GitHubRepositoryDescriptor
|
|
115
|
+
> {
|
|
116
|
+
/**
|
|
117
|
+
* Base URL handed to `@gitkraken/provider-apis`, which derives BOTH the REST and the GraphQL endpoint from it
|
|
118
|
+
* by appending GitHub Enterprise's paths. Only a GHE instance base belongs here; cloud passes `undefined`,
|
|
119
|
+
* the sole value that selects the cloud endpoints (see the cloud subclass).
|
|
120
|
+
*/
|
|
121
|
+
protected abstract get apiBaseUrl(): string | undefined;
|
|
122
|
+
|
|
123
|
+
protected override async getProviderAccountForCommit(
|
|
124
|
+
session: ProviderAuthenticationSession,
|
|
125
|
+
repo: GitHubRepositoryDescriptor,
|
|
126
|
+
rev: string,
|
|
127
|
+
options?: {
|
|
128
|
+
avatarSize?: number;
|
|
129
|
+
},
|
|
130
|
+
): Promise<Account | UnidentifiedAuthor | undefined> {
|
|
131
|
+
return (await this.authenticationService.apis.github)?.getAccountForCommit(
|
|
132
|
+
this,
|
|
133
|
+
toTokenWithInfo(this.id, session),
|
|
134
|
+
repo.owner,
|
|
135
|
+
repo.name,
|
|
136
|
+
rev,
|
|
137
|
+
{
|
|
138
|
+
...options,
|
|
139
|
+
baseUrl: this.apiBaseUrl,
|
|
140
|
+
},
|
|
141
|
+
);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
protected override async getProviderAccountForEmail(
|
|
145
|
+
session: ProviderAuthenticationSession,
|
|
146
|
+
repo: GitHubRepositoryDescriptor,
|
|
147
|
+
email: string,
|
|
148
|
+
options?: {
|
|
149
|
+
avatarSize?: number;
|
|
150
|
+
},
|
|
151
|
+
): Promise<Account | undefined> {
|
|
152
|
+
return (await this.authenticationService.apis.github)?.getAccountForEmail(
|
|
153
|
+
this,
|
|
154
|
+
toTokenWithInfo(this.id, session),
|
|
155
|
+
repo.owner,
|
|
156
|
+
repo.name,
|
|
157
|
+
email,
|
|
158
|
+
{
|
|
159
|
+
...options,
|
|
160
|
+
baseUrl: this.apiBaseUrl,
|
|
161
|
+
},
|
|
162
|
+
);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
protected override async getProviderSshSigningKeysForEmails(
|
|
166
|
+
session: ProviderAuthenticationSession,
|
|
167
|
+
repo: GitHubRepositoryDescriptor,
|
|
168
|
+
emails: string[],
|
|
169
|
+
): Promise<Map<string, string[]>> {
|
|
170
|
+
const result = new Map<string, string[]>();
|
|
171
|
+
|
|
172
|
+
const api = await this.authenticationService.apis.github;
|
|
173
|
+
if (api == null) return result;
|
|
174
|
+
|
|
175
|
+
const token = toTokenWithInfo(this.id, session);
|
|
176
|
+
|
|
177
|
+
// Resolve each email to a login: GitHub noreply addresses encode it locally; the rest are resolved in a single
|
|
178
|
+
// batched GraphQL request rather than one round-trip per email.
|
|
179
|
+
const loginByEmail = new Map<string, string>();
|
|
180
|
+
const toResolve: string[] = [];
|
|
181
|
+
for (const email of emails) {
|
|
182
|
+
const login = getGitHubNoReplyAddressParts(email)?.login;
|
|
183
|
+
if (login != null) {
|
|
184
|
+
loginByEmail.set(email.toLowerCase(), login);
|
|
185
|
+
} else {
|
|
186
|
+
toResolve.push(email);
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
if (toResolve.length) {
|
|
191
|
+
const resolved = await api.getAccountsForEmails(this, token, toResolve, { baseUrl: this.apiBaseUrl });
|
|
192
|
+
for (const [emailLower, login] of resolved) {
|
|
193
|
+
loginByEmail.set(emailLower, login);
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
// Fetch signing keys once per distinct login (REST has no batch endpoint), in bounded batches rather than firing
|
|
198
|
+
// all lookups at once, to avoid a request burst that could trip secondary rate limiting. Then map keys to each email.
|
|
199
|
+
const keysByLogin = new Map<string, string[]>();
|
|
200
|
+
await batch([...new Set(loginByEmail.values())], sshSigningKeyResolveBatchSize, async login => {
|
|
201
|
+
const keys = await api.getUserSshSigningKeys(this, token, login, { baseUrl: this.apiBaseUrl });
|
|
202
|
+
keysByLogin.set(
|
|
203
|
+
login,
|
|
204
|
+
keys.map(k => k.key),
|
|
205
|
+
);
|
|
206
|
+
});
|
|
207
|
+
|
|
208
|
+
for (const [emailLower, login] of loginByEmail) {
|
|
209
|
+
result.set(emailLower, keysByLogin.get(login) ?? []);
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
return result;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
protected override async getProviderDefaultBranch(
|
|
216
|
+
session: ProviderAuthenticationSession,
|
|
217
|
+
repo: GitHubRepositoryDescriptor,
|
|
218
|
+
): Promise<DefaultBranch | undefined> {
|
|
219
|
+
return (await this.authenticationService.apis.github)?.getDefaultBranch(
|
|
220
|
+
this,
|
|
221
|
+
toTokenWithInfo(this.id, session),
|
|
222
|
+
repo.owner,
|
|
223
|
+
repo.name,
|
|
224
|
+
{
|
|
225
|
+
baseUrl: this.apiBaseUrl,
|
|
226
|
+
},
|
|
227
|
+
);
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
protected override async getProviderLinkedIssueOrPullRequest(
|
|
231
|
+
session: ProviderAuthenticationSession,
|
|
232
|
+
repo: GitHubRepositoryDescriptor,
|
|
233
|
+
{ id }: { id: string; key: string },
|
|
234
|
+
): Promise<IssueOrPullRequest | undefined> {
|
|
235
|
+
return (await this.authenticationService.apis.github)?.getIssueOrPullRequest(
|
|
236
|
+
this,
|
|
237
|
+
toTokenWithInfo(this.id, session),
|
|
238
|
+
repo.owner,
|
|
239
|
+
repo.name,
|
|
240
|
+
Number(id),
|
|
241
|
+
{
|
|
242
|
+
baseUrl: this.apiBaseUrl,
|
|
243
|
+
},
|
|
244
|
+
);
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
protected override async getProviderIssue(
|
|
248
|
+
session: ProviderAuthenticationSession,
|
|
249
|
+
repo: GitHubRepositoryDescriptor,
|
|
250
|
+
id: string,
|
|
251
|
+
): Promise<Issue | undefined> {
|
|
252
|
+
return (await this.authenticationService.apis.github)?.getIssue(
|
|
253
|
+
this,
|
|
254
|
+
toTokenWithInfo(this.id, session),
|
|
255
|
+
repo.owner,
|
|
256
|
+
repo.name,
|
|
257
|
+
Number(id),
|
|
258
|
+
{
|
|
259
|
+
baseUrl: this.apiBaseUrl,
|
|
260
|
+
includeBody: true,
|
|
261
|
+
},
|
|
262
|
+
);
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
protected override async getProviderPullRequest(
|
|
266
|
+
session: ProviderAuthenticationSession,
|
|
267
|
+
repo: GitHubRepositoryDescriptor,
|
|
268
|
+
id: string,
|
|
269
|
+
): Promise<PullRequest | undefined> {
|
|
270
|
+
return (await this.authenticationService.apis.github)?.getPullRequest(
|
|
271
|
+
this,
|
|
272
|
+
toTokenWithInfo(this.id, session),
|
|
273
|
+
repo.owner,
|
|
274
|
+
repo.name,
|
|
275
|
+
parseInt(id, 10),
|
|
276
|
+
{
|
|
277
|
+
baseUrl: this.apiBaseUrl,
|
|
278
|
+
},
|
|
279
|
+
);
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
protected override async getProviderPullRequestForBranch(
|
|
283
|
+
session: ProviderAuthenticationSession,
|
|
284
|
+
repo: GitHubRepositoryDescriptor,
|
|
285
|
+
branch: string,
|
|
286
|
+
options?: {
|
|
287
|
+
avatarSize?: number;
|
|
288
|
+
include?: PullRequestState[];
|
|
289
|
+
},
|
|
290
|
+
): Promise<PullRequest | undefined> {
|
|
291
|
+
const { include, ...opts } = options ?? {};
|
|
292
|
+
|
|
293
|
+
const toGitHubPullRequestState = (await import(/* webpackChunkName: "integrations" */ './github/models.js'))
|
|
294
|
+
.toGitHubPullRequestState;
|
|
295
|
+
return (await this.authenticationService.apis.github)?.getPullRequestForBranch(
|
|
296
|
+
this,
|
|
297
|
+
toTokenWithInfo(this.id, session),
|
|
298
|
+
repo.owner,
|
|
299
|
+
repo.name,
|
|
300
|
+
branch,
|
|
301
|
+
{
|
|
302
|
+
...opts,
|
|
303
|
+
include: include?.map(s => toGitHubPullRequestState(s)),
|
|
304
|
+
baseUrl: this.apiBaseUrl,
|
|
305
|
+
},
|
|
306
|
+
);
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
protected override async getProviderPullRequestForCommit(
|
|
310
|
+
session: ProviderAuthenticationSession,
|
|
311
|
+
repo: GitHubRepositoryDescriptor,
|
|
312
|
+
rev: string,
|
|
313
|
+
): Promise<PullRequest | undefined> {
|
|
314
|
+
return (await this.authenticationService.apis.github)?.getPullRequestForCommit(
|
|
315
|
+
this,
|
|
316
|
+
toTokenWithInfo(this.id, session),
|
|
317
|
+
repo.owner,
|
|
318
|
+
repo.name,
|
|
319
|
+
rev,
|
|
320
|
+
{
|
|
321
|
+
baseUrl: this.apiBaseUrl,
|
|
322
|
+
},
|
|
323
|
+
);
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
protected override async getProviderRepositoryMetadata(
|
|
327
|
+
session: ProviderAuthenticationSession,
|
|
328
|
+
repo: GitHubRepositoryDescriptor,
|
|
329
|
+
cancellation?: AbortSignal,
|
|
330
|
+
): Promise<RepositoryMetadata | undefined> {
|
|
331
|
+
return (await this.authenticationService.apis.github)?.getRepositoryMetadata(
|
|
332
|
+
this,
|
|
333
|
+
toTokenWithInfo(this.id, session),
|
|
334
|
+
repo.owner,
|
|
335
|
+
repo.name,
|
|
336
|
+
{
|
|
337
|
+
baseUrl: this.apiBaseUrl,
|
|
338
|
+
},
|
|
339
|
+
cancellation,
|
|
340
|
+
);
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
protected override async getProviderOrganizationsForUser(
|
|
344
|
+
session: ProviderAuthenticationSession,
|
|
345
|
+
): Promise<ProviderHierarchyResult<ProviderOrganization> | undefined> {
|
|
346
|
+
const api = await this.getProvidersApi();
|
|
347
|
+
const result = await api.getGitHubOrgsForCurrentUser(toTokenWithInfo(this.id, session), {
|
|
348
|
+
baseUrl: this.apiBaseUrl,
|
|
349
|
+
});
|
|
350
|
+
return {
|
|
351
|
+
values: result.values.map(o => ({
|
|
352
|
+
id: o.id,
|
|
353
|
+
providerId: this.id,
|
|
354
|
+
name: o.username,
|
|
355
|
+
url: `https://${this.domain}/${o.username}`,
|
|
356
|
+
})),
|
|
357
|
+
...(result.truncated ? { truncated: true } : {}),
|
|
358
|
+
...(result.metadata != null ? { metadata: result.metadata } : {}),
|
|
359
|
+
};
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
protected override async getProviderRepositoriesForOrg(
|
|
363
|
+
session: ProviderAuthenticationSession,
|
|
364
|
+
org: string,
|
|
365
|
+
options?: { cursor?: string },
|
|
366
|
+
): Promise<ProviderHierarchyResult<ProviderRepository> | undefined> {
|
|
367
|
+
const api = await this.getProvidersApi();
|
|
368
|
+
return api.getReposForOrg(toTokenWithInfo(this.id, session), org, {
|
|
369
|
+
baseUrl: this.apiBaseUrl,
|
|
370
|
+
cursor: options?.cursor,
|
|
371
|
+
});
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
protected override async getProviderRepositoriesForUser(
|
|
375
|
+
session: ProviderAuthenticationSession,
|
|
376
|
+
options?: { cursor?: string },
|
|
377
|
+
): Promise<ProviderHierarchyResult<ProviderRepository> | undefined> {
|
|
378
|
+
const api = await this.getProvidersApi();
|
|
379
|
+
// `/user/repos` with the full affiliation set: the user's own repos, collaborations, and org-member
|
|
380
|
+
// repos — matching gkcli's org-less `provider repos github` walk (not every repo of every org).
|
|
381
|
+
return api.getReposForCurrentUser(toTokenWithInfo(this.id, session), {
|
|
382
|
+
affiliations: ['owner', 'collaborator', 'organization_member'],
|
|
383
|
+
baseUrl: this.apiBaseUrl,
|
|
384
|
+
cursor: options?.cursor,
|
|
385
|
+
});
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
public override async getRepoInfo(repo: {
|
|
389
|
+
owner: string;
|
|
390
|
+
name: string;
|
|
391
|
+
project?: string;
|
|
392
|
+
connectionId?: string;
|
|
393
|
+
}): Promise<ProviderRepository | undefined> {
|
|
394
|
+
const api = await this.getProvidersApi();
|
|
395
|
+
// `connectionId` targets a specific account (multi-account); omitted reads the primary.
|
|
396
|
+
const session = await this.resolveReadSession(repo.connectionId, undefined);
|
|
397
|
+
if (session == null) return undefined;
|
|
398
|
+
|
|
399
|
+
// `apiBaseUrl` is undefined for cloud (which is what selects the cloud endpoints) and the GHE instance base
|
|
400
|
+
// for enterprise (inherited override).
|
|
401
|
+
return api.getRepo(toTokenWithInfo(this.id, session), repo.owner, repo.name, repo.project, {
|
|
402
|
+
baseUrl: this.apiBaseUrl,
|
|
403
|
+
});
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
protected override async searchProviderMyPullRequests(
|
|
407
|
+
session: ProviderAuthenticationSession,
|
|
408
|
+
repos?: GitHubRepositoryDescriptor[],
|
|
409
|
+
cancellation?: AbortSignal,
|
|
410
|
+
silent?: boolean,
|
|
411
|
+
state?: PullRequestStateFilter,
|
|
412
|
+
_options?: SearchMyPullRequestsOptions,
|
|
413
|
+
): Promise<PullRequest[] | undefined> {
|
|
414
|
+
return (await this.authenticationService.apis.github)?.searchMyPullRequests(
|
|
415
|
+
this,
|
|
416
|
+
toTokenWithInfo(this.id, session),
|
|
417
|
+
{
|
|
418
|
+
repos: repos?.map(r => `${r.owner}/${r.name}`),
|
|
419
|
+
baseUrl: this.apiBaseUrl,
|
|
420
|
+
silent: silent,
|
|
421
|
+
state: state,
|
|
422
|
+
},
|
|
423
|
+
cancellation,
|
|
424
|
+
);
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
protected override async getProviderMyPullRequestsForUser(
|
|
428
|
+
session: ProviderAuthenticationSession,
|
|
429
|
+
options?: {
|
|
430
|
+
state?: PullRequestStateFilter[];
|
|
431
|
+
cursor?: string;
|
|
432
|
+
includeReviewRequested?: boolean;
|
|
433
|
+
filters?: PullRequestFilter[];
|
|
434
|
+
summary?: boolean;
|
|
435
|
+
},
|
|
436
|
+
): Promise<ProviderApiPagedResult<ProviderPullRequest> | undefined> {
|
|
437
|
+
const explicitFilters = options?.filters?.length ? [...new Set(options.filters)] : undefined;
|
|
438
|
+
// Explicit relationships need independent search facets so the returned union is exact. State-only reads
|
|
439
|
+
// retain the provider-native `involves:@me` behavior for backward compatibility.
|
|
440
|
+
if ((options?.state?.length ?? 0) > 0 || explicitFilters != null || options?.includeReviewRequested === true) {
|
|
441
|
+
const github = await this.authenticationService.apis.github;
|
|
442
|
+
if (github == null) return undefined;
|
|
443
|
+
|
|
444
|
+
const requestedStates: PullRequestStateFilter[] =
|
|
445
|
+
options?.state != null && options.state.length > 0 ? [...new Set(options.state)] : ['open'];
|
|
446
|
+
const facets =
|
|
447
|
+
explicitFilters?.length != null
|
|
448
|
+
? requestedStates.flatMap(state =>
|
|
449
|
+
explicitFilters.map(filter => ({
|
|
450
|
+
key: `${state}:${filter}`,
|
|
451
|
+
state: state,
|
|
452
|
+
search: pullRequestRelationshipQualifier[filter],
|
|
453
|
+
})),
|
|
454
|
+
)
|
|
455
|
+
: requestedStates.flatMap(state => [
|
|
456
|
+
{ key: state, state: state, search: undefined },
|
|
457
|
+
...(options?.includeReviewRequested === true
|
|
458
|
+
? [
|
|
459
|
+
{
|
|
460
|
+
key: `${state}:${PullRequestFilter.ReviewRequested}`,
|
|
461
|
+
state: state,
|
|
462
|
+
search: pullRequestRelationshipQualifier[PullRequestFilter.ReviewRequested],
|
|
463
|
+
},
|
|
464
|
+
]
|
|
465
|
+
: []),
|
|
466
|
+
]);
|
|
467
|
+
const cursors = parsePullRequestFacetCursor(options?.cursor);
|
|
468
|
+
const hasResumableFacetCursor = Object.keys(cursors).length !== 0;
|
|
469
|
+
const facetsWithCursor = facets.filter(facet => cursors[facet.key] != null);
|
|
470
|
+
// The first call has no cursor, so query every requested state. A continuation only happens after a
|
|
471
|
+
// prior page reported `more:true`, whose bundle carries a cursor for each facet still in flight;
|
|
472
|
+
// facets absent from the bundle are exhausted, so re-querying them from scratch would refetch the
|
|
473
|
+
// same PRs (duplicated by the dedup-free sweep) and waste an API call per page. Query only the
|
|
474
|
+
// states that still have a cursor, but degrade a malformed/empty cursor bundle, or one that doesn't
|
|
475
|
+
// apply to the current requested states, to the first page rather than returning an empty page.
|
|
476
|
+
const facetsToQuery =
|
|
477
|
+
options?.cursor != null && hasResumableFacetCursor && facetsWithCursor.length !== 0
|
|
478
|
+
? facetsWithCursor
|
|
479
|
+
: facets;
|
|
480
|
+
const results = await Promise.allSettled(
|
|
481
|
+
facetsToQuery.map(async facet => ({
|
|
482
|
+
key: facet.key,
|
|
483
|
+
result: await github.searchMyPullRequestsPage(this, toTokenWithInfo(this.id, session), {
|
|
484
|
+
baseUrl: this.apiBaseUrl,
|
|
485
|
+
state: facet.state,
|
|
486
|
+
cursor: cursors[facet.key],
|
|
487
|
+
summary: options?.summary,
|
|
488
|
+
...(facet.search != null
|
|
489
|
+
? { search: facet.search, includeDefaultInvolvement: false }
|
|
490
|
+
: undefined),
|
|
491
|
+
}),
|
|
492
|
+
})),
|
|
493
|
+
);
|
|
494
|
+
if (results.every(result => result.status === 'rejected')) {
|
|
495
|
+
const first = results[0];
|
|
496
|
+
if (first?.status === 'rejected') throw first.reason;
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
const values = new Map<string, ProviderPullRequest>();
|
|
500
|
+
const nextCursors: GitHubPullRequestFacetCursor = {};
|
|
501
|
+
const failures = [];
|
|
502
|
+
let hasMore = false;
|
|
503
|
+
let truncated = false;
|
|
504
|
+
let structuralIncompleteness = false;
|
|
505
|
+
let unkeyedPullRequest = 0;
|
|
506
|
+
for (const outcome of results) {
|
|
507
|
+
if (outcome.status === 'rejected') {
|
|
508
|
+
failures.push(toCollectionScopeFailure({ providerId: this.id }, outcome.reason));
|
|
509
|
+
truncated = true;
|
|
510
|
+
continue;
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
const { key, result } = outcome.value;
|
|
514
|
+
for (const pr of result.values) {
|
|
515
|
+
const mapped = toProviderPullRequest(pr);
|
|
516
|
+
const identity = getProviderPullRequestIdentity(mapped) ?? `unkeyed:${unkeyedPullRequest++}`;
|
|
517
|
+
if (!values.has(identity)) {
|
|
518
|
+
values.set(identity, mapped);
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
if (result.hasMore) {
|
|
522
|
+
if (result.cursor == null || result.cursor === '{}' || result.cursor === cursors[key]) {
|
|
523
|
+
truncated = true;
|
|
524
|
+
structuralIncompleteness = true;
|
|
525
|
+
} else {
|
|
526
|
+
hasMore = true;
|
|
527
|
+
nextCursors[key] = result.cursor;
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
if (result.truncated) {
|
|
531
|
+
truncated = true;
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
return {
|
|
536
|
+
values: [...values.values()],
|
|
537
|
+
paging: {
|
|
538
|
+
more: hasMore,
|
|
539
|
+
cursor: hasMore ? JSON.stringify({ type: 'cursor', cursors: nextCursors }) : '{}',
|
|
540
|
+
truncated: truncated || undefined,
|
|
541
|
+
},
|
|
542
|
+
...(failures.length || structuralIncompleteness
|
|
543
|
+
? {
|
|
544
|
+
metadata: {
|
|
545
|
+
completeness: 'partial' as const,
|
|
546
|
+
...(failures.length ? { failures: failures } : {}),
|
|
547
|
+
},
|
|
548
|
+
}
|
|
549
|
+
: undefined),
|
|
550
|
+
};
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
// The current user's login scopes the account-wide `involves:` query (see getPullRequestsForUser →
|
|
554
|
+
// getPullRequestsAssociatedWithUser). Resolve it from THIS session (multi-account safe).
|
|
555
|
+
const username = (await this.getProviderCurrentAccount(session))?.username;
|
|
556
|
+
if (username == null) return undefined;
|
|
557
|
+
|
|
558
|
+
const api = await this.getProvidersApi();
|
|
559
|
+
// Only reachable with NO requested state (the branch above owns every state-filtered read), so there is
|
|
560
|
+
// deliberately no `states` to forward: the SDK's `involves:` search applies its own `is:open` default
|
|
561
|
+
// qualifier, which is exactly the unfiltered "my open PRs" this path is for. Nor could a state be
|
|
562
|
+
// honored here — `getPullRequestsAssociatedWithUser` doesn't accept one — which is why the state-filtered
|
|
563
|
+
// read goes through `searchMyPullRequestsPage` instead of post-filtering a page that never contained the
|
|
564
|
+
// requested states.
|
|
565
|
+
const result = await api.getPullRequestsForUser(toTokenWithInfo(this.id, session), username, {
|
|
566
|
+
baseUrl: this.apiBaseUrl,
|
|
567
|
+
cursor: options?.cursor,
|
|
568
|
+
// The sweep drains this read page by page, so it asks for the largest page the search allows.
|
|
569
|
+
pageSize: githubSearchMaxPageSize,
|
|
570
|
+
});
|
|
571
|
+
return result ?? undefined;
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
protected override async searchProviderMyIssues(
|
|
575
|
+
session: ProviderAuthenticationSession,
|
|
576
|
+
repos?: GitHubRepositoryDescriptor[],
|
|
577
|
+
cancellation?: AbortSignal,
|
|
578
|
+
): Promise<IssueShape[] | undefined> {
|
|
579
|
+
return (await this.searchProviderMyIssuesWithTruncation(session, repos, cancellation))?.values;
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
/**
|
|
583
|
+
* GitHub's account-wide issue search pages authored/assigned/mentioned independently behind one composite
|
|
584
|
+
* cursor. This variant preserves that cursor and the provider's 1,000-result search ceiling signal.
|
|
585
|
+
*
|
|
586
|
+
* `options.filters` selects which of those three searches run, so a caller can narrow the union to just its
|
|
587
|
+
* own slice (e.g. `[Assignee]` ⇒ `assignee:@me`). Omitted keeps GitHub's own definition of "mine" (all three).
|
|
588
|
+
*/
|
|
589
|
+
protected override async searchProviderMyIssuesWithTruncation(
|
|
590
|
+
session: ProviderAuthenticationSession,
|
|
591
|
+
repos?: GitHubRepositoryDescriptor[],
|
|
592
|
+
cancellation?: AbortSignal,
|
|
593
|
+
options?: SearchMyIssuesOptions,
|
|
594
|
+
): Promise<{ values: IssueShape[]; truncated: boolean } | undefined> {
|
|
595
|
+
if ((repos == null || repos.length === 0) && options?.includeAllAssignees) {
|
|
596
|
+
throw new IntegrationReadUnavailableError(
|
|
597
|
+
this.name,
|
|
598
|
+
'`includeAllAssignees` is not supported for account-wide issue reads; scope the read to repositories instead.',
|
|
599
|
+
);
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
return (await this.authenticationService.apis.github)?.searchMyIssues(
|
|
603
|
+
this,
|
|
604
|
+
toTokenWithInfo(this.id, session),
|
|
605
|
+
{
|
|
606
|
+
repos: repos?.map(r => `${r.owner}/${r.name}`),
|
|
607
|
+
baseUrl: this.apiBaseUrl,
|
|
608
|
+
includeBody: true,
|
|
609
|
+
includeAllAssignees: options?.includeAllAssignees,
|
|
610
|
+
cursor: options?.cursor,
|
|
611
|
+
categories: options?.filters?.length
|
|
612
|
+
? {
|
|
613
|
+
authored: options.filters.includes(IssueFilter.Author),
|
|
614
|
+
assigned: options.filters.includes(IssueFilter.Assignee),
|
|
615
|
+
mentioned: options.filters.includes(IssueFilter.Mention),
|
|
616
|
+
}
|
|
617
|
+
: undefined,
|
|
618
|
+
},
|
|
619
|
+
cancellation,
|
|
620
|
+
);
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
protected override async searchProviderPullRequests(
|
|
624
|
+
session: ProviderAuthenticationSession,
|
|
625
|
+
searchQuery: string,
|
|
626
|
+
repos?: GitHubRepositoryDescriptor[],
|
|
627
|
+
cancellation?: AbortSignal,
|
|
628
|
+
options?: { include?: PullRequestState[] },
|
|
629
|
+
): Promise<PullRequest[] | undefined> {
|
|
630
|
+
return (await this.authenticationService.apis.github)?.searchPullRequests(
|
|
631
|
+
this,
|
|
632
|
+
toTokenWithInfo(this.id, session),
|
|
633
|
+
{
|
|
634
|
+
search: searchQuery,
|
|
635
|
+
repos: repos?.map(r => `${r.owner}/${r.name}`),
|
|
636
|
+
baseUrl: this.apiBaseUrl,
|
|
637
|
+
...options,
|
|
638
|
+
},
|
|
639
|
+
cancellation,
|
|
640
|
+
);
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
protected override async mergeProviderPullRequest(
|
|
644
|
+
session: ProviderAuthenticationSession,
|
|
645
|
+
pr: PullRequest,
|
|
646
|
+
options?: {
|
|
647
|
+
mergeMethod?: PullRequestMergeMethod;
|
|
648
|
+
},
|
|
649
|
+
): Promise<boolean> {
|
|
650
|
+
const id = pr.nodeId;
|
|
651
|
+
const headRefSha = pr.refs?.head?.sha;
|
|
652
|
+
if (id == null || headRefSha == null) return false;
|
|
653
|
+
return (
|
|
654
|
+
(await this.authenticationService.apis.github)?.mergePullRequest(
|
|
655
|
+
this,
|
|
656
|
+
toTokenWithInfo(this.id, session),
|
|
657
|
+
id,
|
|
658
|
+
headRefSha,
|
|
659
|
+
{
|
|
660
|
+
mergeMethod: options?.mergeMethod,
|
|
661
|
+
baseUrl: this.apiBaseUrl,
|
|
662
|
+
},
|
|
663
|
+
) ?? false
|
|
664
|
+
);
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
protected override async getProviderCurrentAccount(
|
|
668
|
+
session: ProviderAuthenticationSession,
|
|
669
|
+
options?: { avatarSize?: number },
|
|
670
|
+
): Promise<Account | undefined> {
|
|
671
|
+
return (await this.authenticationService.apis.github)?.getCurrentAccount(
|
|
672
|
+
this,
|
|
673
|
+
toTokenWithInfo(this.id, session),
|
|
674
|
+
{
|
|
675
|
+
...options,
|
|
676
|
+
baseUrl: this.apiBaseUrl,
|
|
677
|
+
},
|
|
678
|
+
);
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
protected override getProviderPullRequestIdentityFromMaybeUrl(search: string): PullRequestUrlIdentity | undefined {
|
|
682
|
+
return getGitHubPullRequestIdentityFromMaybeUrl(search, this.id);
|
|
683
|
+
}
|
|
684
|
+
}
|
|
685
|
+
|
|
686
|
+
export class GitHubIntegration extends GitHubIntegrationBase<GitCloudHostIntegrationId.GitHub> {
|
|
687
|
+
readonly authProvider = authProvider;
|
|
688
|
+
readonly id = GitCloudHostIntegrationId.GitHub;
|
|
689
|
+
protected readonly key = this.id;
|
|
690
|
+
readonly name: string = 'GitHub';
|
|
691
|
+
get domain(): string {
|
|
692
|
+
return metadata.domain;
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
protected override get apiBaseUrl(): string | undefined {
|
|
696
|
+
// Undefined on purpose, NOT 'https://api.github.com'. `@gitkraken/provider-apis` treats this value as an
|
|
697
|
+
// *enterprise* base and derives both endpoints from it by appending GitHub Enterprise's paths:
|
|
698
|
+
// `getRESTBaseUrl` appends `/api/v3` and `getGraphQLEndpoint` appends `/api/graphql` (githubHelpers.ts).
|
|
699
|
+
// Handing it the cloud host therefore built `https://api.github.com/api/graphql`, which GitHub answers
|
|
700
|
+
// 404 — every cloud GraphQL read (orgs, repos, PR/issue search) failed as `not-found`. Omitting it is
|
|
701
|
+
// what selects the cloud endpoints (`GITHUB_API_URL` / `GITHUB_GRAPHQL_API_URL`), so cloud must pass
|
|
702
|
+
// nothing and only GHE passes its instance base.
|
|
703
|
+
return undefined;
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
override access(): Promise<boolean> {
|
|
707
|
+
// Always allow GitHub cloud integration access
|
|
708
|
+
return Promise.resolve(true);
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
// This is a special case for GitHub because we use VSCode's GitHub session, and it can be disconnected
|
|
712
|
+
// outside of the extension.
|
|
713
|
+
override async refresh(): Promise<void> {
|
|
714
|
+
const authProvider = await this.authenticationService.get(this.authProvider.id);
|
|
715
|
+
const session = await authProvider.getSession(this.authProviderDescriptor);
|
|
716
|
+
if (session == null && this.maybeConnected) {
|
|
717
|
+
void this.disconnect({ silent: true });
|
|
718
|
+
} else {
|
|
719
|
+
if (session?.accessToken !== this._session?.accessToken) {
|
|
720
|
+
this._session = undefined;
|
|
721
|
+
}
|
|
722
|
+
super.refresh();
|
|
723
|
+
}
|
|
724
|
+
}
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
export class GitHubEnterpriseIntegration extends GitHubIntegrationBase<GitSelfManagedHostIntegrationId.CloudGitHubEnterprise> {
|
|
728
|
+
readonly authProvider = cloudEnterpriseAuthProvider;
|
|
729
|
+
readonly id = GitSelfManagedHostIntegrationId.CloudGitHubEnterprise;
|
|
730
|
+
protected readonly key;
|
|
731
|
+
readonly name = 'GitHub Enterprise';
|
|
732
|
+
get domain(): string {
|
|
733
|
+
return this._domain;
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
protected override get apiBaseUrl(): string {
|
|
737
|
+
return `https://${this._domain}/api/v3`;
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
constructor(
|
|
741
|
+
ctx: IntegrationServiceContext,
|
|
742
|
+
authenticationService: IntegrationAuthenticationService,
|
|
743
|
+
getProvidersApi: () => Promise<ProvidersApi>,
|
|
744
|
+
didChangeConnection: Emitter<IntegrationConnectionChangeEvent>,
|
|
745
|
+
private readonly _domain: string,
|
|
746
|
+
) {
|
|
747
|
+
super(ctx, authenticationService, getProvidersApi, didChangeConnection);
|
|
748
|
+
this.key = `${this.id}:${this.domain}` as const;
|
|
749
|
+
}
|
|
750
|
+
}
|