@gitkraken/core-gitlens 0.34.0 → 0.36.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.
Files changed (60) hide show
  1. package/CHANGELOG.md +20 -1
  2. package/dist/git/models/branch.d.ts +9 -0
  3. package/dist/git/models/branch.js.map +1 -1
  4. package/dist/git/providers/branches.d.ts +11 -1
  5. package/dist/git/providers/revision.d.ts +6 -0
  6. package/dist/git-cli/exec/git.js +2 -2
  7. package/dist/git-cli/exec/git.js.map +1 -1
  8. package/dist/git-cli/providers/branches.d.ts +6 -1
  9. package/dist/git-cli/providers/branches.js +58 -0
  10. package/dist/git-cli/providers/branches.js.map +1 -1
  11. package/dist/git-cli/providers/revision.d.ts +1 -0
  12. package/dist/git-cli/providers/revision.js +9 -0
  13. package/dist/git-cli/providers/revision.js.map +1 -1
  14. package/dist/plus/git-github/api/config.d.ts +11 -0
  15. package/dist/plus/git-github/api/config.js.map +1 -1
  16. package/dist/plus/git-github/api/github.d.ts +31 -0
  17. package/dist/plus/git-github/api/github.js +48 -24
  18. package/dist/plus/git-github/api/github.js.map +1 -1
  19. package/dist/plus/git-github/models.d.ts +15 -8
  20. package/dist/plus/git-github/models.js +4 -3
  21. package/dist/plus/git-github/models.js.map +1 -1
  22. package/dist/plus/integrations/context.d.ts +12 -0
  23. package/dist/plus/integrations/fieldPresence.d.ts +11 -1
  24. package/dist/plus/integrations/fieldPresence.js +18 -1
  25. package/dist/plus/integrations/fieldPresence.js.map +1 -1
  26. package/dist/plus/integrations/integrationService.d.ts +15 -1
  27. package/dist/plus/integrations/integrationService.js +8 -2
  28. package/dist/plus/integrations/integrationService.js.map +1 -1
  29. package/dist/plus/integrations/manager.d.ts +38 -0
  30. package/dist/plus/integrations/models/gitHostIntegration.d.ts +15 -0
  31. package/dist/plus/integrations/models/gitHostIntegration.js.map +1 -1
  32. package/dist/plus/integrations/models/integration.d.ts +20 -0
  33. package/dist/plus/integrations/models/integration.js +15 -1
  34. package/dist/plus/integrations/models/integration.js.map +1 -1
  35. package/dist/plus/integrations/providers/github/github.js +2 -1
  36. package/dist/plus/integrations/providers/github/github.js.map +1 -1
  37. package/dist/plus/integrations/providers/github.d.ts +5 -0
  38. package/dist/plus/integrations/providers/github.js +18 -5
  39. package/dist/plus/integrations/providers/github.js.map +1 -1
  40. package/dist/plus/integrations/reads/autolinks.js.map +1 -1
  41. package/dist/plus/integrations/reads/context.d.ts +7 -0
  42. package/dist/plus/integrations/reads/drains.d.ts +1 -1
  43. package/dist/plus/integrations/reads/drains.js +2 -1
  44. package/dist/plus/integrations/reads/drains.js.map +1 -1
  45. package/dist/plus/integrations/reads/etag.js +2 -0
  46. package/dist/plus/integrations/reads/etag.js.map +1 -1
  47. package/dist/plus/integrations/reads/pullRequestBatch.d.ts +6 -2
  48. package/dist/plus/integrations/reads/pullRequestBatch.js +9 -2
  49. package/dist/plus/integrations/reads/pullRequestBatch.js.map +1 -1
  50. package/dist/plus/integrations/reads/pullRequestBranches.d.ts +2 -0
  51. package/dist/plus/integrations/reads/pullRequestBranches.js +3 -1
  52. package/dist/plus/integrations/reads/pullRequestBranches.js.map +1 -1
  53. package/dist/plus/integrations/reads/pullRequests.d.ts +2 -0
  54. package/dist/plus/integrations/reads/pullRequests.js +2 -1
  55. package/dist/plus/integrations/reads/pullRequests.js.map +1 -1
  56. package/dist/plus/integrations/reads/searchPullRequests.d.ts +2 -0
  57. package/dist/plus/integrations/reads/searchPullRequests.js +2 -1
  58. package/dist/plus/integrations/reads/searchPullRequests.js.map +1 -1
  59. package/docs/integrations.md +46 -17
  60. package/package.json +1 -1
