@gitkraken/core-gitlens 0.66.0 → 0.67.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 +6 -0
- 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/extensionManager.js.map +1 -1
- package/dist/plus/integrations/index.d.ts +2 -1
- package/dist/plus/integrations/index.js +12 -2
- package/dist/plus/integrations/index.js.map +1 -1
- package/dist/plus/integrations/integrationService.d.ts +20 -6
- package/dist/plus/integrations/integrationService.js +61 -7
- package/dist/plus/integrations/integrationService.js.map +1 -1
- package/dist/plus/integrations/manager.d.ts +6 -0
- package/dist/plus/integrations/models/linearIssueWrites.d.ts +101 -0
- package/dist/plus/integrations/models/linearIssueWrites.js +0 -0
- package/dist/plus/integrations/models/publicIntegration.d.ts +1 -0
- package/dist/plus/integrations/providers/azure/azure.js +2 -2
- package/dist/plus/integrations/providers/github.js +1 -1
- package/dist/plus/integrations/providers/issueSorts.d.ts +1 -0
- package/dist/plus/integrations/providers/linear.d.ts +6 -6
- package/dist/plus/integrations/providers/linear.js +36 -14
- package/dist/plus/integrations/providers/linear.js.map +1 -1
- package/dist/plus/integrations/providers/linearIssueWriteTransport.d.ts +27 -0
- package/dist/plus/integrations/providers/linearIssueWriteTransport.js +110 -0
- package/dist/plus/integrations/providers/linearIssueWriteTransport.js.map +1 -0
- package/dist/plus/integrations/providers/linearIssueWrites.d.ts +27 -0
- package/dist/plus/integrations/providers/linearIssueWrites.js +310 -0
- package/dist/plus/integrations/providers/linearIssueWrites.js.map +1 -0
- package/dist/plus/integrations/providers/linearIssuesEtag.d.ts +2 -0
- package/dist/plus/integrations/providers/linearIssuesEtag.js +27 -1
- package/dist/plus/integrations/providers/linearIssuesEtag.js.map +1 -1
- package/dist/plus/integrations/providers/providerApiClient.d.ts +2 -2
- package/dist/plus/integrations/providers/providerApiClient.js +5 -5
- package/dist/plus/integrations/providers/providerApiClient.js.map +1 -1
- package/dist/plus/integrations/providers/providerErrors.d.ts +9 -0
- package/dist/plus/integrations/providers/providerErrors.js +1 -1
- package/dist/plus/integrations/providers/providerErrors.js.map +1 -1
- package/dist/plus/integrations/providers/providersApi.d.ts +1 -0
- package/dist/plus/integrations/providers/providersApi.js +8 -1
- package/dist/plus/integrations/providers/providersApi.js.map +1 -1
- package/dist/plus/integrations/reads/drains.d.ts +1 -0
- package/dist/utils/env/node/exec.js +2 -2
- package/docs/integrations.md +58 -1
- package/package.json +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ResourceDescriptor } from "../../../git/models/resourceDescriptor.js";
|
|
2
2
|
import { PullRequest, PullRequestFilter, PullRequestStateFilter } from "../../../git/models/pullRequest.js";
|
|
3
3
|
import { IntegrationIds } from "../constants.js";
|
|
4
|
+
import "../providerFilters.js";
|
|
4
5
|
import { ProviderWarning } from "../results.js";
|
|
5
6
|
import { ProviderSweepTarget, PullRequestSweepOptions } from "../manager.js";
|
|
6
7
|
import { IntegrationResult } from "../models/publicIntegration.js";
|
|
@@ -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 { stat } from "fs/promises";
|
|
5
|
-
import * as process from "process";
|
|
6
4
|
import { execFile, spawn } from "child_process";
|
|
7
5
|
import { access, constants } from "fs";
|
|
6
|
+
import { stat } from "fs/promises";
|
|
7
|
+
import * as process from "process";
|
|
8
8
|
//#region ../utils/src/env/node/exec.ts
|
|
9
9
|
var RunError = class extends Error {
|
|
10
10
|
cmd;
|
package/docs/integrations.md
CHANGED
|
@@ -325,7 +325,8 @@ The hosts with a cheap check select only the change state:
|
|
|
325
325
|
leaves out a key it can't answer (deleted, not visible, malformed or moved), so such a key falls through to its own
|
|
326
326
|
full read, whose 404 is what proves an absence.
|
|
327
327
|
- **Linear** (the tracker form of `getIssuesBatch`): one query per team per 50 issues, archived ones included, where
|
|
328
|
-
the full read
|
|
328
|
+
the full read checks each issue by ID. An archived issue gets one additional check for its trash status.
|
|
329
|
+
Trash is a proven absence in either read. The query matches the team's current key, while the full read may also
|
|
329
330
|
resolve an identifier the issue no longer carries (its team was renamed, or it moved), so an issue the query leaves
|
|
330
331
|
out, or an identifier that isn't a team key and a number, falls through to its own full read, which decides whether
|
|
331
332
|
it is absent. The check also reads each issue's GitHub sync links (`syncedWith`) with their coordinates, so a link
|
|
@@ -1190,6 +1191,62 @@ credential. `mutationDispatched: false` means Core stopped before sending the wr
|
|
|
1190
1191
|
`applied: 'maybe'` as uncertain and reconcile the issue state before retrying. A successful delete
|
|
1191
1192
|
requires Jira's `204` acknowledgement. Jira can also return `404` when visibility changes. [Jira Cloud REST v2 issue operations](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-issues/)
|
|
1192
1193
|
|
|
1194
|
+
### Linear issue writes
|
|
1195
|
+
|
|
1196
|
+
Import the Linear methods and types from `@gitkraken/core-gitlens/plus/integrations/index.js`. Every
|
|
1197
|
+
request identifies the `connectionId` and the expected Linear `organizationId`. Use the live workspace
|
|
1198
|
+
ID from Linear discovery. Success results include the viewer's `accountId` and the workspace's
|
|
1199
|
+
`id`, `urlKey`, `url` and `name`. Pass `expectedAccountId` to verify a previously observed viewer
|
|
1200
|
+
and `expectedOrganizationUrlKey` to verify the workspace slug case-insensitively.
|
|
1201
|
+
|
|
1202
|
+
| Method | Input beyond the workspace and connection | Success |
|
|
1203
|
+
| ---------------------------------------------- | --------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ |
|
|
1204
|
+
| `getLinearIssueCreateOptions` | Team UUID (`teamId`) or exact canonical `teamKey` | Team ID, key and name, plus its live workflow states. |
|
|
1205
|
+
| `getLinearIssueWriteOptions` | Issue identifier or UUID (`issue`), optional `teamId` and `expectedIssueId` | Canonical issue, valid workflow states and explicit unknown edit/delete permissions. |
|
|
1206
|
+
| `resolveLinearIssueWriteTarget` | Same as `getLinearIssueWriteOptions` | Fresh canonical issue and account identity for confirmation or revalidation. |
|
|
1207
|
+
| `writeLinearIssue` with `action: 'create'` | `teamId`, nonblank `title`, optional Markdown `description` and `stateId` | Created issue receipt. |
|
|
1208
|
+
| `writeLinearIssue` with `action: 'edit'` | `teamId`, `issue`, `expectedIssueId`, at least one of `title` or `description` | Updated issue receipt. |
|
|
1209
|
+
| `writeLinearIssue` with `action: 'transition'` | `teamId`, `issue`, `expectedIssueId`, `stateId` | Updated issue receipt. |
|
|
1210
|
+
| `deleteLinearIssue` | `teamId`, `issue`, `expectedIssueId`, `expectedAccountId`, `expectedOrganizationUrlKey` | Pre-delete issue receipt and `deletion.trashed: true`, with `deletion.archivedAt` when Linear returns a timestamp. |
|
|
1211
|
+
|
|
1212
|
+
The team lookup works independently of the first page of the general team listing. Workflow
|
|
1213
|
+
discovery fails if the state list cannot be read in full. State entries contain `id`, `name`, Linear's
|
|
1214
|
+
`type` and the normalized `category`. Creation and transitions accept live state UUIDs belonging to
|
|
1215
|
+
the selected team. Reserved duplicate states require an issue relation and are excluded from these
|
|
1216
|
+
options. An omitted initial state lets Linear choose its default. On edit, an omitted description
|
|
1217
|
+
retains the current value and an empty string clears it.
|
|
1218
|
+
|
|
1219
|
+
An issue receipt contains the canonical UUID, identifier, URL, title, update timestamp, team and
|
|
1220
|
+
current state. Issue discovery and target resolution return the issue's live team. Supply `teamId`
|
|
1221
|
+
to require a matching team on these reads. Edit, transition and delete require both the team and the
|
|
1222
|
+
expected issue UUID and dispatch by canonical UUID. Issue identifiers must match the issue's current
|
|
1223
|
+
identifier case-insensitively. A moved or renamed identifier returns `conflict`; use the UUID in
|
|
1224
|
+
`issue` to address the issue by its stable ID. A supplied workspace slug or team mismatch also returns
|
|
1225
|
+
`conflict`. A viewer mismatch returns `forbidden`. Linear evaluates access on each
|
|
1226
|
+
mutation. GitKraken's OAuth configuration requests `read`, `write`, `issues:create` and
|
|
1227
|
+
`comments:create`; issue creation, including an initial state, and issue updates use the write grant.
|
|
1228
|
+
An explicit OAuth scope refusal returns `insufficient-scope`; account or policy denials return
|
|
1229
|
+
`forbidden`.
|
|
1230
|
+
|
|
1231
|
+
Deletion moves the issue and accessible unarchived sub-issues to the trash. Linear retains them for
|
|
1232
|
+
30 days. Archiving retains issues outside the active list, and immediate permanent deletion requires
|
|
1233
|
+
workspace entity-management permission. An issue in the trash returns `not-found` during write
|
|
1234
|
+
option discovery, target resolution and mutation preflight, even if Linear still returns it by ID.
|
|
1235
|
+
Point and batch issue reads also treat trashed issues as absent. Archived issues outside the trash
|
|
1236
|
+
read as closed. If their trash status cannot be verified, the read fails.
|
|
1237
|
+
Receipts include `archivedAt` when available. Archive-only issues remain addressable and Linear
|
|
1238
|
+
evaluates mutation permissions. A successful create or update response can carry `trashed: true`
|
|
1239
|
+
if Linear reports the issue in the trash in that receipt. Resolve the issue again before asking for
|
|
1240
|
+
confirmation and carry the confirmed issue, team, viewer and workspace slug into
|
|
1241
|
+
`deleteLinearIssue`. Linear has no atomic team precondition for these mutations.
|
|
1242
|
+
|
|
1243
|
+
Failures share `IssueTrackerWriteFailure`. `mutationDispatched: false` identifies a refusal before
|
|
1244
|
+
sending the mutation. If `applied: 'maybe'` is present, reconcile the outcome before another write.
|
|
1245
|
+
Core sends each mutation once. See [Linear's GraphQL API](https://linear.app/developers/graphql),
|
|
1246
|
+
[OAuth scopes](https://linear.app/developers/oauth-2-0-authentication),
|
|
1247
|
+
[GraphQL schema](https://studio.apollographql.com/public/Linear-API/variant/current/schema/reference/objects/Mutation)
|
|
1248
|
+
and [delete and archive guidance](https://linear.app/docs/delete-archive-issues).
|
|
1249
|
+
|
|
1193
1250
|
### Azure DevOps Services work item writes
|
|
1194
1251
|
|
|
1195
1252
|
Use the work item methods on `IntegrationManager` from `@gitkraken/core-gitlens/plus/integrations/index.js`.
|
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.67.0",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "GitKraken",
|