@gitkraken/core-gitlens 0.4.0 → 0.4.101
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 +74 -1
- package/README.md +9 -2
- 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.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.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 +3 -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.map +1 -1
- 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.map +1 -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 +2 -1
- package/dist/git-cli/providers/worktrees.d.ts.map +1 -1
- package/dist/git-cli/providers/worktrees.js +28 -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 +0 -2
- 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 +66 -3
- package/dist/plus/git-github/api/github.d.ts.map +1 -1
- package/dist/plus/git-github/api/github.js +345 -74
- 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 +20 -1
- package/dist/plus/integrations/authentication/cloudIntegrationService.d.ts.map +1 -1
- package/dist/plus/integrations/authentication/cloudIntegrationService.js +134 -10
- package/dist/plus/integrations/authentication/cloudIntegrationService.js.map +1 -1
- package/dist/plus/integrations/authentication/configuredIntegrationService.d.ts +52 -5
- package/dist/plus/integrations/authentication/configuredIntegrationService.d.ts.map +1 -1
- package/dist/plus/integrations/authentication/configuredIntegrationService.js +248 -46
- package/dist/plus/integrations/authentication/configuredIntegrationService.js.map +1 -1
- package/dist/plus/integrations/authentication/integrationAuthenticationProvider.d.ts +24 -4
- package/dist/plus/integrations/authentication/integrationAuthenticationProvider.d.ts.map +1 -1
- package/dist/plus/integrations/authentication/integrationAuthenticationProvider.js +58 -26
- package/dist/plus/integrations/authentication/integrationAuthenticationProvider.js.map +1 -1
- package/dist/plus/integrations/authentication/integrationAuthenticationService.d.ts.map +1 -1
- package/dist/plus/integrations/authentication/integrationAuthenticationService.js +7 -3
- package/dist/plus/integrations/authentication/integrationAuthenticationService.js.map +1 -1
- package/dist/plus/integrations/authentication/manualTokenProvider.d.ts +1 -0
- package/dist/plus/integrations/authentication/manualTokenProvider.d.ts.map +1 -1
- package/dist/plus/integrations/authentication/manualTokenProvider.js +9 -5
- package/dist/plus/integrations/authentication/manualTokenProvider.js.map +1 -1
- package/dist/plus/integrations/authentication/models.d.ts +33 -0
- package/dist/plus/integrations/authentication/models.d.ts.map +1 -1
- package/dist/plus/integrations/authentication/models.js.map +1 -1
- 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 +12 -2
- package/dist/plus/integrations/constants.d.ts.map +1 -1
- package/dist/plus/integrations/constants.js +10 -0
- package/dist/plus/integrations/constants.js.map +1 -1
- package/dist/plus/integrations/context.d.ts +10 -6
- package/dist/plus/integrations/context.d.ts.map +1 -1
- package/dist/plus/integrations/errors.d.ts +65 -0
- package/dist/plus/integrations/errors.d.ts.map +1 -1
- package/dist/plus/integrations/errors.js +135 -0
- package/dist/plus/integrations/errors.js.map +1 -1
- package/dist/plus/integrations/index.d.ts +57 -12
- package/dist/plus/integrations/index.d.ts.map +1 -1
- package/dist/plus/integrations/index.js +39 -37
- package/dist/plus/integrations/index.js.map +1 -1
- package/dist/plus/integrations/integrationService.d.ts +297 -13
- package/dist/plus/integrations/integrationService.d.ts.map +1 -1
- package/dist/plus/integrations/integrationService.js +672 -36
- package/dist/plus/integrations/integrationService.js.map +1 -1
- 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 +262 -10
- package/dist/plus/integrations/models/gitHostIntegration.d.ts.map +1 -1
- package/dist/plus/integrations/models/gitHostIntegration.js +675 -101
- package/dist/plus/integrations/models/gitHostIntegration.js.map +1 -1
- package/dist/plus/integrations/models/integration.d.ts +88 -3
- package/dist/plus/integrations/models/integration.d.ts.map +1 -1
- package/dist/plus/integrations/models/integration.js +192 -21
- package/dist/plus/integrations/models/integration.js.map +1 -1
- package/dist/plus/integrations/models/issuesIntegration.d.ts +70 -7
- package/dist/plus/integrations/models/issuesIntegration.d.ts.map +1 -1
- package/dist/plus/integrations/models/issuesIntegration.js +108 -35
- package/dist/plus/integrations/models/issuesIntegration.js.map +1 -1
- 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.map +1 -1
- package/dist/plus/integrations/providers/apiClients.js +3 -3
- package/dist/plus/integrations/providers/apiClients.js.map +1 -1
- 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 +14 -2
- package/dist/plus/integrations/providers/azure/azure.d.ts.map +1 -1
- package/dist/plus/integrations/providers/azure/azure.js +107 -32
- package/dist/plus/integrations/providers/azure/azure.js.map +1 -1
- package/dist/plus/integrations/providers/azure/models.d.ts +16 -0
- package/dist/plus/integrations/providers/azure/models.d.ts.map +1 -1
- package/dist/plus/integrations/providers/azure/models.js +6 -6
- package/dist/plus/integrations/providers/azure/models.js.map +1 -1
- package/dist/plus/integrations/providers/azureDevOps.d.ts +55 -9
- package/dist/plus/integrations/providers/azureDevOps.d.ts.map +1 -1
- package/dist/plus/integrations/providers/azureDevOps.js +572 -79
- package/dist/plus/integrations/providers/azureDevOps.js.map +1 -1
- package/dist/plus/integrations/providers/bitbucket/bitbucket.d.ts +13 -2
- package/dist/plus/integrations/providers/bitbucket/bitbucket.d.ts.map +1 -1
- package/dist/plus/integrations/providers/bitbucket/bitbucket.js +108 -32
- package/dist/plus/integrations/providers/bitbucket/bitbucket.js.map +1 -1
- package/dist/plus/integrations/providers/bitbucket/models.d.ts.map +1 -1
- package/dist/plus/integrations/providers/bitbucket/models.js.map +1 -1
- package/dist/plus/integrations/providers/bitbucket-server/models.d.ts +19 -1
- package/dist/plus/integrations/providers/bitbucket-server/models.d.ts.map +1 -1
- package/dist/plus/integrations/providers/bitbucket-server/models.js +20 -1
- package/dist/plus/integrations/providers/bitbucket-server/models.js.map +1 -1
- package/dist/plus/integrations/providers/bitbucket-server.d.ts +28 -4
- package/dist/plus/integrations/providers/bitbucket-server.d.ts.map +1 -1
- package/dist/plus/integrations/providers/bitbucket-server.js +110 -6
- package/dist/plus/integrations/providers/bitbucket-server.js.map +1 -1
- package/dist/plus/integrations/providers/bitbucket.d.ts +38 -4
- package/dist/plus/integrations/providers/bitbucket.d.ts.map +1 -1
- package/dist/plus/integrations/providers/bitbucket.js +330 -34
- package/dist/plus/integrations/providers/bitbucket.js.map +1 -1
- package/dist/plus/integrations/providers/github/github.d.ts.map +1 -1
- package/dist/plus/integrations/providers/github/github.js +1 -1
- package/dist/plus/integrations/providers/github/github.js.map +1 -1
- package/dist/plus/integrations/providers/github/github.utils.d.ts.map +1 -1
- package/dist/plus/integrations/providers/github/github.utils.js.map +1 -1
- package/dist/plus/integrations/providers/github/models.d.ts.map +1 -1
- package/dist/plus/integrations/providers/github/models.js.map +1 -1
- package/dist/plus/integrations/providers/github.d.ts +49 -6
- package/dist/plus/integrations/providers/github.d.ts.map +1 -1
- package/dist/plus/integrations/providers/github.js +289 -4
- package/dist/plus/integrations/providers/github.js.map +1 -1
- package/dist/plus/integrations/providers/gitlab/gitlab.d.ts +11 -3
- package/dist/plus/integrations/providers/gitlab/gitlab.d.ts.map +1 -1
- package/dist/plus/integrations/providers/gitlab/gitlab.js +121 -47
- package/dist/plus/integrations/providers/gitlab/gitlab.js.map +1 -1
- package/dist/plus/integrations/providers/gitlab/gitlab.utils.d.ts +6 -0
- package/dist/plus/integrations/providers/gitlab/gitlab.utils.d.ts.map +1 -1
- package/dist/plus/integrations/providers/gitlab/gitlab.utils.js +8 -0
- package/dist/plus/integrations/providers/gitlab/gitlab.utils.js.map +1 -1
- package/dist/plus/integrations/providers/gitlab/models.d.ts +10 -0
- package/dist/plus/integrations/providers/gitlab/models.d.ts.map +1 -1
- package/dist/plus/integrations/providers/gitlab/models.js +8 -5
- package/dist/plus/integrations/providers/gitlab/models.js.map +1 -1
- package/dist/plus/integrations/providers/gitlab.d.ts +50 -5
- package/dist/plus/integrations/providers/gitlab.d.ts.map +1 -1
- package/dist/plus/integrations/providers/gitlab.js +274 -8
- package/dist/plus/integrations/providers/gitlab.js.map +1 -1
- package/dist/plus/integrations/providers/jira.d.ts +13 -2
- package/dist/plus/integrations/providers/jira.d.ts.map +1 -1
- package/dist/plus/integrations/providers/jira.js +200 -30
- package/dist/plus/integrations/providers/jira.js.map +1 -1
- package/dist/plus/integrations/providers/linear.d.ts +16 -5
- package/dist/plus/integrations/providers/linear.d.ts.map +1 -1
- package/dist/plus/integrations/providers/linear.js +127 -21
- package/dist/plus/integrations/providers/linear.js.map +1 -1
- package/dist/plus/integrations/providers/models.d.ts +339 -60
- package/dist/plus/integrations/providers/models.d.ts.map +1 -1
- package/dist/plus/integrations/providers/models.js +307 -59
- package/dist/plus/integrations/providers/models.js.map +1 -1
- package/dist/plus/integrations/providers/providersApi.d.ts +144 -11
- package/dist/plus/integrations/providers/providersApi.d.ts.map +1 -1
- package/dist/plus/integrations/providers/providersApi.js +486 -55
- package/dist/plus/integrations/providers/providersApi.js.map +1 -1
- 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 +21 -0
- package/dist/plus/integrations/providers/utils.d.ts.map +1 -1
- package/dist/plus/integrations/providers/utils.js +57 -6
- package/dist/plus/integrations/providers/utils.js.map +1 -1
- package/dist/plus/integrations/reads/broaden.d.ts +20 -0
- package/dist/plus/integrations/reads/broaden.d.ts.map +1 -0
- package/dist/plus/integrations/reads/broaden.js +326 -0
- package/dist/plus/integrations/reads/broaden.js.map +1 -0
- package/dist/plus/integrations/reads/context.d.ts +74 -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 +320 -0
- package/dist/plus/integrations/reads/hierarchy.js.map +1 -0
- package/dist/plus/integrations/reads/hierarchy.utils.d.ts +77 -0
- package/dist/plus/integrations/reads/hierarchy.utils.d.ts.map +1 -0
- package/dist/plus/integrations/reads/hierarchy.utils.js +128 -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 +334 -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/resolveRepository.d.ts +25 -0
- package/dist/plus/integrations/reads/resolveRepository.d.ts.map +1 -0
- package/dist/plus/integrations/reads/resolveRepository.js +235 -0
- package/dist/plus/integrations/reads/resolveRepository.js.map +1 -0
- package/dist/plus/integrations/reads/sweeps.d.ts +11 -0
- package/dist/plus/integrations/reads/sweeps.d.ts.map +1 -0
- package/dist/plus/integrations/reads/sweeps.js +125 -0
- package/dist/plus/integrations/reads/sweeps.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/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 +27 -1
- package/dist/plus/integrations/utils/integration.utils.d.ts.map +1 -1
- package/dist/plus/integrations/utils/integration.utils.js +86 -15
- package/dist/plus/integrations/utils/integration.utils.js.map +1 -1
- 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/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 -213
- package/src/git/cache.ts +75 -8
- 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/status.ts +1 -1
- package/src/git/providers/worktrees.ts +3 -1
- 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/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/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 +40 -4
- 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 +0 -2
- 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 +484 -104
- 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 +189 -17
- package/src/plus/integrations/authentication/configuredIntegrationService.ts +287 -50
- package/src/plus/integrations/authentication/integrationAuthenticationProvider.ts +105 -31
- package/src/plus/integrations/authentication/integrationAuthenticationService.ts +7 -3
- package/src/plus/integrations/authentication/manualTokenProvider.ts +12 -5
- package/src/plus/integrations/authentication/models.ts +35 -1
- package/src/plus/integrations/collectionMetadata.ts +143 -0
- package/src/plus/integrations/constants.ts +21 -0
- package/src/plus/integrations/context.ts +8 -9
- package/src/plus/integrations/errors.ts +153 -0
- package/src/plus/integrations/index.ts +148 -51
- package/src/plus/integrations/integrationService.ts +940 -49
- package/src/plus/integrations/lite.ts +233 -0
- package/src/plus/integrations/manager.ts +359 -0
- package/src/plus/integrations/models/gitHostIntegration.ts +1005 -134
- package/src/plus/integrations/models/integration.ts +293 -24
- package/src/plus/integrations/models/issuesIntegration.ts +132 -39
- package/src/plus/integrations/providerFilters.ts +12 -0
- package/src/plus/integrations/providers/apiClients.ts +8 -11
- package/src/plus/integrations/providers/apiConfig.ts +71 -0
- package/src/plus/integrations/providers/azure/azure.ts +164 -33
- package/src/plus/integrations/providers/azure/models.ts +19 -6
- package/src/plus/integrations/providers/azureDevOps.ts +766 -101
- package/src/plus/integrations/providers/bitbucket/bitbucket.ts +164 -34
- package/src/plus/integrations/providers/bitbucket-server/models.ts +32 -1
- package/src/plus/integrations/providers/bitbucket-server.ts +173 -8
- package/src/plus/integrations/providers/bitbucket.ts +489 -45
- package/src/plus/integrations/providers/github/github.ts +2 -2
- package/src/plus/integrations/providers/github/github.utils.ts +1 -1
- package/src/plus/integrations/providers/github.ts +390 -6
- package/src/plus/integrations/providers/gitlab/gitlab.ts +170 -60
- package/src/plus/integrations/providers/gitlab/gitlab.utils.ts +9 -0
- package/src/plus/integrations/providers/gitlab/models.ts +19 -5
- package/src/plus/integrations/providers/gitlab.ts +369 -10
- package/src/plus/integrations/providers/jira.ts +247 -42
- package/src/plus/integrations/providers/linear.ts +154 -27
- package/src/plus/integrations/providers/models.ts +583 -75
- package/src/plus/integrations/providers/providersApi.ts +849 -86
- 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 +68 -8
- package/src/plus/integrations/reads/broaden.ts +452 -0
- package/src/plus/integrations/reads/context.ts +99 -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 +473 -0
- package/src/plus/integrations/reads/hierarchy.utils.ts +155 -0
- package/src/plus/integrations/reads/issueTracker.ts +468 -0
- package/src/plus/integrations/reads/issues.ts +409 -0
- package/src/plus/integrations/reads/paging.ts +277 -0
- package/src/plus/integrations/reads/pullRequests.ts +260 -0
- package/src/plus/integrations/reads/resolveRepository.ts +272 -0
- package/src/plus/integrations/reads/sweeps.ts +185 -0
- package/src/plus/integrations/reads/warnings.ts +170 -0
- package/src/plus/integrations/results.ts +275 -0
- package/src/plus/integrations/utils/domain.utils.ts +26 -0
- package/src/plus/integrations/utils/integration.utils.ts +93 -16
- 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/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
|
@@ -13,7 +13,7 @@ import type { Account, UnidentifiedAuthor } from '../../../git/models/author.js'
|
|
|
13
13
|
import type { DefaultBranch } from '../../../git/models/defaultBranch.js';
|
|
14
14
|
import type { Issue, IssueShape } from '../../../git/models/issue.js';
|
|
15
15
|
import type { IssueOrPullRequest } from '../../../git/models/issueOrPullRequest.js';
|
|
16
|
-
import type { PullRequest } from '../../../git/models/pullRequest.js';
|
|
16
|
+
import type { PullRequest, PullRequestState, PullRequestStateFilter } from '../../../git/models/pullRequest.js';
|
|
17
17
|
import { PullRequestMergeMethod } from '../../../git/models/pullRequest.js';
|
|
18
18
|
import type { Provider } from '../../../git/models/remoteProvider.js';
|
|
19
19
|
import type { RepositoryMetadata } from '../../../git/models/repositoryMetadata.js';
|
|
@@ -27,6 +27,7 @@ import {
|
|
|
27
27
|
isRevisionRange,
|
|
28
28
|
isSha,
|
|
29
29
|
} from '../../../git/utils/revision.utils.js';
|
|
30
|
+
import { chunk } from '../../../utils/array.js';
|
|
30
31
|
import { base64 } from '../../../utils/base64.js';
|
|
31
32
|
import { CancellationError } from '../../../utils/cancellation.js';
|
|
32
33
|
import { trace } from '../../../utils/decorators/log.js';
|
|
@@ -55,6 +56,7 @@ import type {
|
|
|
55
56
|
GitHubPullRequest,
|
|
56
57
|
GitHubPullRequestLite,
|
|
57
58
|
GitHubPullRequestState,
|
|
59
|
+
GitHubSshSigningKey,
|
|
58
60
|
GitHubTag,
|
|
59
61
|
} from '../models.js';
|
|
60
62
|
import {
|
|
@@ -78,6 +80,9 @@ const maxRequestRetries = 2;
|
|
|
78
80
|
const requestRetryBaseDelay = 300; // ms
|
|
79
81
|
const requestRetryMaxDelay = 2000; // ms
|
|
80
82
|
|
|
83
|
+
/** How many email->login user searches to alias into a single GraphQL request (keeps query cost within limits). */
|
|
84
|
+
const accountResolveBatchSize = 25;
|
|
85
|
+
|
|
81
86
|
function isRetryableTransientError(ex: unknown): ex is RequestError {
|
|
82
87
|
// An aborted request is rethrown as the original `AbortError` (not a `RequestError`), so it is
|
|
83
88
|
// excluded here. octokit maps a fetch/network failure to a `RequestError` with status 500 and
|
|
@@ -96,6 +101,31 @@ function isRetryableTransientError(ex: unknown): ex is RequestError {
|
|
|
96
101
|
}
|
|
97
102
|
}
|
|
98
103
|
|
|
104
|
+
/**
|
|
105
|
+
* When a rate-limited request may be retried, as a UTC epoch in seconds, or `undefined` when the response says
|
|
106
|
+
* nothing useful. Header precedence follows GitHub's own guidance
|
|
107
|
+
* (docs.github.com/en/rest/using-the-rest-api/rate-limits-for-the-rest-api): `retry-after` wins when present —
|
|
108
|
+
* it is the only one a secondary limit reliably sets — and `x-ratelimit-reset` covers the primary limit.
|
|
109
|
+
*/
|
|
110
|
+
function rateLimitResetAt(ex: RequestError): number | undefined {
|
|
111
|
+
const headers = ex.response?.headers;
|
|
112
|
+
if (headers == null) return undefined;
|
|
113
|
+
|
|
114
|
+
// `retry-after` is a delay in seconds, not an epoch, so it has to be added to now to compare with `resetAt`.
|
|
115
|
+
const retryAfter = toPositiveInt(headers['retry-after']);
|
|
116
|
+
if (retryAfter != null) return Math.floor(Date.now() / 1000) + retryAfter;
|
|
117
|
+
|
|
118
|
+
return toPositiveInt(headers['x-ratelimit-reset']);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
function toPositiveInt(value: string | number | undefined): number | undefined {
|
|
122
|
+
if (value == null) return undefined;
|
|
123
|
+
|
|
124
|
+
const parsed = typeof value === 'number' ? value : parseInt(value, 10);
|
|
125
|
+
// Rejects NaN and a nonsensical negative/zero, either of which would present as an already-elapsed reset.
|
|
126
|
+
return Number.isFinite(parsed) && parsed > 0 ? parsed : undefined;
|
|
127
|
+
}
|
|
128
|
+
|
|
99
129
|
function getRequestRetryDelay(attempt: number): number {
|
|
100
130
|
// Exponential backoff with equal jitter, capped — spreads retries so a brief upstream blip
|
|
101
131
|
// isn't hammered by every in-flight request landing on the same schedule.
|
|
@@ -127,15 +157,18 @@ author {
|
|
|
127
157
|
avatarUrl(size: $avatarSize)
|
|
128
158
|
url
|
|
129
159
|
}
|
|
160
|
+
body
|
|
130
161
|
baseRefName
|
|
131
162
|
baseRefOid
|
|
132
163
|
headRefName
|
|
133
164
|
headRefOid
|
|
134
165
|
headRepository {
|
|
166
|
+
isFork
|
|
135
167
|
name
|
|
136
168
|
owner {
|
|
137
169
|
login
|
|
138
170
|
}
|
|
171
|
+
sshUrl
|
|
139
172
|
url
|
|
140
173
|
}
|
|
141
174
|
isCrossRepository
|
|
@@ -148,6 +181,7 @@ repository {
|
|
|
148
181
|
owner {
|
|
149
182
|
login
|
|
150
183
|
}
|
|
184
|
+
sshUrl
|
|
151
185
|
url
|
|
152
186
|
viewerPermission
|
|
153
187
|
}
|
|
@@ -549,6 +583,61 @@ export class GitHubApi {
|
|
|
549
583
|
}
|
|
550
584
|
}
|
|
551
585
|
|
|
586
|
+
@trace({ args: (provider, token) => ({ provider: provider?.name, token: `<token:${token.microHash}>` }) })
|
|
587
|
+
async getAccountsForEmails(
|
|
588
|
+
provider: Provider,
|
|
589
|
+
token: GitHubTokenInfo,
|
|
590
|
+
emails: string[],
|
|
591
|
+
options?: { baseUrl?: string },
|
|
592
|
+
): Promise<Map<string, string>> {
|
|
593
|
+
const scope = getScopedLogger();
|
|
594
|
+
|
|
595
|
+
// Resolves email -> login for many emails in one request via field aliasing, chunked to keep query cost within
|
|
596
|
+
// GitHub's limits. Each email is passed as a GraphQL variable (never interpolated into the query string) so an
|
|
597
|
+
// attacker-controllable commit email can't inject query structure. Keyed by lowercased email.
|
|
598
|
+
//
|
|
599
|
+
// This is intentionally best-effort: user-by-email search only matches accounts whose email is public, and the
|
|
600
|
+
// search API is subject to GitHub's separate search/secondary rate limits, so misses and per-batch failures are
|
|
601
|
+
// expected and tolerated. GitHub noreply addresses (the common case) are decoded locally by the caller without
|
|
602
|
+
// hitting this at all.
|
|
603
|
+
const result = new Map<string, string>();
|
|
604
|
+
if (emails.length === 0) return result;
|
|
605
|
+
|
|
606
|
+
interface QueryResult {
|
|
607
|
+
[alias: string]: { nodes?: ({ login: string | null } | null)[] | null } | null | undefined;
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
for (const batch of chunk(emails, accountResolveBatchSize)) {
|
|
611
|
+
const declarations = batch.map((_, i) => `$q${i}: String!`).join(', ');
|
|
612
|
+
const fields = batch
|
|
613
|
+
.map((_, i) => `e${i}: search(type: USER, query: $q${i}, first: 1) { nodes { ... on User { login } } }`)
|
|
614
|
+
.join('\n\t');
|
|
615
|
+
const query = `query getAccountsForEmails(${declarations}) {\n\t${fields}\n}`;
|
|
616
|
+
|
|
617
|
+
const variables: RequestParameters = { ...options };
|
|
618
|
+
batch.forEach((email, i) => {
|
|
619
|
+
variables[`q${i}`] = `in:email ${email}`;
|
|
620
|
+
});
|
|
621
|
+
|
|
622
|
+
try {
|
|
623
|
+
const rsp = await this.graphql<QueryResult>(provider, token, query, variables, scope);
|
|
624
|
+
if (rsp == null) continue;
|
|
625
|
+
|
|
626
|
+
batch.forEach((email, i) => {
|
|
627
|
+
const login = rsp[`e${i}`]?.nodes?.[0]?.login;
|
|
628
|
+
if (login) {
|
|
629
|
+
result.set(email.toLowerCase(), login);
|
|
630
|
+
}
|
|
631
|
+
});
|
|
632
|
+
} catch (ex) {
|
|
633
|
+
// Best-effort enrichment — a failed batch (e.g. query cost) shouldn't abort the others.
|
|
634
|
+
scope?.error(ex);
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
return result;
|
|
639
|
+
}
|
|
640
|
+
|
|
552
641
|
@trace({
|
|
553
642
|
args: (provider, token, owner, repo) => ({
|
|
554
643
|
provider: provider.name,
|
|
@@ -810,7 +899,7 @@ export class GitHubApi {
|
|
|
810
899
|
) {
|
|
811
900
|
repository(name: $repo, owner: $owner) {
|
|
812
901
|
pullRequest(number: $number) {
|
|
813
|
-
${
|
|
902
|
+
${gqlPullRequestLiteFragment}
|
|
814
903
|
}
|
|
815
904
|
}
|
|
816
905
|
}`;
|
|
@@ -2338,6 +2427,64 @@ export class GitHubApi {
|
|
|
2338
2427
|
}
|
|
2339
2428
|
}
|
|
2340
2429
|
|
|
2430
|
+
@trace({
|
|
2431
|
+
args: (provider, token, username) => ({
|
|
2432
|
+
provider: provider?.name,
|
|
2433
|
+
token: `<token:${token.microHash}>`,
|
|
2434
|
+
username: username,
|
|
2435
|
+
}),
|
|
2436
|
+
})
|
|
2437
|
+
async getUserSshSigningKeys(
|
|
2438
|
+
provider: Provider | undefined,
|
|
2439
|
+
token: GitHubTokenInfo,
|
|
2440
|
+
username: string,
|
|
2441
|
+
options?: { baseUrl?: string },
|
|
2442
|
+
): Promise<GitHubSshSigningKey[]> {
|
|
2443
|
+
const scope = getScopedLogger();
|
|
2444
|
+
|
|
2445
|
+
// SSH signing keys are public, so this works for any user with the current token (no extra scope needed).
|
|
2446
|
+
// TODO@eamodio implement pagination
|
|
2447
|
+
try {
|
|
2448
|
+
const rsp = await this.request(
|
|
2449
|
+
provider,
|
|
2450
|
+
token,
|
|
2451
|
+
'GET /users/{username}/ssh_signing_keys',
|
|
2452
|
+
{ username: username, per_page: 100, ...options },
|
|
2453
|
+
scope,
|
|
2454
|
+
);
|
|
2455
|
+
return rsp?.data ?? [];
|
|
2456
|
+
} catch (ex) {
|
|
2457
|
+
if (ex instanceof RequestNotFoundError) return [];
|
|
2458
|
+
|
|
2459
|
+
throw this.handleException(ex, provider, scope);
|
|
2460
|
+
}
|
|
2461
|
+
}
|
|
2462
|
+
|
|
2463
|
+
@trace({ args: (provider, token) => ({ provider: provider?.name, token: `<token:${token.microHash}>` }) })
|
|
2464
|
+
async getCurrentUserSshSigningKeys(
|
|
2465
|
+
provider: Provider | undefined,
|
|
2466
|
+
token: GitHubTokenInfo,
|
|
2467
|
+
options?: { baseUrl?: string },
|
|
2468
|
+
): Promise<GitHubSshSigningKey[]> {
|
|
2469
|
+
const scope = getScopedLogger();
|
|
2470
|
+
|
|
2471
|
+
// TODO@eamodio implement pagination
|
|
2472
|
+
try {
|
|
2473
|
+
const rsp = await this.request(
|
|
2474
|
+
provider,
|
|
2475
|
+
token,
|
|
2476
|
+
'GET /user/ssh_signing_keys',
|
|
2477
|
+
{ per_page: 100, ...options },
|
|
2478
|
+
scope,
|
|
2479
|
+
);
|
|
2480
|
+
return rsp?.data ?? [];
|
|
2481
|
+
} catch (ex) {
|
|
2482
|
+
if (ex instanceof RequestNotFoundError) return [];
|
|
2483
|
+
|
|
2484
|
+
throw this.handleException(ex, provider, scope);
|
|
2485
|
+
}
|
|
2486
|
+
}
|
|
2487
|
+
|
|
2341
2488
|
@trace({ args: (token, owner, repo) => ({ token: `<token:${token.microHash}>`, owner: owner, repo: repo }) })
|
|
2342
2489
|
async getDefaultBranchName(token: GitHubTokenInfo, owner: string, repo: string): Promise<string | undefined> {
|
|
2343
2490
|
const scope = getScopedLogger();
|
|
@@ -3172,22 +3319,18 @@ export class GitHubApi {
|
|
|
3172
3319
|
case 410: // Gone
|
|
3173
3320
|
case 422: // Unprocessable Entity
|
|
3174
3321
|
throw new RequestNotFoundError(ex);
|
|
3175
|
-
|
|
3322
|
+
case 429: // Too Many Requests
|
|
3323
|
+
// GitHub returns "a `403` or `429` response" for BOTH its primary and secondary rate limits
|
|
3324
|
+
// (docs.github.com/en/rest/using-the-rest-api/rate-limits-for-the-rest-api). 429 is unambiguous —
|
|
3325
|
+
// unlike 403, it is never a permission failure — so it needs no message check.
|
|
3326
|
+
throw new RequestRateLimitError(ex, accessToken, rateLimitResetAt(ex));
|
|
3176
3327
|
case 401: // Unauthorized
|
|
3177
3328
|
throw new AuthenticationError(tokenInfo, AuthenticationErrorReason.Unauthorized, ex);
|
|
3178
3329
|
case 403: // Forbidden
|
|
3330
|
+
// The other status the rate limits arrive on, but 403 is also a plain permission failure, so here
|
|
3331
|
+
// the message is the discriminant.
|
|
3179
3332
|
if (ex.message.includes('rate limit')) {
|
|
3180
|
-
|
|
3181
|
-
|
|
3182
|
-
const reset = ex.response?.headers?.['x-ratelimit-reset'];
|
|
3183
|
-
if (reset != null) {
|
|
3184
|
-
resetAt = parseInt(reset, 10);
|
|
3185
|
-
if (Number.isNaN(resetAt)) {
|
|
3186
|
-
resetAt = undefined;
|
|
3187
|
-
}
|
|
3188
|
-
}
|
|
3189
|
-
|
|
3190
|
-
throw new RequestRateLimitError(ex, accessToken, resetAt);
|
|
3333
|
+
throw new RequestRateLimitError(ex, accessToken, rateLimitResetAt(ex));
|
|
3191
3334
|
}
|
|
3192
3335
|
throw new AuthenticationError(tokenInfo, AuthenticationErrorReason.Forbidden, ex);
|
|
3193
3336
|
case 500: // Internal Server Error
|
|
@@ -3307,7 +3450,7 @@ export class GitHubApi {
|
|
|
3307
3450
|
}
|
|
3308
3451
|
|
|
3309
3452
|
@trace({ args: (provider, token) => ({ provider: provider.name, token: `<token:${token.microHash}>` }) })
|
|
3310
|
-
async
|
|
3453
|
+
async searchMyPullRequestsPage(
|
|
3311
3454
|
provider: Provider,
|
|
3312
3455
|
token: GitHubTokenInfo,
|
|
3313
3456
|
options?: {
|
|
@@ -3317,40 +3460,54 @@ export class GitHubApi {
|
|
|
3317
3460
|
baseUrl?: string;
|
|
3318
3461
|
avatarSize?: number;
|
|
3319
3462
|
silent?: boolean;
|
|
3463
|
+
state?: PullRequestStateFilter;
|
|
3464
|
+
cursor?: string;
|
|
3465
|
+
/**
|
|
3466
|
+
* Uses the lightweight PR fragment while retaining identity, body, author, repository, and branch refs.
|
|
3467
|
+
* Intended for aggregate/list surfaces that do not consume review, check, or diff statistics.
|
|
3468
|
+
*/
|
|
3469
|
+
summary?: boolean;
|
|
3470
|
+
/**
|
|
3471
|
+
* Adds GitHub's provider-native `involves:@me` relationship. Disable when `search` already carries
|
|
3472
|
+
* an explicit relationship qualifier such as `author:@me` or `review-requested:@me`.
|
|
3473
|
+
*/
|
|
3474
|
+
includeDefaultInvolvement?: boolean;
|
|
3320
3475
|
},
|
|
3321
3476
|
cancellation?: AbortSignal,
|
|
3322
|
-
): Promise<PullRequest[]> {
|
|
3477
|
+
): Promise<{ values: PullRequest[]; cursor?: string; hasMore: boolean; truncated: boolean }> {
|
|
3323
3478
|
const scope = getScopedLogger();
|
|
3324
|
-
|
|
3325
3479
|
const limit = Math.min(100, this.config.getLaunchpadQueryLimit?.() ?? 100);
|
|
3326
3480
|
|
|
3327
3481
|
try {
|
|
3328
3482
|
interface SearchResult {
|
|
3329
3483
|
search: {
|
|
3330
3484
|
issueCount: number;
|
|
3485
|
+
pageInfo: {
|
|
3486
|
+
endCursor?: string | null;
|
|
3487
|
+
hasNextPage: boolean;
|
|
3488
|
+
};
|
|
3331
3489
|
nodes: GitHubPullRequest[];
|
|
3332
3490
|
};
|
|
3333
|
-
viewer: {
|
|
3334
|
-
login: string;
|
|
3335
|
-
};
|
|
3336
3491
|
}
|
|
3337
3492
|
|
|
3338
3493
|
const query = `query searchMyPullRequests(
|
|
3339
|
-
|
|
3340
|
-
|
|
3341
|
-
|
|
3342
|
-
|
|
3343
|
-
|
|
3344
|
-
|
|
3345
|
-
|
|
3346
|
-
|
|
3494
|
+
$search: String!
|
|
3495
|
+
$cursor: String
|
|
3496
|
+
$avatarSize: Int
|
|
3497
|
+
) {
|
|
3498
|
+
search(first: ${limit}, after: $cursor, query: $search, type: ISSUE) {
|
|
3499
|
+
issueCount
|
|
3500
|
+
pageInfo {
|
|
3501
|
+
endCursor
|
|
3502
|
+
hasNextPage
|
|
3503
|
+
}
|
|
3504
|
+
nodes {
|
|
3505
|
+
...on PullRequest {
|
|
3506
|
+
${options?.summary ? gqlPullRequestLiteFragment : gqlPullRequestFragment}
|
|
3507
|
+
}
|
|
3347
3508
|
}
|
|
3348
3509
|
}
|
|
3349
|
-
}
|
|
3350
|
-
viewer {
|
|
3351
|
-
login
|
|
3352
|
-
}
|
|
3353
|
-
}`;
|
|
3510
|
+
}`;
|
|
3354
3511
|
|
|
3355
3512
|
let search = options?.search?.trim() ?? '';
|
|
3356
3513
|
|
|
@@ -3362,65 +3519,81 @@ export class GitHubApi {
|
|
|
3362
3519
|
search += ` repo:${options.repos.join(' repo:')}`;
|
|
3363
3520
|
}
|
|
3364
3521
|
|
|
3365
|
-
// Hack for now, ultimately this should be passed in
|
|
3366
3522
|
const ignoredRepos = this.config.getLaunchpadIgnoredRepositories?.() ?? [];
|
|
3367
3523
|
if (ignoredRepos.length) {
|
|
3368
3524
|
search += ` -repo:${ignoredRepos.join(' -repo:')}`;
|
|
3369
3525
|
}
|
|
3370
3526
|
|
|
3371
|
-
// Hack for now, ultimately this should be passed in
|
|
3372
3527
|
const enabledOrgs = this.config.getLaunchpadIncludedOrganizations?.() ?? [];
|
|
3373
3528
|
if (enabledOrgs.length) {
|
|
3374
3529
|
search += ` org:${enabledOrgs.join(' org:')}`;
|
|
3375
3530
|
} else {
|
|
3376
|
-
// Hack for now, ultimately this should be passed in
|
|
3377
3531
|
const ignoredOrgs = this.config.getLaunchpadIgnoredOrganizations?.() ?? [];
|
|
3378
3532
|
if (ignoredOrgs.length) {
|
|
3379
3533
|
search += ` -org:${ignoredOrgs.join(' -org:')}`;
|
|
3380
3534
|
}
|
|
3381
3535
|
}
|
|
3382
3536
|
|
|
3537
|
+
const stateQualifier =
|
|
3538
|
+
options?.state === 'closed'
|
|
3539
|
+
? 'is:closed is:unmerged'
|
|
3540
|
+
: options?.state === 'merged'
|
|
3541
|
+
? 'is:merged'
|
|
3542
|
+
: options?.state === 'all'
|
|
3543
|
+
? ''
|
|
3544
|
+
: 'is:open';
|
|
3545
|
+
|
|
3546
|
+
const relationshipQualifier =
|
|
3547
|
+
options?.includeDefaultInvolvement === false
|
|
3548
|
+
? 'is:pr archived:false'
|
|
3549
|
+
: 'is:pr involves:@me archived:false';
|
|
3383
3550
|
const rsp = await this.graphql<SearchResult>(
|
|
3384
3551
|
provider,
|
|
3385
3552
|
token,
|
|
3386
3553
|
query,
|
|
3387
3554
|
{
|
|
3388
|
-
search:
|
|
3555
|
+
search: [stateQualifier, relationshipQualifier, search].filter(Boolean).join(' ').trim(),
|
|
3556
|
+
cursor: options?.cursor,
|
|
3389
3557
|
baseUrl: options?.baseUrl,
|
|
3390
3558
|
avatarSize: options?.avatarSize,
|
|
3391
3559
|
},
|
|
3392
3560
|
scope,
|
|
3393
3561
|
cancellation,
|
|
3394
3562
|
);
|
|
3395
|
-
if (rsp == null) return [];
|
|
3396
|
-
|
|
3397
|
-
const viewer = rsp.viewer.login;
|
|
3563
|
+
if (rsp == null) return { values: [], hasMore: false, truncated: false };
|
|
3398
3564
|
|
|
3399
|
-
|
|
3400
|
-
|
|
3401
|
-
|
|
3402
|
-
|
|
3403
|
-
|
|
3404
|
-
|
|
3405
|
-
|
|
3406
|
-
|
|
3407
|
-
|
|
3408
|
-
reasons.push('review-requested');
|
|
3409
|
-
}
|
|
3410
|
-
if (reasons.length === 0) {
|
|
3411
|
-
reasons.push('mentioned');
|
|
3412
|
-
}
|
|
3413
|
-
|
|
3414
|
-
return fromGitHubPullRequest(pr, provider);
|
|
3415
|
-
}
|
|
3416
|
-
|
|
3417
|
-
const results: PullRequest[] = rsp.search.nodes.map(pr => toQueryResult(pr));
|
|
3418
|
-
return results;
|
|
3565
|
+
const results: PullRequest[] = rsp.search.nodes.map(pr =>
|
|
3566
|
+
options?.summary ? fromGitHubPullRequestLite(pr, provider) : fromGitHubPullRequest(pr, provider),
|
|
3567
|
+
);
|
|
3568
|
+
return {
|
|
3569
|
+
values: results,
|
|
3570
|
+
cursor: rsp.search.pageInfo.endCursor ?? undefined,
|
|
3571
|
+
hasMore: rsp.search.pageInfo.hasNextPage,
|
|
3572
|
+
truncated: rsp.search.issueCount > 1000,
|
|
3573
|
+
};
|
|
3419
3574
|
} catch (ex) {
|
|
3420
3575
|
throw this.handleException(ex, provider, scope, options?.silent);
|
|
3421
3576
|
}
|
|
3422
3577
|
}
|
|
3423
3578
|
|
|
3579
|
+
@trace({ args: (provider, token) => ({ provider: provider.name, token: `<token:${token.microHash}>` }) })
|
|
3580
|
+
async searchMyPullRequests(
|
|
3581
|
+
provider: Provider,
|
|
3582
|
+
token: GitHubTokenInfo,
|
|
3583
|
+
options?: {
|
|
3584
|
+
search?: string;
|
|
3585
|
+
user?: string;
|
|
3586
|
+
repos?: string[];
|
|
3587
|
+
baseUrl?: string;
|
|
3588
|
+
avatarSize?: number;
|
|
3589
|
+
silent?: boolean;
|
|
3590
|
+
state?: PullRequestStateFilter;
|
|
3591
|
+
},
|
|
3592
|
+
cancellation?: AbortSignal,
|
|
3593
|
+
): Promise<PullRequest[]> {
|
|
3594
|
+
return (await this.searchMyPullRequestsPage(provider, token, options, cancellation)).values;
|
|
3595
|
+
}
|
|
3596
|
+
|
|
3424
3597
|
@trace({ args: (provider, token) => ({ provider: provider.name, token: `<token:${token.microHash}>` }) })
|
|
3425
3598
|
async searchMyIssues(
|
|
3426
3599
|
provider: Provider,
|
|
@@ -3432,55 +3605,130 @@ export class GitHubApi {
|
|
|
3432
3605
|
baseUrl?: string;
|
|
3433
3606
|
avatarSize?: number;
|
|
3434
3607
|
includeBody?: boolean;
|
|
3608
|
+
includeAllAssignees?: boolean;
|
|
3609
|
+
cursor?: string;
|
|
3610
|
+
/**
|
|
3611
|
+
* Which of the three "my issues" searches to run. Omitted runs all three (GitHub's own definition of
|
|
3612
|
+
* "mine": authored ∪ assigned ∪ mentioned). Supplied, only the `true` ones run — so a caller wanting
|
|
3613
|
+
* `assignee:@me` parity asks for `{ assigned: true }` instead of filtering the union client-side (which
|
|
3614
|
+
* can't work: the dropped items still counted toward this page, so `hasMore`/`cursor` would describe a
|
|
3615
|
+
* different result set than `values`).
|
|
3616
|
+
*
|
|
3617
|
+
* At least one must be `true`; an all-`false` set reads nothing rather than silently widening back to
|
|
3618
|
+
* the union. The facade never sends one (an empty filter set means "unfiltered" there).
|
|
3619
|
+
*/
|
|
3620
|
+
categories?: { authored?: boolean; assigned?: boolean; mentioned?: boolean };
|
|
3435
3621
|
},
|
|
3436
3622
|
cancellation?: AbortSignal,
|
|
3437
|
-
): Promise<
|
|
3623
|
+
): Promise<
|
|
3624
|
+
| {
|
|
3625
|
+
values: IssueShape[];
|
|
3626
|
+
cursor?: string;
|
|
3627
|
+
hasMore: boolean;
|
|
3628
|
+
page: number;
|
|
3629
|
+
truncated: boolean;
|
|
3630
|
+
}
|
|
3631
|
+
| undefined
|
|
3632
|
+
> {
|
|
3438
3633
|
const scope = getScopedLogger();
|
|
3439
3634
|
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
|
|
3443
|
-
|
|
3444
|
-
|
|
3445
|
-
nodes: GitHubIssue[];
|
|
3446
|
-
};
|
|
3447
|
-
mentioned: {
|
|
3448
|
-
nodes: GitHubIssue[];
|
|
3635
|
+
type SearchCategory = {
|
|
3636
|
+
issueCount: number;
|
|
3637
|
+
pageInfo?: {
|
|
3638
|
+
endCursor?: string | null;
|
|
3639
|
+
hasNextPage: boolean;
|
|
3449
3640
|
};
|
|
3641
|
+
nodes: GitHubIssue[];
|
|
3642
|
+
};
|
|
3643
|
+
interface SearchResult {
|
|
3644
|
+
authored?: SearchCategory;
|
|
3645
|
+
assigned?: SearchCategory;
|
|
3646
|
+
mentioned?: SearchCategory;
|
|
3647
|
+
}
|
|
3648
|
+
interface SearchCursor {
|
|
3649
|
+
page?: number;
|
|
3650
|
+
authored?: string | null;
|
|
3651
|
+
assigned?: string | null;
|
|
3652
|
+
mentioned?: string | null;
|
|
3653
|
+
truncated?: boolean;
|
|
3450
3654
|
}
|
|
3451
3655
|
|
|
3452
|
-
|
|
3453
|
-
|
|
3454
|
-
|
|
3455
|
-
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
|
|
3656
|
+
let cursor: SearchCursor | undefined;
|
|
3657
|
+
if (options?.cursor != null) {
|
|
3658
|
+
try {
|
|
3659
|
+
cursor = JSON.parse(options.cursor) as SearchCursor;
|
|
3660
|
+
} catch {}
|
|
3661
|
+
}
|
|
3662
|
+
const page = Math.max(1, Math.trunc(cursor?.page ?? 1));
|
|
3663
|
+
// A category is read when the caller asked for it AND it hasn't been exhausted (`null` cursor slot). An
|
|
3664
|
+
// excluded category needs no cursor bookkeeping: `nextCategoryCursor` reads a missing response category as
|
|
3665
|
+
// `null`, so it stays excluded across continuations on its own.
|
|
3666
|
+
const categories = options?.categories;
|
|
3667
|
+
const requested = {
|
|
3668
|
+
authored: categories?.authored ?? categories == null,
|
|
3669
|
+
assigned: categories?.assigned ?? categories == null,
|
|
3670
|
+
mentioned: categories?.mentioned ?? categories == null,
|
|
3671
|
+
};
|
|
3672
|
+
const includeAuthored = requested.authored && cursor?.authored !== null;
|
|
3673
|
+
const includeAssigned = requested.assigned && cursor?.assigned !== null;
|
|
3674
|
+
const includeMentioned = requested.mentioned && cursor?.mentioned !== null;
|
|
3675
|
+
// Reading nothing is the honest answer to "none of the three": widening back to the union would return
|
|
3676
|
+
// issues the caller explicitly excluded.
|
|
3677
|
+
if (!includeAuthored && !includeAssigned && !includeMentioned) {
|
|
3678
|
+
return { values: [], hasMore: false, page: page, truncated: cursor?.truncated === true };
|
|
3679
|
+
}
|
|
3459
3680
|
|
|
3460
3681
|
const query = `query searchMyIssues(
|
|
3461
3682
|
$authored: String!
|
|
3462
3683
|
$assigned: String!
|
|
3463
3684
|
$mentioned: String!
|
|
3685
|
+
$authoredCursor: String
|
|
3686
|
+
$assignedCursor: String
|
|
3687
|
+
$mentionedCursor: String
|
|
3688
|
+
$includeAuthored: Boolean!
|
|
3689
|
+
$includeAssigned: Boolean!
|
|
3690
|
+
$includeMentioned: Boolean!
|
|
3464
3691
|
$avatarSize: Int
|
|
3465
3692
|
) {
|
|
3466
|
-
authored: search(first: 100, query: $authored, type: ISSUE)
|
|
3693
|
+
authored: search(first: 100, after: $authoredCursor, query: $authored, type: ISSUE)
|
|
3694
|
+
@include(if: $includeAuthored) {
|
|
3695
|
+
issueCount
|
|
3696
|
+
pageInfo {
|
|
3697
|
+
endCursor
|
|
3698
|
+
hasNextPage
|
|
3699
|
+
}
|
|
3467
3700
|
nodes {
|
|
3468
3701
|
... on Issue {
|
|
3469
|
-
${
|
|
3702
|
+
${gqIssueFragment}
|
|
3703
|
+
${options?.includeBody ? 'body' : ''}
|
|
3470
3704
|
}
|
|
3471
3705
|
}
|
|
3472
3706
|
}
|
|
3473
|
-
assigned: search(first: 100, query: $assigned, type: ISSUE)
|
|
3707
|
+
assigned: search(first: 100, after: $assignedCursor, query: $assigned, type: ISSUE)
|
|
3708
|
+
@include(if: $includeAssigned) {
|
|
3709
|
+
issueCount
|
|
3710
|
+
pageInfo {
|
|
3711
|
+
endCursor
|
|
3712
|
+
hasNextPage
|
|
3713
|
+
}
|
|
3474
3714
|
nodes {
|
|
3475
3715
|
... on Issue {
|
|
3476
|
-
${
|
|
3716
|
+
${gqIssueFragment}
|
|
3717
|
+
${options?.includeBody ? 'body' : ''}
|
|
3477
3718
|
}
|
|
3478
3719
|
}
|
|
3479
3720
|
}
|
|
3480
|
-
mentioned: search(first: 100, query: $mentioned, type: ISSUE)
|
|
3721
|
+
mentioned: search(first: 100, after: $mentionedCursor, query: $mentioned, type: ISSUE)
|
|
3722
|
+
@include(if: $includeMentioned) {
|
|
3723
|
+
issueCount
|
|
3724
|
+
pageInfo {
|
|
3725
|
+
endCursor
|
|
3726
|
+
hasNextPage
|
|
3727
|
+
}
|
|
3481
3728
|
nodes {
|
|
3482
3729
|
... on Issue {
|
|
3483
|
-
${
|
|
3730
|
+
${gqIssueFragment}
|
|
3731
|
+
${options?.includeBody ? 'body' : ''}
|
|
3484
3732
|
}
|
|
3485
3733
|
}
|
|
3486
3734
|
}
|
|
@@ -3498,6 +3746,15 @@ export class GitHubApi {
|
|
|
3498
3746
|
}
|
|
3499
3747
|
|
|
3500
3748
|
const baseFilters = 'type:issue is:open archived:false';
|
|
3749
|
+
// `includeAllAssignees` broadens the assigned category from "assigned to me" to "assigned to anyone"
|
|
3750
|
+
// (`assignee:*` is GitHub's has-any-assignee qualifier). Authored/mentioned stay bound to `@me` — they're
|
|
3751
|
+
// user-relative by definition, so an all-assignees read still only surfaces the current user's authored
|
|
3752
|
+
// and mentioned issues plus every assigned-to-anyone issue.
|
|
3753
|
+
//
|
|
3754
|
+
// NOTE: GitHub only honors `assignee:*` when the search is scoped to a single repository (see GitHub's
|
|
3755
|
+
// issue-search docs). Callers using `includeAllAssignees` must scope the read via `repos` (the broaden
|
|
3756
|
+
// fan-out does this per org/repo); an unscoped account-wide `assignee:*` is not meaningful to GitHub.
|
|
3757
|
+
const assignedQualifier = options?.includeAllAssignees ? 'assignee:*' : 'assignee:@me';
|
|
3501
3758
|
try {
|
|
3502
3759
|
const rsp = await this.graphql<SearchResult>(
|
|
3503
3760
|
provider,
|
|
@@ -3505,8 +3762,14 @@ export class GitHubApi {
|
|
|
3505
3762
|
query,
|
|
3506
3763
|
{
|
|
3507
3764
|
authored: `${search} ${baseFilters} author:@me`.trim(),
|
|
3508
|
-
assigned: `${search} ${baseFilters}
|
|
3765
|
+
assigned: `${search} ${baseFilters} ${assignedQualifier}`.trim(),
|
|
3509
3766
|
mentioned: `${search} ${baseFilters} mentions:@me`.trim(),
|
|
3767
|
+
authoredCursor: cursor?.authored ?? undefined,
|
|
3768
|
+
assignedCursor: cursor?.assigned ?? undefined,
|
|
3769
|
+
mentionedCursor: cursor?.mentioned ?? undefined,
|
|
3770
|
+
includeAuthored: includeAuthored,
|
|
3771
|
+
includeAssigned: includeAssigned,
|
|
3772
|
+
includeMentioned: includeMentioned,
|
|
3510
3773
|
baseUrl: options?.baseUrl,
|
|
3511
3774
|
avatarSize: options?.avatarSize,
|
|
3512
3775
|
},
|
|
@@ -3518,14 +3781,48 @@ export class GitHubApi {
|
|
|
3518
3781
|
return fromGitHubIssue(issue, provider);
|
|
3519
3782
|
}
|
|
3520
3783
|
|
|
3521
|
-
if (rsp == null) return [];
|
|
3784
|
+
if (rsp == null) return { values: [], hasMore: false, page: page, truncated: false };
|
|
3522
3785
|
|
|
3523
3786
|
const results: IterableIterator<IssueShape> = uniqueBy(
|
|
3524
|
-
[...rsp.assigned
|
|
3787
|
+
[...(rsp.assigned?.nodes ?? []), ...(rsp.mentioned?.nodes ?? []), ...(rsp.authored?.nodes ?? [])].map(
|
|
3788
|
+
toQueryResult,
|
|
3789
|
+
),
|
|
3525
3790
|
r => r.url,
|
|
3526
3791
|
(original, _current) => original,
|
|
3527
3792
|
);
|
|
3528
|
-
|
|
3793
|
+
|
|
3794
|
+
const nextCategoryCursor = (category: SearchCategory | undefined): string | null => {
|
|
3795
|
+
if (category?.pageInfo?.hasNextPage && category.pageInfo.endCursor) {
|
|
3796
|
+
return category.pageInfo.endCursor;
|
|
3797
|
+
}
|
|
3798
|
+
return null;
|
|
3799
|
+
};
|
|
3800
|
+
const next: SearchCursor = {
|
|
3801
|
+
page: page + 1,
|
|
3802
|
+
authored: nextCategoryCursor(rsp.authored),
|
|
3803
|
+
assigned: nextCategoryCursor(rsp.assigned),
|
|
3804
|
+
mentioned: nextCategoryCursor(rsp.mentioned),
|
|
3805
|
+
};
|
|
3806
|
+
const hasMore = next.authored != null || next.assigned != null || next.mentioned != null;
|
|
3807
|
+
// GitHub search exposes at most 1,000 results per category. Paging removes the previous 100-item
|
|
3808
|
+
// truncation; only the upstream search ceiling or an unusable continuation remains incomplete.
|
|
3809
|
+
const continuationMissing = [rsp.authored, rsp.assigned, rsp.mentioned].some(
|
|
3810
|
+
category => category?.pageInfo?.hasNextPage === true && category.pageInfo.endCursor == null,
|
|
3811
|
+
);
|
|
3812
|
+
const truncated =
|
|
3813
|
+
cursor?.truncated === true ||
|
|
3814
|
+
(rsp.authored?.issueCount ?? 0) > 1000 ||
|
|
3815
|
+
(rsp.assigned?.issueCount ?? 0) > 1000 ||
|
|
3816
|
+
(rsp.mentioned?.issueCount ?? 0) > 1000 ||
|
|
3817
|
+
continuationMissing;
|
|
3818
|
+
next.truncated = truncated || undefined;
|
|
3819
|
+
return {
|
|
3820
|
+
values: [...results],
|
|
3821
|
+
cursor: hasMore ? JSON.stringify(next) : undefined,
|
|
3822
|
+
hasMore: hasMore,
|
|
3823
|
+
page: page,
|
|
3824
|
+
truncated: truncated,
|
|
3825
|
+
};
|
|
3529
3826
|
} catch (ex) {
|
|
3530
3827
|
throw this.handleException(ex, provider, scope);
|
|
3531
3828
|
}
|
|
@@ -3535,13 +3832,27 @@ export class GitHubApi {
|
|
|
3535
3832
|
async searchPullRequests(
|
|
3536
3833
|
provider: Provider,
|
|
3537
3834
|
token: GitHubTokenInfo,
|
|
3538
|
-
options?: {
|
|
3835
|
+
options?: {
|
|
3836
|
+
search?: string;
|
|
3837
|
+
user?: string;
|
|
3838
|
+
repos?: string[];
|
|
3839
|
+
baseUrl?: string;
|
|
3840
|
+
avatarSize?: number;
|
|
3841
|
+
include?: PullRequestState[];
|
|
3842
|
+
},
|
|
3539
3843
|
cancellation?: AbortSignal,
|
|
3540
3844
|
): Promise<PullRequest[]> {
|
|
3541
3845
|
const scope = getScopedLogger();
|
|
3846
|
+
const pageSize = 10;
|
|
3847
|
+
const include = options?.include?.length ? options.include : undefined;
|
|
3848
|
+
const requiresPagination = shouldPaginateGitHubSearchState(include);
|
|
3542
3849
|
|
|
3543
3850
|
interface SearchResult {
|
|
3544
3851
|
search: {
|
|
3852
|
+
pageInfo: {
|
|
3853
|
+
endCursor?: string | null;
|
|
3854
|
+
hasNextPage: boolean;
|
|
3855
|
+
};
|
|
3545
3856
|
nodes: GitHubPullRequest[];
|
|
3546
3857
|
};
|
|
3547
3858
|
}
|
|
@@ -3549,9 +3860,14 @@ export class GitHubApi {
|
|
|
3549
3860
|
try {
|
|
3550
3861
|
const query = `query searchPullRequests(
|
|
3551
3862
|
$searchQuery: String!
|
|
3863
|
+
$cursor: String
|
|
3552
3864
|
$avatarSize: Int
|
|
3553
3865
|
) {
|
|
3554
|
-
|
|
3866
|
+
search(first: ${pageSize}, after: $cursor, query: $searchQuery, type: ISSUE) {
|
|
3867
|
+
pageInfo {
|
|
3868
|
+
endCursor
|
|
3869
|
+
hasNextPage
|
|
3870
|
+
}
|
|
3555
3871
|
nodes {
|
|
3556
3872
|
...on PullRequest {
|
|
3557
3873
|
${gqlPullRequestFragment}
|
|
@@ -3571,22 +3887,44 @@ export class GitHubApi {
|
|
|
3571
3887
|
search += `${repo}${options.repos.join(repo)}`;
|
|
3572
3888
|
}
|
|
3573
3889
|
|
|
3574
|
-
const
|
|
3575
|
-
|
|
3576
|
-
|
|
3577
|
-
|
|
3578
|
-
|
|
3579
|
-
|
|
3580
|
-
|
|
3581
|
-
|
|
3582
|
-
|
|
3583
|
-
|
|
3584
|
-
|
|
3585
|
-
|
|
3586
|
-
|
|
3890
|
+
const searchQuery = ['is:pr', toGitHubSearchStateQualifier(include), 'archived:false', search.trim()]
|
|
3891
|
+
.filter(Boolean)
|
|
3892
|
+
.join(' ');
|
|
3893
|
+
|
|
3894
|
+
// Bound the paginated case with a defensive page backstop like the other paged provider drains, so a
|
|
3895
|
+
// large, low-match result set can't fan out into an unbounded request loop.
|
|
3896
|
+
const maxSearchPages = 20;
|
|
3897
|
+
let cursor: string | undefined;
|
|
3898
|
+
const results: PullRequest[] = [];
|
|
3899
|
+
for (let page = 0; page < maxSearchPages; page++) {
|
|
3900
|
+
const rsp = await this.graphql<SearchResult>(
|
|
3901
|
+
provider,
|
|
3902
|
+
token,
|
|
3903
|
+
query,
|
|
3904
|
+
{
|
|
3905
|
+
searchQuery: searchQuery,
|
|
3906
|
+
cursor: cursor,
|
|
3907
|
+
baseUrl: options?.baseUrl,
|
|
3908
|
+
avatarSize: options?.avatarSize,
|
|
3909
|
+
},
|
|
3910
|
+
scope,
|
|
3911
|
+
cancellation,
|
|
3912
|
+
);
|
|
3913
|
+
if (rsp == null) return [];
|
|
3587
3914
|
|
|
3588
|
-
|
|
3589
|
-
|
|
3915
|
+
const pageResults = filterPullRequestsBySearchState(
|
|
3916
|
+
rsp.search.nodes.map(pr => fromGitHubPullRequest(pr, provider)),
|
|
3917
|
+
include,
|
|
3918
|
+
);
|
|
3919
|
+
results.push(...pageResults);
|
|
3920
|
+
|
|
3921
|
+
cursor = rsp.search.pageInfo.endCursor ?? undefined;
|
|
3922
|
+
if (!requiresPagination || results.length >= pageSize || !rsp.search.pageInfo.hasNextPage) {
|
|
3923
|
+
break;
|
|
3924
|
+
}
|
|
3925
|
+
}
|
|
3926
|
+
|
|
3927
|
+
return results.slice(0, pageSize);
|
|
3590
3928
|
} catch (ex) {
|
|
3591
3929
|
throw this.handleException(ex, provider, scope);
|
|
3592
3930
|
}
|
|
@@ -3668,3 +4006,45 @@ export class GitHubApi {
|
|
|
3668
4006
|
function isGitHubDotCom(options?: { baseUrl?: string }) {
|
|
3669
4007
|
return options?.baseUrl == null || options.baseUrl === 'https://api.github.com';
|
|
3670
4008
|
}
|
|
4009
|
+
|
|
4010
|
+
// Translates the requested PR states into a GitHub search state qualifier. GitHub search treats
|
|
4011
|
+
// `is:closed` as closed-or-merged, `is:merged` as its subset, and `is:unmerged` as open + closed
|
|
4012
|
+
// (not-merged), so `closed` and `merged` (distinct in our model) map to `is:closed is:unmerged` and
|
|
4013
|
+
// `is:merged`. `undefined` preserves the historical open-only default.
|
|
4014
|
+
export function toGitHubSearchStateQualifier(include: PullRequestState[] | undefined): string {
|
|
4015
|
+
if (include == null) return 'is:open';
|
|
4016
|
+
|
|
4017
|
+
const opened = include.includes('opened');
|
|
4018
|
+
const closed = include.includes('closed');
|
|
4019
|
+
const merged = include.includes('merged');
|
|
4020
|
+
|
|
4021
|
+
if (opened && closed && merged) return ''; // all states -> no qualifier
|
|
4022
|
+
if (opened && closed) return 'is:unmerged';
|
|
4023
|
+
if (closed && merged) return 'is:closed';
|
|
4024
|
+
// `opened && merged` isn't expressible as a single AND qualifier; omit it here and post-filter.
|
|
4025
|
+
if (opened && merged) return '';
|
|
4026
|
+
if (opened) return 'is:open';
|
|
4027
|
+
if (merged) return 'is:merged';
|
|
4028
|
+
if (closed) return 'is:closed is:unmerged';
|
|
4029
|
+
return 'is:open'; // empty include -> default
|
|
4030
|
+
}
|
|
4031
|
+
|
|
4032
|
+
export function filterPullRequestsBySearchState<T extends { state: PullRequestState }>(
|
|
4033
|
+
pullRequests: T[],
|
|
4034
|
+
include: PullRequestState[] | undefined,
|
|
4035
|
+
): T[] {
|
|
4036
|
+
const states = include?.length ? include : (['opened'] satisfies PullRequestState[]);
|
|
4037
|
+
const allowedStates = new Set<PullRequestState>(states);
|
|
4038
|
+
// There are only 3 possible states, so a full set means every state is allowed; use the deduped set
|
|
4039
|
+
// size rather than the raw length so duplicates (e.g. `['opened', 'opened', 'closed']`) don't skip filtering.
|
|
4040
|
+
if (allowedStates.size === 3) return pullRequests;
|
|
4041
|
+
|
|
4042
|
+
return pullRequests.filter(pr => allowedStates.has(pr.state));
|
|
4043
|
+
}
|
|
4044
|
+
|
|
4045
|
+
function shouldPaginateGitHubSearchState(include: PullRequestState[] | undefined): boolean {
|
|
4046
|
+
if (include == null || include.length === 0) return false;
|
|
4047
|
+
|
|
4048
|
+
const uniqueStates = new Set<PullRequestState>(include);
|
|
4049
|
+
return uniqueStates.size === 2 && uniqueStates.has('opened') && uniqueStates.has('merged');
|
|
4050
|
+
}
|