@gitkraken/core-gitlens 0.5.108 → 0.5.110

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.
Files changed (190) hide show
  1. package/CHANGELOG.md +49 -1
  2. package/dist/git/models/issue.d.ts +70 -0
  3. package/dist/git/models/issue.d.ts.map +1 -1
  4. package/dist/git/models/issue.js +17 -0
  5. package/dist/git/models/issue.js.map +1 -1
  6. package/dist/git/models/pullRequest.d.ts +81 -0
  7. package/dist/git/models/pullRequest.d.ts.map +1 -1
  8. package/dist/git/models/pullRequest.js +15 -0
  9. package/dist/git/models/pullRequest.js.map +1 -1
  10. package/dist/git/utils/issue.utils.d.ts +41 -1
  11. package/dist/git/utils/issue.utils.d.ts.map +1 -1
  12. package/dist/git/utils/issue.utils.js +80 -0
  13. package/dist/git/utils/issue.utils.js.map +1 -1
  14. package/dist/git/utils/pullRequest.utils.d.ts +11 -1
  15. package/dist/git/utils/pullRequest.utils.d.ts.map +1 -1
  16. package/dist/git/utils/pullRequest.utils.js +40 -0
  17. package/dist/git/utils/pullRequest.utils.js.map +1 -1
  18. package/dist/plus/git-github/api/github.d.ts +70 -10
  19. package/dist/plus/git-github/api/github.d.ts.map +1 -1
  20. package/dist/plus/git-github/api/github.js +284 -31
  21. package/dist/plus/git-github/api/github.js.map +1 -1
  22. package/dist/plus/git-github/api/issueSearchQuery.d.ts +49 -5
  23. package/dist/plus/git-github/api/issueSearchQuery.d.ts.map +1 -1
  24. package/dist/plus/git-github/api/issueSearchQuery.js +64 -6
  25. package/dist/plus/git-github/api/issueSearchQuery.js.map +1 -1
  26. package/dist/plus/git-github/api/pullRequestSearchQuery.d.ts +27 -1
  27. package/dist/plus/git-github/api/pullRequestSearchQuery.d.ts.map +1 -1
  28. package/dist/plus/git-github/api/pullRequestSearchQuery.js +73 -6
  29. package/dist/plus/git-github/api/pullRequestSearchQuery.js.map +1 -1
  30. package/dist/plus/git-github/models.d.ts +17 -5
  31. package/dist/plus/git-github/models.d.ts.map +1 -1
  32. package/dist/plus/git-github/models.js +14 -1
  33. package/dist/plus/git-github/models.js.map +1 -1
  34. package/dist/plus/integrations/collectionMetadata.d.ts +18 -0
  35. package/dist/plus/integrations/collectionMetadata.d.ts.map +1 -1
  36. package/dist/plus/integrations/collectionMetadata.js +24 -0
  37. package/dist/plus/integrations/collectionMetadata.js.map +1 -1
  38. package/dist/plus/integrations/integrationService.d.ts +31 -10
  39. package/dist/plus/integrations/integrationService.d.ts.map +1 -1
  40. package/dist/plus/integrations/integrationService.js +9 -1
  41. package/dist/plus/integrations/integrationService.js.map +1 -1
  42. package/dist/plus/integrations/manager.d.ts +85 -31
  43. package/dist/plus/integrations/manager.d.ts.map +1 -1
  44. package/dist/plus/integrations/models/gitHostIntegration.d.ts +18 -31
  45. package/dist/plus/integrations/models/gitHostIntegration.d.ts.map +1 -1
  46. package/dist/plus/integrations/models/gitHostIntegration.js +29 -1
  47. package/dist/plus/integrations/models/gitHostIntegration.js.map +1 -1
  48. package/dist/plus/integrations/models/integration.d.ts +1 -1
  49. package/dist/plus/integrations/models/integration.d.ts.map +1 -1
  50. package/dist/plus/integrations/models/integration.js.map +1 -1
  51. package/dist/plus/integrations/models/issueReads.d.ts +63 -1
  52. package/dist/plus/integrations/models/issueReads.d.ts.map +1 -1
  53. package/dist/plus/integrations/models/issuesIntegration.d.ts +7 -21
  54. package/dist/plus/integrations/models/issuesIntegration.d.ts.map +1 -1
  55. package/dist/plus/integrations/models/issuesIntegration.js.map +1 -1
  56. package/dist/plus/integrations/providerFilters.d.ts +2 -2
  57. package/dist/plus/integrations/providerFilters.d.ts.map +1 -1
  58. package/dist/plus/integrations/providers/accounts.d.ts +6 -0
  59. package/dist/plus/integrations/providers/accounts.d.ts.map +1 -0
  60. package/dist/plus/integrations/providers/accounts.js +30 -0
  61. package/dist/plus/integrations/providers/accounts.js.map +1 -0
  62. package/dist/plus/integrations/providers/azureDevOps.d.ts.map +1 -1
  63. package/dist/plus/integrations/providers/azureDevOps.js +1 -0
  64. package/dist/plus/integrations/providers/azureDevOps.js.map +1 -1
  65. package/dist/plus/integrations/providers/github.d.ts +9 -0
  66. package/dist/plus/integrations/providers/github.d.ts.map +1 -1
  67. package/dist/plus/integrations/providers/github.js +115 -135
  68. package/dist/plus/integrations/providers/github.js.map +1 -1
  69. package/dist/plus/integrations/providers/gitlab.d.ts +9 -0
  70. package/dist/plus/integrations/providers/gitlab.d.ts.map +1 -1
  71. package/dist/plus/integrations/providers/gitlab.js +24 -4
  72. package/dist/plus/integrations/providers/gitlab.js.map +1 -1
  73. package/dist/plus/integrations/providers/issueSorts.d.ts +36 -0
  74. package/dist/plus/integrations/providers/issueSorts.d.ts.map +1 -0
  75. package/dist/plus/integrations/providers/issueSorts.js +76 -0
  76. package/dist/plus/integrations/providers/issueSorts.js.map +1 -0
  77. package/dist/plus/integrations/providers/jira.d.ts +3 -9
  78. package/dist/plus/integrations/providers/jira.d.ts.map +1 -1
  79. package/dist/plus/integrations/providers/jira.js +5 -1
  80. package/dist/plus/integrations/providers/jira.js.map +1 -1
  81. package/dist/plus/integrations/providers/linear.d.ts +24 -9
  82. package/dist/plus/integrations/providers/linear.d.ts.map +1 -1
  83. package/dist/plus/integrations/providers/linear.js +63 -5
  84. package/dist/plus/integrations/providers/linear.js.map +1 -1
  85. package/dist/plus/integrations/providers/models.d.ts +76 -38
  86. package/dist/plus/integrations/providers/models.d.ts.map +1 -1
  87. package/dist/plus/integrations/providers/models.js +91 -105
  88. package/dist/plus/integrations/providers/models.js.map +1 -1
  89. package/dist/plus/integrations/providers/providersApi.d.ts +18 -3
  90. package/dist/plus/integrations/providers/providersApi.d.ts.map +1 -1
  91. package/dist/plus/integrations/providers/providersApi.js +24 -7
  92. package/dist/plus/integrations/providers/providersApi.js.map +1 -1
  93. package/dist/plus/integrations/providers/pullRequestReviews.d.ts +50 -0
  94. package/dist/plus/integrations/providers/pullRequestReviews.d.ts.map +1 -0
  95. package/dist/plus/integrations/providers/pullRequestReviews.js +99 -0
  96. package/dist/plus/integrations/providers/pullRequestReviews.js.map +1 -0
  97. package/dist/plus/integrations/providers/trello.d.ts +3 -9
  98. package/dist/plus/integrations/providers/trello.d.ts.map +1 -1
  99. package/dist/plus/integrations/providers/trello.js +1 -0
  100. package/dist/plus/integrations/providers/trello.js.map +1 -1
  101. package/dist/plus/integrations/providers/utils/providerPaging.d.ts.map +1 -1
  102. package/dist/plus/integrations/providers/utils/providerPaging.js +5 -1
  103. package/dist/plus/integrations/providers/utils/providerPaging.js.map +1 -1
  104. package/dist/plus/integrations/reads/broaden.d.ts +6 -0
  105. package/dist/plus/integrations/reads/broaden.d.ts.map +1 -1
  106. package/dist/plus/integrations/reads/broaden.js.map +1 -1
  107. package/dist/plus/integrations/reads/counts.d.ts +63 -1
  108. package/dist/plus/integrations/reads/counts.d.ts.map +1 -1
  109. package/dist/plus/integrations/reads/counts.js +146 -2
  110. package/dist/plus/integrations/reads/counts.js.map +1 -1
  111. package/dist/plus/integrations/reads/drains.d.ts +7 -1
  112. package/dist/plus/integrations/reads/drains.d.ts.map +1 -1
  113. package/dist/plus/integrations/reads/drains.js +13 -2
  114. package/dist/plus/integrations/reads/drains.js.map +1 -1
  115. package/dist/plus/integrations/reads/filters.d.ts +59 -9
  116. package/dist/plus/integrations/reads/filters.d.ts.map +1 -1
  117. package/dist/plus/integrations/reads/filters.js +39 -0
  118. package/dist/plus/integrations/reads/filters.js.map +1 -1
  119. package/dist/plus/integrations/reads/issueTracker.d.ts +18 -1
  120. package/dist/plus/integrations/reads/issueTracker.d.ts.map +1 -1
  121. package/dist/plus/integrations/reads/issueTracker.js +40 -3
  122. package/dist/plus/integrations/reads/issueTracker.js.map +1 -1
  123. package/dist/plus/integrations/reads/issues.d.ts +27 -3
  124. package/dist/plus/integrations/reads/issues.d.ts.map +1 -1
  125. package/dist/plus/integrations/reads/issues.js +223 -123
  126. package/dist/plus/integrations/reads/issues.js.map +1 -1
  127. package/dist/plus/integrations/reads/ordering.d.ts +101 -0
  128. package/dist/plus/integrations/reads/ordering.d.ts.map +1 -0
  129. package/dist/plus/integrations/reads/ordering.js +48 -0
  130. package/dist/plus/integrations/reads/ordering.js.map +1 -0
  131. package/dist/plus/integrations/reads/searchIssues.d.ts +7 -2
  132. package/dist/plus/integrations/reads/searchIssues.d.ts.map +1 -1
  133. package/dist/plus/integrations/reads/searchIssues.js +9 -3
  134. package/dist/plus/integrations/reads/searchIssues.js.map +1 -1
  135. package/dist/plus/integrations/reads/searchPullRequests.d.ts +4 -3
  136. package/dist/plus/integrations/reads/searchPullRequests.d.ts.map +1 -1
  137. package/dist/plus/integrations/reads/searchPullRequests.js +6 -4
  138. package/dist/plus/integrations/reads/searchPullRequests.js.map +1 -1
  139. package/dist/plus/integrations/reads/sweeps.js +1 -1
  140. package/dist/plus/integrations/reads/sweeps.js.map +1 -1
  141. package/dist/plus/integrations/reads/warnings.d.ts +35 -3
  142. package/dist/plus/integrations/reads/warnings.d.ts.map +1 -1
  143. package/dist/plus/integrations/reads/warnings.js +58 -4
  144. package/dist/plus/integrations/reads/warnings.js.map +1 -1
  145. package/dist/plus/integrations/results.d.ts +15 -0
  146. package/dist/plus/integrations/results.d.ts.map +1 -1
  147. package/dist/plus/integrations/results.js.map +1 -1
  148. package/docs/integrations.md +76 -10
  149. package/docs/kepler-read-api-parity.md +9 -0
  150. package/package.json +2 -2
  151. package/src/git/models/issue.ts +73 -0
  152. package/src/git/models/pullRequest.ts +84 -0
  153. package/src/git/utils/issue.utils.ts +91 -1
  154. package/src/git/utils/pullRequest.utils.ts +50 -0
  155. package/src/plus/git-github/api/github.ts +356 -36
  156. package/src/plus/git-github/api/issueSearchQuery.ts +67 -7
  157. package/src/plus/git-github/api/pullRequestSearchQuery.ts +81 -7
  158. package/src/plus/git-github/models.ts +29 -5
  159. package/src/plus/integrations/collectionMetadata.ts +24 -0
  160. package/src/plus/integrations/integrationService.ts +40 -12
  161. package/src/plus/integrations/manager.ts +89 -35
  162. package/src/plus/integrations/models/gitHostIntegration.ts +47 -31
  163. package/src/plus/integrations/models/integration.ts +1 -0
  164. package/src/plus/integrations/models/issueReads.ts +65 -1
  165. package/src/plus/integrations/models/issuesIntegration.ts +7 -6
  166. package/src/plus/integrations/providerFilters.ts +8 -1
  167. package/src/plus/integrations/providers/accounts.ts +34 -0
  168. package/src/plus/integrations/providers/azureDevOps.ts +1 -0
  169. package/src/plus/integrations/providers/github.ts +134 -144
  170. package/src/plus/integrations/providers/gitlab.ts +29 -10
  171. package/src/plus/integrations/providers/issueSorts.ts +89 -0
  172. package/src/plus/integrations/providers/jira.ts +9 -3
  173. package/src/plus/integrations/providers/linear.ts +77 -8
  174. package/src/plus/integrations/providers/models.ts +185 -128
  175. package/src/plus/integrations/providers/providersApi.ts +51 -13
  176. package/src/plus/integrations/providers/pullRequestReviews.ts +122 -0
  177. package/src/plus/integrations/providers/trello.ts +4 -3
  178. package/src/plus/integrations/providers/utils/providerPaging.ts +6 -1
  179. package/src/plus/integrations/reads/broaden.ts +6 -0
  180. package/src/plus/integrations/reads/counts.ts +281 -3
  181. package/src/plus/integrations/reads/drains.ts +12 -2
  182. package/src/plus/integrations/reads/filters.ts +92 -8
  183. package/src/plus/integrations/reads/issueTracker.ts +78 -4
  184. package/src/plus/integrations/reads/issues.ts +386 -194
  185. package/src/plus/integrations/reads/ordering.ts +124 -0
  186. package/src/plus/integrations/reads/searchIssues.ts +15 -3
  187. package/src/plus/integrations/reads/searchPullRequests.ts +12 -4
  188. package/src/plus/integrations/reads/sweeps.ts +1 -1
  189. package/src/plus/integrations/reads/warnings.ts +84 -2
  190. package/src/plus/integrations/results.ts +15 -0
