@gitkraken/core-gitlens 0.2.0 → 0.3.0
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 +4 -1
- package/dist/git/cache.d.ts +28 -4
- package/dist/git/cache.d.ts.map +1 -1
- package/dist/git/cache.js +82 -18
- package/dist/git/cache.js.map +1 -1
- package/dist/git/models/commit.d.ts.map +1 -1
- package/dist/git/models/commit.js.map +1 -1
- package/dist/git/models/reference.d.ts +31 -0
- package/dist/git/models/reference.d.ts.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/repository.d.ts +9 -1
- package/dist/git/models/repository.d.ts.map +1 -1
- package/dist/git/models/repository.js +19 -3
- package/dist/git/models/repository.js.map +1 -1
- package/dist/git/models/search.d.ts +2 -2
- package/dist/git/models/search.d.ts.map +1 -1
- package/dist/git/models/worktree.d.ts +4 -1
- package/dist/git/models/worktree.d.ts.map +1 -1
- package/dist/git/models/worktree.js +2 -2
- 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.map +1 -1
- package/dist/git/providers/branches.d.ts +15 -4
- package/dist/git/providers/branches.d.ts.map +1 -1
- package/dist/git/providers/config.d.ts +4 -1
- package/dist/git/providers/config.d.ts.map +1 -1
- package/dist/git/providers/operations.d.ts +33 -10
- package/dist/git/providers/operations.d.ts.map +1 -1
- package/dist/git/providers/pausedOperations.d.ts +3 -1
- package/dist/git/providers/pausedOperations.d.ts.map +1 -1
- package/dist/git/providers/refs.d.ts +23 -2
- package/dist/git/providers/refs.d.ts.map +1 -1
- package/dist/git/providers/staging.d.ts +16 -0
- package/dist/git/providers/staging.d.ts.map +1 -1
- package/dist/git/providers/status.d.ts +4 -1
- package/dist/git/providers/status.d.ts.map +1 -1
- package/dist/git/remotes/azure-devops.d.ts.map +1 -1
- package/dist/git/remotes/azure-devops.js.map +1 -1
- package/dist/git/{exec.types.d.ts → run.types.d.ts} +22 -3
- package/dist/git/run.types.d.ts.map +1 -0
- package/dist/git/run.types.js +2 -0
- package/dist/git/run.types.js.map +1 -0
- package/dist/git/service.d.ts.map +1 -1
- package/dist/git/service.js.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/conflictResolution.utils.d.ts +6 -0
- package/dist/git/utils/conflictResolution.utils.d.ts.map +1 -0
- package/dist/git/utils/conflictResolution.utils.js +25 -0
- package/dist/git/utils/conflictResolution.utils.js.map +1 -0
- package/dist/git/utils/fileStatus.utils.d.ts +2 -1
- package/dist/git/utils/fileStatus.utils.d.ts.map +1 -1
- package/dist/git/utils/fileStatus.utils.js +4 -0
- package/dist/git/utils/fileStatus.utils.js.map +1 -1
- package/dist/git/utils/search.utils.d.ts.map +1 -1
- package/dist/git/utils/search.utils.js +3 -0
- package/dist/git/utils/search.utils.js.map +1 -1
- package/dist/git/utils/sorting.d.ts +8 -0
- package/dist/git/utils/sorting.d.ts.map +1 -1
- package/dist/git/utils/sorting.js +15 -0
- package/dist/git/utils/sorting.js.map +1 -1
- package/dist/git/utils/status.utils.d.ts.map +1 -1
- package/dist/git/utils/status.utils.js.map +1 -1
- package/dist/git/watching/classifyChange.d.ts.map +1 -1
- package/dist/git/watching/classifyChange.js +8 -0
- package/dist/git/watching/classifyChange.js.map +1 -1
- package/dist/git/watching/gitIgnoreFilter.js +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/watchGroup.d.ts.map +1 -1
- package/dist/git/watching/watchGroup.js.map +1 -1
- package/dist/git/watching/watchService.d.ts.map +1 -1
- package/dist/git/watching/watchService.js +24 -4
- package/dist/git/watching/watchService.js.map +1 -1
- package/dist/git/watching/watchSession.d.ts.map +1 -1
- package/dist/git/watching/watchSession.js.map +1 -1
- package/dist/git-cli/exec/exec.types.d.ts +1 -1
- package/dist/git-cli/exec/exec.types.d.ts.map +1 -1
- package/dist/git-cli/exec/git.d.ts +3 -3
- package/dist/git-cli/exec/git.d.ts.map +1 -1
- package/dist/git-cli/exec/git.js.map +1 -1
- package/dist/git-cli/exec/gitQueue.d.ts +10 -2
- package/dist/git-cli/exec/gitQueue.d.ts.map +1 -1
- package/dist/git-cli/exec/gitQueue.js +39 -12
- package/dist/git-cli/exec/gitQueue.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/logParser.js.map +1 -1
- package/dist/git-cli/parsers/refParser.d.ts +3 -30
- package/dist/git-cli/parsers/refParser.d.ts.map +1 -1
- package/dist/git-cli/parsers/refParser.js +30 -30
- package/dist/git-cli/parsers/refParser.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 +15 -5
- package/dist/git-cli/providers/branches.d.ts.map +1 -1
- package/dist/git-cli/providers/branches.js +98 -68
- package/dist/git-cli/providers/branches.js.map +1 -1
- package/dist/git-cli/providers/commits.d.ts.map +1 -1
- package/dist/git-cli/providers/commits.js +74 -30
- package/dist/git-cli/providers/commits.js.map +1 -1
- package/dist/git-cli/providers/config.d.ts +11 -2
- package/dist/git-cli/providers/config.d.ts.map +1 -1
- package/dist/git-cli/providers/config.js +27 -2
- package/dist/git-cli/providers/config.js.map +1 -1
- package/dist/git-cli/providers/diff.d.ts.map +1 -1
- package/dist/git-cli/providers/diff.js +4 -2
- package/dist/git-cli/providers/diff.js.map +1 -1
- package/dist/git-cli/providers/graph.d.ts.map +1 -1
- package/dist/git-cli/providers/graph.js +7 -2
- package/dist/git-cli/providers/graph.js.map +1 -1
- package/dist/git-cli/providers/operations.d.ts +13 -11
- package/dist/git-cli/providers/operations.d.ts.map +1 -1
- package/dist/git-cli/providers/operations.js +108 -38
- 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 +3 -1
- package/dist/git-cli/providers/pausedOperations.d.ts.map +1 -1
- package/dist/git-cli/providers/pausedOperations.js +7 -1
- package/dist/git-cli/providers/pausedOperations.js.map +1 -1
- package/dist/git-cli/providers/refs.d.ts +19 -2
- package/dist/git-cli/providers/refs.d.ts.map +1 -1
- package/dist/git-cli/providers/refs.js +286 -2
- package/dist/git-cli/providers/refs.js.map +1 -1
- package/dist/git-cli/providers/revision.js.map +1 -1
- package/dist/git-cli/providers/staging.d.ts +6 -0
- package/dist/git-cli/providers/staging.d.ts.map +1 -1
- package/dist/git-cli/providers/staging.js +32 -0
- package/dist/git-cli/providers/staging.js.map +1 -1
- package/dist/git-cli/providers/status.d.ts +4 -1
- package/dist/git-cli/providers/status.d.ts.map +1 -1
- package/dist/git-cli/providers/status.js +4 -3
- 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 +10 -6
- package/dist/git-cli/providers/tags.js.map +1 -1
- package/dist/ipc/discovery.d.ts +27 -0
- package/dist/ipc/discovery.d.ts.map +1 -0
- package/dist/ipc/discovery.js +38 -0
- package/dist/ipc/discovery.js.map +1 -0
- package/dist/ipc/ipcServer.d.ts +20 -0
- package/dist/ipc/ipcServer.d.ts.map +1 -0
- package/dist/ipc/ipcServer.js +162 -0
- package/dist/ipc/ipcServer.js.map +1 -0
- package/dist/plus/agents/providers/claudeCodeProvider.d.ts +114 -0
- package/dist/plus/agents/providers/claudeCodeProvider.d.ts.map +1 -0
- package/dist/plus/agents/providers/claudeCodeProvider.js +1480 -0
- package/dist/plus/agents/providers/claudeCodeProvider.js.map +1 -0
- package/dist/plus/agents/providers/claudeCodeTranscript.d.ts +36 -0
- package/dist/plus/agents/providers/claudeCodeTranscript.d.ts.map +1 -0
- package/dist/plus/agents/providers/claudeCodeTranscript.js +171 -0
- package/dist/plus/agents/providers/claudeCodeTranscript.js.map +1 -0
- package/dist/plus/agents/sanitizePrompt.d.ts +15 -0
- package/dist/plus/agents/sanitizePrompt.d.ts.map +1 -0
- package/dist/plus/agents/sanitizePrompt.js +103 -0
- package/dist/plus/agents/sanitizePrompt.js.map +1 -0
- package/dist/plus/agents/stateMachine.d.ts +32 -0
- package/dist/plus/agents/stateMachine.d.ts.map +1 -0
- package/dist/plus/agents/stateMachine.js +180 -0
- package/dist/plus/agents/stateMachine.js.map +1 -0
- package/dist/plus/agents/types.d.ts +203 -0
- package/dist/plus/agents/types.d.ts.map +1 -0
- package/dist/plus/agents/types.js +49 -0
- package/dist/plus/agents/types.js.map +1 -0
- package/dist/plus/ai/errors.d.ts +4 -1
- package/dist/plus/ai/errors.d.ts.map +1 -1
- package/dist/plus/ai/errors.js +38 -0
- package/dist/plus/ai/errors.js.map +1 -1
- package/dist/plus/ai/models/promptTemplates.d.ts +11 -2
- package/dist/plus/ai/models/promptTemplates.d.ts.map +1 -1
- package/dist/plus/ai/prompts.d.ts +1 -0
- package/dist/plus/ai/prompts.d.ts.map +1 -1
- package/dist/plus/ai/prompts.js +48 -8
- package/dist/plus/ai/prompts.js.map +1 -1
- package/dist/plus/ai/utils/results.utils.d.ts.map +1 -1
- package/dist/plus/ai/utils/results.utils.js.map +1 -1
- package/dist/plus/git-github/api/github.d.ts +10 -1
- package/dist/plus/git-github/api/github.d.ts.map +1 -1
- package/dist/plus/git-github/api/github.js +156 -49
- package/dist/plus/git-github/api/github.js.map +1 -1
- package/dist/plus/git-github/api/types.d.ts +8 -0
- package/dist/plus/git-github/api/types.d.ts.map +1 -1
- package/dist/plus/git-github/models.d.ts +1 -1
- package/dist/plus/git-github/models.d.ts.map +1 -1
- 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 +5 -1
- package/dist/plus/git-github/providers/github/branches.d.ts.map +1 -1
- package/dist/plus/git-github/providers/github/branches.js +47 -24
- 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 +144 -92
- package/dist/plus/git-github/providers/github/commits.js.map +1 -1
- package/dist/plus/git-github/providers/github/diff.d.ts +1 -1
- package/dist/plus/git-github/providers/github/diff.d.ts.map +1 -1
- package/dist/plus/git-github/providers/github/diff.js +23 -9
- package/dist/plus/git-github/providers/github/diff.js.map +1 -1
- package/dist/plus/git-github/providers/github/refs.d.ts +9 -1
- package/dist/plus/git-github/providers/github/refs.d.ts.map +1 -1
- package/dist/plus/git-github/providers/github/refs.js +38 -13
- package/dist/plus/git-github/providers/github/refs.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 +1 -2
- package/dist/plus/git-github/providers/github/revision.js.map +1 -1
- package/dist/plus/git-github/providers/github/status.d.ts +4 -1
- package/dist/plus/git-github/providers/github/status.d.ts.map +1 -1
- package/dist/plus/git-github/providers/github/status.js +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 +35 -36
- 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/utils/color.d.ts.map +1 -1
- package/dist/utils/color.js.map +1 -1
- package/dist/utils/decorators/serializable.d.ts.map +1 -1
- package/dist/utils/decorators/serializable.js.map +1 -1
- package/dist/utils/dedupedAsyncCache.d.ts +37 -0
- package/dist/utils/dedupedAsyncCache.d.ts.map +1 -0
- package/dist/utils/dedupedAsyncCache.js +68 -0
- package/dist/utils/dedupedAsyncCache.js.map +1 -0
- package/dist/utils/diff.d.ts +2 -0
- package/dist/utils/diff.d.ts.map +1 -0
- package/dist/utils/diff.js +53 -0
- package/dist/utils/diff.js.map +1 -0
- package/dist/utils/disposable.d.ts.map +1 -1
- package/dist/utils/disposable.js.map +1 -1
- package/dist/utils/env/node/exec.d.ts.map +1 -1
- package/dist/utils/env/node/exec.js.map +1 -1
- package/dist/utils/error.d.ts.map +1 -1
- package/dist/utils/error.js.map +1 -1
- package/dist/utils/iterable.d.ts.map +1 -1
- package/dist/utils/iterable.js.map +1 -1
- package/dist/utils/logger.d.ts.map +1 -1
- package/dist/utils/logger.js.map +1 -1
- package/dist/utils/lruMap.d.ts +9 -0
- package/dist/utils/lruMap.d.ts.map +1 -1
- package/dist/utils/lruMap.js +26 -4
- package/dist/utils/lruMap.js.map +1 -1
- package/dist/utils/markdown.d.ts.map +1 -1
- package/dist/utils/markdown.js.map +1 -1
- package/dist/utils/mru.d.ts.map +1 -1
- package/dist/utils/mru.js.map +1 -1
- package/dist/utils/path.d.ts.map +1 -1
- package/dist/utils/path.js.map +1 -1
- package/dist/utils/promise.d.ts +1 -0
- package/dist/utils/promise.d.ts.map +1 -1
- package/dist/utils/promise.js +17 -0
- package/dist/utils/promise.js.map +1 -1
- package/dist/utils/promiseCache.d.ts +10 -0
- package/dist/utils/promiseCache.d.ts.map +1 -1
- package/dist/utils/promiseCache.js +22 -0
- package/dist/utils/promiseCache.js.map +1 -1
- package/dist/utils/string.d.ts.map +1 -1
- package/dist/utils/string.js.map +1 -1
- package/dist/utils/uri.d.ts.map +1 -1
- package/dist/utils/uri.js.map +1 -1
- package/dist/utils/version.d.ts.map +1 -1
- package/dist/utils/version.js.map +1 -1
- package/package.json +13 -1
- package/src/git/cache.ts +142 -28
- package/src/git/models/commit.ts +1 -0
- package/src/git/models/reference.ts +33 -0
- package/src/git/models/remote.ts +1 -0
- package/src/git/models/repository.ts +21 -3
- package/src/git/models/search.ts +2 -2
- package/src/git/models/worktree.ts +10 -2
- package/src/git/parsers/diffParser.ts +2 -0
- package/src/git/providers/branches.ts +22 -4
- package/src/git/providers/config.ts +2 -0
- package/src/git/providers/operations.ts +44 -0
- package/src/git/providers/pausedOperations.ts +1 -0
- package/src/git/providers/refs.ts +32 -3
- package/src/git/providers/staging.ts +12 -0
- package/src/git/providers/status.ts +6 -1
- package/src/git/remotes/azure-devops.ts +2 -0
- package/src/git/{exec.types.ts → run.types.ts} +22 -2
- package/src/git/service.ts +1 -0
- package/src/git/utils/autolink.utils.ts +1 -0
- package/src/git/utils/blame.utils.ts +2 -0
- package/src/git/utils/conflictResolution.utils.ts +31 -0
- package/src/git/utils/fileStatus.utils.ts +7 -1
- package/src/git/utils/search.utils.ts +2 -0
- package/src/git/utils/sorting.ts +17 -0
- package/src/git/utils/status.utils.ts +1 -0
- package/src/git/watching/classifyChange.ts +9 -0
- package/src/git/watching/gitIgnoreFilter.ts +2 -2
- package/src/git/watching/initWatcher.ts +2 -0
- package/src/git/watching/watchGroup.ts +3 -0
- package/src/git/watching/watchService.ts +38 -5
- package/src/git/watching/watchSession.ts +10 -0
- package/src/git-cli/exec/exec.types.ts +2 -2
- package/src/git-cli/exec/git.ts +6 -5
- package/src/git-cli/exec/gitQueue.ts +41 -12
- package/src/git-cli/parsers/blameParser.ts +1 -0
- package/src/git-cli/parsers/logParser.ts +1 -0
- package/src/git-cli/parsers/refParser.ts +33 -34
- package/src/git-cli/providers/blame.ts +1 -0
- package/src/git-cli/providers/branches.ts +164 -93
- package/src/git-cli/providers/commits.ts +83 -37
- package/src/git-cli/providers/config.ts +41 -2
- package/src/git-cli/providers/diff.ts +8 -2
- package/src/git-cli/providers/graph.ts +11 -2
- package/src/git-cli/providers/operations.ts +186 -49
- package/src/git-cli/providers/patch.ts +1 -0
- package/src/git-cli/providers/pausedOperations.ts +8 -0
- package/src/git-cli/providers/refs.ts +247 -3
- package/src/git-cli/providers/revision.ts +2 -2
- package/src/git-cli/providers/staging.ts +33 -0
- package/src/git-cli/providers/status.ts +15 -4
- package/src/git-cli/providers/tags.ts +15 -16
- package/src/ipc/discovery.ts +56 -0
- package/src/ipc/ipcServer.ts +171 -0
- package/src/plus/agents/providers/claudeCodeProvider.ts +1782 -0
- package/src/plus/agents/providers/claudeCodeTranscript.ts +214 -0
- package/src/plus/agents/sanitizePrompt.ts +109 -0
- package/src/plus/agents/stateMachine.ts +197 -0
- package/src/plus/agents/types.ts +277 -0
- package/src/plus/ai/errors.ts +40 -0
- package/src/plus/ai/models/promptTemplates.ts +13 -0
- package/src/plus/ai/prompts.ts +49 -8
- package/src/plus/ai/utils/results.utils.ts +2 -0
- package/src/plus/git-github/api/github.ts +199 -53
- package/src/plus/git-github/api/types.ts +15 -0
- package/src/plus/git-github/models.ts +1 -1
- package/src/plus/git-github/providers/github/blame.ts +2 -0
- package/src/plus/git-github/providers/github/branches.ts +61 -31
- package/src/plus/git-github/providers/github/commits.ts +231 -160
- package/src/plus/git-github/providers/github/diff.ts +27 -19
- package/src/plus/git-github/providers/github/refs.ts +57 -22
- package/src/plus/git-github/providers/github/revision.ts +1 -2
- package/src/plus/git-github/providers/github/status.ts +6 -1
- package/src/plus/git-github/providers/github/tags.ts +61 -62
- package/src/plus/git-github/providers/githubGitProvider.ts +1 -0
- package/src/utils/color.ts +2 -0
- package/src/utils/decorators/serializable.ts +1 -0
- package/src/utils/dedupedAsyncCache.ts +74 -0
- package/src/utils/diff.ts +61 -0
- package/src/utils/disposable.ts +2 -0
- package/src/utils/env/node/exec.ts +2 -0
- package/src/utils/error.ts +1 -0
- package/src/utils/iterable.ts +3 -0
- package/src/utils/logger.ts +1 -0
- package/src/utils/lruMap.ts +29 -4
- package/src/utils/markdown.ts +1 -0
- package/src/utils/mru.ts +2 -0
- package/src/utils/path.ts +1 -0
- package/src/utils/promise.ts +22 -0
- package/src/utils/promiseCache.ts +24 -0
- package/src/utils/string.ts +2 -0
- package/src/utils/uri.ts +1 -0
- package/src/utils/version.ts +1 -0
- package/dist/git/exec.types.d.ts.map +0 -1
- package/dist/git/exec.types.js +0 -2
- package/dist/git/exec.types.js.map +0 -1
package/dist/plus/ai/prompts.js
CHANGED
|
@@ -341,7 +341,7 @@ Available search operators:
|
|
|
341
341
|
- 'commit:' - Search by a specific commit SHA (e.g. 'commit:4ce3a')
|
|
342
342
|
- 'file:' - Search by file path (e.g. 'file:"package.json"', 'file:"*.ts"'); maps to \`git log -- <value>\`
|
|
343
343
|
- 'change:' - Search by specific code changes using regular expressions (e.g. 'change:"function.*auth"', 'change:"import.*react"'); maps to \`git log -G<value>\`
|
|
344
|
-
- 'type:' - Search by type -- supports stash and
|
|
344
|
+
- 'type:' - Search by type -- supports stash, tip, and wip (e.g. 'type:stash', 'type:tip', 'type:wip'). Use 'type:wip' for queries about work in progress, uncommitted changes, or pending changes across worktrees.
|
|
345
345
|
- 'ref:' - Search for commits reachable by a reference (branch, tag, commit) or reference range. Supports single refs (e.g. 'ref:main', 'ref:v1.0'), two-dot ranges (e.g. 'ref:main..feature' for commits in feature but not in main), three-dot ranges (e.g. 'ref:main...feature' for symmetric difference), and relative refs (e.g. 'ref:HEAD~5..HEAD'); maps to \`git log <ref>\`
|
|
346
346
|
- 'after:' - Search for commits after a certain date or range (e.g. 'after:2023-01-01', 'after:"6 months ago"', 'after:"last Tuesday"', 'after:"noon"', 'after:"1 month 2 days ago"'); maps to \`git log --since=<value>\`
|
|
347
347
|
- 'before:' - Search for commits before a certain date or range (e.g. 'before:2023-01-01', 'before:"6 months ago"', 'before:"yesterday"', 'before:"3PM GMT"'); maps to \`git log --until=<value>\`
|
|
@@ -516,10 +516,14 @@ Now, proceed with your analysis and provide a comprehensive review of the PR. Re
|
|
|
516
516
|
};
|
|
517
517
|
export const reviewChanges = {
|
|
518
518
|
id: 'review-changes',
|
|
519
|
-
variables: ['diff', 'message', 'instructions'],
|
|
519
|
+
variables: ['diff', 'message', 'context', 'instructions'],
|
|
520
520
|
template: `You are an expert code reviewer analyzing a set of code changes. Your goal is to identify meaningful issues — bugs, logic errors, security vulnerabilities, missing error handling, and potential regressions — while ignoring style preferences and linter-level concerns. Focus on problems a careful human reviewer would catch.
|
|
521
521
|
|
|
522
|
-
Examine the following code changes in Git diff format:
|
|
522
|
+
Examine the following code changes in Git diff format. Each non-header line inside a hunk has been annotated with its 1-based new-file line number in a \`[NNNNN]\` block placed immediately after the line-type marker (\` \`, \`+\`, or \`-\`):
|
|
523
|
+
\` [ 42] context line\` // context: exists in both old and new; number = new-file line
|
|
524
|
+
\`+[ 43] added line\` // added: only in new file; number = new-file line
|
|
525
|
+
\`-[ ] removed line\` // removed: not in new file; brackets are blank
|
|
526
|
+
\`@@ -10,5 +12,7 @@ ...\` // hunk header (no annotation; ignore for line citing)
|
|
523
527
|
<~~diff~~>
|
|
524
528
|
\${diff}
|
|
525
529
|
</~~diff~~>
|
|
@@ -529,6 +533,9 @@ Author's description of the changes:
|
|
|
529
533
|
\${message}
|
|
530
534
|
</~~message~~>
|
|
531
535
|
|
|
536
|
+
Related work items (known pull requests and issues for this change set). Use these for *intent*: what the change is trying to accomplish. They are not authoritative spec — if a finding contradicts the stated intent, flag it rather than defer to it. May be empty.
|
|
537
|
+
\${context}
|
|
538
|
+
|
|
532
539
|
Produce a structured review in the following XML format. Include ONLY the XML tags described — no other text:
|
|
533
540
|
|
|
534
541
|
<overview>
|
|
@@ -552,7 +559,7 @@ Guidelines:
|
|
|
552
559
|
- Group related findings into focus areas by theme, not by file
|
|
553
560
|
- If changes look correct and well-structured, say so in the overview and include zero focus areas
|
|
554
561
|
- 3-5 high-quality findings are better than 15 low-quality ones
|
|
555
|
-
-
|
|
562
|
+
- For \`lines="start-end"\`, copy the numbers from the \`[NNNNN]\` annotations of the specific lines your finding concerns. Do not count, infer, or estimate — use only the annotated numbers. Removed lines (blank brackets \`[ ]\`) cannot be cited; pick the nearest surrounding new-file line instead. Anchor the range tightly to the lines the finding actually concerns; do not span an entire hunk.
|
|
556
563
|
- Do not flag style issues, naming preferences, or things a linter would catch
|
|
557
564
|
- Base conclusions only on the code shown — do not speculate about unseen code
|
|
558
565
|
|
|
@@ -562,7 +569,7 @@ Review the changes and produce the structured XML output above.`,
|
|
|
562
569
|
};
|
|
563
570
|
export const reviewOverview = {
|
|
564
571
|
id: 'review-overview',
|
|
565
|
-
variables: ['files', 'message', 'instructions'],
|
|
572
|
+
variables: ['files', 'message', 'context', 'instructions'],
|
|
566
573
|
template: `You are an expert code reviewer performing an initial assessment of a set of code changes. You are given a file manifest (not full diffs) — use the file paths, change types, and line counts to identify which areas deserve closer inspection.
|
|
567
574
|
|
|
568
575
|
File manifest (JSON array of changed files):
|
|
@@ -575,6 +582,9 @@ Author's description of the changes:
|
|
|
575
582
|
\${message}
|
|
576
583
|
</~~message~~>
|
|
577
584
|
|
|
585
|
+
Related work items (known pull requests and issues for this change set). Use these for *intent* — what the change is trying to accomplish — when ranking which areas deserve closer review. May be empty.
|
|
586
|
+
\${context}
|
|
587
|
+
|
|
578
588
|
Produce a structured assessment in the following XML format. Include ONLY the XML tags described — no other text:
|
|
579
589
|
|
|
580
590
|
<overview>
|
|
@@ -598,9 +608,32 @@ Guidelines:
|
|
|
598
608
|
|
|
599
609
|
Assess the changes and produce the structured XML output above.`,
|
|
600
610
|
};
|
|
611
|
+
export const addressReviewFindings = {
|
|
612
|
+
id: 'address-review-findings',
|
|
613
|
+
variables: ['reviewMarkdown', 'scopeLabel', 'granularity', 'instructions'],
|
|
614
|
+
template: `You are an AI coding agent tasked with addressing the issues identified in a code review. Your goal is to understand each finding and, where appropriate, propose or make the code changes needed to fix it.
|
|
615
|
+
|
|
616
|
+
The review was performed against: \${scopeLabel}
|
|
617
|
+
|
|
618
|
+
The findings are provided as structured markdown below. Each finding includes a severity (\`**[CRITICAL]**\`, \`**[WARNING]**\`, or \`**[SUGGESTION]**\`), a short title, a description of the problem, and (when available) a file path and line range. Focus areas group related findings and include a rationale explaining why they matter.
|
|
619
|
+
|
|
620
|
+
<review>
|
|
621
|
+
\${reviewMarkdown}
|
|
622
|
+
</review>
|
|
623
|
+
|
|
624
|
+
Guidelines:
|
|
625
|
+
- Treat the findings as a working list. Prioritize critical issues, then warnings, then suggestions.
|
|
626
|
+
- For each finding, locate the referenced file(s) in the workspace before proposing a fix. If the file or line range no longer matches the review (the code may have evolved), reconcile against the current state.
|
|
627
|
+
- When making code changes, address the underlying problem the finding describes — do not just paper over symptoms.
|
|
628
|
+
- Prefer minimal, focused edits that don't introduce unrelated changes.
|
|
629
|
+
- If a finding is ambiguous, contradicts the surrounding code's intent, or is already addressed in the current state, say so explicitly rather than fabricating a fix.
|
|
630
|
+
- If a finding is out of scope (touches unrelated systems, requires significant refactoring, or contradicts established patterns), surface that as a tradeoff rather than acting on it.
|
|
631
|
+
|
|
632
|
+
\${instructions}`,
|
|
633
|
+
};
|
|
601
634
|
export const reviewDetail = {
|
|
602
635
|
id: 'review-detail',
|
|
603
|
-
variables: ['diff', 'overview', 'message', 'focusArea', 'instructions'],
|
|
636
|
+
variables: ['diff', 'overview', 'message', 'focusArea', 'context', 'instructions'],
|
|
604
637
|
template: `You are an expert code reviewer performing a detailed inspection of specific files that were flagged for closer review. You have the context from an initial overview assessment.
|
|
605
638
|
|
|
606
639
|
Initial overview of the full changeset:
|
|
@@ -615,7 +648,14 @@ Author's description of the changes:
|
|
|
615
648
|
\${message}
|
|
616
649
|
</~~message~~>
|
|
617
650
|
|
|
618
|
-
|
|
651
|
+
Related work items (known pull requests and issues for this change set). Use these for *intent* — what the change is trying to accomplish. They are not authoritative spec; if a finding contradicts the stated intent, flag it. May be empty.
|
|
652
|
+
\${context}
|
|
653
|
+
|
|
654
|
+
Code changes for the files in this focus area (Git diff format). Each non-header line inside a hunk has been annotated with its 1-based new-file line number in a \`[NNNNN]\` block placed immediately after the line-type marker (\` \`, \`+\`, or \`-\`):
|
|
655
|
+
\` [ 42] context line\` // context: exists in both old and new; number = new-file line
|
|
656
|
+
\`+[ 43] added line\` // added: only in new file; number = new-file line
|
|
657
|
+
\`-[ ] removed line\` // removed: not in new file; brackets are blank
|
|
658
|
+
\`@@ -10,5 +12,7 @@ ...\` // hunk header (no annotation; ignore for line citing)
|
|
619
659
|
<~~diff~~>
|
|
620
660
|
\${diff}
|
|
621
661
|
</~~diff~~>
|
|
@@ -631,7 +671,7 @@ Produce detailed findings in the following XML format. Include ONLY the XML tags
|
|
|
631
671
|
|
|
632
672
|
Guidelines:
|
|
633
673
|
- Severity: "critical" = bugs, security, data loss; "warning" = logic concerns, error handling, regressions; "suggestion" = improvements, maintainability
|
|
634
|
-
-
|
|
674
|
+
- For \`lines="start-end"\`, copy the numbers from the \`[NNNNN]\` annotations of the specific lines your finding concerns. Do not count, infer, or estimate — use only the annotated numbers. Removed lines (blank brackets \`[ ]\`) cannot be cited; pick the nearest surrounding new-file line instead. Anchor the range tightly to the lines the finding actually concerns; do not span an entire hunk.
|
|
635
675
|
- Be concrete — explain what the problem is and how to fix it
|
|
636
676
|
- If the code in this area looks correct, return an empty <findings></findings> block
|
|
637
677
|
- Do not flag style issues or things a linter would catch
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompts.js","sourceRoot":"","sources":["../../../src/plus/ai/prompts.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,qBAAqB,GAA6C;IAC9E,EAAE,EAAE,2BAA2B;IAC/B,SAAS,EAAE,CAAC,MAAM,EAAE,SAAS,EAAE,cAAc,CAAC;IAC9C,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4IA6CiI;CAC3I,CAAC;AAEF,MAAM,CAAC,MAAM,yBAAyB,GAAkD;IACvF,EAAE,EAAE,gCAAgC;IACpC,SAAS,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,cAAc,CAAC;IACtD,QAAQ,EAAE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C;IAChE,EAAE,EAAE,iBAAiB;IACrB,SAAS,EAAE,CAAC,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,cAAc,CAAC;IAC1D,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gEAoCqD;CAC/D,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAA8C;IAC/E,EAAE,EAAE,yBAAyB;IAC7B,SAAS,EAAE,CAAC,gBAAgB,EAAE,YAAY,EAAE,aAAa,EAAE,cAAc,CAAC;IAC1E,QAAQ,EAAE;;;;;;;;;;;;;;;;;;iBAkBM;CAChB,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAoC;IAC5D,EAAE,EAAE,eAAe;IACnB,SAAS,EAAE,CAAC,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,SAAS,EAAE,cAAc,CAAC;IAClF,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oFA4CyE;CACnF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"results.utils.d.ts","sourceRoot":"","sources":["../../src/utils/results.utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,oBAAoB,EAGpB,cAAc,EAEd,MAAM,sBAAsB,CAAC;AAM9B,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG;IAAE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAkCxG;AAED,wBAAgB,8BAA8B,CAAC,OAAO,EAAE,MAAM,GAAG;IAAE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CASnH;
|
|
1
|
+
{"version":3,"file":"results.utils.d.ts","sourceRoot":"","sources":["../../src/utils/results.utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,E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AM,CAAC;IACtE,MAAM,QAAQ,GAAG,aAAa,CAAC,aAAa,EAAE,WAAW,CAAC,CAAC;IAE3D,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC;AAC/B,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Endpoints } from '@octokit/types';
|
|
1
2
|
import type { Account, UnidentifiedAuthor } from '../../../git/models/author.js';
|
|
2
3
|
import type { DefaultBranch } from '../../../git/models/defaultBranch.js';
|
|
3
4
|
import type { Issue, IssueShape } from '../../../git/models/issue.js';
|
|
@@ -11,7 +12,6 @@ import type { GitUser } from '../../../git/models/user.js';
|
|
|
11
12
|
import type { RepositoryVisibility } from '../../../git/providers/types.js';
|
|
12
13
|
import type { Event } from '../../../utils/event.js';
|
|
13
14
|
import type { PagedResult } from '../../../utils/paging.js';
|
|
14
|
-
import type { Endpoints } from '@octokit/types';
|
|
15
15
|
import type { GitHubBlame, GitHubBranch, GitHubCommit, GitHubCommitRef, GitHubContributor, GitHubPagedResult, GitHubPullRequestState, GitHubTag } from '../models.js';
|
|
16
16
|
import type { GitHubApiConfig } from './config.js';
|
|
17
17
|
import type { GitHubTokenInfo } from './token.js';
|
|
@@ -95,6 +95,14 @@ export declare class GitHubApi {
|
|
|
95
95
|
}): Promise<PagedResult<GitHubCommit> & {
|
|
96
96
|
viewer?: string;
|
|
97
97
|
}>;
|
|
98
|
+
getCommitShas(token: GitHubTokenInfo, owner: string, repo: string, ref: string, options?: {
|
|
99
|
+
after?: string;
|
|
100
|
+
before?: string;
|
|
101
|
+
limit?: number;
|
|
102
|
+
path?: string;
|
|
103
|
+
since?: string | Date;
|
|
104
|
+
until?: string | Date;
|
|
105
|
+
}): Promise<PagedResult<string>>;
|
|
98
106
|
private getCommitsCoreRange;
|
|
99
107
|
private getCommitsCoreSingle;
|
|
100
108
|
getCommitRefs(token: GitHubTokenInfo, owner: string, repo: string, ref: string, options?: {
|
|
@@ -138,6 +146,7 @@ export declare class GitHubApi {
|
|
|
138
146
|
}> | undefined>;
|
|
139
147
|
private _enterpriseVersions;
|
|
140
148
|
private getEnterpriseVersion;
|
|
149
|
+
private readonly _pendingGraphQL;
|
|
141
150
|
private graphql;
|
|
142
151
|
private request;
|
|
143
152
|
private _defaults;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"github.d.ts","sourceRoot":"","sources":["../../src/api/github.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"github.d.ts","sourceRoot":"","sources":["../../src/api/github.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAqB,MAAM,gBAAgB,CAAC;AAQnE,OAAO,KAAK,EAAE,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACjF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AAC1E,OAAO,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2CAA2C,CAAC;AACpF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AACtE,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAC5E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uCAAuC,CAAC;AACtE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2CAA2C,CAAC;AACpF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACxE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAW5E,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAMrD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAK5D,OAAO,KAAK,EACX,WAAW,EAEX,YAAY,EACZ,YAAY,EAC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AAC,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAA;KAAE,EACrG,YAAY,CAAC,EAAE,iBAAiB,GAC9B,OAAO,CAAC,WAAW,EAAE,CAAC;IA+DnB,gBAAgB,CACrB,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,eAAe,EACtB,MAAM,EAAE,MAAM,EACd,iBAAiB,EAAE,MAAM,EACzB,OAAO,CAAC,EAAE;QAAE,WAAW,CAAC,EAAE,sBAAsB,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,EACpE,YAAY,CAAC,EAAE,iBAAiB,GAC9B,OAAO,CAAC,OAAO,CAAC;CAwDnB"}
|
|
@@ -4,6 +4,9 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
+
import { graphql, GraphqlResponseError } from '@octokit/graphql';
|
|
8
|
+
import { request } from '@octokit/request';
|
|
9
|
+
import { RequestError } from '@octokit/request-error';
|
|
7
10
|
import { AuthenticationError, AuthenticationErrorReason, RequestClientError, RequestNotFoundError, RequestRateLimitError, } from '../../../git/errors.js';
|
|
8
11
|
import { PullRequestMergeMethod } from '../../../git/models/pullRequest.js';
|
|
9
12
|
import { getGitHubNoReplyAddressParts } from '../../../git/remotes/github.js';
|
|
@@ -18,9 +21,6 @@ import { getScopedLogger } from '../../../utils/logger.scoped.js';
|
|
|
18
21
|
import { maybeStopWatch } from '../../../utils/stopwatch.js';
|
|
19
22
|
import { parseUri } from '../../../utils/uri.js';
|
|
20
23
|
import { fromString, satisfies } from '../../../utils/version.js';
|
|
21
|
-
import { graphql, GraphqlResponseError } from '@octokit/graphql';
|
|
22
|
-
import { request } from '@octokit/request';
|
|
23
|
-
import { RequestError } from '@octokit/request-error';
|
|
24
24
|
import { fromGitHubIssue, fromGitHubIssueOrPullRequestState, fromGitHubPullRequest, fromGitHubPullRequestLite, } from '../models.js';
|
|
25
25
|
const emptyPagedResult = Object.freeze({ values: [] });
|
|
26
26
|
const emptyBlameResult = Object.freeze({ ranges: [] });
|
|
@@ -70,7 +70,7 @@ repository {
|
|
|
70
70
|
const gqlPullRequestFragment = `
|
|
71
71
|
${gqlPullRequestLiteFragment}
|
|
72
72
|
additions
|
|
73
|
-
assignees(first:
|
|
73
|
+
assignees(first: 25) {
|
|
74
74
|
nodes {
|
|
75
75
|
login
|
|
76
76
|
avatarUrl(size: $avatarSize)
|
|
@@ -84,7 +84,7 @@ mergedBy {
|
|
|
84
84
|
login
|
|
85
85
|
}
|
|
86
86
|
reviewDecision
|
|
87
|
-
latestReviews(first:
|
|
87
|
+
latestReviews(first: 25) {
|
|
88
88
|
nodes {
|
|
89
89
|
author {
|
|
90
90
|
login
|
|
@@ -94,7 +94,7 @@ latestReviews(first: 10) {
|
|
|
94
94
|
state
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
|
-
reviewRequests(first:
|
|
97
|
+
reviewRequests(first: 25) {
|
|
98
98
|
nodes {
|
|
99
99
|
asCodeOwner
|
|
100
100
|
id
|
|
@@ -136,7 +136,7 @@ author {
|
|
|
136
136
|
comments {
|
|
137
137
|
totalCount
|
|
138
138
|
}
|
|
139
|
-
labels(first:
|
|
139
|
+
labels(first: 50) {
|
|
140
140
|
nodes {
|
|
141
141
|
color
|
|
142
142
|
name
|
|
@@ -627,7 +627,7 @@ export class GitHubApi {
|
|
|
627
627
|
endingLine
|
|
628
628
|
commit {
|
|
629
629
|
oid
|
|
630
|
-
parents(first:
|
|
630
|
+
parents(first: 8) { nodes { oid } }
|
|
631
631
|
message
|
|
632
632
|
additions
|
|
633
633
|
changedFiles
|
|
@@ -787,7 +787,7 @@ export class GitHubApi {
|
|
|
787
787
|
$until: GitTimestamp!
|
|
788
788
|
) {
|
|
789
789
|
repository(owner: $owner, name: $repo) {
|
|
790
|
-
refs(first:
|
|
790
|
+
refs(first: 100, refPrefix: "refs/heads/") {
|
|
791
791
|
nodes {
|
|
792
792
|
name
|
|
793
793
|
target {
|
|
@@ -945,7 +945,7 @@ export class GitHubApi {
|
|
|
945
945
|
... on Commit {
|
|
946
946
|
oid
|
|
947
947
|
message
|
|
948
|
-
parents(first:
|
|
948
|
+
parents(first: 8) { nodes { oid } }
|
|
949
949
|
additions
|
|
950
950
|
changedFiles
|
|
951
951
|
deletions
|
|
@@ -1013,6 +1013,68 @@ export class GitHubApi {
|
|
|
1013
1013
|
throw this.handleException(ex, undefined, scope);
|
|
1014
1014
|
}
|
|
1015
1015
|
}
|
|
1016
|
+
async getCommitShas(token, owner, repo, ref, options) {
|
|
1017
|
+
const scope = getScopedLogger();
|
|
1018
|
+
try {
|
|
1019
|
+
const query = `query getCommitShas(
|
|
1020
|
+
$owner: String!
|
|
1021
|
+
$repo: String!
|
|
1022
|
+
$ref: String!
|
|
1023
|
+
$path: String
|
|
1024
|
+
$after: String
|
|
1025
|
+
$before: String
|
|
1026
|
+
$limit: Int = 100
|
|
1027
|
+
$since: GitTimestamp
|
|
1028
|
+
$until: GitTimestamp
|
|
1029
|
+
) {
|
|
1030
|
+
repository(name: $repo, owner: $owner) {
|
|
1031
|
+
object(expression: $ref) {
|
|
1032
|
+
... on Commit {
|
|
1033
|
+
history(first: $limit, path: $path, after: $after, before: $before, since: $since, until: $until) {
|
|
1034
|
+
pageInfo {
|
|
1035
|
+
startCursor
|
|
1036
|
+
endCursor
|
|
1037
|
+
hasNextPage
|
|
1038
|
+
hasPreviousPage
|
|
1039
|
+
}
|
|
1040
|
+
nodes {
|
|
1041
|
+
... on Commit { oid }
|
|
1042
|
+
}
|
|
1043
|
+
}
|
|
1044
|
+
}
|
|
1045
|
+
}
|
|
1046
|
+
}
|
|
1047
|
+
}`;
|
|
1048
|
+
const rsp = await this.graphql(undefined, token, query, {
|
|
1049
|
+
owner: owner,
|
|
1050
|
+
repo: repo,
|
|
1051
|
+
ref: ref,
|
|
1052
|
+
after: options?.after,
|
|
1053
|
+
before: options?.before,
|
|
1054
|
+
path: options?.path,
|
|
1055
|
+
limit: Math.min(100, options?.limit ?? 100),
|
|
1056
|
+
since: typeof options?.since === 'string' ? options?.since : options?.since?.toISOString(),
|
|
1057
|
+
until: typeof options?.until === 'string' ? options?.until : options?.until?.toISOString(),
|
|
1058
|
+
}, scope);
|
|
1059
|
+
const history = rsp?.repository?.object?.history;
|
|
1060
|
+
if (history == null)
|
|
1061
|
+
return emptyPagedResult;
|
|
1062
|
+
return {
|
|
1063
|
+
paging: history.pageInfo.endCursor != null
|
|
1064
|
+
? {
|
|
1065
|
+
cursor: history.pageInfo.endCursor ?? undefined,
|
|
1066
|
+
more: history.pageInfo.hasNextPage,
|
|
1067
|
+
}
|
|
1068
|
+
: undefined,
|
|
1069
|
+
values: history.nodes.map(n => n.oid),
|
|
1070
|
+
};
|
|
1071
|
+
}
|
|
1072
|
+
catch (ex) {
|
|
1073
|
+
if (ex instanceof RequestNotFoundError)
|
|
1074
|
+
return emptyPagedResult;
|
|
1075
|
+
throw this.handleException(ex, undefined, scope);
|
|
1076
|
+
}
|
|
1077
|
+
}
|
|
1016
1078
|
async getCommitsCoreRange(token, owner, repo, range) {
|
|
1017
1079
|
const scope = getScopedLogger();
|
|
1018
1080
|
try {
|
|
@@ -1059,7 +1121,7 @@ export class GitHubApi {
|
|
|
1059
1121
|
object(expression: $ref) {
|
|
1060
1122
|
...on Commit {
|
|
1061
1123
|
oid
|
|
1062
|
-
parents(first:
|
|
1124
|
+
parents(first: 8) { nodes { oid } }
|
|
1063
1125
|
message
|
|
1064
1126
|
additions
|
|
1065
1127
|
changedFiles
|
|
@@ -1159,12 +1221,12 @@ export class GitHubApi {
|
|
|
1159
1221
|
$until: GitTimestamp!
|
|
1160
1222
|
) {
|
|
1161
1223
|
repository(owner: $owner, name: $repo) {
|
|
1162
|
-
refs(first:
|
|
1224
|
+
refs(first: 100, refPrefix: "refs/tags/") {
|
|
1163
1225
|
nodes {
|
|
1164
1226
|
name
|
|
1165
1227
|
target {
|
|
1166
1228
|
... on Commit {
|
|
1167
|
-
history(first:
|
|
1229
|
+
history(first: 10, since: $since until: $until) {
|
|
1168
1230
|
nodes { oid }
|
|
1169
1231
|
}
|
|
1170
1232
|
}
|
|
@@ -1631,53 +1693,88 @@ export class GitHubApi {
|
|
|
1631
1693
|
this._enterpriseVersions.set(accessToken, version);
|
|
1632
1694
|
return version ?? undefined;
|
|
1633
1695
|
}
|
|
1696
|
+
// Inflight dedupe: identical concurrent GraphQL requests share a single promise
|
|
1697
|
+
// to cut redundant traffic during graph/details enrichment bursts.
|
|
1698
|
+
_pendingGraphQL = new Map();
|
|
1634
1699
|
async graphql(provider, token, query, variables, scope, cancellation) {
|
|
1635
1700
|
const { accessToken, ...tokenInfo } = token;
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1701
|
+
// Only dedupe when no cancellation/request option is in play — sharing a promise that
|
|
1702
|
+
// carries one caller's AbortSignal would let one cancellation cancel for everyone.
|
|
1703
|
+
const dedupable = cancellation == null && variables?.request == null;
|
|
1704
|
+
let dedupeKey;
|
|
1705
|
+
if (dedupable) {
|
|
1706
|
+
try {
|
|
1707
|
+
dedupeKey = `${token.microHash}|${provider?.id ?? ''}|${query}|${JSON.stringify(variables ?? null)}`;
|
|
1708
|
+
}
|
|
1709
|
+
catch {
|
|
1710
|
+
// Non-serializable variable (BigInt, function, circular ref) — fall through to direct exec.
|
|
1711
|
+
dedupeKey = undefined;
|
|
1712
|
+
}
|
|
1713
|
+
if (dedupeKey != null) {
|
|
1714
|
+
const inflight = this._pendingGraphQL.get(dedupeKey);
|
|
1715
|
+
if (inflight != null)
|
|
1716
|
+
return inflight;
|
|
1647
1717
|
}
|
|
1648
|
-
return await this.config.wrapForForcedInsecureSSL(provider?.getIgnoreSSLErrors() ?? false, () => this.getDefaults(accessToken, graphql)(query, variables));
|
|
1649
1718
|
}
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1719
|
+
const run = async () => {
|
|
1720
|
+
try {
|
|
1721
|
+
let aborter;
|
|
1722
|
+
if (cancellation != null) {
|
|
1723
|
+
if (cancellation.isCancellationRequested)
|
|
1724
|
+
throw new CancellationError();
|
|
1725
|
+
aborter = new AbortController();
|
|
1726
|
+
cancellation.onCancellationRequested(() => aborter.abort());
|
|
1727
|
+
variables = {
|
|
1728
|
+
...variables,
|
|
1729
|
+
request: { ...variables?.request, signal: aborter.signal },
|
|
1730
|
+
};
|
|
1731
|
+
}
|
|
1732
|
+
return await this.config.wrapForForcedInsecureSSL(provider?.getIgnoreSSLErrors() ?? false, () => this.getDefaults(accessToken, graphql)(query, variables));
|
|
1733
|
+
}
|
|
1734
|
+
catch (ex) {
|
|
1735
|
+
if (ex instanceof GraphqlResponseError) {
|
|
1736
|
+
switch (ex.errors?.[0]?.type) {
|
|
1737
|
+
case 'NOT_FOUND':
|
|
1738
|
+
throw new RequestNotFoundError(ex);
|
|
1739
|
+
case 'FORBIDDEN':
|
|
1740
|
+
throw new AuthenticationError(tokenInfo, AuthenticationErrorReason.Forbidden, ex);
|
|
1741
|
+
case 'RATE_LIMITED': {
|
|
1742
|
+
let resetAt;
|
|
1743
|
+
const reset = ex.headers?.['x-ratelimit-reset'];
|
|
1744
|
+
if (reset != null) {
|
|
1745
|
+
resetAt = parseInt(reset, 10);
|
|
1746
|
+
if (Number.isNaN(resetAt)) {
|
|
1747
|
+
resetAt = undefined;
|
|
1748
|
+
}
|
|
1664
1749
|
}
|
|
1750
|
+
throw new RequestRateLimitError(ex, accessToken, resetAt);
|
|
1665
1751
|
}
|
|
1666
|
-
|
|
1752
|
+
}
|
|
1753
|
+
if (Logger.isDebugging) {
|
|
1754
|
+
this.config.onDebugError?.(`GitHub request failed: ${ex.errors?.[0]?.message ?? ex.message}`);
|
|
1667
1755
|
}
|
|
1668
1756
|
}
|
|
1669
|
-
if (
|
|
1670
|
-
this.
|
|
1757
|
+
else if (ex instanceof RequestError || ex.name === 'AbortError') {
|
|
1758
|
+
this.handleRequestError(provider, token, ex, scope);
|
|
1671
1759
|
}
|
|
1760
|
+
else if (Logger.isDebugging) {
|
|
1761
|
+
this.config.onDebugError?.(`GitHub request failed: ${ex.message}`);
|
|
1762
|
+
}
|
|
1763
|
+
throw ex;
|
|
1672
1764
|
}
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1765
|
+
};
|
|
1766
|
+
if (dedupeKey == null)
|
|
1767
|
+
return run();
|
|
1768
|
+
const promise = run();
|
|
1769
|
+
this._pendingGraphQL.set(dedupeKey, promise);
|
|
1770
|
+
// Clear from the inflight map once the promise settles — successes and failures both
|
|
1771
|
+
// clear, so failed requests don't poison subsequent retries.
|
|
1772
|
+
void promise.finally(() => {
|
|
1773
|
+
if (this._pendingGraphQL.get(dedupeKey) === promise) {
|
|
1774
|
+
this._pendingGraphQL.delete(dedupeKey);
|
|
1678
1775
|
}
|
|
1679
|
-
|
|
1680
|
-
|
|
1776
|
+
});
|
|
1777
|
+
return promise;
|
|
1681
1778
|
}
|
|
1682
1779
|
async request(provider, token, route, options, scope, cancellation) {
|
|
1683
1780
|
const { accessToken } = token;
|
|
@@ -2257,6 +2354,16 @@ __decorate([
|
|
|
2257
2354
|
}),
|
|
2258
2355
|
})
|
|
2259
2356
|
], GitHubApi.prototype, "getCommits", null);
|
|
2357
|
+
__decorate([
|
|
2358
|
+
trace({
|
|
2359
|
+
args: (token, owner, repo, ref) => ({
|
|
2360
|
+
token: `<token:${token.microHash}>`,
|
|
2361
|
+
owner: owner,
|
|
2362
|
+
repo: repo,
|
|
2363
|
+
ref: ref,
|
|
2364
|
+
}),
|
|
2365
|
+
})
|
|
2366
|
+
], GitHubApi.prototype, "getCommitShas", null);
|
|
2260
2367
|
__decorate([
|
|
2261
2368
|
trace({
|
|
2262
2369
|
args: (token, owner, repo, ref) => ({
|