@gitkraken/core-gitlens 0.50.0 → 0.51.1
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 +15 -1
- package/dist/git-cli/providers/config.js +2 -2
- package/dist/git-cli/providers/pausedOperations.js +2 -2
- package/dist/git-cli/providers/pausedOperations.js.map +1 -1
- package/dist/git-cli/providers/staging.js +1 -1
- package/dist/ipc/discovery.js +1 -1
- package/dist/plus/agents/providers/claudeCodeTranscript.js +6 -6
- package/dist/plus/agents/providers/claudeCodeTranscript.js.map +1 -1
- package/dist/plus/ai/providers/openAICompatibleProviderBase.js +1 -1
- package/dist/plus/integrations/index.d.ts +2 -1
- package/dist/plus/integrations/index.js.map +1 -1
- package/dist/plus/integrations/integrationService.d.ts +5 -0
- package/dist/plus/integrations/integrationService.js +40 -0
- package/dist/plus/integrations/integrationService.js.map +1 -1
- package/dist/plus/integrations/manager.d.ts +4 -0
- package/dist/plus/integrations/models/azurePullRequestWrites.d.ts +93 -0
- package/dist/plus/integrations/models/azurePullRequestWrites.js +0 -0
- package/dist/plus/integrations/providers/azure/azure.js +1 -1
- package/dist/plus/integrations/providers/azure/models.d.ts +1 -1
- package/dist/plus/integrations/providers/azure/models.js.map +1 -1
- package/dist/plus/integrations/providers/azure/writeIdentity.d.ts +17 -0
- package/dist/plus/integrations/providers/azure/writeIdentity.js +33 -0
- package/dist/plus/integrations/providers/azure/writeIdentity.js.map +1 -0
- package/dist/plus/integrations/providers/azureDevOps.d.ts +4 -0
- package/dist/plus/integrations/providers/azureDevOps.js +14 -3
- package/dist/plus/integrations/providers/azureDevOps.js.map +1 -1
- package/dist/plus/integrations/providers/azurePullRequestWriteErrors.d.ts +11 -0
- package/dist/plus/integrations/providers/azurePullRequestWriteErrors.js +72 -0
- package/dist/plus/integrations/providers/azurePullRequestWriteErrors.js.map +1 -0
- package/dist/plus/integrations/providers/azurePullRequestWrites.d.ts +36 -0
- package/dist/plus/integrations/providers/azurePullRequestWrites.js +443 -0
- package/dist/plus/integrations/providers/azurePullRequestWrites.js.map +1 -0
- package/dist/plus/integrations/providers/azureWorkItemWriteErrors.d.ts +0 -3
- package/dist/plus/integrations/providers/azureWorkItemWriteErrors.js +3 -12
- package/dist/plus/integrations/providers/azureWorkItemWriteErrors.js.map +1 -1
- package/dist/plus/integrations/providers/azureWorkItemWrites.js +24 -35
- package/dist/plus/integrations/providers/azureWorkItemWrites.js.map +1 -1
- package/dist/plus/integrations/providers/providersApi.d.ts +3 -11
- package/dist/plus/integrations/providers/providersApi.js +10 -12
- package/dist/plus/integrations/providers/providersApi.js.map +1 -1
- package/dist/utils/env/node/exec.js +2 -2
- package/docs/integrations.md +53 -0
- package/package.json +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { getScopedLogger, maybeStartScopedLogger } from "../../logger.scoped.js";
|
|
2
2
|
import { isWindows } from "./platform.js";
|
|
3
3
|
import { join } from "path";
|
|
4
|
-
import { execFile, spawn } from "child_process";
|
|
5
|
-
import { access, constants } from "fs";
|
|
6
4
|
import { stat } from "fs/promises";
|
|
7
5
|
import * as process from "process";
|
|
6
|
+
import { execFile, spawn } from "child_process";
|
|
7
|
+
import { access, constants } from "fs";
|
|
8
8
|
//#region ../utils/src/env/node/exec.ts
|
|
9
9
|
var RunError = class extends Error {
|
|
10
10
|
cmd;
|
package/docs/integrations.md
CHANGED
|
@@ -1047,6 +1047,59 @@ including one produced by the host's fetch, is `rate-limit` and never reported a
|
|
|
1047
1047
|
confirm the result of a dispatched write, it returns `applied: 'maybe'`. Reconcile the provider state before
|
|
1048
1048
|
attempting a new write.
|
|
1049
1049
|
|
|
1050
|
+
### Azure DevOps Services pull request writes
|
|
1051
|
+
|
|
1052
|
+
The following `IntegrationManager` methods and their types are exported from
|
|
1053
|
+
`@gitkraken/core-gitlens/plus/integrations/index.js`.
|
|
1054
|
+
|
|
1055
|
+
| Method | Input | Success |
|
|
1056
|
+
| ------------------------------------- | -------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
|
|
1057
|
+
| `getAzurePullRequestCreateCapability` | `connectionId`, `organization`, project and repository names or IDs, optional `expectedAccountId`. | Live Azure profile ID and canonical organization, project and repository. |
|
|
1058
|
+
| `resolveAzurePullRequestWriteTarget` | The same scope plus the pull request `number`. | Live profile ID, pull request snapshot and action capabilities, including allowed merge types. |
|
|
1059
|
+
| `writeAzurePullRequest` | `connectionId`, `expectedAccountId`, `organization`, `projectId`, `repositoryId` and one of the actions below. | A typed write status and pull request receipt. |
|
|
1060
|
+
|
|
1061
|
+
- `create` takes fully qualified `sourceRef` and `targetRef` in the selected repository, `title` and optional `description`.
|
|
1062
|
+
- `edit` takes `number` and at least one of `title` or `description`. Pass an empty description to clear it.
|
|
1063
|
+
- `abandon` and `reactivate` take `number`.
|
|
1064
|
+
- `complete` takes `number`, `strategy`, `expectedSourceRef`, `expectedSourceSha`, `expectedTargetRef` and `expectedTargetSha`.
|
|
1065
|
+
Strategy values are `noFastForward`, `squash`, `rebase` and `rebaseMerge`.
|
|
1066
|
+
|
|
1067
|
+
Use the connection that read the repository or pull request. Keep the returned `accountId` as
|
|
1068
|
+
`expectedAccountId` and the canonical repository and PR number across confirmation. This API uses Azure
|
|
1069
|
+
DevOps Services OAuth or Entra credentials with profile, organization and repository access. Writes
|
|
1070
|
+
require `vso.code_write` or a scope that includes it, such as `vso.code_manage`. A selected PAT reports
|
|
1071
|
+
`unsupported`. Azure DevOps Server has its own integration. Core checks the live profile and the scope,
|
|
1072
|
+
then checks that the same credential is still current immediately before dispatch.
|
|
1073
|
+
|
|
1074
|
+
Capabilities reflect repository and PR state, applicable blocking merge strategy policies, and the refs
|
|
1075
|
+
available for confirmation. Azure evaluates the viewer's write permissions and required reviewers and
|
|
1076
|
+
policies at dispatch. Draft and fork PRs are unavailable for completion through this API. For drafts,
|
|
1077
|
+
Azure requires a ready PR. The completion contract carries the source ref in the selected repository,
|
|
1078
|
+
which cannot identify a fork repository.
|
|
1079
|
+
|
|
1080
|
+
Keep both fully qualified refs and SHAs from a resolved target with completion available. In that
|
|
1081
|
+
snapshot, `targetSha` is the exact live target ref tip. Azure's `lastMergeTargetCommit` describes its
|
|
1082
|
+
last merge preview and can remain behind the branch tip. Core checks the preview's source commit against
|
|
1083
|
+
the live source tip and sends Azure the approved SHA in `lastMergeSourceCommit`.
|
|
1084
|
+
|
|
1085
|
+
Before dispatch Core checks the strategy and live refs, rereads the PR for retargeting, and checks the
|
|
1086
|
+
approved target tip again. A conflict from the current preview blocks completion. If the preview targets
|
|
1087
|
+
an older tip, Azure evaluates the current merge on dispatch. A queued merge remains unavailable for
|
|
1088
|
+
completion. Azure's update API provides no atomic target or PR revision comparison, so the target may
|
|
1089
|
+
move after the preflight reads.
|
|
1090
|
+
Completion explicitly requests the selected merge strategy with policy bypass disabled.
|
|
1091
|
+
See the [Azure DevOps update API](https://learn.microsoft.com/en-us/rest/api/azure/devops/git/pull-requests/update?view=azure-devops-rest-7.1)
|
|
1092
|
+
and [scoped policy configurations API](https://learn.microsoft.com/en-us/rest/api/azure/devops/git/policy-configurations/get?view=azure-devops-rest-7.1).
|
|
1093
|
+
|
|
1094
|
+
`forbidden` includes write-scope and permission rejections. `policy-blocked`, `invalid-input`,
|
|
1095
|
+
`conflict`, `source-changed`, and `target-changed` distinguish provider and preflight failures.
|
|
1096
|
+
`completed` confirms Azure reported the PR completed and the merge succeeded. `pending` acknowledges a queued completion.
|
|
1097
|
+
The typed target read reports the PR as active while Azure still reports the merge queued, even if Azure
|
|
1098
|
+
sets its PR status to completed. A completed PR status with a failed or unconfirmed merge reports a
|
|
1099
|
+
failure. Use the typed read to reconcile pending completion before publishing a merged state.
|
|
1100
|
+
`outcome-unknown` means Core dispatched a write and could not confirm the result. For pending or
|
|
1101
|
+
uncertain writes, reconcile with a read before attempting another write. Core sends each mutation once.
|
|
1102
|
+
|
|
1050
1103
|
### GitHub and GitHub Enterprise Server pull request writes
|
|
1051
1104
|
|
|
1052
1105
|
Use `providerId: 'github'` and the `connectionId` that read the repository or pull request. Pass the
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gitkraken/core-gitlens",
|
|
3
3
|
"description": "GitLens core — shared Git / AI / GitHub primitives for internal GitKraken consumption",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.51.1",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "GitKraken",
|