@gitkraken/core-gitlens 0.33.0 → 0.34.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 +16 -1
- package/dist/git/cache.d.ts +31 -0
- package/dist/git/cache.js +101 -30
- package/dist/git/cache.js.map +1 -1
- package/dist/git/context.d.ts +3 -1
- package/dist/git/context.js.map +1 -1
- package/dist/git/errors.d.ts +3 -1
- package/dist/git/errors.js +4 -1
- package/dist/git/errors.js.map +1 -1
- package/dist/git/models/pullRequest.d.ts +90 -1
- package/dist/git/models/pullRequest.js +18 -2
- package/dist/git/models/pullRequest.js.map +1 -1
- package/dist/git/providers/shared/remotes.js +2 -0
- package/dist/git/providers/shared/remotes.js.map +1 -1
- package/dist/git/utils/pullRequest.utils.d.ts +72 -1
- package/dist/git/utils/pullRequest.utils.js +99 -1
- package/dist/git/utils/pullRequest.utils.js.map +1 -1
- package/dist/git/utils/repository.utils.d.ts +6 -0
- package/dist/git/utils/repository.utils.js +14 -2
- package/dist/git/utils/repository.utils.js.map +1 -1
- package/dist/git/watching/gitDirPoller.d.ts +10 -1
- package/dist/git/watching/gitDirPoller.js +9 -3
- package/dist/git/watching/gitDirPoller.js.map +1 -1
- package/dist/git/watching/unwatchedCacheValidator.d.ts +144 -0
- package/dist/git/watching/unwatchedCacheValidator.js +884 -0
- package/dist/git/watching/unwatchedCacheValidator.js.map +1 -0
- package/dist/git/watching/watchGroup.d.ts +2 -0
- package/dist/git/watching/watchGroup.js +4 -8
- package/dist/git/watching/watchGroup.js.map +1 -1
- package/dist/git/watching/watchService.d.ts +23 -0
- package/dist/git/watching/watchService.js +42 -2
- package/dist/git/watching/watchService.js.map +1 -1
- package/dist/git/watching/watchSession.d.ts +2 -0
- package/dist/git/watching/watchSession.js +3 -2
- package/dist/git/watching/watchSession.js.map +1 -1
- package/dist/git-cli/cliGitProvider.js +1 -1
- package/dist/git-cli/cliGitProvider.js.map +1 -1
- package/dist/git-cli/exec/commandClassifier.d.ts +31 -1
- package/dist/git-cli/exec/commandClassifier.js +67 -16
- package/dist/git-cli/exec/commandClassifier.js.map +1 -1
- package/dist/git-cli/exec/git.d.ts +46 -2
- package/dist/git-cli/exec/git.js +80 -7
- package/dist/git-cli/exec/git.js.map +1 -1
- package/dist/git-cli/exec/gitDirResolver.d.ts +11 -0
- package/dist/git-cli/exec/gitDirResolver.js +34 -1
- package/dist/git-cli/exec/gitDirResolver.js.map +1 -1
- package/dist/git-cli/exec/gitQueue.js +2 -28
- package/dist/git-cli/exec/gitQueue.js.map +1 -1
- package/dist/git-cli/providers/branches.d.ts +1 -0
- package/dist/git-cli/providers/branches.js +6 -0
- package/dist/git-cli/providers/branches.js.map +1 -1
- package/dist/git-cli/providers/config.d.ts +13 -1
- package/dist/git-cli/providers/config.js +48 -14
- package/dist/git-cli/providers/config.js.map +1 -1
- package/dist/git-cli/providers/pausedOperations.d.ts +1 -0
- package/dist/git-cli/providers/pausedOperations.js +4 -0
- package/dist/git-cli/providers/pausedOperations.js.map +1 -1
- package/dist/git-cli/providers/revision.js +2 -0
- package/dist/git-cli/providers/revision.js.map +1 -1
- package/dist/git-cli/providers/worktrees.js +2 -0
- package/dist/git-cli/providers/worktrees.js.map +1 -1
- package/dist/git-cli/service.d.ts +25 -1
- package/dist/git-cli/service.js +45 -0
- package/dist/git-cli/service.js.map +1 -1
- package/dist/plus/ai/errors.d.ts +8 -2
- package/dist/plus/ai/errors.js +15 -3
- package/dist/plus/ai/errors.js.map +1 -1
- package/dist/plus/git-github/api/github.d.ts +51 -1
- package/dist/plus/git-github/api/github.js +276 -3
- package/dist/plus/git-github/api/github.js.map +1 -1
- package/dist/plus/git-github/models.d.ts +54 -1
- package/dist/plus/git-github/models.js +48 -3
- package/dist/plus/git-github/models.js.map +1 -1
- package/dist/plus/integrations/fieldPresence.d.ts +6 -1
- package/dist/plus/integrations/fieldPresence.js +19 -9
- package/dist/plus/integrations/fieldPresence.js.map +1 -1
- package/dist/plus/integrations/models/gitHostIntegration.d.ts +26 -1
- package/dist/plus/integrations/models/gitHostIntegration.js +51 -0
- package/dist/plus/integrations/models/gitHostIntegration.js.map +1 -1
- package/dist/plus/integrations/models/integration.d.ts +15 -2
- package/dist/plus/integrations/models/integration.js.map +1 -1
- package/dist/plus/integrations/providers/github.d.ts +16 -1
- package/dist/plus/integrations/providers/github.js +53 -1
- package/dist/plus/integrations/providers/github.js.map +1 -1
- package/dist/plus/integrations/reads/etag.js +11 -0
- package/dist/plus/integrations/reads/etag.js.map +1 -1
- package/docs/integrations.md +39 -6
- package/package.json +1 -1
package/docs/integrations.md
CHANGED
|
@@ -179,7 +179,8 @@ host's `IntegrationCacheProvider.getPullRequest`, so the caller owns caching the
|
|
|
179
179
|
Both batch reads detect change with **etags**. Every fully read row carries an opaque `etag`, whether or not the
|
|
180
180
|
caller sent one; send it back as the target's `etag` on the next call. Compare etags for equality only and never
|
|
181
181
|
parse one: core computes it from the item's change state — a pull request's state, draft flag, update time and head
|
|
182
|
-
commit (plus, on Azure DevOps, a fingerprint of the fields it changes without an update time
|
|
182
|
+
commit (plus, on Azure DevOps, a fingerprint of the fields it changes without an update time, and on github.com a
|
|
183
|
+
queued pull request's merge-queue state; see below); an issue's
|
|
183
184
|
state and update time — and it is not the provider's HTTP ETag. A field the host changes without moving the update
|
|
184
185
|
time is not an input unless `etagIncludes` names it. Reactions are such a field: GitHub adds a reaction without
|
|
185
186
|
touching the update time, so an `unchanged` issue's `thumbsUpCount` can be stale unless the call listed `'reactions'`,
|
|
@@ -200,7 +201,16 @@ The hosts with a cheap check select only the change state:
|
|
|
200
201
|
|
|
201
202
|
- **GitHub/GHE:** one aliased document per 25 targets, like the full read. Assigning or clearing a milestone moves
|
|
202
203
|
the update time, so the etag sees it; editing the milestone itself (its title, due date or state) doesn't, and a row
|
|
203
|
-
that compares unchanged keeps the milestone as it was read.
|
|
204
|
+
that compares unchanged keeps the milestone as it was read. Against github.com it also selects each pull request's
|
|
205
|
+
merge-queue entry (its `state` and `enqueuedAt` only), because joining, moving through and leaving the queue don't
|
|
206
|
+
move the update time. Only a queued pull request's etag carries it, with no `etagIncludes` needed, so a pull request
|
|
207
|
+
that isn't queued keeps exactly the etag it had before the queue was read, under any include set. The estimate
|
|
208
|
+
(`estimatedMergeAt`) isn't an input: GitHub recomputes it as the queue moves, so an `unchanged` queued pull request's
|
|
209
|
+
estimate can be stale, though as a date it keeps counting down. Nor is the `position`, which moves as the entries
|
|
210
|
+
ahead merge, or `mergeQueueRequired`, which only a change to the base branch's rules moves, so an `unchanged` row's
|
|
211
|
+
can be stale. The check also selects each pull request's latest merge-queue event, so a pull request that joined the
|
|
212
|
+
queue and was removed between two checks reads as changed: only a row with a `mergeQueueRemoval` carries it in its
|
|
213
|
+
etag, so every other pull request's etag is unchanged by it.
|
|
204
214
|
- **GitLab and GitLab self-managed:** one query per project per 100 iids. That drops to 10 iids when `etagIncludes`
|
|
205
215
|
has `'checks'`, because GitLab resolves every job of each head pipeline for that input. GitLab resets a merge
|
|
206
216
|
request's merge status whenever its target branch moves, so on a busy repository `'mergeable'` changes, and costs a
|
|
@@ -341,8 +351,8 @@ A group is `fetched` only if every field in it is. Pull request groups: `descrip
|
|
|
341
351
|
reads, and is `undefined` elsewhere), `reviewDecision`, `assignees`, `checks` (`statusCheckRollupState`), `mergeable`
|
|
342
352
|
(`mergeableState`), `diffStats` (`additions`, `deletions`, `filesChanged`), `commitCount`, `comments` (`commentsCount`),
|
|
343
353
|
`reactions` (`thumbsUpCount`), `access` (`viewerCanUpdate` and `repository.accessLevel`), `authoredByMe` (with `viewer`,
|
|
344
|
-
the identity it was matched against), `stack` and `
|
|
345
|
-
`viewerCanUpdate` live on the `PullRequest` class every row is, not on the `PullRequestShape` type. Issue groups:
|
|
354
|
+
the identity it was matched against), `stack`, `milestone` and `mergeQueue`. `statusCheckRollupState`, `commitCount`
|
|
355
|
+
and `viewerCanUpdate` live on the `PullRequest` class every row is, not on the `PullRequestShape` type. Issue groups:
|
|
346
356
|
`description` (`body`, and `bodyField` where the provider sets it, so take both from the same row), `assignees`,
|
|
347
357
|
`labels`, `comments` (`commentsCount`), `reactions` (`thumbsUpCount`), `access` (`repository.accessLevel`) and
|
|
348
358
|
`milestone` (on Linear, the issue's project milestone).
|
|
@@ -371,6 +381,7 @@ differ, and `—` means that host never produces the tag.
|
|
|
371
381
|
| authoredByMe | not-requested | not-requested | not-requested | not-requested | not-requested | not-requested | not-requested | not-requested | not-requested |
|
|
372
382
|
| stack | fetched / unavailable | fetched / unavailable | fetched / unavailable | fetched / unavailable | fetched / unavailable | fetched / unavailable | not-requested | not-requested | fetched / unavailable |
|
|
373
383
|
| milestone | fetched | fetched | fetched | fetched | fetched | fetched | fetched | fetched | fetched |
|
|
384
|
+
| mergeQueue | fetched / unavailable | fetched / unavailable | fetched / unavailable | fetched / unavailable | fetched / unavailable | fetched / unavailable | not-requested | not-requested | fetched / unavailable |
|
|
374
385
|
|
|
375
386
|
<!-- field-presence: issues -->
|
|
376
387
|
|
|
@@ -394,7 +405,25 @@ The cells that aren't obvious from the projection names:
|
|
|
394
405
|
GitLens' own reads don't. Its comment count is issue comments only, where `search` counts review
|
|
395
406
|
comments too. On GitHub Enterprise it reads check runs only from server 3.0 on, which the table can't see.
|
|
396
407
|
- `authoredByMe` needs the current account, which a read may fail to resolve, so it is never `fetched`.
|
|
397
|
-
- `stack`
|
|
408
|
+
- `stack` and `mergeQueue` are selected only against github.com. A row without `mergeQueue` where the group is
|
|
409
|
+
`fetched` is not queued; `isPullRequestInMergeQueue(pr)` answers that for an open pull request. Its
|
|
410
|
+
`estimatedMergeAt` is GitHub's estimate of the time remaining, fixed to a date when the row was read, so it may be
|
|
411
|
+
in the past on a row held a while, and its `position` is 1-based in enqueue order.
|
|
412
|
+
- The `mergeQueue` group also covers `mergeQueueRequired` (the base branch accepts the pull request only through a
|
|
413
|
+
merge queue; `false` is an answer, `undefined` not read) and `mergeQueueRemoval` (`{ reason, removedAt }`: the
|
|
414
|
+
latest removal from the queue, set only while it is the pull request's latest merge-queue event and didn't merge it).
|
|
415
|
+
`reason` is GitHub's own string, passed through (`failed_checks`, `manual`, others undocumented); classify it with
|
|
416
|
+
`getPullRequestMergeQueueRemovalKind` (`failed`, `manual`, `other`). A removal stays on the row however much later
|
|
417
|
+
the pull request changes, so ask `isPullRequestMergeQueueRemovalCurrent(pr)` whether it still describes it: open,
|
|
418
|
+
not queued, and not updated since. Any later update clears it — a comment or a label as well as a push — because
|
|
419
|
+
GitHub's timeline orders commits by commit date, not push time, so it can't say whether a push followed the
|
|
420
|
+
removal; GitHub's removal itself doesn't move the update time.
|
|
421
|
+
- Cost: the merge-queue selection adds one connection per pull request (`timelineItems(last: 1)`). By GitHub's
|
|
422
|
+
rate-limit formula (a request per connection per parent node, summed, divided by 100 and rounded, minimum 1) that
|
|
423
|
+
is one more request per pull request read: a 30-row full search page goes from 121 requests (1 point) to 151 (2
|
|
424
|
+
points), a 100-row lite page from 1 to 101 (1 point either way), a 25-target batch read from 100 to 125 (1 point),
|
|
425
|
+
and the cheap check's 25 targets from 0 or 25 (with `'checks'`) to 25 or 50 (1 point either way). The filtered
|
|
426
|
+
search's worst case, 15 facets of 30 rows, goes from 1,815 requests (18 points) to 2,265 (23).
|
|
398
427
|
|
|
399
428
|
#### Every other provider
|
|
400
429
|
|
|
@@ -407,7 +436,8 @@ What holds for all of them:
|
|
|
407
436
|
derived from its reviewers' states, which ignores the host's own approval rules (GitLab's approval rules, Azure
|
|
408
437
|
DevOps' branch policies, Bitbucket's merge checks), so derive one from `reviews` and `reviewRequests` instead.
|
|
409
438
|
- **`access` and `authoredByMe` are never `fetched`**: no other host's read sets `repository.accessLevel`, and the
|
|
410
|
-
current account may not resolve. No other host has stacks
|
|
439
|
+
current account may not resolve. No other host has stacks, and no other host's merge queue (GitLab's merge trains
|
|
440
|
+
included) is read yet, so `mergeQueue` is `unavailable` everywhere else.
|
|
411
441
|
- **Substitutions.** Azure DevOps has no pull request assignees: both of its converters fill `assignees` with the
|
|
412
442
|
reviewers, which `reviews` and `reviewRequests` already hold, so `assignees` is `unavailable` there. Votes are not
|
|
413
443
|
reactions: a Jira issue's or Trello card's votes, and a Bitbucket issue's, land in `thumbsUpCount` (and read 0
|
|
@@ -438,6 +468,7 @@ What holds for all of them:
|
|
|
438
468
|
| authoredByMe | not-requested | not-requested | not-requested | not-requested | not-requested | not-requested | not-requested | not-requested |
|
|
439
469
|
| stack | unavailable | unavailable | unavailable | unavailable | unavailable | unavailable | unavailable | unavailable |
|
|
440
470
|
| milestone | not-requested | fetched | not-requested | fetched | fetched | fetched | fetched | fetched |
|
|
471
|
+
| mergeQueue | unavailable | unavailable | unavailable | unavailable | unavailable | unavailable | unavailable | unavailable |
|
|
441
472
|
|
|
442
473
|
<!-- field-presence: gitlab-issues -->
|
|
443
474
|
|
|
@@ -480,6 +511,7 @@ What holds for all of them:
|
|
|
480
511
|
| authoredByMe | not-requested | not-requested | — / not-requested | not-requested | not-requested | not-requested | not-requested | not-requested | not-requested |
|
|
481
512
|
| stack | unavailable | unavailable | — / unavailable | unavailable | unavailable | unavailable | unavailable | unavailable | unavailable |
|
|
482
513
|
| milestone | unavailable | unavailable | — / unavailable | unavailable | unavailable | unavailable | unavailable | unavailable | unavailable |
|
|
514
|
+
| mergeQueue | unavailable | unavailable | — / unavailable | unavailable | unavailable | unavailable | unavailable | unavailable | unavailable |
|
|
483
515
|
|
|
484
516
|
<!-- field-presence: azure-issues -->
|
|
485
517
|
|
|
@@ -517,6 +549,7 @@ What holds for all of them:
|
|
|
517
549
|
| authoredByMe | not-requested | not-requested | — / not-requested | not-requested | not-requested | not-requested | not-requested | not-requested | not-requested |
|
|
518
550
|
| stack | unavailable | unavailable | — / unavailable | unavailable | unavailable | unavailable | unavailable | unavailable | unavailable |
|
|
519
551
|
| milestone | unavailable | unavailable | — / unavailable | unavailable | unavailable | unavailable | unavailable | unavailable | unavailable |
|
|
552
|
+
| mergeQueue | unavailable | unavailable | — / unavailable | unavailable | unavailable | unavailable | unavailable | unavailable | unavailable |
|
|
520
553
|
|
|
521
554
|
<!-- field-presence: bitbucket-issues -->
|
|
522
555
|
|
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.34.0",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "GitKraken",
|