package/CHANGELOG.md CHANGED
@@ -6,6 +6,52 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.5.110] - 2026-08-14
10
+
11
+ ### Added
12
+
13
+ - Adds `draft` to `PullRequestSearchCriteria`, a tri-state boolean that narrows the filtered PR search on draft state — `true` returns only drafts, `false` only ready-for-review, omitted places no constraint; `false` is a distinct request rather than the absence of one, so emission and validation both key on `!= null`. GitHub/GHE emit `draft:true` / `draft:false` on every relationship × state facet and declare the flag on `getSupportedFilters().pullRequestSearch`. Other providers report it false and the facade refuses the read all-or-nothing, the same contract the criteria already follow: dropping an unsupported criterion would widen the provider query while its page and cursor still describe the narrower set. Follow-up to [#5665](https://github.com/gitkraken/vscode-gitlens/issues/5665), which shipped the filtered PR search this extends ([#5708](https://github.com/gitkraken/vscode-gitlens/issues/5708)) (plus/integrations, git, plus/git-github)
14
+
15
+ - Adds `updatedAfter` / `createdAfter` (ISO `YYYY-MM-DD`) to `PullRequestSearchCriteria`, the recency window the filtered issue search already had — a date bound is the most effective narrowing on a large scope, and it is what lets a caller bound a broad closed-PR read instead of capping page iterations. GitHub/GHE emit `updated:>=` / `created:>=` on every relationship × state facet, sanitizing the value and dropping one emptied by sanitizing rather than sending a bare qualifier GitHub rejects, and declare the two flags on `getSupportedFilters().pullRequestSearch`. Other providers report them false and the facade refuses the read all-or-nothing, the same contract the criteria already follow: dropping an unsupported date would widen the provider query while its page and cursor still describe the narrower set. Follow-up to [#5665](https://github.com/gitkraken/vscode-gitlens/issues/5665), which shipped the filtered PR search this extends ([#5707](https://github.com/gitkraken/vscode-gitlens/issues/5707)) (plus/integrations, git, plus/git-github)
16
+
17
+ - Adds an optional `sort` (`field:direction`) to the filtered pull-request search, inside `criteria` on `searchPullRequestsPage`, defaulting to `updated:desc` — the order it hardcoded before, so an omitted `sort` is byte-identical to today's query (`sort:updated`, bare). The vocabulary is `created` and `updated` in both directions, deliberately narrower than the issue set: it is the intersection of what GitHub's PR search can express server-side and what a normalized pull request carries, because this read always merges its relationship × state facets in the facade and must re-order the union itself — so a field GitHub cannot order PRs by, or one a merged page cannot reproduce, is left out rather than advertised and then approximated. Relevance is refused (unstable, and it has no comparable value to re-sort a merge by), and priority is not a pull-request concept on any provider that has PRs. Two of the issue side's three contract parts hold verbatim. **The key is validated, never downgraded**: `getSupportedFilters().pullRequestSearch` gains `sorts`, and a key the provider can't express refuses the whole read with a warning + `fetchFailed`, because at a bounded result window another order is another subset and the cursor that comes with it describes that other subset. **A page assembled from several facets is ordered, not concatenated**: GitHub's per-relationship × per-state searches merged unordered before this, so the union was ordered only within each facet; it is now ordered as a whole. That re-sort runs client-side unconditionally — GitHub's server-side PR sort has been unreliable (the per-branch PR path re-sorts for the same reason) — so the order holds even when the provider ignores the qualifier. The third differs, and only because the read differs: the issue search is cursor-only and so must REFUSE a cursor threaded under a new key, while this read drains to the requested page, so `sort` joins text and scope in the cursor fingerprint and a changed key simply degrades to a re-drain from page 1 — the position it reports is always the position it actually reached. The result-ceiling omission now reflects the requested order, since which matches are reachable depends on it (plus/integrations, git, plus/git-github)
18
+
19
+ - Adds `IntegrationService.countPullRequests`, the pull-request twin of `countIssues`: how many PRs match each scope, fetching none of them — what a "this will fetch ~N pull requests" preview and a live count beside an unapplied filter both need. It closes the read-API asymmetry the [#5665](https://github.com/gitkraken/vscode-gitlens/issues/5665) audit flagged, where an explicit "search everywhere" on pull requests ran blind while the same action on issues showed a number. GitHub reports `issueCount` on a zero-node `search` selection, so this transfers no pull requests at all, and it takes the same `criteria` as `searchPullRequestsPage` validated against the same capability table, so a count never previews a fetch that cannot happen. Everything the issue count contracts, this contracts identically: `key` is caller-owned and echoed back so a batch needs no positional matching, a duplicate key refuses the whole call rather than being deduped, `count: undefined` means the provider did not report one and is NOT zero, and a refused or failed scope drops only itself and sets `fetchFailed` while every other count still comes back. One difference is inherent to pull requests: a scope's `states` are counted as independent searches, so the reported `count` is the LARGEST of them — the same total `searchPullRequestsPage` surfaces, and the value `exceedsProviderLimit` compares against the per-search ceiling — never their sum, which would claim a total the read never returns. Several states in one scope are therefore fine (they are disjoint); several relationships are refused (they are OR-ed, so overlapping matches would be double-counted), one scope per relationship. GitHub/GHE only, matching `searchPullRequestsPage` ([#5709](https://github.com/gitkraken/vscode-gitlens/issues/5709)) (plus/integrations, plus/git-github)
20
+
21
+ - Adds `PullRequestFilter.Reviewed`, the "pull requests I have already reviewed" relationship (GitHub `reviewed-by:@me`), so a "needs my review" surface can separate _waiting on the author after my review_ from _waiting for my review_ — until now only the latter (`ReviewRequested`) was expressible. It is the one relationship whose account-wide vocabulary is WIDER than the repo-scoped one: the repo-scoped read builds `GetPullRequestsOptions`, which no provider SDK gives a reviewed-by axis, so advertising it there would let the read accept the filter and then silently drop the constraint. `getSupportedFilters().pullRequestsAccountWide` and `.pullRequestSearch.relationships` declare it for GitHub/GHE; `.pullRequests` (repo-scoped) does not, and that read refuses it (plus/integrations, plus/git-github)
22
+ - Adds `PullRequestReviewer.commitOid`, the head commit a review was submitted against, so a consumer can tell "the PR moved past my review" (review oid !== the PR's current head) from a review still at the tip — without a per-review timestamp. GitHub-only, and populated only on the full projection (plus/git-github, plus/integrations)
23
+ - Reads GitHub's `viewerLatestReview` alongside `latestReviews`, and unions it in when the two disagree. `latestReviews` is capped at 25 nodes, so on a heavily-reviewed pull request the current user's own review — the one row a "needs my review" surface is actually asking about — could fall outside the window and arrive as no review at all. Deduplicated by review id, so the common case adds nothing (plus/git-github)
24
+ - Dismissed reviews now survive the provider round-trip instead of being dropped by the projection. This is the case the `commitOid` field exists for: GitHub's _dismiss stale reviews_ branch rule flips an approval to dismissed on the next push, and `reviewed-by:@me` still returns that pull request — so dropping it handed a consumer a PR from the reviewed set with NO review row for the current user, indistinguishable from never having reviewed it. provider-apis' `GitPullRequestReviewState` has no member for it, so the local `ProviderPullRequest` fork (which already widens `reviews` for `commitOid`) widens the state too, and `toProviderPullRequestWithUniqueId` narrows it back at the SDK boundary, where `getActionablePullRequests` only knows the upstream vocabulary. Unsubmitted (`Pending`) reviews are still dropped — they carry no verdict and are visible only to their author (plus/integrations)
25
+ - Adds `latestReviews` to `PullRequestShape` — already carried by the `PullRequest` class but absent from the shape the sweep and search surfaces declare, so a consumer holding the declared result type could not read submitted reviews (nor the `commitOid` on them) without downcasting to the concrete class (git)
26
+ - Adds `includeReviews` to the account-wide pull-request sweep options: fetch the full projection (review decision, review requests, latest reviews) rather than the default lite one. Opt-in because it selects a much heavier GraphQL fragment — the same one that forced the filtered search down to a 30-node default page, so the read pages at that size; budget `maxPages` accordingly. It affects projection only, never which pull requests come back, and the document's weight scales with the relationship × state facets in flight. GitHub/GHE only; other providers return their native shape, so this is a breadth request rather than a guarantee and does not refuse (plus/integrations)
27
+
28
+ ### Changed
29
+
30
+ - Routes every GitHub/GHE account-wide pull-request read through one search, removing the SDK `getPullRequestsForUser` fallback that served the reads it happened to be able to express (no state set, no exact relationships, lite projection only). Two routes meant the same read answered differently depending on options that were supposed to select only a projection or a relationship: **only the search applies the Launchpad ignored-repository and included/ignored-organization qualifiers**, so `includeReviews: true` on an otherwise unfiltered sweep silently dropped pull requests from ignored repositories, and `sort:updated` applied on one path and relevance ranking on the other. An unfiltered account-wide read now emits a single facet with no relationship qualifier, which is the `involves:@me` + `is:open` question the fallback asked — with those qualifiers and that ordering applied consistently. A consumer that relied on ignored repositories appearing in an unfiltered sweep will see fewer rows; that was the inconsistency, not a feature (plus/integrations)
31
+ - Ties the account-wide search page size to the projection instead of to how a caller spelled the request. The full PR fragment is what GitHub rejects at 100 nodes with `Resource limits for this query exceeded`, so every read that selects it now pages at 30 — including one that omits `summary` — and only the lite shape asks for the 100-node maximum. `summary` therefore means one thing (which fragment) rather than three. To keep that from costing coverage, `GitHubApi.searchMyPullRequests` — whose `IntegrationResult<T[]>` return has no paging channel to hand a cursor back on — now drains up to four pages itself, deduplicated by pull-request URL, which covers more than the single 100-node page it served before (plus/git-github)
32
+ - Splits the pull-request review mapping out of `providers/models.ts` into `providers/pullRequestReviews.ts` (state tables, review/request projections, review-decision derivation) and the member mapping into `providers/accounts.ts`. Behavior-identical; `models.ts` drops from ~1880 to ~1750 lines. `fromProviderAccount`, `toProviderReviews` and `providerPullRequestReviewStateDismissed` now import from those modules rather than from `providers/models.js` (plus/integrations)
33
+
34
+ ### Fixed
35
+
36
+ - Imports the `@gitkraken/provider-apis` subpath helpers (`/entity-identifiers`, `/provider-utils`) as named exports instead of default-import-then-destructure. Both subpaths are CJS bundles that set `__esModule: true` and export only named members, so no default exists: Node's ESM→CJS interop hands one out anyway (`default` = `module.exports`, which is why every test suite passed), but a bundler that honors `__esModule` — webpack here, esbuild or Rollup in a consumer — does not, and the module-scope destructure then evaluates `undefined` and throws before anything else runs. In this repo's own extension bundle that meant the extension did not activate at all (`Cannot destructure property 'EntityIdentifierUtils' of '..._entity_identifiers__WEBPACK_IMPORTED_MODULE_0___default(...)'`), and the published `dist` carried the same import, so a consumer bundling 0.5.107-0.5.109 could hit it too. Only the package's main entry ships a real default export; these two never did. Broken on this branch since `097a14a6d` (#5540); `main` has used the named form since the integrations package was extracted (plus/integrations)
37
+ - Drops a review whose provider-apis state has no local mapping instead of publishing it with `state: undefined`. provider-apis' GitHub normalizer maps only its four known review states, and its repo-scoped field set selects `latestReviews`, so a real dismissed review arrived carrying a state its own type says cannot occur — an unswitchable value on the newly-published `PullRequestShape.latestReviews`, which then round-tripped through the `ReviewRequested` fallback and reported a dismissed review as an outstanding review request (plus/integrations)
38
+ - Stops an unsubmitted review draft from appearing among reviews already submitted. `PENDING` is in GitHub's review-state enum on both the `latestReviews` and `viewerLatestReview` selections, and a draft is visible only to its own author — so it reached a "needs my review" consumer as evidence the review was done, and an author with both a submitted review and a newer draft produced two rows with conflicting states for the same reviewer (plus/git-github)
39
+
40
+ ## [0.5.109] - 2026-08-12
41
+
42
+ ### Added
43
+
44
+ - Adds an optional `sort` (`field:direction`, e.g. `updated:desc`) to every issue read: `searchIssuesPage` takes it inside `criteria`, and `listIssuesPage` / `listIssueTrackerIssuesPage` take it as an option. Ordering was previously fixed and undocumentedly inconsistent — the filtered GitHub search hardcoded `sort:updated`, Azure ordered by created date, GitLab's account-wide read by created date, Linear by created date, Jira per project by nothing at all, and GitHub's account-wide "my issues" read by relevance. Three parts of the contract are load-bearing. **The key is validated, never downgraded**: `getSupportedFilters()` gains `issueSorts` (repo-scoped, and the only surface an issue tracker has) and `issueSortsAccountWide` (a different vocabulary, not a subset — GitLab's two reads are GraphQL and REST), plus `issueSearch.sorts`, and a key the provider can't express refuses the whole read with a warning + `fetchFailed`, because at a bounded result window another order is another subset and the cursor that comes with it describes that other subset. **A page assembled from several provider queries is ordered, not concatenated**: GitHub's per-relationship searches, GitLab across repositories, Azure and the trackers across projects all merged their results unordered before this, so the union was ordered only within each part; it is now ordered as a whole, and a key no normalized issue carries (`priority`, `dueDate`, `resolved`) is refused for such a page rather than served as concatenated per-scope runs — the same key still works for a single repository or project, where the provider does the ordering. **A cursor is bound to the order that produced it**: threading an issue-search cursor under a different key is refused with a warning + `fetchFailed` rather than resumed into a differently-ordered set, and rather than silently restarted — this read is cursor-only, so its reported position comes from the `page` supplied alongside the cursor, and a restart would publish page 1's rows as page N. Drop the cursor to change the order. A cursor persisted before this change carries no key, still resumes, and is sealed with the current one. The result-ceiling omission now carries `sort` and its message names the order, since which matches are reachable depends on it. One key's meaning is narrower than its name: `reactions` orders by THUMBS-UP, not by the total across every reaction type, because thumbs-up is the only reaction count a normalized issue carries — ordering by the total would rank a page by a number the consumer cannot see, and would disagree with the comparator that re-sorts a merged page. Requires `@gitkraken/provider-apis` 0.56.0 for every provider except GitHub, whose translation table lives in this repo (plus/integrations, git, plus/git-github)
45
+
46
+ ### Changed
47
+
48
+ - Changes what a page of six issue reads contains, now that ordering is expressible: `listIssuesPage` and `listIssueTrackerIssuesPage` pass `updated:desc` explicitly rather than leaving each provider's own default. Account-wide, **GitHub** was answering in relevance (best-match) order because that read never requested one, **GitLab** ordered by creation date (REST `created_at`) and **Azure DevOps** by creation date. Repository-scoped, **GitLab** pages arrive most-recently-updated first: the order requested of GitLab was already that, but each page used to be re-sorted oldest-first afterwards, which described no order across pages at all — that inversion is gone. On the trackers, **Jira** per project was emitting no `ORDER BY` whatsoever (an unspecified order, which over offset paging duplicated and dropped issues between pages) and **Linear** ordered by creation date. Unaffected: GitHub repository-scoped and the filtered search, which already requested `sort:updated`, and Trello, which already sent `sort:edited`. Pass an explicit `sort` to choose a different key; the default is applied only where the provider can express it, so a provider that cannot order at all is left exactly as it was. Note `GitHubApi.searchMyIssues` still emits no `sort:` qualifier when called directly with none — the default is the facade's, not that method's
49
+ - Stops asking Jira to expand issue transitions on every list read. `@gitkraken/provider-apis` 0.56.0 made that expansion optional (it defaults to on, as it always was), and Jira computes an issue's available transitions per issue from the workflow and the reader's permissions — so a page of 100 paid for 100 of them in server work and response payload, on a path that runs at startup. Nothing in this package reads `statusTransitions` off a list, so the cost bought nothing; the singular `getIssue` still expands them, which is where a status change is offered from. No consumer-visible change beyond the latency and payload: `statusTransitions` comes back empty on list rows, where it was never read (plus/integrations)
50
+ - Refuses an invalid issue read outright instead of reporting it as an incomplete one. `@gitkraken/provider-apis` 0.56.0 gained a second caller-contract error alongside `UnsupportedSortError` — `InvalidRequestError`, raised before any request goes out for a Jira project-key list that is empty or longer than one search can carry, a non-integer `pageSize`, an unknown current-user filter, or a Jira Server read with no `baseUrl` to address the API — and every provider fan-out here degraded it the way it degrades a per-scope failure. That produced N identical `CollectionScopeFailure`s and an empty `partial` page, which describes an invalid call as a read that was merely incomplete: a consumer would show a truncation warning and a retry for a call that cannot succeed until its arguments change. Both codes are now re-thrown from every fan-out (plus/integrations)
51
+ - Fixes issues moving between pages of a paged Azure DevOps or Jira read. Both re-run their whole query per page (Azure slices an id list client-side, Jira Data Center pages from a raw `startAt` offset), so two rows the provider considered tied could swap places between two page requests — serving one twice and skipping the other. Every clause those reads emit now carries a unique second column (`[System.Id]`, `key`) — the requested one and the default one alike, since the hazard never depended on the caller having asked for an order — which makes the order total. Only rows that compared equal are affected, and their relative order was previously arbitrary rather than defined. Inherited from `@gitkraken/provider-apis`; GitLab's account-wide REST read is the one this cannot fix, since that endpoint exposes no secondary sort column
52
+ - Changes what `ProviderSweepTargetEvent.domain` reports, and therefore how a consumer buckets `onTargetSettled` events shipped in [0.5.108]. It used to come out of the per-target slice, which meant the domain the read resolved on the targets that got that far and the domain the caller asked for on the ones rejected earlier — a field whose meaning depended on which guard rejected the target. It is now resolved by one rule for every target however far it got (configured connection, explicit domain, then the provider's primary configured host), normalized to a host so a target addressed as `https://ghe.example.com/api/v3` and one addressed by its configured domain stop reading as two hosts, and **`undefined` for every cloud provider**, which has a single host and nothing to disambiguate — where the previous field sometimes carried that host, splitting one provider across two buckets on the shape of the selector alone. Group by `providerId` and treat `domain` as a label, not part of the key (plus/integrations)
53
+ - Changes `broadenIssues` pages on GitLab, and documents why it takes no `sort`. It accepts no ordering — one of its pages spans several orgs at independent provider positions in a cursor bundle, so honoring an order across them needs a k-way merge with a buffer per org rather than a sort of what arrived, and `searchIssuesPage({ repos, criteria: { sort } })` is the ordered answer to the same question. But because it reads through the same repository-scoped read as `listIssuesPage`, it inherits that read's fix: its GitLab pages used to be re-sorted oldest-updated-first and now arrive most-recently-updated first. The set it drains is unchanged
54
+
9
55
  ## [0.5.108] - 2026-08-07
10
56
 
11
57
  ### Added
@@ -213,7 +259,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
213
259
 
214
260
  - Initial release. Bundles `@gitlens/utils`, `@gitlens/git`, `@gitlens/git-cli`, `@gitlens/ai`, and `@gitlens/git-github` into a single core npm package with subpath exports.
215
261
 
216
- [unreleased]: https://github.com/gitkraken/vscode-gitlens/compare/releases/core/v0.5.108...HEAD
262
+ [unreleased]: https://github.com/gitkraken/vscode-gitlens/compare/releases/core/v0.5.110...HEAD
263
+ [0.5.110]: https://github.com/gitkraken/vscode-gitlens/compare/releases/core/v0.5.109...gitkraken:releases/core/v0.5.110
264
+ [0.5.109]: https://github.com/gitkraken/vscode-gitlens/compare/releases/core/v0.5.108...gitkraken:releases/core/v0.5.109
217
265
  [0.5.108]: https://github.com/gitkraken/vscode-gitlens/compare/releases/core/v0.5.107...gitkraken:releases/core/v0.5.108
218
266
  [0.5.107]: https://github.com/gitkraken/vscode-gitlens/compare/releases/core/v0.5.106...gitkraken:releases/core/v0.5.107
219
267
  [0.5.106]: https://github.com/gitkraken/vscode-gitlens/compare/releases/core/v0.5.105...gitkraken:releases/core/v0.5.106
@@ -21,6 +21,57 @@ export type IssueSearchRelationship =
21
21
  | 'any-assignee'
22
22
  /** Assigned to nobody. The complement of `any-assignee`, not a broadening of it. */
23
23
  | 'unassigned';
24
+ /**
25
+ * A field an issue read can be ordered by, provider-neutral. No provider expresses all of them: each read
26
+ * validates the requested key against the capability its provider declares and refuses one it can't express
27
+ * server-side, rather than serving a differently-ordered list under the name of the one that was asked for.
28
+ *
29
+ * `closed` and `resolved` are deliberately SEPARATE, not two names for the same date. Azure DevOps tracks both
30
+ * and they differ (an issue can be closed without being resolved and resolved without being closed), and Jira
31
+ * has no close date at all — it models the equivalent as `resolutiondate`. Collapsing them would force one of
32
+ * those two providers to lie about which date it ordered by.
33
+ */
34
+ export type IssueSortField =
35
+ /** Creation date. */
36
+ 'created'
37
+ /** Last activity. */
38
+ | 'updated'
39
+ /** Close date. Only where the provider orders by it server-side — notably NOT GitHub. */
40
+ | 'closed'
41
+ /** Resolution date (Jira `resolutiondate`, Azure `ResolvedDate`). Distinct from `closed`. */
42
+ | 'resolved'
43
+ /** Number of comments. */
44
+ | 'comments'
45
+ /** Reactions/upvotes. */
46
+ | 'reactions'
47
+ /** The provider's own priority field. */
48
+ | 'priority'
49
+ /** Due date. */
50
+ | 'dueDate'
51
+ /** Alphabetical by title. */
52
+ | 'title';
53
+ /**
54
+ * How an issue read is ordered, as `field:direction` — the same shape `BranchSorting`/`TagSorting` already use,
55
+ * so it is one serializable string a consumer can persist, compare, or bind straight to a setting or a dropdown.
56
+ */
57
+ export type IssueSorting = `${IssueSortField}:asc` | `${IssueSortField}:desc`;
58
+ /**
59
+ * The order every issue read that HAS a default applies when the caller asks for none: most recently updated
60
+ * first, which is what those reads served before ordering was an option.
61
+ *
62
+ * One definition rather than one per layer, because it is a promise made in several places at once — the criteria
63
+ * model documents it, the GitHub query emits it, and the result-ceiling warning quotes it — and three copies would
64
+ * be free to disagree about what "the default" is.
65
+ *
66
+ * Note it is not a default every read has, and the two layers differ. The API client's account-wide "my issues"
67
+ * search (`GitHubApi.searchMyIssues`) never requested an order, so a direct caller omitting `sort` still gets
68
+ * GitHub's relevance order — the default is opt-in there, to keep that read's already-shipped results unchanged.
69
+ * The FACADE does apply it: GitHub declares `updated:desc` among its account-wide keys, so
70
+ * `readAccountWideIssuesPage` resolves the omission to this default and forwards it, and that read's emitted query
71
+ * gained a `sort:updated` qualifier it did not have before. A read whose surface cannot express even this key is
72
+ * the only one the facade leaves in the provider's own order.
73
+ */
74
+ export declare const defaultIssueSort: IssueSorting;
24
75
  /**
25
76
  * What a filtered issue search narrows on: a provider-neutral criteria set, translated to each provider's own
26
77
  * query language by its integration.
@@ -63,6 +114,19 @@ export interface IssueSearchCriteria {
63
114
  withoutLinkedPullRequest?: boolean;
64
115
  /** Includes issues in archived repositories, which are excluded by default. */
65
116
  includeArchived?: boolean;
117
+ /**
118
+ * How to order the results. Omitted means `updated:desc`, which is what this search has always served.
119
+ *
120
+ * Validated like every other criterion — all-or-nothing against {@link IssueSearchCapabilities.sorts}: a key
121
+ * the provider can't express server-side refuses the WHOLE read rather than falling back to the default.
122
+ * Serving another order is not a smaller error than serving a wider result: combined with the provider's
123
+ * result ceiling it returns a different subset than was asked for, and the paging that comes with it describes
124
+ * that other subset.
125
+ *
126
+ * Do not change it mid-pagination. A cursor carries the sort it was produced under, and threading it under a
127
+ * different key is refused rather than serving a sequence with gaps and repeats: drop the cursor instead.
128
+ */
129
+ sort?: IssueSorting;
66
130
  }
67
131
  /**
68
132
  * Which {@link IssueSearchCriteria} fields a provider's filtered issue search can express server-side.
@@ -81,6 +145,12 @@ export interface IssueSearchCapabilities {
81
145
  withoutLinkedPullRequest: boolean;
82
146
  /** Whether {@link IssueSearchCriteria.state} can select anything other than the provider's default (open). */
83
147
  states: boolean;
148
+ /**
149
+ * Sort keys the search can express IN SERVER. Always contains at least `updated:desc` — the historical default
150
+ * — when the search exists at all, so it is never empty for a usable surface; a provider without a filtered
151
+ * search reports an empty `relationships`, which is already the signal that there is no surface to order.
152
+ */
153
+ sorts: IssueSorting[];
84
154
  }
85
155
  export interface IssueShape extends IssueOrPullRequest {
86
156
  /** `undefined` when the provider can't resolve the author, e.g. a deleted GitHub account */
@@ -1 +1 @@
1
- {"version":3,"file":"issue.d.ts","sourceRoot":"","sources":["../../../src/git/models/issue.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AACjF,OAAO,KAAK,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAC3F,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,2BAA2B,CAAC;AAE9E,oFAAoF;AACpF,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,QAAQ,GAAG,KAAK,CAAC;AAEzD;;;;;GAKG;AACH,MAAM,MAAM,uBAAuB;AAClC,oCAAoC;AAClC,UAAU;AACZ,oCAAoC;GAClC,UAAU;AACZ,iCAAiC;GAC/B,WAAW;AACb,sGAAsG;GACpG,cAAc;AAChB,oFAAoF;GAClF,YAAY,CAAC;AAEhB;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,mBAAmB;IACnC;;;;;;;;OAQG;IACH,aAAa,CAAC,EAAE,uBAAuB,EAAE,CAAC;IAC1C;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,+DAA+D;IAC/D,KAAK,CAAC,EAAE,gBAAgB,CAAC;IACzB,sFAAsF;IACtF,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,+FAA+F;IAC/F,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,+BAA+B;IAC/B,YAAY,CAAC,EAAE,MAAM,CAA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MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,eAAe;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,qBAAqB,CAAC;IACpC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,EAAE,CAAC,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,MAAM,iCAAiC,GAAG,oBAAoB,CACnE,WAAW,CAAC,4BAA4B,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,EAC7D,UAAU,EACV,IAAI,GAAG,QAAQ,GAAG,YAAY,GAAG,UAAU,CAC3C,GACA,oBAAoB,CAAC,WAAW,CAAC,4BAA4B,CAAC,MAAM,CAAC,EAAE,QAAQ,CAAC,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC"}
@@ -6,6 +6,23 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
6
6
  };
7
7
  var Issue_1;
8
8
  import { loggable } from '../../utils/decorators/log.js';
9
+ /**
10
+ * The order every issue read that HAS a default applies when the caller asks for none: most recently updated
11
+ * first, which is what those reads served before ordering was an option.
12
+ *
13
+ * One definition rather than one per layer, because it is a promise made in several places at once — the criteria
14
+ * model documents it, the GitHub query emits it, and the result-ceiling warning quotes it — and three copies would
15
+ * be free to disagree about what "the default" is.
16
+ *
17
+ * Note it is not a default every read has, and the two layers differ. The API client's account-wide "my issues"
18
+ * search (`GitHubApi.searchMyIssues`) never requested an order, so a direct caller omitting `sort` still gets
19
+ * GitHub's relevance order — the default is opt-in there, to keep that read's already-shipped results unchanged.
20
+ * The FACADE does apply it: GitHub declares `updated:desc` among its account-wide keys, so
21
+ * `readAccountWideIssuesPage` resolves the omission to this default and forwards it, and that read's emitted query
22
+ * gained a `sort:updated` qualifier it did not have before. A read whose surface cannot express even this key is
23
+ * the only one the facade leaves in the provider's own order.
24
+ */
25
+ export const defaultIssueSort = 'updated:desc';
9
26
  let Issue = Issue_1 = class Issue {
10
27
  provider;
11
28
  id;
@@ -1 +1 @@
1
- {"version":3,"file":"issue.js","sourceRoot":"","sources":["../../../src/git/models/issue.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAsGrD,IAAM,KAAK,aAAX,MAAM,KAAK;IAIA,QAAQ;IACR,EAAE;IACF,MAAM;IACN,KAAK;IACL,GAAG;IACH,WAAW;IACX,WAAW;IACX,MAAM;IACN,KAAK;IACL,MAAM;IACN,SAAS;IACT,UAAU;IACV,UAAU;IACV,MAAM;IACN,aAAa;IACb,aAAa;IACb,IAAI;IACJ,OAAO;IACP,MAAM;IACN,SAAS;IAtBjB,IAAI,GAAG,OAAO,CAAC;IAExB,YACiB,QAA2B,EAC3B,EAAU,EACV,MAA0B,EAC1B,KAAa,EACb,GAAW,EACX,WAAiB,EACjB,WAAiB,EACjB,MAAe,EACf,KAA8B,EAC9B,MAA+B,EAC/B,SAAwB,EACxB,UAA4B,EAC5B,UAAiB,EACjB,MAAqB,EACrB,aAAsB,EACtB,aAAsB,EACtB,IAAa,EACb,OAAsB,EACtB,MAAe,EACf,SAAkB;wBAnBlB,QAAQ;kBACR,EAAE;sBACF,MAAM;qBACN,KAAK;mBACL,GAAG;2BACH,WAAW;2BACX,WAAW;sBACX,MAAM;qBACN,KAAK;sBACL,MAAM;yBACN,SAAS;0BACT,UAAU;0BACV,UAAU;sBACV,MAAM;6BACN,aAAa;6BACb,aAAa;oBACb,IAAI;uBACJ,OAAO;sBACP,MAAM;yBACN,SAAS;IACvB,CAAC;IAEG,AAAP,MAAM,CAAC,EAAE,CAAC,KAAc;QACvB,OAAO,KAAK,mBAAiB,CAAC;IAC/B,CAAC;CACD,CAAA;AA7BY,KAAK;IADjB,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;GACP,KAAK,CA6BjB;;AAED,MAAM,CAAN,IAAkB,qBAOjB;AAPD,WAAkB,qBAAqB;IACtC,qEAAW,CAAA;IACX,0EAAa,CAAA;IACb,oEAAU,CAAA;IACV,sEAAW,CAAA;IACX,kEAAS,CAAA;IACT,iEAAQ,CAAA;AACT,CAAC,EAPiB,qBAAqB,KAArB,qBAAqB,QAOtC"}
1
+ {"version":3,"file":"issue.js","sourceRoot":"","sources":["../../../src/git/models/issue.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AA+D5D;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAiB,cAAc,CAAC;AAgGtD,IAAM,KAAK,aAAX,MAAM,KAAK;IAIA,QAAQ;IACR,EAAE;IACF,MAAM;IACN,KAAK;IACL,GAAG;IACH,WAAW;IACX,WAAW;IACX,MAAM;IACN,KAAK;IACL,MAAM;IACN,SAAS;IACT,UAAU;IACV,UAAU;IACV,MAAM;IACN,aAAa;IACb,aAAa;IACb,IAAI;IACJ,OAAO;IACP,MAAM;IACN,SAAS;IAtBjB,IAAI,GAAG,OAAO,CAAC;IAExB,YACiB,QAA2B,EAC3B,EAAU,EACV,MAA0B,EAC1B,KAAa,EACb,GAAW,EACX,WAAiB,EACjB,WAAiB,EACjB,MAAe,EACf,KAA8B,EAC9B,MAA+B,EAC/B,SAAwB,EACxB,UAA4B,EAC5B,UAAiB,EACjB,MAAqB,EACrB,aAAsB,EACtB,aAAsB,EACtB,IAAa,EACb,OAAsB,EACtB,MAAe,EACf,SAAkB;wBAnBlB,QAAQ;kBACR,EAAE;sBACF,MAAM;qBACN,KAAK;mBACL,GAAG;2BACH,WAAW;2BACX,WAAW;sBACX,MAAM;qBACN,KAAK;sBACL,MAAM;yBACN,SAAS;0BACT,UAAU;0BACV,UAAU;sBACV,MAAM;6BACN,aAAa;6BACb,aAAa;oBACb,IAAI;uBACJ,OAAO;sBACP,MAAM;yBACN,SAAS;IACvB,CAAC;IAEG,AAAP,MAAM,CAAC,EAAE,CAAC,KAAc;QACvB,OAAO,KAAK,mBAAiB,CAAC;IAC/B,CAAC;CACD,CAAA;AA7BY,KAAK;IADjB,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;GACP,KAAK,CA6BjB;;AAED,MAAM,CAAN,IAAkB,qBAOjB;AAPD,WAAkB,qBAAqB;IACtC,qEAAW,CAAA;IACX,0EAAa,CAAA;IACb,oEAAU,CAAA;IACV,sEAAW,CAAA;IACX,kEAAS,CAAA;IACT,iEAAQ,CAAA;AACT,CAAC,EAPiB,qBAAqB,KAArB,qBAAqB,QAOtC"}
@@ -21,6 +21,15 @@ export interface PullRequestShape extends IssueOrPullRequest {
21
21
  readonly mergeableState?: PullRequestMergeableState;
22
22
  readonly reviewDecision?: PullRequestReviewDecision;
23
23
  readonly reviewRequests?: PullRequestReviewer[];
24
+ /**
25
+ * Reviews already submitted, as opposed to the still-pending {@link reviewRequests}. Absent means the read
26
+ * didn't fetch reviews; empty means nobody has reviewed. Those are different answers and neither substitutes
27
+ * for the other, so which one you get is provider- and read-dependent: GitHub/GHE carry reviews on the
28
+ * repo-scoped read and the filtered search, and on the account-wide read only where `includeReviews` opts
29
+ * into the full projection, while GitLab never populates the field at all.
30
+ * {@link PullRequestReviewer.commitOid} is the narrower promise: only the full GitHub/GHE projection has it.
31
+ */
32
+ readonly latestReviews?: PullRequestReviewer[];
24
33
  readonly assignees?: PullRequestMember[];
25
34
  readonly project?: IssueProject;
26
35
  readonly number?: number;
@@ -125,10 +134,45 @@ export declare enum PullRequestFilter {
125
134
  Author = "author",
126
135
  Assignee = "assignee",
127
136
  ReviewRequested = "review-requested",
137
+ /**
138
+ * PRs the user has already reviewed (GitHub `reviewed-by:@me`), as opposed to `ReviewRequested` (a
139
+ * still-pending request). Distinguishes "waiting on the author after my review" from "waiting for my
140
+ * review". Not expressible on the repo-scoped listing — no provider SDK exposes a reviewed-by axis there —
141
+ * so it is advertised for the account-wide read and for the filtered search (which can still bound itself
142
+ * to repositories or an org), never under `supportedPullRequestFilters`.
143
+ */
144
+ Reviewed = "reviewed-by",
128
145
  Mention = "mention"
129
146
  }
130
147
  /** Selects which pull request states a read should include. `all` covers open + closed + merged. */
131
148
  export type PullRequestStateFilter = 'open' | 'closed' | 'merged' | 'all';
149
+ /**
150
+ * A field a pull-request read can be ordered by, provider-neutral.
151
+ *
152
+ * Only two, and deliberately so — unlike {@link IssueSortField} this is the INTERSECTION of what GitHub's PR
153
+ * search can order by server-side and what a {@link PullRequestShape} carries, because the filtered PR search
154
+ * always merges its relationship × state facets in the facade and so must re-order the union itself (see
155
+ * `getPullRequestComparator`). `created` and `updated` are both. A field GitHub cannot order PRs by, or one a
156
+ * merged page can't reproduce, is left out rather than advertised and then approximated: relevance is unstable
157
+ * and has no comparable value on a merge, and priority is not a pull-request concept on any provider that has PRs.
158
+ */
159
+ export type PullRequestSortField =
160
+ /** Creation date. */
161
+ 'created'
162
+ /** Last activity. */
163
+ | 'updated';
164
+ /**
165
+ * How a pull-request read is ordered, as `field:direction` — the same serializable shape {@link IssueSorting}
166
+ * and `BranchSorting` use, so a consumer can persist it, compare it, or bind it straight to a setting or dropdown.
167
+ */
168
+ export type PullRequestSorting = `${PullRequestSortField}:asc` | `${PullRequestSortField}:desc`;
169
+ /**
170
+ * The order the filtered pull-request search applies when the caller asks for none: most recently updated first,
171
+ * which is what it served before ordering was an option. Named once rather than per layer — the criteria model
172
+ * documents it, the GitHub query emits it, and the result-ceiling warning quotes it — so the three cannot
173
+ * disagree about what "the default" is.
174
+ */
175
+ export declare const defaultPullRequestSort: PullRequestSorting;
132
176
  /**
133
177
  * What the filtered pull-request search narrows on.
134
178
  *
@@ -150,8 +194,27 @@ export interface PullRequestSearchCriteria {
150
194
  relationships?: PullRequestFilter[];
151
195
  /** Pull request states to union. Empty/omitted reads open PRs; `all` subsumes every other member. */
152
196
  states?: PullRequestStateFilter[];
197
+ /** ISO date (`YYYY-MM-DD`). The most effective narrowing criterion by far on a large scope. */
198
+ updatedAfter?: string;
199
+ /** ISO date (`YYYY-MM-DD`). */
200
+ createdAfter?: string;
153
201
  /** Includes PRs from archived repositories. They are excluded by default. */
154
202
  includeArchived?: boolean;
203
+ /**
204
+ * Narrows on draft state: `true` returns only drafts, `false` only ready-for-review PRs. Omitted places no
205
+ * constraint. A boolean rather than a truthy flag because `false` is a distinct request, not the absence of one.
206
+ */
207
+ draft?: boolean;
208
+ /**
209
+ * How to order the results. Omitted means `updated:desc`, which is what this search has always served.
210
+ *
211
+ * Validated all-or-nothing against {@link PullRequestSearchCapabilities.sorts} like every other criterion: a
212
+ * key the provider can't express server-side refuses the WHOLE read rather than falling back to the default,
213
+ * because combined with the provider's result ceiling another order returns a different subset than was asked
214
+ * for and the paging that comes with it describes that other subset. Do not change it mid-pagination — a
215
+ * cursor carries the sort it was produced under; drop the cursor instead of threading it under a new key.
216
+ */
217
+ sort?: PullRequestSorting;
155
218
  }
156
219
  /**
157
220
  * Which {@link PullRequestSearchCriteria} fields and manager-level scopes a provider can express server-side.
@@ -163,11 +226,21 @@ export interface PullRequestSearchCapabilities {
163
226
  /** Individual state values the provider can union in one logical search. */
164
227
  states: PullRequestStateFilter[];
165
228
  text: boolean;
229
+ updatedAfter: boolean;
230
+ createdAfter: boolean;
166
231
  includeArchived: boolean;
232
+ /** Whether the provider can constrain the search by draft state server-side. */
233
+ draft: boolean;
167
234
  /** Whether the manager's repository-descriptor scope is supported. */
168
235
  repositoryScope: boolean;
169
236
  /** Whether the manager's organization scope is supported. */
170
237
  organizationScope: boolean;
238
+ /**
239
+ * Sort keys the search can express server-side. Always contains at least `updated:desc` — the historical
240
+ * default — when the search exists at all, so it is never empty for a usable surface; a provider without a
241
+ * filtered PR search reports an empty `relationships`, which is already the signal there is no surface to order.
242
+ */
243
+ sorts: PullRequestSorting[];
171
244
  }
172
245
  export interface PullRequestRef {
173
246
  owner: string;
@@ -192,6 +265,14 @@ export interface PullRequestReviewer {
192
265
  isCodeOwner?: boolean;
193
266
  reviewer: PullRequestMember;
194
267
  state: PullRequestReviewState;
268
+ /**
269
+ * The head commit oid this review was submitted against (GitHub). Lets a consumer tell "the PR moved past
270
+ * my review" (oid !== the PR's current head) from a review still at the tip — without a per-review
271
+ * timestamp. Only populated where the full GitHub/GHE projection is selected: the filtered search read, and
272
+ * an account-wide sweep that opts in with `includeReviews`. Undefined elsewhere, including reviews the
273
+ * repo-scoped read carries natively.
274
+ */
275
+ commitOid?: string;
195
276
  }
196
277
  export type PullRequestRepositoryIdentityDescriptor = RequireSomeWithProps<RequireSome<RepositoryIdentityDescriptor<string>, 'provider'>, 'provider', 'id' | 'domain' | 'repoDomain' | 'repoName'> & RequireSomeWithProps<RequireSome<RepositoryIdentityDescriptor<string>, 'remote'>, 'remote', 'domain'>;
197
278
  //# sourceMappingURL=pullRequest.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"pullRequest.d.ts","sourceRoot":"","sources":["../../../src/git/models/pullRequest.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AACjF,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAChE,OAAO,KAAK,EAAE,kBAAkB,EAAE,uBAAuB,IAAI,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC/G,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,2BAA2B,CAAC;AAE9E,YAAY,EAAE,gBAAgB,EAAE,CAAC;AAEjC,MAAM,WAAW,gBAAiB,SAAQ,kBAAkB;IAC3D,QAAQ,CAAC,MAAM,EAAE,iBAAiB,CAAC;IACnC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB;;;;OAIG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,eAAe,CAAC;IACtC,QAAQ,CAAC,UAAU,CAAC,EAAE,IAAI,CAAC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,CAAC;CACjB;AAED,MAAM,WAAW,eAAe;IAC/B,IAAI,EAAE,cAAc,CAAC;IACrB,IAAI,EAAE,cAAc,CAAC;IACrB,iBAAiB,EAAE,OAAO,CAAC;CAC3B;AAED,MAAM,WAAW,mBAAmB;IACnC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,KAAK,EAAE,sBAAsB,CAAC;IAC9B;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,MAAM,uCAAuC,GAAG,oBAAoB,CACzE,WAAW,CAAC,4BAA4B,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,EAC7D,UAAU,EACV,IAAI,GAAG,QAAQ,GAAG,YAAY,GAAG,UAAU,CAC3C,GACA,oBAAoB,CAAC,WAAW,CAAC,4BAA4B,CAAC,MAAM,CAAC,EAAE,QAAQ,CAAC,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC"}
@@ -136,6 +136,21 @@ export var PullRequestFilter;
136
136
  PullRequestFilter["Author"] = "author";
137
137
  PullRequestFilter["Assignee"] = "assignee";
138
138
  PullRequestFilter["ReviewRequested"] = "review-requested";
139
+ /**
140
+ * PRs the user has already reviewed (GitHub `reviewed-by:@me`), as opposed to `ReviewRequested` (a
141
+ * still-pending request). Distinguishes "waiting on the author after my review" from "waiting for my
142
+ * review". Not expressible on the repo-scoped listing — no provider SDK exposes a reviewed-by axis there —
143
+ * so it is advertised for the account-wide read and for the filtered search (which can still bound itself
144
+ * to repositories or an org), never under `supportedPullRequestFilters`.
145
+ */
146
+ PullRequestFilter["Reviewed"] = "reviewed-by";
139
147
  PullRequestFilter["Mention"] = "mention";
140
148
  })(PullRequestFilter || (PullRequestFilter = {}));
149
+ /**
150
+ * The order the filtered pull-request search applies when the caller asks for none: most recently updated first,
151
+ * which is what it served before ordering was an option. Named once rather than per layer — the criteria model
152
+ * documents it, the GitHub query emits it, and the result-ceiling warning quotes it — so the three cannot
153
+ * disagree about what "the default" is.
154
+ */
155
+ export const defaultPullRequestSort = 'updated:desc';
141
156
  //# sourceMappingURL=pullRequest.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"pullRequest.js","sourceRoot":"","sources":["../../../src/git/models/pullRequest.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AAkClE,IAAM,WAAW,mBAAjB,MAAM,WAAW;IAIN,QAAQ;IACR,MAAM;IACN,EAAE;IACF,MAAM;IACN,KAAK;IACL,GAAG;IACH,UAAU;IACV,KAAK;IACL,WAAW;IACX,WAAW;IACX,UAAU;IACV,UAAU;IACV,cAAc;IACd,eAAe;IACf,IAAI;IACJ,OAAO;IACP,SAAS;IACT,SAAS;IACT,aAAa;IACb,aAAa;IACb,cAAc;IACd,cAAc;IACd,aAAa;IACb,SAAS;IACT,sBAAsB;IACtB,OAAO;IACP,OAAO;IACP,IAAI;IACJ,MAAM;IACN,YAAY;IAhCpB,IAAI,GAAG,aAAa,CAAC;IAE9B,YACiB,QAA2B,EAC3B,MAAyB,EACzB,EAAU,EACV,MAA0B,EAC1B,KAAa,EACb,GAAW,EACX,UAA2B,EAC3B,KAAuB,EACvB,WAAiB,EACjB,WAAiB,EACjB,UAAiB,EACjB,UAAiB,EACjB,cAA0C,EAC1C,eAAyB,EACzB,IAAsB,EACtB,OAAiB,EACjB,SAAkB,EAClB,SAAkB,EAClB,aAAsB,EACtB,aAAsB,EACtB,cAA0C,EAC1C,cAAsC,EACtC,aAAqC,EACrC,SAA+B,EAC/B,sBAA0D,EAC1D,OAAsB,EACtB,OAAgB,EAChB,IAAa,EACb,MAAe,EACf,YAAsB;wBA7BtB,QAAQ;sBACR,MAAM;kBACN,EAAE;sBACF,MAAM;qBACN,KAA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B;AAJD,WAAkB,yBAAyB;IAC1C,kDAAqB,CAAA;IACrB,kEAAqC,CAAA;IACrC,8DAAiC,CAAA;AAClC,CAAC,EAJiB,yBAAyB,KAAzB,yBAAyB,QAI1C;AAED,MAAM,CAAN,IAAkB,yBAMjB;AAND,WAAkB,yBAAyB;IAC1C,gDAAmB,CAAA;IACnB,oDAAuB,CAAA;IACvB,wDAA2B,CAAA;IAC3B,4DAA+B,CAAA;IAC/B,gEAAmC,CAAA;AACpC,CAAC,EANiB,yBAAyB,KAAzB,yBAAyB,QAM1C;AAED,MAAM,CAAN,IAAkB,iCAIjB;AAJD,WAAkB,iCAAiC;IAClD,wDAAmB,CAAA;IACnB,wDAAmB,CAAA;IACnB,sDAAiB,CAAA;AAClB,CAAC,EAJiB,iCAAiC,KAAjC,iCAAiC,QAIlD;AAED,MAAM,CAAN,IAAkB,sBAIjB;AAJD,WAAkB,sBAAsB;IACvC,yCAAe,CAAA;IACf,2CAAiB,CAAA;IACjB,2CAAiB,CAAA;AAClB,CAAC,EAJiB,sBAAsB,KAAtB,sBAAsB,QAIvC;AAED,MAAM,CAAN,IAAkB,sBAOjB;AAPD,WAAkB,sBAAsB;IACvC,+CAAqB,CAAA;IACrB,gEAAsC,CAAA;IACtC,iDAAuB,CAAA;IACvB,iDAAuB,CAAA;IACvB,6CAAmB,CAAA;IACnB,8DAAoC,CAAA;AACrC,CAAC,EAPiB,sBAAsB,KAAtB,sBAAsB,QAOvC;AAoBD,yFAAyF;AACzF,MAAM,CAAN,IAAY,iBAKX;AALD,WAAY,iBAAiB;IAC5B,sCAAiB,CAAA;IACjB,0CAAqB,CAAA;IACrB,yDAAoC,CAAA;IACpC,wCAAmB,CAAA;AACpB,CAAC,EALW,iBAAiB,KAAjB,iBAAiB,QAK5B"}
1
+ {"version":3,"file":"pullRequest.js","sourceRoot":"","sources":["../../../src/git/models/pullRequest.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MA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wDAA2B,CAAA;IAC3B,4DAA+B,CAAA;IAC/B,gEAAmC,CAAA;AACpC,CAAC,EANiB,yBAAyB,KAAzB,yBAAyB,QAM1C;AAED,MAAM,CAAN,IAAkB,iCAIjB;AAJD,WAAkB,iCAAiC;IAClD,wDAAmB,CAAA;IACnB,wDAAmB,CAAA;IACnB,sDAAiB,CAAA;AAClB,CAAC,EAJiB,iCAAiC,KAAjC,iCAAiC,QAIlD;AAED,MAAM,CAAN,IAAkB,sBAIjB;AAJD,WAAkB,sBAAsB;IACvC,yCAAe,CAAA;IACf,2CAAiB,CAAA;IACjB,2CAAiB,CAAA;AAClB,CAAC,EAJiB,sBAAsB,KAAtB,sBAAsB,QAIvC;AAED,MAAM,CAAN,IAAkB,sBAOjB;AAPD,WAAkB,sBAAsB;IACvC,+CAAqB,CAAA;IACrB,gEAAsC,CAAA;IACtC,iDAAuB,CAAA;IACvB,iDAAuB,CAAA;IACvB,6CAAmB,CAAA;IACnB,8DAAoC,CAAA;AACrC,CAAC,EAPiB,sBAAsB,KAAtB,sBAAsB,QAOvC;AAoBD,yFAAyF;AACzF,MAAM,CAAN,IAAY,iBAaX;AAbD,WAAY,iBAAiB;IAC5B,sCAAiB,CAAA;IACjB,0CAAqB,CAAA;IACrB,yDAAoC,CAAA;IACpC;;;;;;OAMG;IACH,6CAAwB,CAAA;IACxB,wCAAmB,CAAA;AACpB,CAAC,EAbW,iBAAiB,KAAjB,iBAAiB,QAa5B;AA2BD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAuB,cAAc,CAAC"}
@@ -1,4 +1,44 @@
1
- import type { Issue, IssueRepositoryIdentityDescriptor, IssueShape } from '../models/issue.js';
1
+ import type { Issue, IssueRepositoryIdentityDescriptor, IssueShape, IssueSorting } from '../models/issue.js';
2
+ /**
3
+ * The order a read that ALWAYS orders is being made under: the caller's key, or the facade's default.
4
+ *
5
+ * The one place `?? defaultIssueSort` may be written. Several things downstream must agree on the answer — the
6
+ * emitted provider qualifier, the fingerprint sealed into a cursor, the comparator that re-sorts a merged page and
7
+ * the ceiling warning that names the order — and re-deriving the fallback at each is how they come to disagree,
8
+ * which is not cosmetic: a cursor sealed with a key its query wasn't built with makes the fingerprint check refuse
9
+ * valid resumptions.
10
+ *
11
+ * Note this is for a surface that CAN always order. A read whose provider may not express even the default resolves
12
+ * through `resolveIssueSort` instead, which can answer "leave the provider's own order".
13
+ */
14
+ export declare function effectiveIssueSort(sort: IssueSorting | undefined): IssueSorting;
15
+ /**
16
+ * A comparator for one sort key over normalized issues, or `undefined` when the field isn't derivable from an
17
+ * {@link IssueShape} — the signal that the key is only honorable on a SINGLE-origin read, where the provider
18
+ * already ordered the page.
19
+ *
20
+ * `@gitkraken/provider-apis` carries a twin of this over its own `Issue` shape (`src/issueSort.ts`), which it uses
21
+ * for the merges it performs itself. It is not importable — the SDK does not export it, and it takes a different
22
+ * shape — so the two are separate implementations of one rule, and the rule below is the part that must not drift.
23
+ *
24
+ * Missing values sort LAST in both directions. That is deliberately not the same as negating the descending
25
+ * comparator (which would float them to the front when ascending), and it is why they're partitioned before any
26
+ * arithmetic rather than mapped to an infinite sentinel: two missing values have to compare equal, and
27
+ * `-Infinity - -Infinity` is `NaN`, which makes the comparator inconsistent and the resulting order
28
+ * implementation-defined.
29
+ *
30
+ * Note it orders whatever it is handed. Sorting a page that was already capped does not make it the top N.
31
+ *
32
+ * KNOWN DIVERGENCE, `title` only: strings are compared by code unit, so `'B' < 'a'`. A single-scope read is
33
+ * ordered by the provider's own database instead — case-insensitive and accent-aware — so the same `title:asc`
34
+ * yields "Banana, apple, ábaco" from a merged page and "ábaco, apple, Banana" from one repository. Deliberately
35
+ * NOT fixed with `localeCompare`: the SDK's twin comparator (which performs the merges core doesn't, notably
36
+ * GitLab's repo-ids aggregate) compares by code unit, so switching here would make two paths of the SAME
37
+ * multi-repo read disagree — a worse divergence than the one it closes, and it would break the parity test in
38
+ * `issueSortCapabilities.test.ts`. Closing this properly means changing the rule on BOTH sides at once; until
39
+ * then it is a cosmetic ordering difference on one key, not wrong data.
40
+ */
41
+ export declare function getIssueComparator(sort: IssueSorting): ((a: IssueShape, b: IssueShape) => number) | undefined;
2
42
  export declare function getRepositoryIdentityForIssue(issue: IssueShape | Issue): IssueRepositoryIdentityDescriptor;
3
43
  export declare function serializeIssue(value: IssueShape): IssueShape;
4
44
  //# sourceMappingURL=issue.utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"issue.utils.d.ts","sourceRoot":"","sources":["../../../src/git/utils/issue.utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,iCAAiC,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAE/F,wBAAgB,6BAA6B,CAAC,KAAK,EAAE,UAAU,GAAG,KAAK,GAAG,iCAAiC,CAiB1G;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,UAAU,GAAG,UAAU,CA+D5D"}
1
+ {"version":3,"file":"issue.utils.d.ts","sourceRoot":"","sources":["../../../src/git/utils/issue.utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,KAAK,EACL,iCAAiC,EACjC,UAAU,EAEV,YAAY,EACZ,MAAM,oBAAoB,CAAC;AAqB5B;;;;;;;;;;;GAWG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,YAAY,GAAG,SAAS,GAAG,YAAY,CAE/E;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,YAAY,GAAG,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,UAAU,KAAK,MAAM,CAAC,GAAG,SAAS,CAiB7G;AAMD,wBAAgB,6BAA6B,CAAC,KAAK,EAAE,UAAU,GAAG,KAAK,GAAG,iCAAiC,CAiB1G;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,UAAU,GAAG,UAAU,CA+D5D"}
@@ -1,3 +1,83 @@
1
+ import { defaultIssueSort } from '../models/issue.js';
2
+ /**
3
+ * How each sort field is read off an {@link IssueShape}, for the reads that MERGE several provider queries and so
4
+ * have to order the union themselves instead of letting the provider do it.
5
+ *
6
+ * Only the fields the shape actually carries appear. `priority`, `dueDate` and `resolved` are absent because
7
+ * `IssueOrPullRequest`/`IssueShape` doesn't model them: a provider may well order by them server-side on a
8
+ * single-query read, but a merged one cannot — which is exactly what {@link getIssueComparator} returning
9
+ * `undefined` lets its caller refuse, instead of concatenating unordered runs and calling them sorted.
10
+ */
11
+ const issueSortValues = {
12
+ created: i => i.createdDate,
13
+ updated: i => i.updatedDate,
14
+ closed: i => i.closedDate,
15
+ comments: i => i.commentsCount,
16
+ reactions: i => i.thumbsUpCount,
17
+ title: i => i.title,
18
+ };
19
+ /**
20
+ * The order a read that ALWAYS orders is being made under: the caller's key, or the facade's default.
21
+ *
22
+ * The one place `?? defaultIssueSort` may be written. Several things downstream must agree on the answer — the
23
+ * emitted provider qualifier, the fingerprint sealed into a cursor, the comparator that re-sorts a merged page and
24
+ * the ceiling warning that names the order — and re-deriving the fallback at each is how they come to disagree,
25
+ * which is not cosmetic: a cursor sealed with a key its query wasn't built with makes the fingerprint check refuse
26
+ * valid resumptions.
27
+ *
28
+ * Note this is for a surface that CAN always order. A read whose provider may not express even the default resolves
29
+ * through `resolveIssueSort` instead, which can answer "leave the provider's own order".
30
+ */
31
+ export function effectiveIssueSort(sort) {
32
+ return sort ?? defaultIssueSort;
33
+ }
34
+ /**
35
+ * A comparator for one sort key over normalized issues, or `undefined` when the field isn't derivable from an
36
+ * {@link IssueShape} — the signal that the key is only honorable on a SINGLE-origin read, where the provider
37
+ * already ordered the page.
38
+ *
39
+ * `@gitkraken/provider-apis` carries a twin of this over its own `Issue` shape (`src/issueSort.ts`), which it uses
40
+ * for the merges it performs itself. It is not importable — the SDK does not export it, and it takes a different
41
+ * shape — so the two are separate implementations of one rule, and the rule below is the part that must not drift.
42
+ *
43
+ * Missing values sort LAST in both directions. That is deliberately not the same as negating the descending
44
+ * comparator (which would float them to the front when ascending), and it is why they're partitioned before any
45
+ * arithmetic rather than mapped to an infinite sentinel: two missing values have to compare equal, and
46
+ * `-Infinity - -Infinity` is `NaN`, which makes the comparator inconsistent and the resulting order
47
+ * implementation-defined.
48
+ *
49
+ * Note it orders whatever it is handed. Sorting a page that was already capped does not make it the top N.
50
+ *
51
+ * KNOWN DIVERGENCE, `title` only: strings are compared by code unit, so `'B' < 'a'`. A single-scope read is
52
+ * ordered by the provider's own database instead — case-insensitive and accent-aware — so the same `title:asc`
53
+ * yields "Banana, apple, ábaco" from a merged page and "ábaco, apple, Banana" from one repository. Deliberately
54
+ * NOT fixed with `localeCompare`: the SDK's twin comparator (which performs the merges core doesn't, notably
55
+ * GitLab's repo-ids aggregate) compares by code unit, so switching here would make two paths of the SAME
56
+ * multi-repo read disagree — a worse divergence than the one it closes, and it would break the parity test in
57
+ * `issueSortCapabilities.test.ts`. Closing this properly means changing the rule on BOTH sides at once; until
58
+ * then it is a cosmetic ordering difference on one key, not wrong data.
59
+ */
60
+ export function getIssueComparator(sort) {
61
+ // The union's shape guarantees both halves, so this needs no validation — only the cast tsc can't infer.
62
+ const [field, direction] = sort.split(':');
63
+ const getValue = issueSortValues[field];
64
+ if (getValue == null)
65
+ return undefined;
66
+ return (a, b) => {
67
+ const left = toComparable(getValue(a));
68
+ const right = toComparable(getValue(b));
69
+ if (left == null || right == null) {
70
+ if (left == null && right == null)
71
+ return 0;
72
+ return left == null ? 1 : -1;
73
+ }
74
+ const ordered = left < right ? -1 : left > right ? 1 : 0;
75
+ return direction === 'asc' ? ordered : -ordered;
76
+ };
77
+ }
78
+ function toComparable(value) {
79
+ return value instanceof Date ? value.getTime() : value;
80
+ }
1
81
  export function getRepositoryIdentityForIssue(issue) {
2
82
  if (issue.repository == null)
3
83
  throw new Error('Missing repository');
@@ -1 +1 @@
1
- {"version":3,"file":"issue.utils.js","sourceRoot":"","sources":["../../../src/git/utils/issue.utils.ts"],"names":[],"mappings":"AAEA,MA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,EAAE,KAAK,CAAC,IAAI;KAChB,CAAC;IACF,OAAO,UAAU,CAAC;AACnB,CAAC"}
@@ -1,4 +1,14 @@
1
- import type { PullRequest, PullRequestComparisonRefs, PullRequestRefs, PullRequestRepositoryIdentityDescriptor, PullRequestShape } from '../models/pullRequest.js';
1
+ import type { PullRequest, PullRequestComparisonRefs, PullRequestRefs, PullRequestRepositoryIdentityDescriptor, PullRequestShape, PullRequestSorting } from '../models/pullRequest.js';
2
+ /**
3
+ * A comparator for one sort key over normalized pull requests, or `undefined` when the field isn't derivable
4
+ * from a {@link PullRequestShape} — the signal that the key is only honorable on a SINGLE-origin read where the
5
+ * provider already ordered the page. Missing values sort LAST in both directions (partitioned before any
6
+ * arithmetic so two missing values compare equal, exactly as `getIssueComparator` does).
7
+ *
8
+ * Note it orders whatever it is handed. Sorting a page already capped at the result ceiling does not make it the
9
+ * top N.
10
+ */
11
+ export declare function getPullRequestComparator(sort: PullRequestSorting): ((a: PullRequestShape, b: PullRequestShape) => number) | undefined;
2
12
  export interface PullRequestUrlIdentity<TProvider extends string = string> {
3
13
  provider?: TProvider;
4
14
  ownerAndRepo?: string;