@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
|
@@ -11,6 +11,7 @@ import { AuthenticationError, AuthenticationErrorReason, RequestClientError, Req
|
|
|
11
11
|
import { PullRequestMergeMethod } from '../../../git/models/pullRequest.js';
|
|
12
12
|
import { getGitHubNoReplyAddressParts } from '../../../git/remotes/github.js';
|
|
13
13
|
import { createRevisionRange, getRevisionRangeParts, isRevisionRange, isSha, } from '../../../git/utils/revision.utils.js';
|
|
14
|
+
import { chunk } from '../../../utils/array.js';
|
|
14
15
|
import { base64 } from '../../../utils/base64.js';
|
|
15
16
|
import { CancellationError } from '../../../utils/cancellation.js';
|
|
16
17
|
import { trace } from '../../../utils/decorators/log.js';
|
|
@@ -32,6 +33,8 @@ const emptyBlameResult = Object.freeze({ ranges: [] });
|
|
|
32
33
|
const maxRequestRetries = 2;
|
|
33
34
|
const requestRetryBaseDelay = 300; // ms
|
|
34
35
|
const requestRetryMaxDelay = 2000; // ms
|
|
36
|
+
/** How many email->login user searches to alias into a single GraphQL request (keeps query cost within limits). */
|
|
37
|
+
const accountResolveBatchSize = 25;
|
|
35
38
|
function isRetryableTransientError(ex) {
|
|
36
39
|
// An aborted request is rethrown as the original `AbortError` (not a `RequestError`), so it is
|
|
37
40
|
// excluded here. octokit maps a fetch/network failure to a `RequestError` with status 500 and
|
|
@@ -49,6 +52,29 @@ function isRetryableTransientError(ex) {
|
|
|
49
52
|
return false;
|
|
50
53
|
}
|
|
51
54
|
}
|
|
55
|
+
/**
|
|
56
|
+
* When a rate-limited request may be retried, as a UTC epoch in seconds, or `undefined` when the response says
|
|
57
|
+
* nothing useful. Header precedence follows GitHub's own guidance
|
|
58
|
+
* (docs.github.com/en/rest/using-the-rest-api/rate-limits-for-the-rest-api): `retry-after` wins when present —
|
|
59
|
+
* it is the only one a secondary limit reliably sets — and `x-ratelimit-reset` covers the primary limit.
|
|
60
|
+
*/
|
|
61
|
+
function rateLimitResetAt(ex) {
|
|
62
|
+
const headers = ex.response?.headers;
|
|
63
|
+
if (headers == null)
|
|
64
|
+
return undefined;
|
|
65
|
+
// `retry-after` is a delay in seconds, not an epoch, so it has to be added to now to compare with `resetAt`.
|
|
66
|
+
const retryAfter = toPositiveInt(headers['retry-after']);
|
|
67
|
+
if (retryAfter != null)
|
|
68
|
+
return Math.floor(Date.now() / 1000) + retryAfter;
|
|
69
|
+
return toPositiveInt(headers['x-ratelimit-reset']);
|
|
70
|
+
}
|
|
71
|
+
function toPositiveInt(value) {
|
|
72
|
+
if (value == null)
|
|
73
|
+
return undefined;
|
|
74
|
+
const parsed = typeof value === 'number' ? value : parseInt(value, 10);
|
|
75
|
+
// Rejects NaN and a nonsensical negative/zero, either of which would present as an already-elapsed reset.
|
|
76
|
+
return Number.isFinite(parsed) && parsed > 0 ? parsed : undefined;
|
|
77
|
+
}
|
|
52
78
|
function getRequestRetryDelay(attempt) {
|
|
53
79
|
// Exponential backoff with equal jitter, capped — spreads retries so a brief upstream blip
|
|
54
80
|
// isn't hammered by every in-flight request landing on the same schedule.
|
|
@@ -78,15 +104,18 @@ author {
|
|
|
78
104
|
avatarUrl(size: $avatarSize)
|
|
79
105
|
url
|
|
80
106
|
}
|
|
107
|
+
body
|
|
81
108
|
baseRefName
|
|
82
109
|
baseRefOid
|
|
83
110
|
headRefName
|
|
84
111
|
headRefOid
|
|
85
112
|
headRepository {
|
|
113
|
+
isFork
|
|
86
114
|
name
|
|
87
115
|
owner {
|
|
88
116
|
login
|
|
89
117
|
}
|
|
118
|
+
sshUrl
|
|
90
119
|
url
|
|
91
120
|
}
|
|
92
121
|
isCrossRepository
|
|
@@ -99,6 +128,7 @@ repository {
|
|
|
99
128
|
owner {
|
|
100
129
|
login
|
|
101
130
|
}
|
|
131
|
+
sshUrl
|
|
102
132
|
url
|
|
103
133
|
viewerPermission
|
|
104
134
|
}
|
|
@@ -360,6 +390,47 @@ export class GitHubApi {
|
|
|
360
390
|
throw this.handleException(ex, provider, scope);
|
|
361
391
|
}
|
|
362
392
|
}
|
|
393
|
+
async getAccountsForEmails(provider, token, emails, options) {
|
|
394
|
+
const scope = getScopedLogger();
|
|
395
|
+
// Resolves email -> login for many emails in one request via field aliasing, chunked to keep query cost within
|
|
396
|
+
// GitHub's limits. Each email is passed as a GraphQL variable (never interpolated into the query string) so an
|
|
397
|
+
// attacker-controllable commit email can't inject query structure. Keyed by lowercased email.
|
|
398
|
+
//
|
|
399
|
+
// This is intentionally best-effort: user-by-email search only matches accounts whose email is public, and the
|
|
400
|
+
// search API is subject to GitHub's separate search/secondary rate limits, so misses and per-batch failures are
|
|
401
|
+
// expected and tolerated. GitHub noreply addresses (the common case) are decoded locally by the caller without
|
|
402
|
+
// hitting this at all.
|
|
403
|
+
const result = new Map();
|
|
404
|
+
if (emails.length === 0)
|
|
405
|
+
return result;
|
|
406
|
+
for (const batch of chunk(emails, accountResolveBatchSize)) {
|
|
407
|
+
const declarations = batch.map((_, i) => `$q${i}: String!`).join(', ');
|
|
408
|
+
const fields = batch
|
|
409
|
+
.map((_, i) => `e${i}: search(type: USER, query: $q${i}, first: 1) { nodes { ... on User { login } } }`)
|
|
410
|
+
.join('\n\t');
|
|
411
|
+
const query = `query getAccountsForEmails(${declarations}) {\n\t${fields}\n}`;
|
|
412
|
+
const variables = { ...options };
|
|
413
|
+
batch.forEach((email, i) => {
|
|
414
|
+
variables[`q${i}`] = `in:email ${email}`;
|
|
415
|
+
});
|
|
416
|
+
try {
|
|
417
|
+
const rsp = await this.graphql(provider, token, query, variables, scope);
|
|
418
|
+
if (rsp == null)
|
|
419
|
+
continue;
|
|
420
|
+
batch.forEach((email, i) => {
|
|
421
|
+
const login = rsp[`e${i}`]?.nodes?.[0]?.login;
|
|
422
|
+
if (login) {
|
|
423
|
+
result.set(email.toLowerCase(), login);
|
|
424
|
+
}
|
|
425
|
+
});
|
|
426
|
+
}
|
|
427
|
+
catch (ex) {
|
|
428
|
+
// Best-effort enrichment — a failed batch (e.g. query cost) shouldn't abort the others.
|
|
429
|
+
scope?.error(ex);
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
return result;
|
|
433
|
+
}
|
|
363
434
|
async getDefaultBranch(provider, token, owner, repo, options) {
|
|
364
435
|
const scope = getScopedLogger();
|
|
365
436
|
try {
|
|
@@ -487,7 +558,7 @@ export class GitHubApi {
|
|
|
487
558
|
) {
|
|
488
559
|
repository(name: $repo, owner: $owner) {
|
|
489
560
|
pullRequest(number: $number) {
|
|
490
|
-
${
|
|
561
|
+
${gqlPullRequestLiteFragment}
|
|
491
562
|
}
|
|
492
563
|
}
|
|
493
564
|
}`;
|
|
@@ -1372,6 +1443,33 @@ export class GitHubApi {
|
|
|
1372
1443
|
throw this.handleException(ex, undefined, scope);
|
|
1373
1444
|
}
|
|
1374
1445
|
}
|
|
1446
|
+
async getUserSshSigningKeys(provider, token, username, options) {
|
|
1447
|
+
const scope = getScopedLogger();
|
|
1448
|
+
// SSH signing keys are public, so this works for any user with the current token (no extra scope needed).
|
|
1449
|
+
// TODO@eamodio implement pagination
|
|
1450
|
+
try {
|
|
1451
|
+
const rsp = await this.request(provider, token, 'GET /users/{username}/ssh_signing_keys', { username: username, per_page: 100, ...options }, scope);
|
|
1452
|
+
return rsp?.data ?? [];
|
|
1453
|
+
}
|
|
1454
|
+
catch (ex) {
|
|
1455
|
+
if (ex instanceof RequestNotFoundError)
|
|
1456
|
+
return [];
|
|
1457
|
+
throw this.handleException(ex, provider, scope);
|
|
1458
|
+
}
|
|
1459
|
+
}
|
|
1460
|
+
async getCurrentUserSshSigningKeys(provider, token, options) {
|
|
1461
|
+
const scope = getScopedLogger();
|
|
1462
|
+
// TODO@eamodio implement pagination
|
|
1463
|
+
try {
|
|
1464
|
+
const rsp = await this.request(provider, token, 'GET /user/ssh_signing_keys', { per_page: 100, ...options }, scope);
|
|
1465
|
+
return rsp?.data ?? [];
|
|
1466
|
+
}
|
|
1467
|
+
catch (ex) {
|
|
1468
|
+
if (ex instanceof RequestNotFoundError)
|
|
1469
|
+
return [];
|
|
1470
|
+
throw this.handleException(ex, provider, scope);
|
|
1471
|
+
}
|
|
1472
|
+
}
|
|
1375
1473
|
async getDefaultBranchName(token, owner, repo) {
|
|
1376
1474
|
const scope = getScopedLogger();
|
|
1377
1475
|
try {
|
|
@@ -1794,21 +1892,18 @@ export class GitHubApi {
|
|
|
1794
1892
|
}
|
|
1795
1893
|
const run = async () => {
|
|
1796
1894
|
try {
|
|
1797
|
-
let aborter;
|
|
1798
1895
|
if (cancellation != null) {
|
|
1799
|
-
if (cancellation.
|
|
1896
|
+
if (cancellation.aborted)
|
|
1800
1897
|
throw new CancellationError();
|
|
1801
|
-
aborter = new AbortController();
|
|
1802
|
-
cancellation.onCancellationRequested(() => aborter.abort());
|
|
1803
1898
|
variables = {
|
|
1804
1899
|
...variables,
|
|
1805
|
-
request: { ...variables?.request, signal:
|
|
1900
|
+
request: { ...variables?.request, signal: cancellation },
|
|
1806
1901
|
};
|
|
1807
1902
|
}
|
|
1808
1903
|
// Retry transient gateway/network failures, but only confirmed read queries — never
|
|
1809
1904
|
// mutations (re-running one isn't idempotent)
|
|
1810
1905
|
const retryable = graphqlReadQueryRegex.test(query);
|
|
1811
|
-
return await this.requestWithRetries(() => this.config.wrapForForcedInsecureSSL(provider?.getIgnoreSSLErrors() ?? false, () => this.getDefaults(accessToken, graphql)(query, variables)), retryable,
|
|
1906
|
+
return await this.requestWithRetries(() => this.config.wrapForForcedInsecureSSL(provider?.getIgnoreSSLErrors() ?? false, () => this.getDefaults(accessToken, graphql)(query, variables)), retryable, cancellation, scope);
|
|
1812
1907
|
}
|
|
1813
1908
|
catch (ex) {
|
|
1814
1909
|
if (ex instanceof GraphqlResponseError) {
|
|
@@ -1863,11 +1958,9 @@ export class GitHubApi {
|
|
|
1863
1958
|
try {
|
|
1864
1959
|
let signal;
|
|
1865
1960
|
if (cancellation != null) {
|
|
1866
|
-
if (cancellation.
|
|
1961
|
+
if (cancellation.aborted)
|
|
1867
1962
|
throw new CancellationError();
|
|
1868
|
-
|
|
1869
|
-
cancellation.onCancellationRequested(() => aborter.abort());
|
|
1870
|
-
signal = aborter.signal;
|
|
1963
|
+
signal = cancellation;
|
|
1871
1964
|
options = { ...options, request: { ...options?.request, signal: signal } };
|
|
1872
1965
|
}
|
|
1873
1966
|
// Retry transient gateway/network failures on idempotent reads only
|
|
@@ -1949,20 +2042,18 @@ export class GitHubApi {
|
|
|
1949
2042
|
case 410: // Gone
|
|
1950
2043
|
case 422: // Unprocessable Entity
|
|
1951
2044
|
throw new RequestNotFoundError(ex);
|
|
1952
|
-
|
|
2045
|
+
case 429: // Too Many Requests
|
|
2046
|
+
// GitHub returns "a `403` or `429` response" for BOTH its primary and secondary rate limits
|
|
2047
|
+
// (docs.github.com/en/rest/using-the-rest-api/rate-limits-for-the-rest-api). 429 is unambiguous —
|
|
2048
|
+
// unlike 403, it is never a permission failure — so it needs no message check.
|
|
2049
|
+
throw new RequestRateLimitError(ex, accessToken, rateLimitResetAt(ex));
|
|
1953
2050
|
case 401: // Unauthorized
|
|
1954
2051
|
throw new AuthenticationError(tokenInfo, AuthenticationErrorReason.Unauthorized, ex);
|
|
1955
2052
|
case 403: // Forbidden
|
|
2053
|
+
// The other status the rate limits arrive on, but 403 is also a plain permission failure, so here
|
|
2054
|
+
// the message is the discriminant.
|
|
1956
2055
|
if (ex.message.includes('rate limit')) {
|
|
1957
|
-
|
|
1958
|
-
const reset = ex.response?.headers?.['x-ratelimit-reset'];
|
|
1959
|
-
if (reset != null) {
|
|
1960
|
-
resetAt = parseInt(reset, 10);
|
|
1961
|
-
if (Number.isNaN(resetAt)) {
|
|
1962
|
-
resetAt = undefined;
|
|
1963
|
-
}
|
|
1964
|
-
}
|
|
1965
|
-
throw new RequestRateLimitError(ex, accessToken, resetAt);
|
|
2056
|
+
throw new RequestRateLimitError(ex, accessToken, rateLimitResetAt(ex));
|
|
1966
2057
|
}
|
|
1967
2058
|
throw new AuthenticationError(tokenInfo, AuthenticationErrorReason.Forbidden, ex);
|
|
1968
2059
|
case 500: // Internal Server Error
|
|
@@ -2046,26 +2137,28 @@ export class GitHubApi {
|
|
|
2046
2137
|
// The /u/e endpoint automatically falls back to gravatar if not found
|
|
2047
2138
|
return `https://avatars.githubusercontent.com/u/e?email=${encodeURIComponent(email)}&s=${avatarSize}`;
|
|
2048
2139
|
}
|
|
2049
|
-
async
|
|
2140
|
+
async searchMyPullRequestsPage(provider, token, options, cancellation) {
|
|
2050
2141
|
const scope = getScopedLogger();
|
|
2051
2142
|
const limit = Math.min(100, this.config.getLaunchpadQueryLimit?.() ?? 100);
|
|
2052
2143
|
try {
|
|
2053
2144
|
const query = `query searchMyPullRequests(
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2145
|
+
$search: String!
|
|
2146
|
+
$cursor: String
|
|
2147
|
+
$avatarSize: Int
|
|
2148
|
+
) {
|
|
2149
|
+
search(first: ${limit}, after: $cursor, query: $search, type: ISSUE) {
|
|
2150
|
+
issueCount
|
|
2151
|
+
pageInfo {
|
|
2152
|
+
endCursor
|
|
2153
|
+
hasNextPage
|
|
2154
|
+
}
|
|
2155
|
+
nodes {
|
|
2156
|
+
...on PullRequest {
|
|
2157
|
+
${options?.summary ? gqlPullRequestLiteFragment : gqlPullRequestFragment}
|
|
2158
|
+
}
|
|
2062
2159
|
}
|
|
2063
2160
|
}
|
|
2064
|
-
}
|
|
2065
|
-
viewer {
|
|
2066
|
-
login
|
|
2067
|
-
}
|
|
2068
|
-
}`;
|
|
2161
|
+
}`;
|
|
2069
2162
|
let search = options?.search?.trim() ?? '';
|
|
2070
2163
|
if (options?.user) {
|
|
2071
2164
|
search += ` user:${options.user}`;
|
|
@@ -2073,85 +2166,131 @@ export class GitHubApi {
|
|
|
2073
2166
|
if (options?.repos?.length) {
|
|
2074
2167
|
search += ` repo:${options.repos.join(' repo:')}`;
|
|
2075
2168
|
}
|
|
2076
|
-
// Hack for now, ultimately this should be passed in
|
|
2077
2169
|
const ignoredRepos = this.config.getLaunchpadIgnoredRepositories?.() ?? [];
|
|
2078
2170
|
if (ignoredRepos.length) {
|
|
2079
2171
|
search += ` -repo:${ignoredRepos.join(' -repo:')}`;
|
|
2080
2172
|
}
|
|
2081
|
-
// Hack for now, ultimately this should be passed in
|
|
2082
2173
|
const enabledOrgs = this.config.getLaunchpadIncludedOrganizations?.() ?? [];
|
|
2083
2174
|
if (enabledOrgs.length) {
|
|
2084
2175
|
search += ` org:${enabledOrgs.join(' org:')}`;
|
|
2085
2176
|
}
|
|
2086
2177
|
else {
|
|
2087
|
-
// Hack for now, ultimately this should be passed in
|
|
2088
2178
|
const ignoredOrgs = this.config.getLaunchpadIgnoredOrganizations?.() ?? [];
|
|
2089
2179
|
if (ignoredOrgs.length) {
|
|
2090
2180
|
search += ` -org:${ignoredOrgs.join(' -org:')}`;
|
|
2091
2181
|
}
|
|
2092
2182
|
}
|
|
2183
|
+
const stateQualifier = options?.state === 'closed'
|
|
2184
|
+
? 'is:closed is:unmerged'
|
|
2185
|
+
: options?.state === 'merged'
|
|
2186
|
+
? 'is:merged'
|
|
2187
|
+
: options?.state === 'all'
|
|
2188
|
+
? ''
|
|
2189
|
+
: 'is:open';
|
|
2190
|
+
const relationshipQualifier = options?.includeDefaultInvolvement === false
|
|
2191
|
+
? 'is:pr archived:false'
|
|
2192
|
+
: 'is:pr involves:@me archived:false';
|
|
2093
2193
|
const rsp = await this.graphql(provider, token, query, {
|
|
2094
|
-
search:
|
|
2194
|
+
search: [stateQualifier, relationshipQualifier, search].filter(Boolean).join(' ').trim(),
|
|
2195
|
+
cursor: options?.cursor,
|
|
2095
2196
|
baseUrl: options?.baseUrl,
|
|
2096
2197
|
avatarSize: options?.avatarSize,
|
|
2097
2198
|
}, scope, cancellation);
|
|
2098
2199
|
if (rsp == null)
|
|
2099
|
-
return [];
|
|
2100
|
-
const
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
reasons.push('assigned');
|
|
2108
|
-
}
|
|
2109
|
-
if (pr.reviewRequests.nodes.some(r => r.requestedReviewer?.login === viewer)) {
|
|
2110
|
-
reasons.push('review-requested');
|
|
2111
|
-
}
|
|
2112
|
-
if (reasons.length === 0) {
|
|
2113
|
-
reasons.push('mentioned');
|
|
2114
|
-
}
|
|
2115
|
-
return fromGitHubPullRequest(pr, provider);
|
|
2116
|
-
}
|
|
2117
|
-
const results = rsp.search.nodes.map(pr => toQueryResult(pr));
|
|
2118
|
-
return results;
|
|
2200
|
+
return { values: [], hasMore: false, truncated: false };
|
|
2201
|
+
const results = rsp.search.nodes.map(pr => options?.summary ? fromGitHubPullRequestLite(pr, provider) : fromGitHubPullRequest(pr, provider));
|
|
2202
|
+
return {
|
|
2203
|
+
values: results,
|
|
2204
|
+
cursor: rsp.search.pageInfo.endCursor ?? undefined,
|
|
2205
|
+
hasMore: rsp.search.pageInfo.hasNextPage,
|
|
2206
|
+
truncated: rsp.search.issueCount > 1000,
|
|
2207
|
+
};
|
|
2119
2208
|
}
|
|
2120
2209
|
catch (ex) {
|
|
2121
2210
|
throw this.handleException(ex, provider, scope, options?.silent);
|
|
2122
2211
|
}
|
|
2123
2212
|
}
|
|
2213
|
+
async searchMyPullRequests(provider, token, options, cancellation) {
|
|
2214
|
+
return (await this.searchMyPullRequestsPage(provider, token, options, cancellation)).values;
|
|
2215
|
+
}
|
|
2124
2216
|
async searchMyIssues(provider, token, options, cancellation) {
|
|
2125
2217
|
const scope = getScopedLogger();
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2218
|
+
let cursor;
|
|
2219
|
+
if (options?.cursor != null) {
|
|
2220
|
+
try {
|
|
2221
|
+
cursor = JSON.parse(options.cursor);
|
|
2222
|
+
}
|
|
2223
|
+
catch { }
|
|
2224
|
+
}
|
|
2225
|
+
const page = Math.max(1, Math.trunc(cursor?.page ?? 1));
|
|
2226
|
+
// A category is read when the caller asked for it AND it hasn't been exhausted (`null` cursor slot). An
|
|
2227
|
+
// excluded category needs no cursor bookkeeping: `nextCategoryCursor` reads a missing response category as
|
|
2228
|
+
// `null`, so it stays excluded across continuations on its own.
|
|
2229
|
+
const categories = options?.categories;
|
|
2230
|
+
const requested = {
|
|
2231
|
+
authored: categories?.authored ?? categories == null,
|
|
2232
|
+
assigned: categories?.assigned ?? categories == null,
|
|
2233
|
+
mentioned: categories?.mentioned ?? categories == null,
|
|
2234
|
+
};
|
|
2235
|
+
const includeAuthored = requested.authored && cursor?.authored !== null;
|
|
2236
|
+
const includeAssigned = requested.assigned && cursor?.assigned !== null;
|
|
2237
|
+
const includeMentioned = requested.mentioned && cursor?.mentioned !== null;
|
|
2238
|
+
// Reading nothing is the honest answer to "none of the three": widening back to the union would return
|
|
2239
|
+
// issues the caller explicitly excluded.
|
|
2240
|
+
if (!includeAuthored && !includeAssigned && !includeMentioned) {
|
|
2241
|
+
return { values: [], hasMore: false, page: page, truncated: cursor?.truncated === true };
|
|
2242
|
+
}
|
|
2131
2243
|
const query = `query searchMyIssues(
|
|
2132
2244
|
$authored: String!
|
|
2133
2245
|
$assigned: String!
|
|
2134
2246
|
$mentioned: String!
|
|
2247
|
+
$authoredCursor: String
|
|
2248
|
+
$assignedCursor: String
|
|
2249
|
+
$mentionedCursor: String
|
|
2250
|
+
$includeAuthored: Boolean!
|
|
2251
|
+
$includeAssigned: Boolean!
|
|
2252
|
+
$includeMentioned: Boolean!
|
|
2135
2253
|
$avatarSize: Int
|
|
2136
2254
|
) {
|
|
2137
|
-
authored: search(first: 100, query: $authored, type: ISSUE)
|
|
2255
|
+
authored: search(first: 100, after: $authoredCursor, query: $authored, type: ISSUE)
|
|
2256
|
+
@include(if: $includeAuthored) {
|
|
2257
|
+
issueCount
|
|
2258
|
+
pageInfo {
|
|
2259
|
+
endCursor
|
|
2260
|
+
hasNextPage
|
|
2261
|
+
}
|
|
2138
2262
|
nodes {
|
|
2139
2263
|
... on Issue {
|
|
2140
|
-
${
|
|
2264
|
+
${gqIssueFragment}
|
|
2265
|
+
${options?.includeBody ? 'body' : ''}
|
|
2141
2266
|
}
|
|
2142
2267
|
}
|
|
2143
2268
|
}
|
|
2144
|
-
assigned: search(first: 100, query: $assigned, type: ISSUE)
|
|
2269
|
+
assigned: search(first: 100, after: $assignedCursor, query: $assigned, type: ISSUE)
|
|
2270
|
+
@include(if: $includeAssigned) {
|
|
2271
|
+
issueCount
|
|
2272
|
+
pageInfo {
|
|
2273
|
+
endCursor
|
|
2274
|
+
hasNextPage
|
|
2275
|
+
}
|
|
2145
2276
|
nodes {
|
|
2146
2277
|
... on Issue {
|
|
2147
|
-
${
|
|
2278
|
+
${gqIssueFragment}
|
|
2279
|
+
${options?.includeBody ? 'body' : ''}
|
|
2148
2280
|
}
|
|
2149
2281
|
}
|
|
2150
2282
|
}
|
|
2151
|
-
mentioned: search(first: 100, query: $mentioned, type: ISSUE)
|
|
2283
|
+
mentioned: search(first: 100, after: $mentionedCursor, query: $mentioned, type: ISSUE)
|
|
2284
|
+
@include(if: $includeMentioned) {
|
|
2285
|
+
issueCount
|
|
2286
|
+
pageInfo {
|
|
2287
|
+
endCursor
|
|
2288
|
+
hasNextPage
|
|
2289
|
+
}
|
|
2152
2290
|
nodes {
|
|
2153
2291
|
... on Issue {
|
|
2154
|
-
${
|
|
2292
|
+
${gqIssueFragment}
|
|
2293
|
+
${options?.includeBody ? 'body' : ''}
|
|
2155
2294
|
}
|
|
2156
2295
|
}
|
|
2157
2296
|
}
|
|
@@ -2165,11 +2304,26 @@ export class GitHubApi {
|
|
|
2165
2304
|
search += `${repo}${options.repos.join(repo)}`;
|
|
2166
2305
|
}
|
|
2167
2306
|
const baseFilters = 'type:issue is:open archived:false';
|
|
2307
|
+
// `includeAllAssignees` broadens the assigned category from "assigned to me" to "assigned to anyone"
|
|
2308
|
+
// (`assignee:*` is GitHub's has-any-assignee qualifier). Authored/mentioned stay bound to `@me` — they're
|
|
2309
|
+
// user-relative by definition, so an all-assignees read still only surfaces the current user's authored
|
|
2310
|
+
// and mentioned issues plus every assigned-to-anyone issue.
|
|
2311
|
+
//
|
|
2312
|
+
// NOTE: GitHub only honors `assignee:*` when the search is scoped to a single repository (see GitHub's
|
|
2313
|
+
// issue-search docs). Callers using `includeAllAssignees` must scope the read via `repos` (the broaden
|
|
2314
|
+
// fan-out does this per org/repo); an unscoped account-wide `assignee:*` is not meaningful to GitHub.
|
|
2315
|
+
const assignedQualifier = options?.includeAllAssignees ? 'assignee:*' : 'assignee:@me';
|
|
2168
2316
|
try {
|
|
2169
2317
|
const rsp = await this.graphql(provider, token, query, {
|
|
2170
2318
|
authored: `${search} ${baseFilters} author:@me`.trim(),
|
|
2171
|
-
assigned: `${search} ${baseFilters}
|
|
2319
|
+
assigned: `${search} ${baseFilters} ${assignedQualifier}`.trim(),
|
|
2172
2320
|
mentioned: `${search} ${baseFilters} mentions:@me`.trim(),
|
|
2321
|
+
authoredCursor: cursor?.authored ?? undefined,
|
|
2322
|
+
assignedCursor: cursor?.assigned ?? undefined,
|
|
2323
|
+
mentionedCursor: cursor?.mentioned ?? undefined,
|
|
2324
|
+
includeAuthored: includeAuthored,
|
|
2325
|
+
includeAssigned: includeAssigned,
|
|
2326
|
+
includeMentioned: includeMentioned,
|
|
2173
2327
|
baseUrl: options?.baseUrl,
|
|
2174
2328
|
avatarSize: options?.avatarSize,
|
|
2175
2329
|
}, scope, cancellation);
|
|
@@ -2177,9 +2331,37 @@ export class GitHubApi {
|
|
|
2177
2331
|
return fromGitHubIssue(issue, provider);
|
|
2178
2332
|
}
|
|
2179
2333
|
if (rsp == null)
|
|
2180
|
-
return [];
|
|
2181
|
-
const results = uniqueBy([...rsp.assigned
|
|
2182
|
-
|
|
2334
|
+
return { values: [], hasMore: false, page: page, truncated: false };
|
|
2335
|
+
const results = uniqueBy([...(rsp.assigned?.nodes ?? []), ...(rsp.mentioned?.nodes ?? []), ...(rsp.authored?.nodes ?? [])].map(toQueryResult), r => r.url, (original, _current) => original);
|
|
2336
|
+
const nextCategoryCursor = (category) => {
|
|
2337
|
+
if (category?.pageInfo?.hasNextPage && category.pageInfo.endCursor) {
|
|
2338
|
+
return category.pageInfo.endCursor;
|
|
2339
|
+
}
|
|
2340
|
+
return null;
|
|
2341
|
+
};
|
|
2342
|
+
const next = {
|
|
2343
|
+
page: page + 1,
|
|
2344
|
+
authored: nextCategoryCursor(rsp.authored),
|
|
2345
|
+
assigned: nextCategoryCursor(rsp.assigned),
|
|
2346
|
+
mentioned: nextCategoryCursor(rsp.mentioned),
|
|
2347
|
+
};
|
|
2348
|
+
const hasMore = next.authored != null || next.assigned != null || next.mentioned != null;
|
|
2349
|
+
// GitHub search exposes at most 1,000 results per category. Paging removes the previous 100-item
|
|
2350
|
+
// truncation; only the upstream search ceiling or an unusable continuation remains incomplete.
|
|
2351
|
+
const continuationMissing = [rsp.authored, rsp.assigned, rsp.mentioned].some(category => category?.pageInfo?.hasNextPage === true && category.pageInfo.endCursor == null);
|
|
2352
|
+
const truncated = cursor?.truncated === true ||
|
|
2353
|
+
(rsp.authored?.issueCount ?? 0) > 1000 ||
|
|
2354
|
+
(rsp.assigned?.issueCount ?? 0) > 1000 ||
|
|
2355
|
+
(rsp.mentioned?.issueCount ?? 0) > 1000 ||
|
|
2356
|
+
continuationMissing;
|
|
2357
|
+
next.truncated = truncated || undefined;
|
|
2358
|
+
return {
|
|
2359
|
+
values: [...results],
|
|
2360
|
+
cursor: hasMore ? JSON.stringify(next) : undefined,
|
|
2361
|
+
hasMore: hasMore,
|
|
2362
|
+
page: page,
|
|
2363
|
+
truncated: truncated,
|
|
2364
|
+
};
|
|
2183
2365
|
}
|
|
2184
2366
|
catch (ex) {
|
|
2185
2367
|
throw this.handleException(ex, provider, scope);
|
|
@@ -2187,12 +2369,20 @@ export class GitHubApi {
|
|
|
2187
2369
|
}
|
|
2188
2370
|
async searchPullRequests(provider, token, options, cancellation) {
|
|
2189
2371
|
const scope = getScopedLogger();
|
|
2372
|
+
const pageSize = 10;
|
|
2373
|
+
const include = options?.include?.length ? options.include : undefined;
|
|
2374
|
+
const requiresPagination = shouldPaginateGitHubSearchState(include);
|
|
2190
2375
|
try {
|
|
2191
2376
|
const query = `query searchPullRequests(
|
|
2192
2377
|
$searchQuery: String!
|
|
2378
|
+
$cursor: String
|
|
2193
2379
|
$avatarSize: Int
|
|
2194
2380
|
) {
|
|
2195
|
-
|
|
2381
|
+
search(first: ${pageSize}, after: $cursor, query: $searchQuery, type: ISSUE) {
|
|
2382
|
+
pageInfo {
|
|
2383
|
+
endCursor
|
|
2384
|
+
hasNextPage
|
|
2385
|
+
}
|
|
2196
2386
|
nodes {
|
|
2197
2387
|
...on PullRequest {
|
|
2198
2388
|
${gqlPullRequestFragment}
|
|
@@ -2208,15 +2398,31 @@ export class GitHubApi {
|
|
|
2208
2398
|
const repo = ' repo:';
|
|
2209
2399
|
search += `${repo}${options.repos.join(repo)}`;
|
|
2210
2400
|
}
|
|
2211
|
-
const
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
const results =
|
|
2219
|
-
|
|
2401
|
+
const searchQuery = ['is:pr', toGitHubSearchStateQualifier(include), 'archived:false', search.trim()]
|
|
2402
|
+
.filter(Boolean)
|
|
2403
|
+
.join(' ');
|
|
2404
|
+
// Bound the paginated case with a defensive page backstop like the other paged provider drains, so a
|
|
2405
|
+
// large, low-match result set can't fan out into an unbounded request loop.
|
|
2406
|
+
const maxSearchPages = 20;
|
|
2407
|
+
let cursor;
|
|
2408
|
+
const results = [];
|
|
2409
|
+
for (let page = 0; page < maxSearchPages; page++) {
|
|
2410
|
+
const rsp = await this.graphql(provider, token, query, {
|
|
2411
|
+
searchQuery: searchQuery,
|
|
2412
|
+
cursor: cursor,
|
|
2413
|
+
baseUrl: options?.baseUrl,
|
|
2414
|
+
avatarSize: options?.avatarSize,
|
|
2415
|
+
}, scope, cancellation);
|
|
2416
|
+
if (rsp == null)
|
|
2417
|
+
return [];
|
|
2418
|
+
const pageResults = filterPullRequestsBySearchState(rsp.search.nodes.map(pr => fromGitHubPullRequest(pr, provider)), include);
|
|
2419
|
+
results.push(...pageResults);
|
|
2420
|
+
cursor = rsp.search.pageInfo.endCursor ?? undefined;
|
|
2421
|
+
if (!requiresPagination || results.length >= pageSize || !rsp.search.pageInfo.hasNextPage) {
|
|
2422
|
+
break;
|
|
2423
|
+
}
|
|
2424
|
+
}
|
|
2425
|
+
return results.slice(0, pageSize);
|
|
2220
2426
|
}
|
|
2221
2427
|
catch (ex) {
|
|
2222
2428
|
throw this.handleException(ex, provider, scope);
|
|
@@ -2286,6 +2492,9 @@ __decorate([
|
|
|
2286
2492
|
}),
|
|
2287
2493
|
})
|
|
2288
2494
|
], GitHubApi.prototype, "getAccountForEmail", null);
|
|
2495
|
+
__decorate([
|
|
2496
|
+
trace({ args: (provider, token) => ({ provider: provider?.name, token: `<token:${token.microHash}>` }) })
|
|
2497
|
+
], GitHubApi.prototype, "getAccountsForEmails", null);
|
|
2289
2498
|
__decorate([
|
|
2290
2499
|
trace({
|
|
2291
2500
|
args: (provider, token, owner, repo) => ({
|
|
@@ -2487,6 +2696,18 @@ __decorate([
|
|
|
2487
2696
|
__decorate([
|
|
2488
2697
|
trace({ args: (token, owner, repo) => ({ token: `<token:${token.microHash}>`, owner: owner, repo: repo }) })
|
|
2489
2698
|
], GitHubApi.prototype, "getContributors", null);
|
|
2699
|
+
__decorate([
|
|
2700
|
+
trace({
|
|
2701
|
+
args: (provider, token, username) => ({
|
|
2702
|
+
provider: provider?.name,
|
|
2703
|
+
token: `<token:${token.microHash}>`,
|
|
2704
|
+
username: username,
|
|
2705
|
+
}),
|
|
2706
|
+
})
|
|
2707
|
+
], GitHubApi.prototype, "getUserSshSigningKeys", null);
|
|
2708
|
+
__decorate([
|
|
2709
|
+
trace({ args: (provider, token) => ({ provider: provider?.name, token: `<token:${token.microHash}>` }) })
|
|
2710
|
+
], GitHubApi.prototype, "getCurrentUserSshSigningKeys", null);
|
|
2490
2711
|
__decorate([
|
|
2491
2712
|
trace({ args: (token, owner, repo) => ({ token: `<token:${token.microHash}>`, owner: owner, repo: repo }) })
|
|
2492
2713
|
], GitHubApi.prototype, "getDefaultBranchName", null);
|
|
@@ -2529,6 +2750,9 @@ __decorate([
|
|
|
2529
2750
|
__decorate([
|
|
2530
2751
|
trace({ args: (provider, token) => ({ provider: provider?.name, token: `<token:${token.microHash}>` }) })
|
|
2531
2752
|
], GitHubApi.prototype, "getEnterpriseVersion", null);
|
|
2753
|
+
__decorate([
|
|
2754
|
+
trace({ args: (provider, token) => ({ provider: provider.name, token: `<token:${token.microHash}>` }) })
|
|
2755
|
+
], GitHubApi.prototype, "searchMyPullRequestsPage", null);
|
|
2532
2756
|
__decorate([
|
|
2533
2757
|
trace({ args: (provider, token) => ({ provider: provider.name, token: `<token:${token.microHash}>` }) })
|
|
2534
2758
|
], GitHubApi.prototype, "searchMyPullRequests", null);
|
|
@@ -2551,4 +2775,46 @@ __decorate([
|
|
|
2551
2775
|
function isGitHubDotCom(options) {
|
|
2552
2776
|
return options?.baseUrl == null || options.baseUrl === 'https://api.github.com';
|
|
2553
2777
|
}
|
|
2778
|
+
// Translates the requested PR states into a GitHub search state qualifier. GitHub search treats
|
|
2779
|
+
// `is:closed` as closed-or-merged, `is:merged` as its subset, and `is:unmerged` as open + closed
|
|
2780
|
+
// (not-merged), so `closed` and `merged` (distinct in our model) map to `is:closed is:unmerged` and
|
|
2781
|
+
// `is:merged`. `undefined` preserves the historical open-only default.
|
|
2782
|
+
export function toGitHubSearchStateQualifier(include) {
|
|
2783
|
+
if (include == null)
|
|
2784
|
+
return 'is:open';
|
|
2785
|
+
const opened = include.includes('opened');
|
|
2786
|
+
const closed = include.includes('closed');
|
|
2787
|
+
const merged = include.includes('merged');
|
|
2788
|
+
if (opened && closed && merged)
|
|
2789
|
+
return ''; // all states -> no qualifier
|
|
2790
|
+
if (opened && closed)
|
|
2791
|
+
return 'is:unmerged';
|
|
2792
|
+
if (closed && merged)
|
|
2793
|
+
return 'is:closed';
|
|
2794
|
+
// `opened && merged` isn't expressible as a single AND qualifier; omit it here and post-filter.
|
|
2795
|
+
if (opened && merged)
|
|
2796
|
+
return '';
|
|
2797
|
+
if (opened)
|
|
2798
|
+
return 'is:open';
|
|
2799
|
+
if (merged)
|
|
2800
|
+
return 'is:merged';
|
|
2801
|
+
if (closed)
|
|
2802
|
+
return 'is:closed is:unmerged';
|
|
2803
|
+
return 'is:open'; // empty include -> default
|
|
2804
|
+
}
|
|
2805
|
+
export function filterPullRequestsBySearchState(pullRequests, include) {
|
|
2806
|
+
const states = include?.length ? include : ['opened'];
|
|
2807
|
+
const allowedStates = new Set(states);
|
|
2808
|
+
// There are only 3 possible states, so a full set means every state is allowed; use the deduped set
|
|
2809
|
+
// size rather than the raw length so duplicates (e.g. `['opened', 'opened', 'closed']`) don't skip filtering.
|
|
2810
|
+
if (allowedStates.size === 3)
|
|
2811
|
+
return pullRequests;
|
|
2812
|
+
return pullRequests.filter(pr => allowedStates.has(pr.state));
|
|
2813
|
+
}
|
|
2814
|
+
function shouldPaginateGitHubSearchState(include) {
|
|
2815
|
+
if (include == null || include.length === 0)
|
|
2816
|
+
return false;
|
|
2817
|
+
const uniqueStates = new Set(include);
|
|
2818
|
+
return uniqueStates.size === 2 && uniqueStates.has('opened') && uniqueStates.has('merged');
|
|
2819
|
+
}
|
|
2554
2820
|
//# sourceMappingURL=github.js.map
|