@@ -186,6 +186,13 @@ type PullRequestSweepCommonOptions = {
186
186
  * remotes. Defaults to `true`; other providers ignore it.
187
187
  */
188
188
  includeRemoteInfo?: boolean;
189
+ /**
190
+ * Selects merge-queue data (`mergeQueue`, `mergeQueueRequired`, `mergeQueueRemoval`) on GitHub.com for this
191
+ * read: `true` selects it, `false` doesn't, omitted follows the host's `ConfigProvider.getPullRequestReadOptions`.
192
+ * Account-wide targets only; a repo-scoped read goes through provider-apis, which selects none, and every other
193
+ * provider ignores it. Selecting it costs a rate-limit request per row.
194
+ */
195
+ mergeQueue?: boolean;
189
196
  /**
190
197
  * Page budget per provider. A stop at this budget with a resumable cursor is reported as
191
198
  * `pagination-incomplete` with `recovery: 'page-budget'`. A part no budget reaches is reported beside it
@@ -421,6 +428,14 @@ export interface IntegrationManager {
421
428
  * checked out or matched to local remotes. Defaults to `true`; other providers ignore it.
422
429
  */
423
430
  includeRemoteInfo?: boolean;
431
+ /**
432
+ * Selects merge-queue data (`mergeQueue`, `mergeQueueRequired`, `mergeQueueRemoval`) on GitHub.com for this
433
+ * read: `true` selects it, `false` doesn't, omitted follows the host's
434
+ * `ConfigProvider.getPullRequestReadOptions`. Account-wide only (no `repos`); the repo-scoped read goes through
435
+ * provider-apis, which selects none, and every other provider ignores it. Selecting it costs a rate-limit
436
+ * request per row.
437
+ */
438
+ mergeQueue?: boolean;
424
439
  }): Promise<ProviderPagedResult<PullRequestShape>>;
425
440
  /**
426
441
  * Pull requests matching structured criteria over a repository/organization or current-user relationship
@@ -508,6 +523,13 @@ export interface IntegrationManager {
508
523
  * rather than a contract about which fields are present.
509
524
  */
510
525
  summary?: boolean;
526
+ /**
527
+ * Selects merge-queue data (`mergeQueue`, `mergeQueueRequired`, `mergeQueueRemoval`) on GitHub.com for this
528
+ * read: `true` selects it, `false` doesn't, omitted follows the host's
529
+ * `ConfigProvider.getPullRequestReadOptions`. Every other provider ignores it. Selecting it costs a
530
+ * rate-limit request per row.
531
+ */
532
+ mergeQueue?: boolean;
511
533
  }): Promise<ProviderPagedResult<PullRequestShape>>;
512
534
  listIssuesPage(options: {
513
535
  state?: IssueStateFilter;
@@ -796,6 +818,15 @@ export interface IntegrationManager {
796
818
  * computed (and the cheap check's selection); the full read is the same.
797
819
  */
798
820
  etagIncludes?: readonly PullRequestEtagInclude[];
821
+ /**
822
+ * Selects merge-queue data (`mergeQueue`, `mergeQueueRequired`, `mergeQueueRemoval`) on GitHub.com, in the cheap
823
+ * check and the full read alike: `true` selects it, `false` doesn't, omitted follows the host's
824
+ * `ConfigProvider.getPullRequestReadOptions`, resolved once per call. Every other provider ignores it. A read
825
+ * that selects it adds a marker to every etag it computes, so its etags and those of a read that doesn't never
826
+ * compare equal: changing this, or the host setting, reads each held target in full once. Selecting it costs a
827
+ * rate-limit request per row, in the cheap check as well as the full read.
828
+ */
829
+ mergeQueue?: boolean;
799
830
  }): Promise<ProviderResult<PullRequestBatchResult>>;
800
831
  /**
801
832
  * Finds, for each branch, every pull request whose head is that branch — in any state (open, closed or merged),
@@ -841,6 +872,13 @@ export interface IntegrationManager {
841
872
  connectionId?: string;
842
873
  /** Self-managed host domain fallback; see {@link ProviderSweepTarget.domain}. */
843
874
  domain?: string;
875
+ /**
876
+ * Selects merge-queue data (`mergeQueue`, `mergeQueueRequired`, `mergeQueueRemoval`) on GitHub.com for this
877
+ * read: `true` selects it, `false` doesn't, omitted follows the host's
878
+ * `ConfigProvider.getPullRequestReadOptions`, resolved once per call. Every other provider ignores it.
879
+ * Selecting it costs a rate-limit request per row (a 25-branch chunk 13 points instead of 10 without).
880
+ */
881
+ mergeQueue?: boolean;
844
882
  }): Promise<ProviderResult<PullRequestBranchResult>>;
845
883
  /**
846
884
  * How many pull requests match each scope — the PR twin of {@link countIssues}, behind a "this will fetch ~N pull
@@ -405,6 +405,10 @@ export declare abstract class GitHostIntegration<ID extends IntegrationIds = Int
405
405
  filters?: PullRequestFilter[];
406
406
  /** Request only the stable list fields, omitting optional provider enrichments. */
407
407
  summary?: boolean;
408
+ /**
409
+ * Selects merge-queue data on GitHub.com for this read, over the host's default; other providers ignore it.
410
+ */
411
+ mergeQueue?: boolean;
408
412
  }, connectionId?: string): Promise<IntegrationResult<ProviderApiPagedResult<ProviderPullRequest | PullRequest> | undefined>>;
