@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
|
@@ -9,13 +9,22 @@ import type {
|
|
|
9
9
|
Bitbucket,
|
|
10
10
|
BitbucketServer,
|
|
11
11
|
BitbucketWorkspaceStub,
|
|
12
|
+
CollectionMetadata,
|
|
13
|
+
CursorPageInput,
|
|
12
14
|
EnterpriseOptions,
|
|
13
15
|
GetRepoInput,
|
|
16
|
+
GitBuildStatusState as GitBuildStatusStateType,
|
|
14
17
|
GitHub,
|
|
18
|
+
GitIssueState as GitIssueStateType,
|
|
15
19
|
GitLab,
|
|
20
|
+
GitLabGroup,
|
|
16
21
|
GitMergeStrategy,
|
|
17
22
|
GitPullRequest,
|
|
23
|
+
GitPullRequestMergeableState as GitPullRequestMergeableStateType,
|
|
24
|
+
GitPullRequestReviewState as GitPullRequestReviewStateType,
|
|
25
|
+
GitPullRequestState as GitPullRequestStateType,
|
|
18
26
|
GitRepository,
|
|
27
|
+
GitRepositoryRemoteInfo,
|
|
19
28
|
Jira,
|
|
20
29
|
JiraProject,
|
|
21
30
|
JiraResource,
|
|
@@ -23,6 +32,7 @@ import type {
|
|
|
23
32
|
LinearOrganization,
|
|
24
33
|
LinearTeam,
|
|
25
34
|
NumberedPageInput,
|
|
35
|
+
Organization,
|
|
26
36
|
Issue as ProviderApiIssue,
|
|
27
37
|
PullRequestWithUniqueID,
|
|
28
38
|
RequestFunction,
|
|
@@ -31,23 +41,19 @@ import type {
|
|
|
31
41
|
SetPullRequestInput,
|
|
32
42
|
Trello,
|
|
33
43
|
} from '@gitkraken/provider-apis';
|
|
34
|
-
import
|
|
35
|
-
|
|
36
|
-
GitPullRequestMergeableState,
|
|
37
|
-
GitPullRequestReviewState,
|
|
38
|
-
GitPullRequestState,
|
|
39
|
-
} from '@gitkraken/provider-apis';
|
|
40
|
-
import { EntityIdentifierUtils } from '@gitkraken/provider-apis/entity-identifiers';
|
|
41
|
-
import { GitProviderUtils } from '@gitkraken/provider-apis/provider-utils';
|
|
44
|
+
import entityIdentifiersModule from '@gitkraken/provider-apis/entity-identifiers';
|
|
45
|
+
import providerUtilsModule from '@gitkraken/provider-apis/provider-utils';
|
|
42
46
|
import type { Account as UserAccount } from '../../../git/models/author.js';
|
|
43
|
-
import type { IssueMember, IssueProject, IssueShape } from '../../../git/models/issue.js';
|
|
47
|
+
import type { IssueMember, IssueProject, IssueShape, IssueStateFilter } from '../../../git/models/issue.js';
|
|
44
48
|
import { Issue, RepositoryAccessLevel } from '../../../git/models/issue.js';
|
|
45
49
|
import type {
|
|
46
50
|
PullRequestMember,
|
|
51
|
+
PullRequestRef,
|
|
47
52
|
PullRequestRefs,
|
|
48
53
|
PullRequestRepositoryIdentityDescriptor,
|
|
49
54
|
PullRequestReviewer,
|
|
50
55
|
PullRequestState,
|
|
56
|
+
PullRequestStateFilter,
|
|
51
57
|
} from '../../../git/models/pullRequest.js';
|
|
52
58
|
import {
|
|
53
59
|
PullRequest,
|
|
@@ -57,7 +63,9 @@ import {
|
|
|
57
63
|
PullRequestStatusCheckRollupState,
|
|
58
64
|
} from '../../../git/models/pullRequest.js';
|
|
59
65
|
import type { Provider, ProviderReference } from '../../../git/models/remoteProvider.js';
|
|
66
|
+
import type { ProviderScope } from '../../../git/models/resourceDescriptor.js';
|
|
60
67
|
import { gitSuffixRegex } from '../../../git/utils/remote.utils.js';
|
|
68
|
+
import type { PagedResult } from '../../../utils/paging.js';
|
|
61
69
|
import { equalsIgnoreCase } from '../../../utils/string.js';
|
|
62
70
|
import type { IntegrationIds } from '../constants.js';
|
|
63
71
|
import {
|
|
@@ -66,8 +74,69 @@ import {
|
|
|
66
74
|
IssuesCloudHostIntegrationId,
|
|
67
75
|
} from '../constants.js';
|
|
68
76
|
import type { Integration, IntegrationType } from '../models/integration.js';
|
|
77
|
+
import { IssueFilter, PullRequestFilter } from '../providerFilters.js';
|
|
78
|
+
|
|
79
|
+
export { IssueFilter, PullRequestFilter } from '../providerFilters.js';
|
|
80
|
+
import type { ProviderRepositoryShape } from '../results.js';
|
|
81
|
+
|
|
82
|
+
export type { ProviderOrganization, ProviderRepositoryShape } from '../results.js';
|
|
69
83
|
import { getEntityIdentifierInput } from './utils.js';
|
|
70
84
|
|
|
85
|
+
type GitBuildStatusState = GitBuildStatusStateType;
|
|
86
|
+
type GitIssueState = GitIssueStateType;
|
|
87
|
+
type GitPullRequestMergeableState = GitPullRequestMergeableStateType;
|
|
88
|
+
type GitPullRequestReviewState = GitPullRequestReviewStateType;
|
|
89
|
+
type GitPullRequestState = GitPullRequestStateType;
|
|
90
|
+
|
|
91
|
+
const { EntityIdentifierUtils } = entityIdentifiersModule;
|
|
92
|
+
const { GitProviderUtils } = providerUtilsModule;
|
|
93
|
+
|
|
94
|
+
// Local runtime copies of the `@gitkraken/provider-apis` string enums. Duplicated (not imported as
|
|
95
|
+
// values) because the SDK ships as CJS whose named enum exports can't be statically imported as ESM
|
|
96
|
+
// values from the bundled `dist`. Exported so the enum-parity test can deep-equal them against the
|
|
97
|
+
// real SDK enums and turn any upstream drift into a test failure instead of a silent mismatch.
|
|
98
|
+
export const GitBuildStatusState = {
|
|
99
|
+
ActionRequired: 'ACTION_REQUIRED' as GitBuildStatusState,
|
|
100
|
+
Cancelled: 'CANCELLED' as GitBuildStatusState,
|
|
101
|
+
Error: 'ERROR' as GitBuildStatusState,
|
|
102
|
+
Failed: 'FAILED' as GitBuildStatusState,
|
|
103
|
+
Pending: 'PENDING' as GitBuildStatusState,
|
|
104
|
+
Running: 'RUNNING' as GitBuildStatusState,
|
|
105
|
+
Skipped: 'SKIPPED' as GitBuildStatusState,
|
|
106
|
+
Success: 'SUCCESS' as GitBuildStatusState,
|
|
107
|
+
Warning: 'WARNING' as GitBuildStatusState,
|
|
108
|
+
OptionalActionRequired: 'OPTIONAL_ACTION_REQUIRED' as GitBuildStatusState,
|
|
109
|
+
} as const;
|
|
110
|
+
|
|
111
|
+
export const GitIssueState = {
|
|
112
|
+
Open: 'OPEN' as GitIssueState,
|
|
113
|
+
Closed: 'CLOSED' as GitIssueState,
|
|
114
|
+
} as const;
|
|
115
|
+
|
|
116
|
+
export const GitPullRequestState = {
|
|
117
|
+
Open: 'OPEN' as GitPullRequestState,
|
|
118
|
+
Closed: 'CLOSED' as GitPullRequestState,
|
|
119
|
+
Merged: 'MERGED' as GitPullRequestState,
|
|
120
|
+
} as const;
|
|
121
|
+
|
|
122
|
+
export const GitPullRequestReviewState = {
|
|
123
|
+
Approved: 'APPROVED' as GitPullRequestReviewState,
|
|
124
|
+
ChangesRequested: 'CHANGES_REQUESTED' as GitPullRequestReviewState,
|
|
125
|
+
Commented: 'COMMENTED' as GitPullRequestReviewState,
|
|
126
|
+
ReviewRequested: 'REVIEW_REQUESTED' as GitPullRequestReviewState,
|
|
127
|
+
} as const;
|
|
128
|
+
|
|
129
|
+
export const GitPullRequestMergeableState = {
|
|
130
|
+
Behind: 'BEHIND' as GitPullRequestMergeableState,
|
|
131
|
+
Blocked: 'BLOCKED' as GitPullRequestMergeableState,
|
|
132
|
+
Conflicts: 'CONFLICTS' as GitPullRequestMergeableState,
|
|
133
|
+
FailingChecks: 'FAILING_CHECKS' as GitPullRequestMergeableState,
|
|
134
|
+
Mergeable: 'MERGEABLE' as GitPullRequestMergeableState,
|
|
135
|
+
Unknown: 'UNKNOWN' as GitPullRequestMergeableState,
|
|
136
|
+
UnknownAndBlocked: 'UNKNOWN_AND_BLOCKED' as GitPullRequestMergeableState,
|
|
137
|
+
Unstable: 'UNSTABLE' as GitPullRequestMergeableState,
|
|
138
|
+
} as const;
|
|
139
|
+
|
|
71
140
|
/**
|
|
72
141
|
* Forward-only host type — the package only sets `EnrichablePullRequest.enrichable`
|
|
73
142
|
* for the host to consume. Typed as `any` to avoid duplicating the host's
|
|
@@ -89,25 +158,79 @@ export type ProviderLinearOrganization = LinearOrganization;
|
|
|
89
158
|
export type ProviderAzureProject = AzureProject;
|
|
90
159
|
export type ProviderAzureResource = AzureOrganization;
|
|
91
160
|
export type ProviderBitbucketResource = BitbucketWorkspaceStub;
|
|
161
|
+
export type ProviderGitHubOrganization = Organization;
|
|
162
|
+
export type ProviderGitLabGroup = GitLabGroup;
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* Returns an account-wide PR identity. Provider PR ids are commonly scoped to a repository or organization,
|
|
166
|
+
* so an id alone is never safe for deduplication across a multi-repository fan-out. Repository identity wins
|
|
167
|
+
* when available so the same row still deduplicates when a later facet adds or removes its URL.
|
|
168
|
+
*/
|
|
169
|
+
export function getProviderPullRequestIdentity(
|
|
170
|
+
pr: Pick<ProviderPullRequest, 'id' | 'repository' | 'url'>,
|
|
171
|
+
): string | undefined {
|
|
172
|
+
const repository = pr.repository as
|
|
173
|
+
| {
|
|
174
|
+
id?: string | number;
|
|
175
|
+
name?: string;
|
|
176
|
+
namespace?: string;
|
|
177
|
+
owner?: { login?: string } | string;
|
|
178
|
+
project?: string;
|
|
179
|
+
}
|
|
180
|
+
| undefined;
|
|
181
|
+
const urlIdentity = pr.url != null && pr.url.trim() !== '' ? `url:${pr.url}` : undefined;
|
|
182
|
+
if (repository == null) return urlIdentity;
|
|
183
|
+
|
|
184
|
+
const owner = typeof repository.owner === 'string' ? repository.owner : repository.owner?.login;
|
|
185
|
+
const repositoryId = repository.id != null ? String(repository.id).trim() : '';
|
|
186
|
+
if (repositoryId !== '') return `repository:${repositoryId}:pull-request:${pr.id}`;
|
|
187
|
+
|
|
188
|
+
const name = repository.name?.trim() ?? '';
|
|
189
|
+
const namespace = (repository.namespace ?? owner)?.trim() ?? '';
|
|
190
|
+
const project = repository.project?.trim() ?? '';
|
|
191
|
+
if (name !== '' && (namespace !== '' || project !== '')) {
|
|
192
|
+
return `repository:${namespace}/${project}/${name}:pull-request:${pr.id}`;
|
|
193
|
+
}
|
|
194
|
+
return urlIdentity;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
export type ProviderHierarchyResult<T> = PagedResult<T> & {
|
|
198
|
+
readonly truncated?: boolean;
|
|
199
|
+
/**
|
|
200
|
+
* SDK collection metadata merged across the drained pages. Independent from the local `truncated` backstop:
|
|
201
|
+
* a page-drain backstop stays visible even if every fetched page reported `complete`, and SDK
|
|
202
|
+
* incompleteness is preserved even when the drain finished within its page budget.
|
|
203
|
+
*/
|
|
204
|
+
readonly metadata?: CollectionMetadata;
|
|
205
|
+
};
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* A normalized {@link PagedResult} that additionally carries the SDK's collection {@link CollectionMetadata}
|
|
209
|
+
* (completeness + per-scope failures). Named to avoid colliding with the public ProviderBackend
|
|
210
|
+
* `ProviderPagedResult` in `results.ts`: this is the integration-local carrier between the `ProvidersApi`
|
|
211
|
+
* boundary and the code that maps metadata into warnings/truncation. `metadata` is optional so providers and
|
|
212
|
+
* test doubles that predate the SDK metadata contract keep behaving exactly as before.
|
|
213
|
+
*/
|
|
214
|
+
export type ProviderApiPagedResult<T> = PagedResult<T> & {
|
|
215
|
+
readonly metadata?: CollectionMetadata;
|
|
216
|
+
};
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* A non-paged collection result carrying SDK {@link CollectionMetadata}. Used for fan-out reads that return a
|
|
220
|
+
* flat set of values with completeness/failure metadata but no provider-native pagination (e.g. Jira project
|
|
221
|
+
* discovery across resources, Trello board search).
|
|
222
|
+
*/
|
|
223
|
+
export type ProviderApiCollectionResult<T> = {
|
|
224
|
+
readonly values: NonNullable<T>[];
|
|
225
|
+
readonly metadata?: CollectionMetadata;
|
|
226
|
+
};
|
|
227
|
+
|
|
92
228
|
export const ProviderPullRequestReviewState = GitPullRequestReviewState;
|
|
93
229
|
export const ProviderBuildStatusState = GitBuildStatusState;
|
|
94
230
|
export type ProviderRequestFunction = RequestFunction;
|
|
95
231
|
export type ProviderRequestResponse<T> = Response<T>;
|
|
96
232
|
export type ProviderRequestOptions = RequestOptions;
|
|
97
233
|
|
|
98
|
-
export enum PullRequestFilter {
|
|
99
|
-
Author = 'author',
|
|
100
|
-
Assignee = 'assignee',
|
|
101
|
-
ReviewRequested = 'review-requested',
|
|
102
|
-
Mention = 'mention',
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
export enum IssueFilter {
|
|
106
|
-
Author = 'author',
|
|
107
|
-
Assignee = 'assignee',
|
|
108
|
-
Mention = 'mention',
|
|
109
|
-
}
|
|
110
|
-
|
|
111
234
|
export enum PagingMode {
|
|
112
235
|
Project = 'project',
|
|
113
236
|
Repo = 'repo',
|
|
@@ -134,16 +257,37 @@ export interface GetPullRequestsOptions {
|
|
|
134
257
|
authorLogin?: string;
|
|
135
258
|
assigneeLogins?: string[];
|
|
136
259
|
reviewRequestedLogin?: string;
|
|
260
|
+
// Reviewer filters keyed differently per provider: GitHub/GitLab use reviewRequestedLogin (login),
|
|
261
|
+
// Bitbucket/Azure DevOps use reviewerId (account id), Bitbucket Server uses reviewerLogin (login).
|
|
262
|
+
reviewerId?: string;
|
|
263
|
+
reviewerLogin?: string;
|
|
137
264
|
mentionLogin?: string;
|
|
265
|
+
// PR states to include; when omitted the provider returns its default (open only).
|
|
266
|
+
states?: GitPullRequestState[];
|
|
138
267
|
query?: string;
|
|
139
268
|
cursor?: string; // stringified JSON object of type { type: 'cursor' | 'page'; value: string | number } | {}
|
|
140
269
|
baseUrl?: string;
|
|
270
|
+
// 1-based page to request from numbered-page providers; takes precedence over a page-typed cursor.
|
|
271
|
+
page?: number;
|
|
272
|
+
// Items to request per page (numbered-page providers, plus GitHub's maxPageSize).
|
|
273
|
+
pageSize?: number;
|
|
274
|
+
// Opt in to repository remote metadata (clone URLs) when the PR payload lacks it. Only Azure DevOps
|
|
275
|
+
// acts on this today (extra API call); it is a no-op for the other providers.
|
|
276
|
+
includeRemoteInfo?: boolean;
|
|
141
277
|
}
|
|
142
278
|
|
|
143
279
|
export interface GetPullRequestsForUserOptions {
|
|
144
280
|
includeFromArchivedRepos?: boolean;
|
|
145
281
|
cursor?: string; // stringified JSON object of type { type: 'cursor' | 'page'; value: string | number } | {}
|
|
146
282
|
baseUrl?: string;
|
|
283
|
+
// PR states to include; when omitted the provider returns its default (open only).
|
|
284
|
+
states?: GitPullRequestState[];
|
|
285
|
+
/**
|
|
286
|
+
* Items to request per page. Worth setting explicitly on an account-wide read that gets DRAINED: each
|
|
287
|
+
* provider falls back to its own historical page size when this is omitted, and GitHub's is 15
|
|
288
|
+
* (`MAX_PR_PAGE_SIZE`), so a drain pays ~7x the round trips of the 100 its search actually allows.
|
|
289
|
+
*/
|
|
290
|
+
pageSize?: number;
|
|
147
291
|
}
|
|
148
292
|
|
|
149
293
|
export interface GetPullRequestsForUserInput extends GetPullRequestsForUserOptions {
|
|
@@ -170,8 +314,14 @@ export interface GetIssuesOptions {
|
|
|
170
314
|
authorLogin?: string;
|
|
171
315
|
assigneeLogins?: string[];
|
|
172
316
|
mentionLogin?: string;
|
|
317
|
+
// Issue states to include; when omitted the provider returns its default (open only).
|
|
318
|
+
states?: GitIssueState[];
|
|
173
319
|
cursor?: string; // stringified JSON object of type { type: 'cursor' | 'page'; value: string | number } | {}
|
|
174
320
|
baseUrl?: string;
|
|
321
|
+
// 1-based page to request from numbered-page providers; takes precedence over a page-typed cursor.
|
|
322
|
+
page?: number;
|
|
323
|
+
// Items to request per page (numbered-page providers, plus GitHub's maxPageSize).
|
|
324
|
+
pageSize?: number;
|
|
175
325
|
}
|
|
176
326
|
|
|
177
327
|
export interface GetIssuesForRepoInput extends GetIssuesOptions {
|
|
@@ -209,6 +359,10 @@ export interface PageInfo {
|
|
|
209
359
|
hasNextPage: boolean;
|
|
210
360
|
endCursor?: string | null;
|
|
211
361
|
nextPage?: number | null;
|
|
362
|
+
// Numbered-page providers (Bitbucket, Bitbucket Server, Azure DevOps) additionally report these.
|
|
363
|
+
currentPage?: number | null;
|
|
364
|
+
totalPages?: number | null;
|
|
365
|
+
totalCount?: number | null;
|
|
212
366
|
}
|
|
213
367
|
|
|
214
368
|
export type GetRepoFn = (
|
|
@@ -223,7 +377,10 @@ export type GetRepoOfProjectFn = (
|
|
|
223
377
|
export type GetPullRequestsForReposFn = (
|
|
224
378
|
input: (GetPullRequestsForReposInput | GetPullRequestsForRepoIdsInput) & PagingInput,
|
|
225
379
|
options?: EnterpriseOptions,
|
|
226
|
-
|
|
380
|
+
// `metadata` carries SDK collection completeness/failures for multi-repo fan-outs (Bitbucket, Azure DevOps,
|
|
381
|
+
// Bitbucket Server); `pageInfo` is present for the cursor-based aggregate (GitHub). Both are optional so
|
|
382
|
+
// each provider only sets what it actually reports.
|
|
383
|
+
) => Promise<{ data: ProviderPullRequest[]; pageInfo?: PageInfo; metadata?: CollectionMetadata }>;
|
|
227
384
|
|
|
228
385
|
export type GetPullRequestsForRepoFn = (
|
|
229
386
|
input: GetPullRequestsForRepoInput & PagingInput,
|
|
@@ -236,9 +393,32 @@ export type GetPullRequestsForUserFn = (
|
|
|
236
393
|
) => Promise<{ data: ProviderPullRequest[]; pageInfo?: PageInfo }>;
|
|
237
394
|
|
|
238
395
|
export type GetPullRequestsForAzureProjectsFn = (
|
|
239
|
-
input: {
|
|
396
|
+
input: {
|
|
397
|
+
projects: { namespace: string; project: string }[];
|
|
398
|
+
authorLogin?: string;
|
|
399
|
+
assigneeLogins?: string[];
|
|
400
|
+
reviewerId?: string;
|
|
401
|
+
states?: GitPullRequestState[];
|
|
402
|
+
repo?: ProviderRepoInput;
|
|
403
|
+
},
|
|
240
404
|
options?: EnterpriseOptions,
|
|
241
|
-
|
|
405
|
+
// Aggregate multi-project fan-out: no `pageInfo` (call getPullRequestsForAzureProject for that), but SDK
|
|
406
|
+
// collection metadata reports per-project completeness/failures.
|
|
407
|
+
) => Promise<{ data: ProviderPullRequest[]; metadata?: CollectionMetadata }>;
|
|
408
|
+
|
|
409
|
+
/** Single Azure project PR read, paginated by number (unlike the aggregate {@link GetPullRequestsForAzureProjectsFn}). */
|
|
410
|
+
export type GetPullRequestsForAzureProjectFn = (
|
|
411
|
+
input: {
|
|
412
|
+
namespace: string;
|
|
413
|
+
project: string;
|
|
414
|
+
authorLogin?: string;
|
|
415
|
+
assigneeLogins?: string[];
|
|
416
|
+
reviewerId?: string;
|
|
417
|
+
states?: GitPullRequestState[];
|
|
418
|
+
repo?: ProviderRepoInput;
|
|
419
|
+
} & PagingInput,
|
|
420
|
+
options?: EnterpriseOptions,
|
|
421
|
+
) => Promise<{ data: ProviderPullRequest[]; pageInfo: { hasNextPage: boolean; nextPage: number | null } }>;
|
|
242
422
|
|
|
243
423
|
export type MergePullRequestFn =
|
|
244
424
|
| ((
|
|
@@ -292,8 +472,18 @@ export type GetIssuesForReposFn = (
|
|
|
292
472
|
options?: EnterpriseOptions,
|
|
293
473
|
) => Promise<{ data: ProviderIssue[]; pageInfo?: PageInfo }>;
|
|
294
474
|
|
|
475
|
+
export type GetIssuesForCurrentUserInput = PagingInput & {
|
|
476
|
+
// GitLab's account-wide REST read (`GET /issues`): `scope` controls breadth ('assigned_to_me' vs 'all') and
|
|
477
|
+
// the username fields independently narrow a broad read to a specific assignee or author. Other providers
|
|
478
|
+
// (Linear) ignore these and page purely off the cursor.
|
|
479
|
+
scope?: 'assigned_to_me' | 'all';
|
|
480
|
+
assigneeUsername?: string;
|
|
481
|
+
authorUsername?: string;
|
|
482
|
+
pageSize?: number;
|
|
483
|
+
};
|
|
484
|
+
|
|
295
485
|
export type GetIssuesForCurrentUserFn = (
|
|
296
|
-
input:
|
|
486
|
+
input: GetIssuesForCurrentUserInput,
|
|
297
487
|
options?: EnterpriseOptions,
|
|
298
488
|
) => Promise<{ data: ProviderIssue[]; pageInfo?: PageInfo }>;
|
|
299
489
|
|
|
@@ -312,6 +502,29 @@ export type GetReposForAzureProjectFn = (
|
|
|
312
502
|
options?: EnterpriseOptions,
|
|
313
503
|
) => Promise<{ data: ProviderRepository[]; pageInfo?: PageInfo }>;
|
|
314
504
|
|
|
505
|
+
export type GetOrgsForCurrentUserFn = (
|
|
506
|
+
input?: CursorPageInput,
|
|
507
|
+
options?: EnterpriseOptions,
|
|
508
|
+
) => Promise<{ data: ProviderGitHubOrganization[]; pageInfo?: PageInfo }>;
|
|
509
|
+
export type GetReposForOrgFn = (
|
|
510
|
+
input: { orgName: string } & PagingInput,
|
|
511
|
+
options?: EnterpriseOptions,
|
|
512
|
+
) => Promise<{ data: ProviderRepository[]; pageInfo?: PageInfo }>;
|
|
513
|
+
export type GetReposForWorkspaceFn = (
|
|
514
|
+
input: { workspace: string } & PagingInput,
|
|
515
|
+
options?: EnterpriseOptions,
|
|
516
|
+
) => Promise<{ data: ProviderRepository[]; pageInfo?: PageInfo }>;
|
|
517
|
+
export type GetReposForCurrentUserFn = (
|
|
518
|
+
// `affiliations` narrows GitHub's `/user/repos` read (owner/collaborator/organization_member);
|
|
519
|
+
// GitLab's equivalent read ignores it.
|
|
520
|
+
input: PagingInput & { affiliations?: ('owner' | 'collaborator' | 'organization_member')[] },
|
|
521
|
+
options?: EnterpriseOptions,
|
|
522
|
+
) => Promise<{ data: ProviderRepository[]; pageInfo?: PageInfo }>;
|
|
523
|
+
export type GetGroupsForCurrentUserFn = (
|
|
524
|
+
input?: { topLevelOnly?: boolean } & PagingInput,
|
|
525
|
+
options?: EnterpriseOptions,
|
|
526
|
+
) => Promise<{ data: ProviderGitLabGroup[]; pageInfo?: PageInfo }>;
|
|
527
|
+
|
|
315
528
|
export type GetCurrentUserFn = (
|
|
316
529
|
input: Record<string, never>,
|
|
317
530
|
options?: EnterpriseOptions,
|
|
@@ -328,10 +541,40 @@ export type GetCurrentUserForResourceFn = (
|
|
|
328
541
|
export type GetJiraResourcesForCurrentUserFn = (options?: EnterpriseOptions) => Promise<{ data: JiraResource[] }>;
|
|
329
542
|
export type GetLinearOrganizationFn = (options?: EnterpriseOptions) => Promise<{ data: LinearOrganization }>;
|
|
330
543
|
export type GetLinearTeamsForCurrentUserFn = (options?: EnterpriseOptions) => Promise<{ data: LinearTeam[] }>;
|
|
544
|
+
export type GetLinearIssuesFn = (
|
|
545
|
+
input: { teams?: string[]; projects?: string[]; labels?: string[] } & PagingInput,
|
|
546
|
+
options?: EnterpriseOptions,
|
|
547
|
+
) => Promise<{ data: ProviderIssue[]; pageInfo?: PageInfo }>;
|
|
548
|
+
/**
|
|
549
|
+
* Linear's current-user (viewer) query. Its raw `@linear/sdk` User isn't a `ProviderAccount` (no
|
|
550
|
+
* username/avatar/url), so it's typed with the minimal fields the viewer query actually returns rather than
|
|
551
|
+
* importing `@linear/sdk` (which is bundled in the SDK dist and not a resolvable top-level dependency).
|
|
552
|
+
*/
|
|
553
|
+
export type GetLinearCurrentUserFn = (
|
|
554
|
+
options?: EnterpriseOptions,
|
|
555
|
+
) => Promise<{ data: { id: string; name?: string | null; email?: string | null; displayName?: string | null } }>;
|
|
331
556
|
export type GetJiraProjectsForResourcesFn = (
|
|
332
557
|
input: { resourceIds: string[] },
|
|
333
558
|
options?: EnterpriseOptions,
|
|
334
|
-
|
|
559
|
+
// Fan-out across resources: preserves successful resources' projects and reports per-resource failures in
|
|
560
|
+
// SDK collection metadata instead of throwing when a single resource fails.
|
|
561
|
+
) => Promise<{ data: JiraProject[]; metadata?: CollectionMetadata }>;
|
|
562
|
+
export type GetJiraProjectsForResourceFn = (
|
|
563
|
+
input: { resourceId: string } & CursorPageInput,
|
|
564
|
+
options?: EnterpriseOptions,
|
|
565
|
+
) => Promise<{ data: JiraProject[]; pageInfo?: PageInfo; metadata?: CollectionMetadata }>;
|
|
566
|
+
export type GetGitLabPullRequestsForUserAssociationFn = (
|
|
567
|
+
input: {
|
|
568
|
+
username: string;
|
|
569
|
+
association: 'assigned' | 'authored' | 'reviewRequested';
|
|
570
|
+
includeFromArchivedRepos?: boolean;
|
|
571
|
+
labelNames?: string[];
|
|
572
|
+
repo?: ProviderRepoInput;
|
|
573
|
+
states?: GitPullRequestState[];
|
|
574
|
+
pageSize?: number;
|
|
575
|
+
} & CursorPageInput,
|
|
576
|
+
options?: EnterpriseOptions,
|
|
577
|
+
) => Promise<{ data: ProviderPullRequest[]; pageInfo?: PageInfo }>;
|
|
335
578
|
export type GetAzureResourcesForUserFn = (
|
|
336
579
|
input: { userId: string },
|
|
337
580
|
options?: EnterpriseOptions,
|
|
@@ -341,13 +584,14 @@ export type GetAzureProjectsForResourceFn = (
|
|
|
341
584
|
options?: EnterpriseOptions,
|
|
342
585
|
) => Promise<{ data: AzureProject[]; pageInfo?: PageInfo }>;
|
|
343
586
|
export type GetBitbucketResourcesForCurrentUserFn = (
|
|
344
|
-
input:
|
|
587
|
+
input: { page?: number },
|
|
345
588
|
options?: EnterpriseOptions,
|
|
346
|
-
) => Promise<{ data: BitbucketWorkspaceStub[] }>;
|
|
589
|
+
) => Promise<{ data: BitbucketWorkspaceStub[]; pageInfo?: PageInfo }>;
|
|
347
590
|
export type GetBitbucketPullRequestsAuthoredByUserForWorkspaceFn = (
|
|
348
591
|
input: {
|
|
349
592
|
userId: string;
|
|
350
593
|
workspaceSlug: string;
|
|
594
|
+
states?: GitPullRequestState[];
|
|
351
595
|
} & NumberedPageInput,
|
|
352
596
|
options?: EnterpriseOptions,
|
|
353
597
|
) => Promise<{
|
|
@@ -358,7 +602,7 @@ export type GetBitbucketPullRequestsAuthoredByUserForWorkspaceFn = (
|
|
|
358
602
|
data: GitPullRequest[];
|
|
359
603
|
}>;
|
|
360
604
|
export type GetBitbucketServerPullRequestsForCurrentUserFn = (
|
|
361
|
-
input: NumberedPageInput,
|
|
605
|
+
input: { states?: GitPullRequestState[] } & NumberedPageInput,
|
|
362
606
|
options?: EnterpriseOptions,
|
|
363
607
|
) => Promise<{
|
|
364
608
|
pageInfo: {
|
|
@@ -373,6 +617,15 @@ export type GetIssuesForResourceForCurrentUserFn = (
|
|
|
373
617
|
options?: EnterpriseOptions,
|
|
374
618
|
) => Promise<{ data: ProviderIssue[] }>;
|
|
375
619
|
|
|
620
|
+
// Trello reads (issues-capable provider). The Trello client is keyed by an `appKey` (the Trello app key from
|
|
621
|
+
// the cloud token exchange) alongside the OAuth token, so these mirror the client method shapes directly.
|
|
622
|
+
export type GetTrelloCurrentUserFn = Trello['getCurrentUser'];
|
|
623
|
+
export type GetTrelloBoardsForCurrentUserFn = Trello['getBoardsForCurrentUser'];
|
|
624
|
+
export type GetTrelloListsForBoardFn = Trello['getListsForTrelloBoard'];
|
|
625
|
+
export type GetTrelloAccountForIdFn = Trello['getAccountForId'];
|
|
626
|
+
export type GetTrelloIssuesForBoardFn = Trello['getIssuesForBoard'];
|
|
627
|
+
export type GetTrelloLabelsForBoardFn = Trello['getLabelsForBoard'];
|
|
628
|
+
|
|
376
629
|
export interface ProviderInfo extends ProviderMetadata {
|
|
377
630
|
provider: GitHub | GitLab | Bitbucket | BitbucketServer | Jira | Linear | Trello | AzureDevOps;
|
|
378
631
|
getRepoFn?: GetRepoFn;
|
|
@@ -380,7 +633,9 @@ export interface ProviderInfo extends ProviderMetadata {
|
|
|
380
633
|
getPullRequestsForReposFn?: GetPullRequestsForReposFn;
|
|
381
634
|
getPullRequestsForRepoFn?: GetPullRequestsForRepoFn;
|
|
382
635
|
getPullRequestsForUserFn?: GetPullRequestsForUserFn;
|
|
636
|
+
getGitLabPullRequestsForUserAssociationFn?: GetGitLabPullRequestsForUserAssociationFn;
|
|
383
637
|
getPullRequestsForAzureProjectsFn?: GetPullRequestsForAzureProjectsFn;
|
|
638
|
+
getPullRequestsForAzureProjectFn?: GetPullRequestsForAzureProjectFn;
|
|
384
639
|
getIssueFn?: GetIssueFn;
|
|
385
640
|
getIssuesForReposFn?: GetIssuesForReposFn;
|
|
386
641
|
getIssuesForCurrentUserFn?: GetIssuesForCurrentUserFn;
|
|
@@ -392,16 +647,30 @@ export interface ProviderInfo extends ProviderMetadata {
|
|
|
392
647
|
getJiraResourcesForCurrentUserFn?: GetJiraResourcesForCurrentUserFn;
|
|
393
648
|
getLinearOrganizationFn?: GetLinearOrganizationFn;
|
|
394
649
|
getLinearTeamsForCurrentUserFn?: GetLinearTeamsForCurrentUserFn;
|
|
650
|
+
getLinearIssuesFn?: GetLinearIssuesFn;
|
|
651
|
+
getLinearCurrentUserFn?: GetLinearCurrentUserFn;
|
|
395
652
|
getAzureResourcesForUserFn?: GetAzureResourcesForUserFn;
|
|
396
653
|
getBitbucketResourcesForCurrentUserFn?: GetBitbucketResourcesForCurrentUserFn;
|
|
397
654
|
getBitbucketPullRequestsAuthoredByUserForWorkspaceFn?: GetBitbucketPullRequestsAuthoredByUserForWorkspaceFn;
|
|
398
655
|
getBitbucketServerPullRequestsForCurrentUserFn?: GetBitbucketServerPullRequestsForCurrentUserFn;
|
|
399
656
|
getJiraProjectsForResourcesFn?: GetJiraProjectsForResourcesFn;
|
|
657
|
+
getJiraProjectsForResourceFn?: GetJiraProjectsForResourceFn;
|
|
400
658
|
getAzureProjectsForResourceFn?: GetAzureProjectsForResourceFn;
|
|
401
659
|
getIssuesForProjectFn?: GetIssuesForProjectFn;
|
|
402
660
|
getReposForAzureProjectFn?: GetReposForAzureProjectFn;
|
|
403
661
|
getIssuesForResourceForCurrentUserFn?: GetIssuesForResourceForCurrentUserFn;
|
|
404
662
|
mergePullRequestFn?: MergePullRequestFn;
|
|
663
|
+
getOrgsForCurrentUserFn?: GetOrgsForCurrentUserFn;
|
|
664
|
+
getReposForOrgFn?: GetReposForOrgFn;
|
|
665
|
+
getReposForWorkspaceFn?: GetReposForWorkspaceFn;
|
|
666
|
+
getReposForCurrentUserFn?: GetReposForCurrentUserFn;
|
|
667
|
+
getGroupsForCurrentUserFn?: GetGroupsForCurrentUserFn;
|
|
668
|
+
getTrelloCurrentUserFn?: GetTrelloCurrentUserFn;
|
|
669
|
+
getTrelloBoardsForCurrentUserFn?: GetTrelloBoardsForCurrentUserFn;
|
|
670
|
+
getTrelloListsForBoardFn?: GetTrelloListsForBoardFn;
|
|
671
|
+
getTrelloAccountForIdFn?: GetTrelloAccountForIdFn;
|
|
672
|
+
getTrelloIssuesForBoardFn?: GetTrelloIssuesForBoardFn;
|
|
673
|
+
getTrelloLabelsForBoardFn?: GetTrelloLabelsForBoardFn;
|
|
405
674
|
}
|
|
406
675
|
|
|
407
676
|
export interface ProviderMetadata {
|
|
@@ -416,7 +685,28 @@ export interface ProviderMetadata {
|
|
|
416
685
|
pullRequestsPagingMode?: PagingMode;
|
|
417
686
|
scopes: string[];
|
|
418
687
|
supportedPullRequestFilters?: PullRequestFilter[];
|
|
688
|
+
/**
|
|
689
|
+
* Relationship filters the ACCOUNT-WIDE pull-request read can express as an exact OR union.
|
|
690
|
+
* This is independent from `supportedPullRequestFilters`, which describes repo-scoped reads.
|
|
691
|
+
*/
|
|
692
|
+
supportedAccountWidePullRequestFilters?: PullRequestFilter[];
|
|
693
|
+
/** Filters the REPO-scoped issue read can express. */
|
|
419
694
|
supportedIssueFilters?: IssueFilter[];
|
|
695
|
+
/**
|
|
696
|
+
* Filters the ACCOUNT-WIDE issue read can express, which is NOT the same set as
|
|
697
|
+
* {@link ProviderMetadata.supportedIssueFilters}: the two reads are different provider queries.
|
|
698
|
+
*
|
|
699
|
+
* Unfiltered, each provider's account-wide read is that provider's own definition of "my issues" — GitHub/GHE
|
|
700
|
+
* union authored + assigned + mentioned, Azure drains assigned + authored, and GitLab reads assigned-to-me.
|
|
701
|
+
* A consumer replacing a narrower tool (`gk`'s `assignee:@me`) must select the `Assignee` filter wherever the
|
|
702
|
+
* provider's default is wider.
|
|
703
|
+
*
|
|
704
|
+
* A filter listed here narrows that read server-side. Absent/empty means the read can't be narrowed at all,
|
|
705
|
+
* so the facade refuses a filtered request rather than serving the unnarrowed union as if it had been
|
|
706
|
+
* filtered. GitLab lists `Assignee` and `Author` because the SDK's account-wide input exposes both username
|
|
707
|
+
* axes; it omits `Mention` because that REST read has no first-class mention filter.
|
|
708
|
+
*/
|
|
709
|
+
supportedAccountWideIssueFilters?: IssueFilter[];
|
|
420
710
|
}
|
|
421
711
|
|
|
422
712
|
export type Providers = Record<IntegrationIds, ProviderInfo>;
|
|
@@ -438,8 +728,17 @@ export const providersMetadata: ProvidersMetadata = {
|
|
|
438
728
|
PullRequestFilter.ReviewRequested,
|
|
439
729
|
PullRequestFilter.Mention,
|
|
440
730
|
],
|
|
731
|
+
supportedAccountWidePullRequestFilters: [
|
|
732
|
+
PullRequestFilter.Author,
|
|
733
|
+
PullRequestFilter.Assignee,
|
|
734
|
+
PullRequestFilter.ReviewRequested,
|
|
735
|
+
PullRequestFilter.Mention,
|
|
736
|
+
],
|
|
441
737
|
// Use 'username' property on account for issue filters
|
|
442
738
|
supportedIssueFilters: [IssueFilter.Author, IssueFilter.Assignee, IssueFilter.Mention],
|
|
739
|
+
// The account-wide read is three independent searches (`author:@me`, `assignee:@me`, `mentions:@me`) behind
|
|
740
|
+
// one composite cursor, so any subset of them is expressible.
|
|
741
|
+
supportedAccountWideIssueFilters: [IssueFilter.Author, IssueFilter.Assignee, IssueFilter.Mention],
|
|
443
742
|
scopes: ['repo', 'read:user', 'user:email'],
|
|
444
743
|
},
|
|
445
744
|
[GitSelfManagedHostIntegrationId.CloudGitHubEnterprise]: {
|
|
@@ -457,8 +756,17 @@ export const providersMetadata: ProvidersMetadata = {
|
|
|
457
756
|
PullRequestFilter.ReviewRequested,
|
|
458
757
|
PullRequestFilter.Mention,
|
|
459
758
|
],
|
|
759
|
+
supportedAccountWidePullRequestFilters: [
|
|
760
|
+
PullRequestFilter.Author,
|
|
761
|
+
PullRequestFilter.Assignee,
|
|
762
|
+
PullRequestFilter.ReviewRequested,
|
|
763
|
+
PullRequestFilter.Mention,
|
|
764
|
+
],
|
|
460
765
|
// Use 'username' property on account for issue filters
|
|
461
766
|
supportedIssueFilters: [IssueFilter.Author, IssueFilter.Assignee, IssueFilter.Mention],
|
|
767
|
+
// The account-wide read is three independent searches (`author:@me`, `assignee:@me`, `mentions:@me`) behind
|
|
768
|
+
// one composite cursor, so any subset of them is expressible.
|
|
769
|
+
supportedAccountWideIssueFilters: [IssueFilter.Author, IssueFilter.Assignee, IssueFilter.Mention],
|
|
462
770
|
scopes: ['repo', 'read:user', 'user:email'],
|
|
463
771
|
},
|
|
464
772
|
[GitCloudHostIntegrationId.GitLab]: {
|
|
@@ -475,8 +783,17 @@ export const providersMetadata: ProvidersMetadata = {
|
|
|
475
783
|
PullRequestFilter.Assignee,
|
|
476
784
|
PullRequestFilter.ReviewRequested,
|
|
477
785
|
],
|
|
786
|
+
supportedAccountWidePullRequestFilters: [
|
|
787
|
+
PullRequestFilter.Author,
|
|
788
|
+
PullRequestFilter.Assignee,
|
|
789
|
+
PullRequestFilter.ReviewRequested,
|
|
790
|
+
],
|
|
478
791
|
// Use 'username' property on account for issue filters
|
|
479
792
|
supportedIssueFilters: [IssueFilter.Author, IssueFilter.Assignee],
|
|
793
|
+
// The account-wide read drains one `scope=assigned_to_me` pass and one `scope=all` + `authorUsername` pass,
|
|
794
|
+
// unioned, so either axis is expressible on its own. Mention is absent because GitLab's REST issue read has
|
|
795
|
+
// no first-class mention filter to narrow with.
|
|
796
|
+
supportedAccountWideIssueFilters: [IssueFilter.Assignee, IssueFilter.Author],
|
|
480
797
|
scopes: ['api', 'read_user', 'read_repository'],
|
|
481
798
|
},
|
|
482
799
|
[GitSelfManagedHostIntegrationId.CloudGitLabSelfHosted]: {
|
|
@@ -493,8 +810,17 @@ export const providersMetadata: ProvidersMetadata = {
|
|
|
493
810
|
PullRequestFilter.Assignee,
|
|
494
811
|
PullRequestFilter.ReviewRequested,
|
|
495
812
|
],
|
|
813
|
+
supportedAccountWidePullRequestFilters: [
|
|
814
|
+
PullRequestFilter.Author,
|
|
815
|
+
PullRequestFilter.Assignee,
|
|
816
|
+
PullRequestFilter.ReviewRequested,
|
|
817
|
+
],
|
|
496
818
|
// Use 'username' property on account for issue filters
|
|
497
819
|
supportedIssueFilters: [IssueFilter.Author, IssueFilter.Assignee],
|
|
820
|
+
// The account-wide read drains one `scope=assigned_to_me` pass and one `scope=all` + `authorUsername` pass,
|
|
821
|
+
// unioned, so either axis is expressible on its own. Mention is absent because GitLab's REST issue read has
|
|
822
|
+
// no first-class mention filter to narrow with.
|
|
823
|
+
supportedAccountWideIssueFilters: [IssueFilter.Assignee, IssueFilter.Author],
|
|
498
824
|
scopes: ['api', 'read_user', 'read_repository'],
|
|
499
825
|
},
|
|
500
826
|
[GitCloudHostIntegrationId.Bitbucket]: {
|
|
@@ -504,8 +830,9 @@ export const providersMetadata: ProvidersMetadata = {
|
|
|
504
830
|
type: 'git',
|
|
505
831
|
iconKey: GitCloudHostIntegrationId.Bitbucket,
|
|
506
832
|
pullRequestsPagingMode: PagingMode.Repo,
|
|
507
|
-
// Use 'id' property on account for PR filters
|
|
508
|
-
supportedPullRequestFilters: [PullRequestFilter.Author],
|
|
833
|
+
// Use 'id' property on account for PR filters (reviewer filter keyed by account id / reviewerId)
|
|
834
|
+
supportedPullRequestFilters: [PullRequestFilter.Author, PullRequestFilter.ReviewRequested],
|
|
835
|
+
supportedAccountWidePullRequestFilters: [PullRequestFilter.Author, PullRequestFilter.ReviewRequested],
|
|
509
836
|
scopes: ['account:read', 'repository:read', 'pullrequest:read', 'issue:read'],
|
|
510
837
|
},
|
|
511
838
|
[GitSelfManagedHostIntegrationId.BitbucketServer]: {
|
|
@@ -515,6 +842,7 @@ export const providersMetadata: ProvidersMetadata = {
|
|
|
515
842
|
type: 'git',
|
|
516
843
|
iconKey: GitSelfManagedHostIntegrationId.BitbucketServer,
|
|
517
844
|
supportedPullRequestFilters: [PullRequestFilter.Author, PullRequestFilter.ReviewRequested],
|
|
845
|
+
supportedAccountWidePullRequestFilters: [PullRequestFilter.Author, PullRequestFilter.ReviewRequested],
|
|
518
846
|
scopes: ['Project (Read)', 'Repository (Write)'],
|
|
519
847
|
},
|
|
520
848
|
[GitCloudHostIntegrationId.AzureDevOps]: {
|
|
@@ -525,10 +853,22 @@ export const providersMetadata: ProvidersMetadata = {
|
|
|
525
853
|
iconKey: GitCloudHostIntegrationId.AzureDevOps,
|
|
526
854
|
issuesPagingMode: PagingMode.Project,
|
|
527
855
|
pullRequestsPagingMode: PagingMode.Repo,
|
|
528
|
-
// Use 'id' property on account for PR filters
|
|
529
|
-
supportedPullRequestFilters: [
|
|
856
|
+
// Use 'id' property on account for PR filters (reviewer filter keyed by account id / reviewerId)
|
|
857
|
+
supportedPullRequestFilters: [
|
|
858
|
+
PullRequestFilter.Author,
|
|
859
|
+
PullRequestFilter.Assignee,
|
|
860
|
+
PullRequestFilter.ReviewRequested,
|
|
861
|
+
],
|
|
862
|
+
supportedAccountWidePullRequestFilters: [
|
|
863
|
+
PullRequestFilter.Author,
|
|
864
|
+
PullRequestFilter.Assignee,
|
|
865
|
+
PullRequestFilter.ReviewRequested,
|
|
866
|
+
],
|
|
530
867
|
// Use 'name' property on account for issue filters
|
|
531
868
|
supportedIssueFilters: [IssueFilter.Author, IssueFilter.Assignee, IssueFilter.Mention],
|
|
869
|
+
// The account-wide read drains one (project × assignee) and one (project × author) query per project, so
|
|
870
|
+
// either axis is expressible on its own. There is no mention query to narrow to.
|
|
871
|
+
supportedAccountWideIssueFilters: [IssueFilter.Author, IssueFilter.Assignee],
|
|
532
872
|
scopes: ['vso.code', 'vso.identity', 'vso.project', 'vso.profile', 'vso.work'],
|
|
533
873
|
},
|
|
534
874
|
[GitSelfManagedHostIntegrationId.AzureDevOpsServer]: {
|
|
@@ -539,10 +879,22 @@ export const providersMetadata: ProvidersMetadata = {
|
|
|
539
879
|
iconKey: GitCloudHostIntegrationId.AzureDevOps,
|
|
540
880
|
issuesPagingMode: PagingMode.Project,
|
|
541
881
|
pullRequestsPagingMode: PagingMode.Repo,
|
|
542
|
-
// Use 'id' property on account for PR filters
|
|
543
|
-
supportedPullRequestFilters: [
|
|
882
|
+
// Use 'id' property on account for PR filters (reviewer filter keyed by account id / reviewerId)
|
|
883
|
+
supportedPullRequestFilters: [
|
|
884
|
+
PullRequestFilter.Author,
|
|
885
|
+
PullRequestFilter.Assignee,
|
|
886
|
+
PullRequestFilter.ReviewRequested,
|
|
887
|
+
],
|
|
888
|
+
supportedAccountWidePullRequestFilters: [
|
|
889
|
+
PullRequestFilter.Author,
|
|
890
|
+
PullRequestFilter.Assignee,
|
|
891
|
+
PullRequestFilter.ReviewRequested,
|
|
892
|
+
],
|
|
544
893
|
// Use 'name' property on account for issue filters
|
|
545
894
|
supportedIssueFilters: [IssueFilter.Author, IssueFilter.Assignee, IssueFilter.Mention],
|
|
895
|
+
// The account-wide read drains one (project × assignee) and one (project × author) query per project, so
|
|
896
|
+
// either axis is expressible on its own. There is no mention query to narrow to.
|
|
897
|
+
supportedAccountWideIssueFilters: [IssueFilter.Author, IssueFilter.Assignee],
|
|
546
898
|
scopes: ['vso.code', 'vso.identity', 'vso.project', 'vso.profile', 'vso.work'],
|
|
547
899
|
},
|
|
548
900
|
[IssuesCloudHostIntegrationId.Jira]: {
|
|
@@ -596,6 +948,8 @@ export const providersMetadata: ProvidersMetadata = {
|
|
|
596
948
|
type: 'issues',
|
|
597
949
|
iconKey: IssuesCloudHostIntegrationId.Linear,
|
|
598
950
|
scopes: [],
|
|
951
|
+
// Linear scopes "my issues" client-side by the viewer's assignee id; author/mention aren't supported.
|
|
952
|
+
supportedIssueFilters: [IssueFilter.Assignee],
|
|
599
953
|
},
|
|
600
954
|
[IssuesCloudHostIntegrationId.Trello]: {
|
|
601
955
|
domain: 'trello.com',
|
|
@@ -604,6 +958,8 @@ export const providersMetadata: ProvidersMetadata = {
|
|
|
604
958
|
type: 'issues',
|
|
605
959
|
iconKey: IssuesCloudHostIntegrationId.Trello,
|
|
606
960
|
scopes: [],
|
|
961
|
+
// Trello cards are filtered by the assignee (member) only; author/mention have no Trello equivalent.
|
|
962
|
+
supportedIssueFilters: [IssueFilter.Assignee],
|
|
607
963
|
},
|
|
608
964
|
};
|
|
609
965
|
|
|
@@ -629,14 +985,29 @@ export function getReasonsForUserIssue(issue: ProviderIssue, userLogin: string):
|
|
|
629
985
|
return reasons;
|
|
630
986
|
}
|
|
631
987
|
|
|
988
|
+
function toIssueIdentifier(value: string | number): string {
|
|
989
|
+
return String(value);
|
|
990
|
+
}
|
|
991
|
+
|
|
632
992
|
export function toIssueShape(issue: ProviderIssue, provider: ProviderReference): IssueShape | undefined {
|
|
633
993
|
// TODO: Add some protections/baselines rather than killing the transformation here
|
|
634
|
-
|
|
994
|
+
// `author` is intentionally not required: some providers have no per-item creator (e.g. Trello cards,
|
|
995
|
+
// which the SDK maps with `author: null`), and dropping every such item would discard the whole board.
|
|
996
|
+
// Fall back to an empty author instead so these issues still surface.
|
|
997
|
+
if (issue.updatedDate == null || issue.url == null) return undefined;
|
|
635
998
|
|
|
636
999
|
return {
|
|
637
1000
|
type: 'issue',
|
|
638
1001
|
provider: provider,
|
|
639
|
-
id
|
|
1002
|
+
// `id` is the provider's display number/key (GitHub number, Jira/Linear key, Trello idShort), NOT a
|
|
1003
|
+
// globally-unique id: it's rendered to users as `#{id}`, used to build branch names, and passed back
|
|
1004
|
+
// to the provider as the `getIssue`/cache lookup key, all of which expect the number. `nodeId` is the
|
|
1005
|
+
// provider-native stable id, but its uniqueness scope is provider-specific (Azure work-item ids are
|
|
1006
|
+
// organization-scoped), so cross-scope consumers must include provider/domain/container identity too.
|
|
1007
|
+
// provider-apis declares this as a string, but some providers (notably
|
|
1008
|
+
// Azure's broadened work-item path) return a number at runtime. Keep the
|
|
1009
|
+
// public IssueShape contract truthful for consumers that use string APIs.
|
|
1010
|
+
id: toIssueIdentifier(issue.number),
|
|
640
1011
|
nodeId: issue.graphQLId ?? issue.id,
|
|
641
1012
|
title: issue.title,
|
|
642
1013
|
url: issue.url,
|
|
@@ -646,35 +1017,60 @@ export function toIssueShape(issue: ProviderIssue, provider: ProviderReference):
|
|
|
646
1017
|
closed: issue.closedDate != null,
|
|
647
1018
|
state: issue.closedDate != null ? 'closed' : 'opened',
|
|
648
1019
|
author: {
|
|
649
|
-
id: issue.author
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
1020
|
+
id: issue.author?.id ?? '',
|
|
1021
|
+
// An absent name stays absent, matching {@link fromProviderAccount}; see `IssueMember.name`.
|
|
1022
|
+
name: issue.author?.name ?? undefined,
|
|
1023
|
+
avatarUrl: issue.author?.avatarUrl ?? undefined,
|
|
1024
|
+
url: issue.author?.url ?? undefined,
|
|
653
1025
|
},
|
|
654
1026
|
assignees:
|
|
655
1027
|
issue.assignees?.map(assignee => ({
|
|
656
1028
|
id: assignee.id ?? '',
|
|
657
|
-
name: assignee.name ??
|
|
1029
|
+
name: assignee.name ?? undefined,
|
|
658
1030
|
avatarUrl: assignee.avatarUrl ?? undefined,
|
|
659
1031
|
url: assignee.url ?? undefined,
|
|
660
1032
|
})) ?? [],
|
|
661
|
-
project:
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
1033
|
+
project:
|
|
1034
|
+
issue.project?.id && issue.project.resourceId && issue.project.namespace
|
|
1035
|
+
? {
|
|
1036
|
+
id: issue.project.id,
|
|
1037
|
+
name: issue.project.name,
|
|
1038
|
+
resourceId: issue.project.resourceId,
|
|
1039
|
+
resourceName: issue.project.namespace,
|
|
1040
|
+
}
|
|
1041
|
+
: undefined,
|
|
667
1042
|
repository:
|
|
668
1043
|
issue.repository?.owner?.login != null
|
|
669
1044
|
? {
|
|
670
1045
|
owner: issue.repository.owner.login,
|
|
671
1046
|
repo: issue.repository.name,
|
|
1047
|
+
id: issue.repository.id,
|
|
672
1048
|
}
|
|
673
1049
|
: undefined,
|
|
674
1050
|
labels: issue.labels.map(label => ({ color: label.color ?? undefined, name: label.name })),
|
|
675
1051
|
commentsCount: issue.commentCount ?? undefined,
|
|
676
1052
|
thumbsUpCount: issue.upvoteCount ?? undefined,
|
|
677
1053
|
body: issue.description ?? undefined,
|
|
1054
|
+
issueType: issue.type ?? undefined,
|
|
1055
|
+
};
|
|
1056
|
+
}
|
|
1057
|
+
|
|
1058
|
+
/**
|
|
1059
|
+
* Maps a raw provider-apis {@link ProviderRepository} to the GitLens-owned {@link ProviderRepositoryShape}
|
|
1060
|
+
* the ProviderBackend `listRepos` facade surfaces, so consumers don't depend on the SDK repo type. The SDK's
|
|
1061
|
+
* nullable fields (`webUrl`/`httpsUrl`/`sshUrl`/`defaultBranch`) collapse to `undefined`, matching the
|
|
1062
|
+
* `?? undefined` convention in {@link toIssueShape}/{@link toAccount}.
|
|
1063
|
+
*/
|
|
1064
|
+
export function toProviderRepositoryShape(repo: ProviderRepository): ProviderRepositoryShape {
|
|
1065
|
+
return {
|
|
1066
|
+
id: repo.id,
|
|
1067
|
+
namespace: repo.namespace,
|
|
1068
|
+
name: repo.name,
|
|
1069
|
+
project: repo.project ?? undefined,
|
|
1070
|
+
url: repo.webUrl ?? undefined,
|
|
1071
|
+
cloneUrlHttps: repo.httpsUrl ?? undefined,
|
|
1072
|
+
cloneUrlSsh: repo.sshUrl ?? undefined,
|
|
1073
|
+
defaultBranch: repo.defaultBranch?.name ?? undefined,
|
|
678
1074
|
};
|
|
679
1075
|
}
|
|
680
1076
|
|
|
@@ -829,16 +1225,91 @@ export function fromProviderPullRequestState(state: GitPullRequestState): PullRe
|
|
|
829
1225
|
return state === GitPullRequestState.Open ? 'opened' : state === GitPullRequestState.Closed ? 'closed' : 'merged';
|
|
830
1226
|
}
|
|
831
1227
|
|
|
1228
|
+
type PullRequestStateInput = PullRequestState | PullRequestStateFilter;
|
|
1229
|
+
|
|
1230
|
+
function toProviderPullRequestStatesCore(state: PullRequestStateInput): GitPullRequestState[] {
|
|
1231
|
+
switch (state) {
|
|
1232
|
+
case 'open':
|
|
1233
|
+
case 'opened':
|
|
1234
|
+
return [GitPullRequestState.Open];
|
|
1235
|
+
case 'closed':
|
|
1236
|
+
return [GitPullRequestState.Closed];
|
|
1237
|
+
case 'merged':
|
|
1238
|
+
return [GitPullRequestState.Merged];
|
|
1239
|
+
case 'all':
|
|
1240
|
+
return [GitPullRequestState.Open, GitPullRequestState.Closed, GitPullRequestState.Merged];
|
|
1241
|
+
}
|
|
1242
|
+
}
|
|
1243
|
+
|
|
1244
|
+
/** Maps PR include/state filters to the SDK's `states` input. `undefined`/omitted preserves the open-only default. */
|
|
1245
|
+
export function toProviderPullRequestStates(
|
|
1246
|
+
state: PullRequestStateInput | PullRequestStateInput[] | undefined,
|
|
1247
|
+
): GitPullRequestState[] | undefined {
|
|
1248
|
+
if (state == null) return undefined;
|
|
1249
|
+
|
|
1250
|
+
const states = (Array.isArray(state) ? state : [state]).flatMap(s => toProviderPullRequestStatesCore(s));
|
|
1251
|
+
return states.length > 0 ? [...new Set(states)] : undefined;
|
|
1252
|
+
}
|
|
1253
|
+
|
|
1254
|
+
/** Maps an issue state filter to the SDK's `states` input. `undefined`/omitted preserves the open-only default. */
|
|
1255
|
+
export function toProviderIssueStates(state: IssueStateFilter | undefined): GitIssueState[] | undefined {
|
|
1256
|
+
switch (state) {
|
|
1257
|
+
case 'open':
|
|
1258
|
+
return [GitIssueState.Open];
|
|
1259
|
+
case 'closed':
|
|
1260
|
+
return [GitIssueState.Closed];
|
|
1261
|
+
case 'all':
|
|
1262
|
+
return [GitIssueState.Open, GitIssueState.Closed];
|
|
1263
|
+
default:
|
|
1264
|
+
return undefined;
|
|
1265
|
+
}
|
|
1266
|
+
}
|
|
1267
|
+
|
|
1268
|
+
/**
|
|
1269
|
+
* Resolves a normalized {@link ProviderScope} to the provider-appropriate read inputs, dispatching on the
|
|
1270
|
+
* provider's {@link PagingMode} (the authoritative per-provider scoping selector). Project-mode providers
|
|
1271
|
+
* (Azure issues, Jira) produce `projectInputs` from `org` + `project`; repo/repos-mode providers produce a
|
|
1272
|
+
* repo `GetRepoInput[]` from `scope.repos` (carrying `project` where relevant, e.g. Azure). This is the
|
|
1273
|
+
* single public entry point consumers can use instead of hand-building the three underlying representations.
|
|
1274
|
+
*/
|
|
1275
|
+
export function resolveProviderScope(
|
|
1276
|
+
scope: ProviderScope,
|
|
1277
|
+
pagingMode: PagingMode | undefined,
|
|
1278
|
+
): { reposInput?: GetRepoInput[]; projectInputs?: { namespace: string; project: string }[] } {
|
|
1279
|
+
if (pagingMode === PagingMode.Project) {
|
|
1280
|
+
if (scope.org != null && scope.project != null) {
|
|
1281
|
+
return { projectInputs: [{ namespace: scope.org, project: scope.project }] };
|
|
1282
|
+
}
|
|
1283
|
+
return {};
|
|
1284
|
+
}
|
|
1285
|
+
|
|
1286
|
+
const reposInput = scope.repos?.map(r => ({ namespace: r.owner, name: r.name, project: scope.project }));
|
|
1287
|
+
return { reposInput: reposInput };
|
|
1288
|
+
}
|
|
1289
|
+
|
|
1290
|
+
export function providerPullRequestMatchesSearch(pr: ProviderPullRequest, search: string): boolean {
|
|
1291
|
+
const term = search.trim().toLowerCase();
|
|
1292
|
+
if (term.length === 0) return true;
|
|
1293
|
+
|
|
1294
|
+
return pr.title.toLowerCase().includes(term) || (pr.description?.toLowerCase().includes(term) ?? false);
|
|
1295
|
+
}
|
|
1296
|
+
|
|
1297
|
+
function toProviderRemoteInfo(ref: PullRequestRef | undefined): GitRepositoryRemoteInfo | null {
|
|
1298
|
+
// Match the SDK convention: only populate remoteInfo when both clone URLs are known.
|
|
1299
|
+
return ref?.cloneHttps && ref?.cloneSsh ? { cloneUrlHTTPS: ref.cloneHttps, cloneUrlSSH: ref.cloneSsh } : null;
|
|
1300
|
+
}
|
|
1301
|
+
|
|
832
1302
|
export function toProviderPullRequest(pr: PullRequest): ProviderPullRequest {
|
|
833
1303
|
const prReviews = [...(pr.reviewRequests ?? []), ...(pr.latestReviews ?? [])];
|
|
834
1304
|
return {
|
|
835
1305
|
id: pr.id,
|
|
836
1306
|
graphQLId: pr.nodeId,
|
|
837
|
-
number: Number.parseInt(pr.id, 10),
|
|
1307
|
+
number: pr.number ?? Number.parseInt(pr.id, 10),
|
|
838
1308
|
title: pr.title,
|
|
839
|
-
description: null,
|
|
1309
|
+
description: pr.body ?? null,
|
|
840
1310
|
url: pr.url,
|
|
841
1311
|
state: toProviderPullRequestState(pr.state),
|
|
1312
|
+
isCrossRepository: pr.refs?.isCrossRepository ?? false,
|
|
842
1313
|
isDraft: pr.isDraft ?? false,
|
|
843
1314
|
createdDate: pr.createdDate,
|
|
844
1315
|
updatedDate: pr.updatedDate,
|
|
@@ -871,12 +1342,12 @@ export function toProviderPullRequest(pr: PullRequest): ProviderPullRequest {
|
|
|
871
1342
|
repository:
|
|
872
1343
|
pr.repository != null
|
|
873
1344
|
? {
|
|
874
|
-
id: pr.repository.
|
|
1345
|
+
id: pr.repository.id ?? '',
|
|
875
1346
|
name: pr.repository.repo,
|
|
876
1347
|
owner: {
|
|
877
1348
|
login: pr.repository.owner,
|
|
878
1349
|
},
|
|
879
|
-
remoteInfo:
|
|
1350
|
+
remoteInfo: toProviderRemoteInfo(pr.refs?.base),
|
|
880
1351
|
}
|
|
881
1352
|
: {
|
|
882
1353
|
id: '',
|
|
@@ -894,7 +1365,8 @@ export function toProviderPullRequest(pr: PullRequest): ProviderPullRequest {
|
|
|
894
1365
|
owner: {
|
|
895
1366
|
login: pr.refs.head.owner,
|
|
896
1367
|
},
|
|
897
|
-
remoteInfo:
|
|
1368
|
+
remoteInfo: toProviderRemoteInfo(pr.refs.head),
|
|
1369
|
+
isFork: pr.refs.head.isFork,
|
|
898
1370
|
}
|
|
899
1371
|
: null,
|
|
900
1372
|
headCommit:
|
|
@@ -935,8 +1407,15 @@ export function toProviderPullRequest(pr: PullRequest): ProviderPullRequest {
|
|
|
935
1407
|
export function fromProviderPullRequest(
|
|
936
1408
|
pr: ProviderPullRequest,
|
|
937
1409
|
provider: Provider,
|
|
938
|
-
options?: { project?: IssueProject },
|
|
1410
|
+
options?: { project?: IssueProject; currentAccountId?: string },
|
|
939
1411
|
): PullRequest {
|
|
1412
|
+
const repository = pr.repository;
|
|
1413
|
+
const repositoryName = repository?.name ?? '';
|
|
1414
|
+
const repositoryOwner = repository?.owner?.login ?? '';
|
|
1415
|
+
const repositoryRemoteInfo = repository?.remoteInfo;
|
|
1416
|
+
const headRepository = pr.headRepository;
|
|
1417
|
+
const headRepositoryRemoteInfo = headRepository?.remoteInfo;
|
|
1418
|
+
|
|
940
1419
|
return new PullRequest(
|
|
941
1420
|
provider,
|
|
942
1421
|
fromProviderAccount(pr.author),
|
|
@@ -945,11 +1424,11 @@ export function fromProviderPullRequest(
|
|
|
945
1424
|
pr.title,
|
|
946
1425
|
pr.url ?? '',
|
|
947
1426
|
{
|
|
948
|
-
owner:
|
|
949
|
-
repo:
|
|
1427
|
+
owner: repositoryOwner,
|
|
1428
|
+
repo: repositoryName,
|
|
950
1429
|
// This has to be here until we can take this information from ProviderPullRequest:
|
|
951
1430
|
accessLevel: RepositoryAccessLevel.Write,
|
|
952
|
-
id:
|
|
1431
|
+
id: repository?.id ?? '',
|
|
953
1432
|
},
|
|
954
1433
|
fromProviderPullRequestState(pr.state),
|
|
955
1434
|
pr.createdDate,
|
|
@@ -962,24 +1441,29 @@ export function fromProviderPullRequest(
|
|
|
962
1441
|
base: {
|
|
963
1442
|
branch: pr.baseRef?.name ?? '',
|
|
964
1443
|
sha: pr.baseRef?.oid ?? '',
|
|
965
|
-
repo:
|
|
966
|
-
owner:
|
|
1444
|
+
repo: repositoryName,
|
|
1445
|
+
owner: repositoryOwner,
|
|
967
1446
|
exists: pr.baseRef != null,
|
|
968
|
-
url:
|
|
969
|
-
?
|
|
1447
|
+
url: repositoryRemoteInfo?.cloneUrlHTTPS
|
|
1448
|
+
? repositoryRemoteInfo.cloneUrlHTTPS.replace(gitSuffixRegex, '')
|
|
970
1449
|
: '',
|
|
1450
|
+
cloneHttps: repositoryRemoteInfo?.cloneUrlHTTPS || undefined,
|
|
1451
|
+
cloneSsh: repositoryRemoteInfo?.cloneUrlSSH || undefined,
|
|
971
1452
|
},
|
|
972
1453
|
head: {
|
|
973
1454
|
branch: pr.headRef?.name ?? '',
|
|
974
1455
|
sha: pr.headRef?.oid ?? '',
|
|
975
|
-
repo:
|
|
976
|
-
owner:
|
|
1456
|
+
repo: headRepository?.name ?? '',
|
|
1457
|
+
owner: headRepository?.owner?.login ?? '',
|
|
977
1458
|
exists: pr.headRef != null,
|
|
978
|
-
url:
|
|
979
|
-
?
|
|
1459
|
+
url: headRepositoryRemoteInfo?.cloneUrlHTTPS
|
|
1460
|
+
? headRepositoryRemoteInfo.cloneUrlHTTPS.replace(gitSuffixRegex, '')
|
|
980
1461
|
: '',
|
|
1462
|
+
cloneHttps: headRepositoryRemoteInfo?.cloneUrlHTTPS || undefined,
|
|
1463
|
+
cloneSsh: headRepositoryRemoteInfo?.cloneUrlSSH || undefined,
|
|
1464
|
+
isFork: headRepository?.isFork,
|
|
981
1465
|
},
|
|
982
|
-
isCrossRepository: pr.
|
|
1466
|
+
isCrossRepository: pr.isCrossRepository,
|
|
983
1467
|
},
|
|
984
1468
|
pr.isDraft,
|
|
985
1469
|
pr.additions ?? undefined,
|
|
@@ -995,6 +1479,9 @@ export function fromProviderPullRequest(
|
|
|
995
1479
|
: undefined,
|
|
996
1480
|
options?.project,
|
|
997
1481
|
pr.version,
|
|
1482
|
+
pr.description ?? undefined,
|
|
1483
|
+
pr.number,
|
|
1484
|
+
options?.currentAccountId != null ? pr.author?.id === options.currentAccountId : undefined,
|
|
998
1485
|
);
|
|
999
1486
|
}
|
|
1000
1487
|
|
|
@@ -1003,10 +1490,11 @@ export function fromProviderIssue(
|
|
|
1003
1490
|
integration: Integration,
|
|
1004
1491
|
options?: { project?: IssueProject },
|
|
1005
1492
|
): Issue {
|
|
1493
|
+
const identifier = toIssueIdentifier(issue.number);
|
|
1006
1494
|
return new Issue(
|
|
1007
1495
|
integration,
|
|
1008
|
-
|
|
1009
|
-
issue.graphQLId,
|
|
1496
|
+
identifier,
|
|
1497
|
+
issue.graphQLId ?? issue.id,
|
|
1010
1498
|
issue.title,
|
|
1011
1499
|
issue.url ?? '',
|
|
1012
1500
|
issue.createdDate,
|
|
@@ -1015,9 +1503,15 @@ export function fromProviderIssue(
|
|
|
1015
1503
|
issue.closedDate != null ? 'closed' : 'opened',
|
|
1016
1504
|
fromProviderAccount(issue.author),
|
|
1017
1505
|
issue.assignees?.map(fromProviderAccount) ?? undefined,
|
|
1018
|
-
|
|
1506
|
+
issue.repository != null
|
|
1507
|
+
? {
|
|
1508
|
+
owner: issue.repository.owner.login ?? '',
|
|
1509
|
+
repo: issue.repository.name,
|
|
1510
|
+
id: issue.repository.id,
|
|
1511
|
+
}
|
|
1512
|
+
: undefined,
|
|
1019
1513
|
issue.closedDate ?? undefined,
|
|
1020
|
-
undefined,
|
|
1514
|
+
issue.labels?.map(label => ({ name: label.name, color: label.color ?? undefined })),
|
|
1021
1515
|
issue.commentCount ?? undefined,
|
|
1022
1516
|
issue.upvoteCount ?? undefined,
|
|
1023
1517
|
issue.description ?? undefined,
|
|
@@ -1036,7 +1530,8 @@ export function fromProviderIssue(
|
|
|
1036
1530
|
resourceName: issue.project.namespace,
|
|
1037
1531
|
}
|
|
1038
1532
|
: undefined,
|
|
1039
|
-
|
|
1533
|
+
identifier,
|
|
1534
|
+
issue.type ?? undefined,
|
|
1040
1535
|
);
|
|
1041
1536
|
}
|
|
1042
1537
|
|
|
@@ -1062,9 +1557,19 @@ export function toProviderAccount(account: PullRequestMember | IssueMember): Pro
|
|
|
1062
1557
|
export function fromProviderAccount(account: ProviderAccount | null): PullRequestMember | IssueMember {
|
|
1063
1558
|
return {
|
|
1064
1559
|
id: account?.id ?? '',
|
|
1065
|
-
|
|
1560
|
+
// An absent name stays absent. `'unknown'` was a display fallback invented in the provider layer, and a
|
|
1561
|
+
// consumer couldn't tell it apart from a member genuinely named that — so it couldn't be undone where a
|
|
1562
|
+
// name-shaped placeholder is wrong (rendering an avatar-only chip, or building an AI prompt, where
|
|
1563
|
+
// `Assignees: unknown` reads as a real assignee). It also disagreed with {@link toIssueShape}, which
|
|
1564
|
+
// collapsed the same absent name to `''` — same facade method, two fallbacks. Both now emit `undefined`.
|
|
1565
|
+
name: account?.name ?? undefined,
|
|
1066
1566
|
avatarUrl: account?.avatarUrl ?? undefined,
|
|
1067
|
-
|
|
1567
|
+
// `url` is optional, so an absent one must be `undefined`, not `''`. `''` passes a `!= null` presence
|
|
1568
|
+
// check and renders as a link to nowhere, and it disagreed with {@link toIssueShape} — which already
|
|
1569
|
+
// collapses to `undefined` — even though BOTH mappers feed `listIssuesPage` (the repo-scoped path goes
|
|
1570
|
+
// through `toIssueShape`, Azure's account-wide path through {@link fromProviderIssue}). Same facade
|
|
1571
|
+
// method, two shapes. Matches {@link toProviderRepositoryShape}, which collapses every absent optional.
|
|
1572
|
+
url: account?.url ?? undefined,
|
|
1068
1573
|
};
|
|
1069
1574
|
}
|
|
1070
1575
|
|
|
@@ -1099,7 +1604,10 @@ export function isGitLabDotCom(domain: string | null | undefined): boolean {
|
|
|
1099
1604
|
return equalsIgnoreCase(domain, 'gitlab.com');
|
|
1100
1605
|
}
|
|
1101
1606
|
|
|
1102
|
-
|
|
1607
|
+
// Anchor the `visualstudio.com` alternative on a label boundary (`^` or `.`) rather than `\b`: `\b` treats a
|
|
1608
|
+
// hyphen as a word boundary, so `\bvisualstudio\.com$` matched attacker-controlled hosts like
|
|
1609
|
+
// `evil-visualstudio.com` and classified them as Azure cloud, changing their auth/URL handling.
|
|
1610
|
+
const azureCloudDomainRegex = /^dev\.azure\.com$|(?:^|\.)visualstudio\.com$/i;
|
|
1103
1611
|
export function isAzureCloudDomain(domain: string | undefined): boolean {
|
|
1104
1612
|
return domain != null && azureCloudDomainRegex.test(domain);
|
|
1105
1613
|
}
|