@gitkraken/core-gitlens 0.37.0 → 0.37.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -1
- package/dist/plus/git-github/api/github.d.ts +4 -0
- package/dist/plus/git-github/api/github.js +11 -1
- package/dist/plus/git-github/api/github.js.map +1 -1
- package/dist/plus/integrations/providers/issueSorts.d.ts +0 -1
- package/dist/plus/integrations/reads/drains.d.ts +0 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,12 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [0.37.1] - 2026-11-10
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
|
|
13
|
+
- Fixes GitHub/GHE pull request text searches for exactly open and merged matches filling their ten-result limit with open pull requests before considering merged ones. This combination now selects and combines matches newest-created first, overriding unquoted `sort:` qualifiers in the search text. Other state combinations and the filtered, paged search keep their existing behavior ([#5980](https://github.com/gitkraken/vscode-gitlens/issues/5980)) (plus/git-github)
|
|
14
|
+
|
|
9
15
|
## [0.37.0] - 2026-11-10
|
|
10
16
|
|
|
11
17
|
### Added
|
|
@@ -1220,7 +1226,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
|
|
|
1220
1226
|
|
|
1221
1227
|
- 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.
|
|
1222
1228
|
|
|
1223
|
-
[unreleased]: https://github.com/gitkraken/vscode-gitlens/compare/releases/core/v0.37.
|
|
1229
|
+
[unreleased]: https://github.com/gitkraken/vscode-gitlens/compare/releases/core/v0.37.1...HEAD
|
|
1230
|
+
[0.37.1]: https://github.com/gitkraken/vscode-gitlens/compare/releases/core/v0.37.0...gitkraken:releases/core/v0.37.1
|
|
1224
1231
|
[0.37.0]: https://github.com/gitkraken/vscode-gitlens/compare/releases/core/v0.36.0...gitkraken:releases/core/v0.37.0
|
|
1225
1232
|
[0.36.0]: https://github.com/gitkraken/vscode-gitlens/compare/releases/core/v0.35.0...gitkraken:releases/core/v0.36.0
|
|
1226
1233
|
[0.35.0]: https://github.com/gitkraken/vscode-gitlens/compare/releases/core/v0.34.0...gitkraken:releases/core/v0.35.0
|
|
@@ -664,6 +664,10 @@ export declare class GitHubApi {
|
|
|
664
664
|
*/
|
|
665
665
|
mergeQueue?: boolean;
|
|
666
666
|
}, cancellation?: AbortSignal): Promise<PullRequestSearchResult | undefined>;
|
|
667
|
+
/**
|
|
668
|
+
* The exact opened + merged state set is ordered newest-created first, overriding unquoted `sort:` qualifiers
|
|
669
|
+
* in the search text. Other state sets keep GitHub's order, including any caller-supplied sort.
|
|
670
|
+
*/
|
|
667
671
|
searchPullRequests(provider: Provider, token: GitHubTokenInfo, options?: {
|
|
668
672
|
search?: string;
|
|
669
673
|
user?: string;
|
|
@@ -3218,11 +3218,16 @@ var GitHubApi = class {
|
|
|
3218
3218
|
throw this.handleException(ex, provider, scope);
|
|
3219
3219
|
}
|
|
3220
3220
|
}
|
|
3221
|
+
/**
|
|
3222
|
+
* The exact opened + merged state set is ordered newest-created first, overriding unquoted `sort:` qualifiers
|
|
3223
|
+
* in the search text. Other state sets keep GitHub's order, including any caller-supplied sort.
|
|
3224
|
+
*/
|
|
3221
3225
|
async searchPullRequests(provider, token, options, cancellation) {
|
|
3222
3226
|
const scope = getScopedLogger();
|
|
3223
3227
|
const pageSize = 10;
|
|
3224
3228
|
const include = options?.include?.length ? options.include : void 0;
|
|
3225
|
-
const
|
|
3229
|
+
const splitStates = requiresGitHubPullRequestStateFacets(include);
|
|
3230
|
+
const stateSearches = splitStates ? [{
|
|
3226
3231
|
alias: "opened",
|
|
3227
3232
|
qualifier: "is:open"
|
|
3228
3233
|
}, {
|
|
@@ -3256,6 +3261,10 @@ var GitHubApi = class {
|
|
|
3256
3261
|
${fields.join("\n ")}
|
|
3257
3262
|
}`;
|
|
3258
3263
|
let search = options?.search?.trim() ?? "";
|
|
3264
|
+
if (splitStates) {
|
|
3265
|
+
search = search.replace(/"(?:\\.|[^"\\])*"|(?:^|\s)sort:(?:"(?:\\.|[^"\\])*"|[^\s"]*)/gi, (match) => match.startsWith("\"") ? match : "");
|
|
3266
|
+
search = `${search.trim()} sort:created-desc`.trim();
|
|
3267
|
+
}
|
|
3259
3268
|
if (options?.user) search += ` user:${options.user}`;
|
|
3260
3269
|
if (options?.repos != null && options.repos.length > 0) {
|
|
3261
3270
|
const repo = " repo:";
|
|
@@ -3278,6 +3287,7 @@ var GitHubApi = class {
|
|
|
3278
3287
|
if (rsp == null) return [];
|
|
3279
3288
|
const results = [];
|
|
3280
3289
|
for (const { alias } of stateSearches) for (const node of rsp[alias]?.nodes ?? []) results.push(fromGitHubPullRequest(node, provider, "text-search"));
|
|
3290
|
+
if (splitStates) results.sort(getPullRequestComparator("created:desc"));
|
|
3281
3291
|
return [...uniqueBy(filterPullRequestsBySearchState(results, include), (pr) => pr.url, (original, _current) => original)].slice(0, pageSize);
|
|
3282
3292
|
} catch (ex) {
|
|
3283
3293
|
throw this.handleException(ex, provider, scope);
|