409
413
  /**
410
414
  * Reads the current user's pull requests across the whole account using each provider's native "my PRs"
@@ -428,6 +432,7 @@ export declare abstract class GitHostIntegration<ID extends IntegrationIds = Int
428
432
  includeReviewRequested?: boolean;
429
433
  filters?: PullRequestFilter[];
430
434
  summary?: boolean;
435
+ mergeQueue?: boolean;
431
436
  }): Promise<ProviderApiPagedResult<ProviderPullRequest | PullRequest> | undefined>;
432
437
  /**
433
438
  * The current account as each of `pullRequests` identifies its members, in order: what a raw row's
@@ -471,6 +476,8 @@ export declare abstract class GitHostIntegration<ID extends IntegrationIds = Int
471
476
  pageSize?: number;
472
477
  /** See {@link IntegrationManager.searchPullRequestsPage}. */
473
478
  summary?: boolean;
479
+ /** See {@link IntegrationManager.searchPullRequestsPage}. */
480
+ mergeQueue?: boolean;
474
481
  }, cancellation?: AbortSignal, connectionId?: string): Promise<IntegrationResult<ProviderPullRequestSearchPage | undefined>>;
475
482
  /** Must agree with `ProviderMetadata.supportedPullRequestSearch`. */
476
483
  protected searchProviderPullRequestsPage?(session: ProviderAuthenticationSession, options: {
@@ -481,6 +488,8 @@ export declare abstract class GitHostIntegration<ID extends IntegrationIds = Int
481
488
  pageSize?: number;
482
489
  /** See the caller's option of the same name on {@link searchPullRequestsPage}. */
483
490
  summary?: boolean;
491
+ /** See the caller's option of the same name on {@link searchPullRequestsPage}. */
492
+ mergeQueue?: boolean;
484
493
  }, cancellation?: AbortSignal): Promise<ProviderPullRequestSearchPage | undefined>;
485
494
  /** Free-text search across pull requests, optionally narrowed to `repos`. */
486
495
  searchPullRequests(searchQuery: string, repos?: T | T[], cancellation?: AbortSignal, options?: SearchPullRequestsOptions & {
@@ -618,6 +627,7 @@ export declare abstract class GitHostIntegration<ID extends IntegrationIds = Int
618
627
  id: string;
619
628
  username?: string;
620
629
  };
630
+ mergeQueue?: boolean;
621
631
  }, cancellation?: AbortSignal, connectionId?: string): Promise<IntegrationResult<BatchSlot<PullRequestShape | undefined>[] | undefined>>;
622
632
  /**
623
633
  * OPTIONAL: resolves several coordinates, returning one settled slot per input coordinate, in order, in the
@@ -639,6 +649,7 @@ export declare abstract class GitHostIntegration<ID extends IntegrationIds = Int
639
649
  id: string;
640
650
  username?: string;
641
651
  };
652
+ mergeQueue?: boolean;
642
653
  } | undefined, cancellation?: AbortSignal): Promise<PromiseSettledResult<PullRequestShape | undefined>[] | undefined>;
643
654
  /**
644
655
  * Result-returning wrapper for the cheap check behind the batch issue read's etags: each coordinate's change
@@ -692,6 +703,7 @@ export declare abstract class GitHostIntegration<ID extends IntegrationIds = Int
692
703
  project?: string;
693
704
  }[], options: {
694
705
  etagIncludes?: readonly PullRequestEtagInclude[];
706
+ mergeQueue?: boolean;
695
707
  }, cancellation?: AbortSignal, connectionId?: string): Promise<IntegrationResult<BatchSlot<PullRequestEtagFields | undefined>[] | undefined>>;
696
708
  /**
697
709
  * OPTIONAL: the cheap check behind the batch pull request read's etags — one settled slot per input coordinate,
@@ -707,6 +719,7 @@ export declare abstract class GitHostIntegration<ID extends IntegrationIds = Int
707
719
  project?: string;
708
720
  }[], options: {
709
721
  etagIncludes?: readonly PullRequestEtagInclude[];
722
+ mergeQueue?: boolean;
710
723
  }, cancellation?: AbortSignal): Promise<PromiseSettledResult<PullRequestEtagFields | undefined>[] | undefined>;
711
724
  /**
712
725
  * Result-returning wrapper for the pull-requests-by-branch read: for each target, every pull request whose head
@@ -735,6 +748,7 @@ export declare abstract class GitHostIntegration<ID extends IntegrationIds = Int
735
748
  username?: string;
736
749
  };
737
750
  limit: number;
751
+ mergeQueue?: boolean;
738
752
  }, cancellation?: AbortSignal, connectionId?: string): Promise<IntegrationResult<BatchSlot<{
739
753
  pullRequests: PullRequestShape[];
740
754
  truncated: boolean;
@@ -763,6 +777,7 @@ export declare abstract class GitHostIntegration<ID extends IntegrationIds = Int
763
777
  username?: string;
764
778
  };
765
779
  limit: number;
780
+ mergeQueue?: boolean;
766
781
  }, cancellation?: AbortSignal): Promise<PromiseSettledResult<{
767
782
  pullRequests: PullRequestShape[];
768
783
  truncated: boolean;