@gitkraken/core-gitlens 0.45.0 → 0.47.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 (261) hide show
  1. package/CHANGELOG.md +35 -1
  2. package/dist/git/models/remote.js +2 -2
  3. package/dist/git/models/remote.js.map +1 -1
  4. package/dist/git/remotes/matcher.js +25 -3
  5. package/dist/git/remotes/matcher.js.map +1 -1
  6. package/dist/git/utils/branchLanded.utils.d.ts +7 -0
  7. package/dist/git/utils/branchLanded.utils.js +10 -1
  8. package/dist/git/utils/branchLanded.utils.js.map +1 -1
  9. package/dist/git/utils/remote.utils.d.ts +1 -0
  10. package/dist/git/utils/remote.utils.js +14 -5
  11. package/dist/git/utils/remote.utils.js.map +1 -1
  12. package/dist/git-cli/parsers/logParser.js +227 -468
  13. package/dist/git-cli/parsers/logParser.js.map +1 -1
  14. package/dist/git-cli/parsers/refParser.js +4 -4
  15. package/dist/git-cli/parsers/refParser.js.map +1 -1
  16. package/dist/git-cli/providers/branches.d.ts +5 -0
  17. package/dist/git-cli/providers/branches.js +25 -21
  18. package/dist/git-cli/providers/branches.js.map +1 -1
  19. package/dist/git-cli/providers/config.js +2 -2
  20. package/dist/git-cli/providers/pausedOperations.js +2 -2
  21. package/dist/git-cli/providers/pausedOperations.js.map +1 -1
  22. package/dist/git-cli/providers/staging.js +1 -1
  23. package/dist/ipc/discovery.js +1 -1
  24. package/dist/plus/agents/providers/claudeCodeTranscript.js +6 -6
  25. package/dist/plus/agents/providers/claudeCodeTranscript.js.map +1 -1
  26. package/dist/plus/ai/providers/openAICompatibleProviderBase.js +1 -1
  27. package/dist/plus/git-github/api/enterprisePullRequestMergePolicy.d.ts +31 -0
  28. package/dist/plus/git-github/api/enterprisePullRequestMergePolicy.js +166 -0
  29. package/dist/plus/git-github/api/enterprisePullRequestMergePolicy.js.map +1 -0
  30. package/dist/plus/git-github/api/github.d.ts +13 -5
  31. package/dist/plus/git-github/api/github.js +53 -13
  32. package/dist/plus/git-github/api/github.js.map +1 -1
  33. package/dist/plus/git-github/api/issueWrites.d.ts +7 -1
  34. package/dist/plus/git-github/api/issueWrites.js +62 -32
  35. package/dist/plus/git-github/api/issueWrites.js.map +1 -1
  36. package/dist/plus/git-github/api/pullRequestWrites.d.ts +7 -3
  37. package/dist/plus/git-github/api/pullRequestWrites.js +120 -67
  38. package/dist/plus/git-github/api/pullRequestWrites.js.map +1 -1
  39. package/dist/plus/integrations/authentication/cloudIntegrationAuthenticationProvider.d.ts +44 -0
  40. package/dist/plus/integrations/authentication/cloudIntegrationAuthenticationProvider.js +199 -0
  41. package/dist/plus/integrations/authentication/cloudIntegrationAuthenticationProvider.js.map +1 -0
  42. package/dist/plus/integrations/authentication/configuredIntegrationService.d.ts +7 -0
  43. package/dist/plus/integrations/authentication/configuredIntegrationService.js +53 -7
  44. package/dist/plus/integrations/authentication/configuredIntegrationService.js.map +1 -1
  45. package/dist/plus/integrations/authentication/integrationAuthenticationProvider.d.ts +2 -38
  46. package/dist/plus/integrations/authentication/integrationAuthenticationProvider.js +0 -199
  47. package/dist/plus/integrations/authentication/integrationAuthenticationService.d.ts +4 -2
  48. package/dist/plus/integrations/authentication/integrationAuthenticationService.js +12 -1
  49. package/dist/plus/integrations/authentication/integrationAuthenticationService.js.map +1 -1
  50. package/dist/plus/integrations/authentication/models.d.ts +0 -1
  51. package/dist/plus/integrations/authentication/models.js +1 -2
  52. package/dist/plus/integrations/authentication/models.js.map +1 -1
  53. package/dist/plus/integrations/constants.d.ts +0 -10
  54. package/dist/plus/integrations/constants.js +1 -95
  55. package/dist/plus/integrations/constants.js.map +1 -1
  56. package/dist/plus/integrations/context.d.ts +17 -17
  57. package/dist/plus/integrations/index.d.ts +44 -25
  58. package/dist/plus/integrations/index.js +41 -8
  59. package/dist/plus/integrations/index.js.map +1 -1
  60. package/dist/plus/integrations/integrationService.d.ts +24 -24
  61. package/dist/plus/integrations/integrationService.js +125 -34
  62. package/dist/plus/integrations/integrationService.js.map +1 -1
  63. package/dist/plus/integrations/lite.js +1 -1
  64. package/dist/plus/integrations/lite.js.map +1 -1
  65. package/dist/plus/integrations/manager.d.ts +81 -21
  66. package/dist/plus/integrations/models/actionablePullRequest.d.ts +213 -0
  67. package/dist/plus/integrations/models/actionablePullRequest.js +25 -0
  68. package/dist/plus/integrations/models/actionablePullRequest.js.map +1 -0
  69. package/dist/plus/integrations/models/gitHostIntegration.d.ts +13 -46
  70. package/dist/plus/integrations/models/gitHostIntegration.js +22 -8
  71. package/dist/plus/integrations/models/gitHostIntegration.js.map +1 -1
  72. package/dist/plus/integrations/models/integration.d.ts +11 -175
  73. package/dist/plus/integrations/models/integration.js +22 -76
  74. package/dist/plus/integrations/models/integration.js.map +1 -1
  75. package/dist/plus/integrations/models/issueTrackerWrites.d.ts +128 -0
  76. package/dist/plus/integrations/models/issueTrackerWrites.js +0 -0
  77. package/dist/plus/integrations/models/issuesIntegration.d.ts +9 -5
  78. package/dist/plus/integrations/models/issuesIntegration.js +5 -3
  79. package/dist/plus/integrations/models/issuesIntegration.js.map +1 -1
  80. package/dist/plus/integrations/models/publicIntegration.d.ts +257 -0
  81. package/dist/plus/integrations/models/publicIntegration.js +21 -0
  82. package/dist/plus/integrations/models/publicIntegration.js.map +1 -0
  83. package/dist/plus/integrations/providerFilters.d.ts +58 -0
  84. package/dist/plus/integrations/providerFilters.js.map +1 -1
  85. package/dist/plus/integrations/providers/actionablePullRequests.d.ts +19 -0
  86. package/dist/plus/integrations/providers/actionablePullRequests.js +32 -0
  87. package/dist/plus/integrations/providers/actionablePullRequests.js.map +1 -0
  88. package/dist/plus/integrations/providers/apiClients.d.ts +1 -2
  89. package/dist/plus/integrations/providers/apiClients.js.map +1 -1
  90. package/dist/plus/integrations/providers/asana.d.ts +3 -2
  91. package/dist/plus/integrations/providers/asana.js +2 -1
  92. package/dist/plus/integrations/providers/asana.js.map +1 -1
  93. package/dist/plus/integrations/providers/azure/azure.d.ts +1 -1
  94. package/dist/plus/integrations/providers/azure/azure.js +1 -1
  95. package/dist/plus/integrations/providers/azure/azure.utils.d.ts +10 -3
  96. package/dist/plus/integrations/providers/azure/azure.utils.js +5 -1
  97. package/dist/plus/integrations/providers/azure/azure.utils.js.map +1 -1
  98. package/dist/plus/integrations/providers/azure/models.d.ts +1 -5
  99. package/dist/plus/integrations/providers/azure/models.js +1 -1
  100. package/dist/plus/integrations/providers/azure/models.js.map +1 -1
  101. package/dist/plus/integrations/providers/azureDevOps.d.ts +8 -5
  102. package/dist/plus/integrations/providers/azureDevOps.js +2 -1
  103. package/dist/plus/integrations/providers/azureDevOps.js.map +1 -1
  104. package/dist/plus/integrations/providers/azureDevOpsServer.d.ts +5 -4
  105. package/dist/plus/integrations/providers/azureDevOpsServer.js +3 -1
  106. package/dist/plus/integrations/providers/azureDevOpsServer.js.map +1 -1
  107. package/dist/plus/integrations/providers/bitbucket/bitbucket.d.ts +2 -2
  108. package/dist/plus/integrations/providers/bitbucket/bitbucket.js.map +1 -1
  109. package/dist/plus/integrations/providers/bitbucket/models.d.ts +1 -1
  110. package/dist/plus/integrations/providers/bitbucket/models.js.map +1 -1
  111. package/dist/plus/integrations/providers/bitbucket-server.d.ts +5 -4
  112. package/dist/plus/integrations/providers/bitbucket-server.js +2 -1
  113. package/dist/plus/integrations/providers/bitbucket-server.js.map +1 -1
  114. package/dist/plus/integrations/providers/bitbucket.d.ts +4 -3
  115. package/dist/plus/integrations/providers/bitbucket.js +2 -1
  116. package/dist/plus/integrations/providers/bitbucket.js.map +1 -1
  117. package/dist/plus/integrations/providers/github/github.d.ts +0 -1
  118. package/dist/plus/integrations/providers/github/github.js +1 -1
  119. package/dist/plus/integrations/providers/github/github.js.map +1 -1
  120. package/dist/plus/integrations/providers/github.d.ts +29 -11
  121. package/dist/plus/integrations/providers/github.js +195 -78
  122. package/dist/plus/integrations/providers/github.js.map +1 -1
  123. package/dist/plus/integrations/providers/gitlab/gitlab.d.ts +2 -2
  124. package/dist/plus/integrations/providers/gitlab/gitlab.js +1 -2
  125. package/dist/plus/integrations/providers/gitlab/gitlab.js.map +1 -1
  126. package/dist/plus/integrations/providers/gitlab/gitlab.utils.d.ts +14 -1
  127. package/dist/plus/integrations/providers/gitlab/gitlab.utils.js.map +1 -1
  128. package/dist/plus/integrations/providers/gitlab/models.d.ts +2 -10
  129. package/dist/plus/integrations/providers/gitlab/models.js.map +1 -1
  130. package/dist/plus/integrations/providers/gitlab.d.ts +7 -5
  131. package/dist/plus/integrations/providers/gitlab.js +2 -1
  132. package/dist/plus/integrations/providers/gitlab.js.map +1 -1
  133. package/dist/plus/integrations/providers/issueSorts.d.ts +1 -0
  134. package/dist/plus/integrations/providers/jira-server.d.ts +4 -4
  135. package/dist/plus/integrations/providers/jira-server.js +3 -2
  136. package/dist/plus/integrations/providers/jira-server.js.map +1 -1
  137. package/dist/plus/integrations/providers/jira.d.ts +3 -3
  138. package/dist/plus/integrations/providers/jira.js +4 -3
  139. package/dist/plus/integrations/providers/jira.js.map +1 -1
  140. package/dist/plus/integrations/providers/jiraIssueByKey.d.ts +3 -1
  141. package/dist/plus/integrations/providers/jiraIssueByKey.js +1 -1
  142. package/dist/plus/integrations/providers/jiraIssueByKey.js.map +1 -1
  143. package/dist/plus/integrations/providers/jiraIssueWriteErrors.d.ts +10 -0
  144. package/dist/plus/integrations/providers/jiraIssueWriteErrors.js +68 -0
  145. package/dist/plus/integrations/providers/jiraIssueWriteErrors.js.map +1 -0
  146. package/dist/plus/integrations/providers/jiraIssueWrites.d.ts +40 -0
  147. package/dist/plus/integrations/providers/jiraIssueWrites.js +397 -0
  148. package/dist/plus/integrations/providers/jiraIssueWrites.js.map +1 -0
  149. package/dist/plus/integrations/providers/linear.d.ts +4 -3
  150. package/dist/plus/integrations/providers/linear.js +3 -2
  151. package/dist/plus/integrations/providers/linear.js.map +1 -1
  152. package/dist/plus/integrations/providers/linearIssuesEtag.d.ts +1 -1
  153. package/dist/plus/integrations/providers/linearIssuesEtag.js +1 -1
  154. package/dist/plus/integrations/providers/linearIssuesEtag.js.map +1 -1
  155. package/dist/plus/integrations/providers/metadata.d.ts +136 -0
  156. package/dist/plus/integrations/providers/metadata.js +513 -0
  157. package/dist/plus/integrations/providers/metadata.js.map +1 -0
  158. package/dist/plus/integrations/providers/models.d.ts +10 -206
  159. package/dist/plus/integrations/providers/models.js +8 -539
  160. package/dist/plus/integrations/providers/models.js.map +1 -1
  161. package/dist/plus/integrations/providers/providersApi.d.ts +7 -3
  162. package/dist/plus/integrations/providers/providersApi.js +23 -11
  163. package/dist/plus/integrations/providers/providersApi.js.map +1 -1
  164. package/dist/plus/integrations/providers/trello.d.ts +1 -1
  165. package/dist/plus/integrations/providers/trello.js +2 -1
  166. package/dist/plus/integrations/providers/trello.js.map +1 -1
  167. package/dist/plus/integrations/providers/utils/providerPaging.d.ts +2 -0
  168. package/dist/plus/integrations/providers/utils/providerPaging.js +3 -2
  169. package/dist/plus/integrations/providers/utils/providerPaging.js.map +1 -1
  170. package/dist/plus/integrations/providers/utils.d.ts +119 -10
  171. package/dist/plus/integrations/providers/utils.js +57 -3
  172. package/dist/plus/integrations/providers/utils.js.map +1 -1
  173. package/dist/plus/integrations/reads/autolinks.d.ts +1 -1
  174. package/dist/plus/integrations/reads/autolinks.js +1 -1
  175. package/dist/plus/integrations/reads/autolinks.js.map +1 -1
  176. package/dist/plus/integrations/reads/broaden.d.ts +1 -1
  177. package/dist/plus/integrations/reads/broaden.js +3 -2
  178. package/dist/plus/integrations/reads/broaden.js.map +1 -1
  179. package/dist/plus/integrations/reads/context.d.ts +1 -1
  180. package/dist/plus/integrations/reads/counts.d.ts +1 -88
  181. package/dist/plus/integrations/reads/counts.js +4 -2
  182. package/dist/plus/integrations/reads/counts.js.map +1 -1
  183. package/dist/plus/integrations/reads/currentAccount.d.ts +1 -18
  184. package/dist/plus/integrations/reads/currentAccount.js.map +1 -1
  185. package/dist/plus/integrations/reads/drains.d.ts +4 -3
  186. package/dist/plus/integrations/reads/drains.js +1 -1
  187. package/dist/plus/integrations/reads/drains.js.map +1 -1
  188. package/dist/plus/integrations/reads/etag.d.ts +174 -3
  189. package/dist/plus/integrations/reads/etag.js +69 -14
  190. package/dist/plus/integrations/reads/etag.js.map +1 -1
  191. package/dist/plus/integrations/reads/filters.d.ts +3 -61
  192. package/dist/plus/integrations/reads/filters.js +1 -1
  193. package/dist/plus/integrations/reads/filters.js.map +1 -1
  194. package/dist/plus/integrations/reads/hierarchy.d.ts +1 -1
  195. package/dist/plus/integrations/reads/hierarchy.js +4 -2
  196. package/dist/plus/integrations/reads/hierarchy.js.map +1 -1
  197. package/dist/plus/integrations/reads/issueBatch.d.ts +2 -102
  198. package/dist/plus/integrations/reads/issueBatch.js +3 -4
  199. package/dist/plus/integrations/reads/issueBatch.js.map +1 -1
  200. package/dist/plus/integrations/reads/issueTracker.d.ts +1 -1
  201. package/dist/plus/integrations/reads/issueTracker.js +4 -3
  202. package/dist/plus/integrations/reads/issueTracker.js.map +1 -1
  203. package/dist/plus/integrations/reads/issues.d.ts +1 -1
  204. package/dist/plus/integrations/reads/issues.js +4 -2
  205. package/dist/plus/integrations/reads/issues.js.map +1 -1
  206. package/dist/plus/integrations/reads/paging.d.ts +1 -1
  207. package/dist/plus/integrations/reads/paging.js +1 -1
  208. package/dist/plus/integrations/reads/paging.js.map +1 -1
  209. package/dist/plus/integrations/reads/pullRequestActivity.d.ts +1 -24
  210. package/dist/plus/integrations/reads/pullRequestActivity.js +2 -1
  211. package/dist/plus/integrations/reads/pullRequestActivity.js.map +1 -1
  212. package/dist/plus/integrations/reads/pullRequestBatch.d.ts +2 -56
  213. package/dist/plus/integrations/reads/pullRequestBatch.js +23 -3
  214. package/dist/plus/integrations/reads/pullRequestBatch.js.map +1 -1
  215. package/dist/plus/integrations/reads/pullRequestBranches.d.ts +1 -47
  216. package/dist/plus/integrations/reads/pullRequestBranches.js +2 -1
  217. package/dist/plus/integrations/reads/pullRequestBranches.js.map +1 -1
  218. package/dist/plus/integrations/reads/pullRequestCheckLogs.d.ts +1 -15
  219. package/dist/plus/integrations/reads/pullRequestCheckLogs.js +2 -1
  220. package/dist/plus/integrations/reads/pullRequestCheckLogs.js.map +1 -1
  221. package/dist/plus/integrations/reads/pullRequests.js +4 -2
  222. package/dist/plus/integrations/reads/pullRequests.js.map +1 -1
  223. package/dist/plus/integrations/reads/pullRequestsForCommits.d.ts +1 -16
  224. package/dist/plus/integrations/reads/pullRequestsForCommits.js +2 -1
  225. package/dist/plus/integrations/reads/pullRequestsForCommits.js.map +1 -1
  226. package/dist/plus/integrations/reads/resolveRepository.js +10 -5
  227. package/dist/plus/integrations/reads/resolveRepository.js.map +1 -1
  228. package/dist/plus/integrations/reads/searchIssues.js +2 -1
  229. package/dist/plus/integrations/reads/searchIssues.js.map +1 -1
  230. package/dist/plus/integrations/reads/searchPullRequests.js +2 -1
  231. package/dist/plus/integrations/reads/searchPullRequests.js.map +1 -1
  232. package/dist/plus/integrations/reads/sweeps.d.ts +1 -1
  233. package/dist/plus/integrations/reads/sweeps.js +3 -2
  234. package/dist/plus/integrations/reads/sweeps.js.map +1 -1
  235. package/dist/plus/integrations/reads/warnings.d.ts +1 -1
  236. package/dist/plus/integrations/reads/warnings.js +1 -1
  237. package/dist/plus/integrations/reads/warnings.js.map +1 -1
  238. package/dist/plus/integrations/results.d.ts +324 -2
  239. package/dist/plus/integrations/results.js.map +1 -1
  240. package/dist/plus/integrations/telemetry.d.ts +0 -10
  241. package/dist/plus/integrations/telemetry.js +0 -11
  242. package/dist/plus/integrations/utils/domain.utils.d.ts +1 -0
  243. package/dist/plus/integrations/utils/domain.utils.js +10 -2
  244. package/dist/plus/integrations/utils/domain.utils.js.map +1 -1
  245. package/dist/plus/integrations/utils/integration.utils.d.ts +2 -6
  246. package/dist/plus/integrations/utils/integration.utils.js +8 -9
  247. package/dist/plus/integrations/utils/integration.utils.js.map +1 -1
  248. package/dist/utils/env/node/exec.js +2 -2
  249. package/dist/utils/keys/chord.d.ts +13 -2
  250. package/dist/utils/keys/chord.js +76 -17
  251. package/dist/utils/keys/chord.js.map +1 -1
  252. package/dist/utils/keys/keybinding.d.ts +12 -0
  253. package/dist/utils/keys/keybinding.js +52 -2
  254. package/dist/utils/keys/keybinding.js.map +1 -1
  255. package/dist/utils/markdown.d.ts +21 -0
  256. package/dist/utils/markdown.js +33 -1
  257. package/dist/utils/markdown.js.map +1 -1
  258. package/docs/integrations.md +174 -19
  259. package/package.json +5 -1
  260. package/dist/plus/integrations/authentication/integrationAuthenticationProvider.js.map +0 -1
  261. package/dist/plus/integrations/telemetry.js.map +0 -1
@@ -0,0 +1,513 @@
1
+ import { equalsIgnoreCase } from "../../../utils/string.js";
2
+ import "../../../git/models/pullRequest.js";
3
+ import "../constants.js";
4
+ import { githubSearchResultLimit } from "../../git-github/api/config.js";
5
+ import "../providerFilters.js";
6
+ import { azurePullRequestSearchSorts, azureWorkItemSearchRelationships, azureWorkItemSearchResultLimit, azureWorkItemSearchSorts } from "./azure/search.js";
7
+ import { asanaIssueSorts, azureAccountWideIssueSorts, azureIssueSorts, githubAccountWideIssueSorts, githubIssueSorts, gitlabAccountWideIssueSorts, gitlabIssueSorts, jiraIssueSorts, linearIssueSorts, trelloIssueSorts } from "./issueSorts.js";
8
+ //#region ../plus/integrations/src/providers/metadata.ts
9
+ let PagingMode = /* @__PURE__ */ function(PagingMode) {
10
+ PagingMode["Project"] = "project";
11
+ PagingMode["Repo"] = "repo";
12
+ PagingMode["Repos"] = "repos";
13
+ return PagingMode;
14
+ }({});
15
+ /**
16
+ * GitHub and GitHub Enterprise express every criterion as a search qualifier on the same GraphQL `search` field,
17
+ * so the two share one declaration — a GHE instance running the same search syntax has the same capability, and
18
+ * two copies of this table would be free to drift.
19
+ *
20
+ * Every entry is a claim the implementation must keep: `searchIssuesPage` emits a qualifier for each of these,
21
+ * and a test asserts that (see the `issueSearch` capability tests) so the table can't quietly outrun the code.
22
+ */
23
+ const githubIssueSearchCapabilities = {
24
+ relationships: [
25
+ "authored",
26
+ "assigned",
27
+ "mentioned",
28
+ "any-assignee",
29
+ "unassigned"
30
+ ],
31
+ text: true,
32
+ labels: true,
33
+ milestone: true,
34
+ updatedAfter: true,
35
+ createdAfter: true,
36
+ withoutLinkedPullRequest: true,
37
+ states: true,
38
+ sorts: githubIssueSorts
39
+ };
40
+ /** GitHub and GHE use the same filtered pull-request search syntax and result ceiling. */
41
+ const githubPullRequestSearchCapabilities = {
42
+ relationships: [
43
+ "author",
44
+ "assignee",
45
+ "review-requested",
46
+ "reviewed-by",
47
+ "mention"
48
+ ],
49
+ states: [
50
+ "open",
51
+ "closed",
52
+ "merged",
53
+ "all"
54
+ ],
55
+ text: true,
56
+ updatedAfter: true,
57
+ createdAfter: true,
58
+ includeArchived: true,
59
+ draft: true,
60
+ repositoryScope: true,
61
+ organizationScope: true,
62
+ sorts: [
63
+ "updated:desc",
64
+ "updated:asc",
65
+ "created:desc",
66
+ "created:asc"
67
+ ]
68
+ };
69
+ /**
70
+ * Bitbucket Data Center's filtered pull-request search (`bitbucket-server/pullRequestSearch.ts`), declared from what
71
+ * its REST API can express rather than from what a PR shape carries:
72
+ * - relationships: `role=AUTHOR`, and a reviewer's `UNAPPROVED` status for a pending review versus `APPROVED` or
73
+ * `NEEDS_WORK` for one already given. A Bitbucket pull request has no assignee, and nothing filters by mention.
74
+ * - text is `filterText` (title or description), draft is `draft`, and archived repositories are excluded unless
75
+ * asked for — all re-checked on each row, since the dashboard read has neither filter.
76
+ * - no date filters and no `created` ordering: `order` is only `NEWEST`/`OLDEST` by last update, and filtering a
77
+ * date on the rows read would page through everything before it.
78
+ * - no organization scope: there is no project-wide pull-request list, only per repository and the dashboard.
79
+ */
80
+ const bitbucketServerPullRequestSearchCapabilities = {
81
+ relationships: [
82
+ "author",
83
+ "review-requested",
84
+ "reviewed-by"
85
+ ],
86
+ states: [
87
+ "open",
88
+ "closed",
89
+ "merged",
90
+ "all"
91
+ ],
92
+ text: true,
93
+ updatedAfter: false,
94
+ createdAfter: false,
95
+ includeArchived: true,
96
+ draft: true,
97
+ repositoryScope: true,
98
+ organizationScope: false,
99
+ sorts: ["updated:desc", "updated:asc"]
100
+ };
101
+ /**
102
+ * Azure DevOps Server's filtered pull-request search. Azure's pull request query narrows only by creator, reviewer,
103
+ * status and repository, so the provider drains each facet and applies text, draft and dates to the complete facet
104
+ * before merging — so a criterion never narrows a page after its count, and the only sort keys are the two a merged
105
+ * page can be re-ordered by. What text and `updatedAfter` match is bounded by the list endpoint: see
106
+ * `toAzurePullRequestSearchFilter`.
107
+ *
108
+ * `Assignee` and `ReviewRequested` both read by reviewer: Azure has no assignee distinct from its reviewers.
109
+ * `Reviewed` and `Mention` are absent because the pull request query has no axis for either, and `includeArchived`
110
+ * because Azure has no archived repositories to exclude.
111
+ */
112
+ const azureServerPullRequestSearchCapabilities = {
113
+ relationships: [
114
+ "author",
115
+ "assignee",
116
+ "review-requested"
117
+ ],
118
+ states: [
119
+ "open",
120
+ "closed",
121
+ "merged",
122
+ "all"
123
+ ],
124
+ text: true,
125
+ updatedAfter: true,
126
+ createdAfter: true,
127
+ includeArchived: false,
128
+ draft: true,
129
+ repositoryScope: true,
130
+ organizationScope: true,
131
+ sorts: azurePullRequestSearchSorts
132
+ };
133
+ /**
134
+ * Azure DevOps Server's filtered work-item search: one WIQL query per collection, every criterion a clause of it.
135
+ * `mentioned` is absent because `@RecentMentions` only reaches back 30 days; `milestone` and
136
+ * `withoutLinkedPullRequest` because WIQL has no flat-query clause for either. See `azure/search.ts`.
137
+ */
138
+ const azureServerIssueSearchCapabilities = {
139
+ relationships: azureWorkItemSearchRelationships,
140
+ text: true,
141
+ labels: true,
142
+ milestone: false,
143
+ updatedAfter: true,
144
+ createdAfter: true,
145
+ withoutLinkedPullRequest: false,
146
+ states: true,
147
+ sorts: azureWorkItemSearchSorts
148
+ };
149
+ const providersMetadata = {
150
+ ["github"]: {
151
+ domain: "github.com",
152
+ id: "github",
153
+ name: "GitHub",
154
+ type: "git",
155
+ iconKey: "github",
156
+ issuesPagingMode: "repos",
157
+ pullRequestsPagingMode: "repos",
158
+ supportedPullRequestFilters: [
159
+ "author",
160
+ "assignee",
161
+ "review-requested",
162
+ "mention"
163
+ ],
164
+ supportedAccountWidePullRequestFilters: [
165
+ "author",
166
+ "assignee",
167
+ "review-requested",
168
+ "reviewed-by",
169
+ "mention"
170
+ ],
171
+ supportedPullRequestSearch: githubPullRequestSearchCapabilities,
172
+ pullRequestSearchResultLimit: githubSearchResultLimit,
173
+ supportedIssueFilters: [
174
+ "author",
175
+ "assignee",
176
+ "mention"
177
+ ],
178
+ supportedAccountWideIssueFilters: [
179
+ "author",
180
+ "assignee",
181
+ "mention"
182
+ ],
183
+ supportedIssueSorts: githubIssueSorts,
184
+ supportedAccountWideIssueSorts: githubAccountWideIssueSorts,
185
+ supportedIssueSearch: githubIssueSearchCapabilities,
186
+ issueSearchResultLimit: githubSearchResultLimit,
187
+ scopes: [
188
+ "repo",
189
+ "read:user",
190
+ "user:email"
191
+ ]
192
+ },
193
+ ["cloud-github-enterprise"]: {
194
+ domain: "",
195
+ id: "cloud-github-enterprise",
196
+ name: "GitHub Enterprise",
197
+ type: "git",
198
+ iconKey: "github-enterprise",
199
+ issuesPagingMode: "repos",
200
+ pullRequestsPagingMode: "repos",
201
+ supportedPullRequestFilters: [
202
+ "author",
203
+ "assignee",
204
+ "review-requested",
205
+ "mention"
206
+ ],
207
+ supportedAccountWidePullRequestFilters: [
208
+ "author",
209
+ "assignee",
210
+ "review-requested",
211
+ "reviewed-by",
212
+ "mention"
213
+ ],
214
+ supportedPullRequestSearch: githubPullRequestSearchCapabilities,
215
+ pullRequestSearchResultLimit: githubSearchResultLimit,
216
+ supportedIssueFilters: [
217
+ "author",
218
+ "assignee",
219
+ "mention"
220
+ ],
221
+ supportedAccountWideIssueFilters: [
222
+ "author",
223
+ "assignee",
224
+ "mention"
225
+ ],
226
+ supportedIssueSorts: githubIssueSorts,
227
+ supportedAccountWideIssueSorts: githubAccountWideIssueSorts,
228
+ supportedIssueSearch: githubIssueSearchCapabilities,
229
+ issueSearchResultLimit: githubSearchResultLimit,
230
+ scopes: [
231
+ "repo",
232
+ "read:user",
233
+ "user:email"
234
+ ]
235
+ },
236
+ ["gitlab"]: {
237
+ domain: "gitlab.com",
238
+ id: "gitlab",
239
+ name: "GitLab",
240
+ type: "git",
241
+ iconKey: "gitlab",
242
+ issuesPagingMode: "repo",
243
+ pullRequestsPagingMode: "repo",
244
+ supportedPullRequestFilters: [
245
+ "author",
246
+ "assignee",
247
+ "review-requested"
248
+ ],
249
+ supportedAccountWidePullRequestFilters: [
250
+ "author",
251
+ "assignee",
252
+ "review-requested"
253
+ ],
254
+ supportedIssueFilters: ["author", "assignee"],
255
+ supportedAccountWideIssueFilters: ["assignee", "author"],
256
+ supportedIssueSorts: gitlabIssueSorts,
257
+ supportedAccountWideIssueSorts: gitlabAccountWideIssueSorts,
258
+ scopes: [
259
+ "api",
260
+ "read_user",
261
+ "read_repository"
262
+ ]
263
+ },
264
+ ["cloud-gitlab-self-hosted"]: {
265
+ domain: "",
266
+ id: "cloud-gitlab-self-hosted",
267
+ name: "GitLab Self-Hosted",
268
+ type: "git",
269
+ iconKey: "gitlab-self-hosted",
270
+ issuesPagingMode: "repo",
271
+ pullRequestsPagingMode: "repo",
272
+ supportedPullRequestFilters: [
273
+ "author",
274
+ "assignee",
275
+ "review-requested"
276
+ ],
277
+ supportedAccountWidePullRequestFilters: [
278
+ "author",
279
+ "assignee",
280
+ "review-requested"
281
+ ],
282
+ supportedIssueFilters: ["author", "assignee"],
283
+ supportedAccountWideIssueFilters: ["assignee", "author"],
284
+ supportedIssueSorts: gitlabIssueSorts,
285
+ supportedAccountWideIssueSorts: gitlabAccountWideIssueSorts,
286
+ scopes: [
287
+ "api",
288
+ "read_user",
289
+ "read_repository"
290
+ ]
291
+ },
292
+ ["bitbucket"]: {
293
+ domain: "bitbucket.org",
294
+ id: "bitbucket",
295
+ name: "Bitbucket",
296
+ type: "git",
297
+ iconKey: "bitbucket",
298
+ pullRequestsPagingMode: "repo",
299
+ supportedPullRequestFilters: ["author", "review-requested"],
300
+ supportedAccountWidePullRequestFilters: ["author", "review-requested"],
301
+ scopes: [
302
+ "account:read",
303
+ "repository:read",
304
+ "pullrequest:read",
305
+ "issue:read"
306
+ ]
307
+ },
308
+ ["bitbucket-server"]: {
309
+ domain: "",
310
+ id: "bitbucket-server",
311
+ name: "Bitbucket Data Center",
312
+ type: "git",
313
+ iconKey: "bitbucket-server",
314
+ pullRequestsPagingMode: "repo",
315
+ supportedPullRequestFilters: ["author", "review-requested"],
316
+ supportedAccountWidePullRequestFilters: ["author", "review-requested"],
317
+ supportedPullRequestSearch: bitbucketServerPullRequestSearchCapabilities,
318
+ scopes: ["Project (Read)", "Repository (Write)"]
319
+ },
320
+ ["azureDevOps"]: {
321
+ supportsIssueStates: true,
322
+ domain: "dev.azure.com",
323
+ id: "azureDevOps",
324
+ name: "Azure DevOps",
325
+ type: "git",
326
+ iconKey: "azureDevOps",
327
+ issuesPagingMode: "project",
328
+ pullRequestsPagingMode: "repo",
329
+ supportedPullRequestFilters: [
330
+ "author",
331
+ "assignee",
332
+ "review-requested"
333
+ ],
334
+ supportedAccountWidePullRequestFilters: [
335
+ "author",
336
+ "assignee",
337
+ "review-requested"
338
+ ],
339
+ supportedIssueFilters: [
340
+ "author",
341
+ "assignee",
342
+ "mention"
343
+ ],
344
+ supportedAccountWideIssueFilters: ["author", "assignee"],
345
+ supportedIssueSorts: azureIssueSorts,
346
+ supportedAccountWideIssueSorts: azureAccountWideIssueSorts,
347
+ scopes: [
348
+ "vso.code",
349
+ "vso.identity",
350
+ "vso.project",
351
+ "vso.profile",
352
+ "vso.work"
353
+ ]
354
+ },
355
+ ["azure-devops-server"]: {
356
+ supportsIssueStates: true,
357
+ domain: "",
358
+ id: "azure-devops-server",
359
+ name: "Azure DevOps Server",
360
+ type: "git",
361
+ iconKey: "azureDevOps",
362
+ issuesPagingMode: "project",
363
+ pullRequestsPagingMode: "repo",
364
+ supportedPullRequestFilters: [
365
+ "author",
366
+ "assignee",
367
+ "review-requested"
368
+ ],
369
+ supportedAccountWidePullRequestFilters: [
370
+ "author",
371
+ "assignee",
372
+ "review-requested"
373
+ ],
374
+ supportedIssueFilters: [
375
+ "author",
376
+ "assignee",
377
+ "mention"
378
+ ],
379
+ supportedAccountWideIssueFilters: ["author", "assignee"],
380
+ supportedIssueSorts: azureIssueSorts,
381
+ supportedAccountWideIssueSorts: azureAccountWideIssueSorts,
382
+ supportedPullRequestSearch: azureServerPullRequestSearchCapabilities,
383
+ supportedIssueSearch: azureServerIssueSearchCapabilities,
384
+ issueSearchResultLimit: azureWorkItemSearchResultLimit,
385
+ exactSearchScopeNames: true,
386
+ scopes: [
387
+ "vso.code",
388
+ "vso.identity",
389
+ "vso.project",
390
+ "vso.profile",
391
+ "vso.work"
392
+ ]
393
+ },
394
+ ["jira"]: {
395
+ domain: "atlassian.net",
396
+ id: "jira",
397
+ name: "Jira",
398
+ type: "issues",
399
+ iconKey: "jira",
400
+ scopes: [
401
+ "read:status:jira",
402
+ "read:application-role:jira",
403
+ "read:attachment:jira",
404
+ "write:attachment:jira",
405
+ "read:comment:jira",
406
+ "read:project-category:jira",
407
+ "read:project:jira",
408
+ "read:issue.vote:jira",
409
+ "read:field-configuration:jira",
410
+ "write:issue:jira",
411
+ "read:issue-security-level:jira",
412
+ "write:issue.property:jira",
413
+ "read:issue.changelog:jira",
414
+ "read:avatar:jira",
415
+ "read:issue-meta:jira",
416
+ "read:permission:jira",
417
+ "offline_access",
418
+ "read:issue:jira",
419
+ "read:me",
420
+ "read:audit-log:jira",
421
+ "read:project.component:jira",
422
+ "read:group:jira",
423
+ "read:project-role:jira",
424
+ "write:comment:jira",
425
+ "read:label:jira",
426
+ "write:comment.property:jira",
427
+ "read:issue-details:jira",
428
+ "read:issue-type-hierarchy:jira",
429
+ "read:issue.transition:jira",
430
+ "read:user:jira",
431
+ "read:field:jira",
432
+ "read:issue-type:jira",
433
+ "read:project.property:jira",
434
+ "read:comment.property:jira",
435
+ "read:project-version:jira"
436
+ ],
437
+ supportedIssueFilters: [
438
+ "author",
439
+ "assignee",
440
+ "mention"
441
+ ],
442
+ supportedIssueSorts: jiraIssueSorts,
443
+ supportsIssueStates: true
444
+ },
445
+ ["jira-server"]: {
446
+ domain: "",
447
+ id: "jira-server",
448
+ name: "Jira Data Center",
449
+ type: "issues",
450
+ iconKey: "jira",
451
+ scopes: [],
452
+ supportedIssueFilters: [
453
+ "author",
454
+ "assignee",
455
+ "mention"
456
+ ],
457
+ supportedIssueSorts: jiraIssueSorts,
458
+ supportsIssueStates: true
459
+ },
460
+ ["linear"]: {
461
+ domain: "linear.app",
462
+ id: "linear",
463
+ name: "Linear",
464
+ type: "issues",
465
+ iconKey: "linear",
466
+ scopes: [],
467
+ supportedIssueFilters: ["assignee"],
468
+ supportedIssueSorts: linearIssueSorts,
469
+ supportsIssueStates: true
470
+ },
471
+ ["trello"]: {
472
+ domain: "trello.com",
473
+ id: "trello",
474
+ name: "Trello",
475
+ type: "issues",
476
+ iconKey: "trello",
477
+ scopes: [],
478
+ supportedIssueFilters: ["assignee"],
479
+ supportedIssueSorts: trelloIssueSorts
480
+ },
481
+ ["asana"]: {
482
+ domain: "app.asana.com",
483
+ id: "asana",
484
+ name: "Asana",
485
+ type: "issues",
486
+ iconKey: "asana",
487
+ scopes: [],
488
+ supportedIssueFilters: ["assignee"],
489
+ supportedIssueSorts: asanaIssueSorts,
490
+ supportsIssueStates: true
491
+ }
492
+ };
493
+ function isGitHubDotCom(domain) {
494
+ return equalsIgnoreCase(domain, "github.com");
495
+ }
496
+ function isGitLabDotCom(domain) {
497
+ return equalsIgnoreCase(domain, "gitlab.com");
498
+ }
499
+ const azureCloudDomainRegex = /^dev\.azure\.com$|(?:^|\.)visualstudio\.com$/i;
500
+ function isAzureCloudDomain(domain) {
501
+ return domain != null && azureCloudDomainRegex.test(domain);
502
+ }
503
+ const bitbucketCloudDomainRegex = /^bitbucket\.org$/i;
504
+ function isBitbucketCloudDomain(domain) {
505
+ return domain != null && bitbucketCloudDomainRegex.test(domain);
506
+ }
507
+ function supportsCodeSuggest(provider) {
508
+ return isGitHubDotCom(provider.domain);
509
+ }
510
+ //#endregion
511
+ export { PagingMode, isAzureCloudDomain, isBitbucketCloudDomain, isGitHubDotCom, isGitLabDotCom, providersMetadata, supportsCodeSuggest };
512
+
513
+ //# sourceMappingURL=metadata.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"metadata.js","names":[],"sources":["../../../../../plus/integrations/src/providers/metadata.ts"],"sourcesContent":["import { githubSearchResultLimit } from '@gitlens/git-github/api/config.js';\nimport type { ProviderReference } from '@gitlens/git/models/remoteProvider.js';\nimport { equalsIgnoreCase } from '@gitlens/utils/string.js';\nimport type { IntegrationIds } from '../constants.js';\nimport {\n\tGitCloudHostIntegrationId,\n\tGitSelfManagedHostIntegrationId,\n\tIssuesCloudHostIntegrationId,\n\tIssuesSelfManagedHostIntegrationId,\n} from '../constants.js';\nimport type { IntegrationType } from '../models/publicIntegration.js';\nimport type {\n\tIssueSearchCapabilities,\n\tIssueSorting,\n\tPullRequestSearchCapabilities,\n\tPullRequestSorting,\n} from '../providerFilters.js';\nimport { IssueFilter, PullRequestFilter } from '../providerFilters.js';\nimport {\n\tazurePullRequestSearchSorts,\n\tazureWorkItemSearchRelationships,\n\tazureWorkItemSearchResultLimit,\n\tazureWorkItemSearchSorts,\n} from './azure/search.js';\nimport {\n\tasanaIssueSorts,\n\tazureAccountWideIssueSorts,\n\tazureIssueSorts,\n\tgithubAccountWideIssueSorts,\n\tgithubIssueSorts,\n\tgitlabAccountWideIssueSorts,\n\tgitlabIssueSorts,\n\tjiraIssueSorts,\n\tlinearIssueSorts,\n\ttrelloIssueSorts,\n} from './issueSorts.js';\n\n// Provider metadata (names, domains, icons, scopes, capabilities) and the domain checks built on it. Kept apart from\n// `models.ts`, which holds the `@gitkraken/provider-apis` mappings, so the public facade can re-export this without\n// its declarations reaching the SDK.\n\nexport enum PagingMode {\n\tProject = 'project',\n\tRepo = 'repo',\n\tRepos = 'repos',\n}\n\nexport interface ProviderMetadata {\n\tdomain: string;\n\tid: IntegrationIds;\n\tname: string;\n\ttype: IntegrationType;\n\t/** Key for the `gl-provider-<iconKey>` glicon. Cloud self-managed variants reuse the base\n\t * `'github-enterprise'`/`'gitlab-self-hosted'` icon (no enum member exists for those anymore). */\n\ticonKey: string;\n\tissuesPagingMode?: PagingMode;\n\tpullRequestsPagingMode?: PagingMode;\n\tscopes: string[];\n\tsupportedPullRequestFilters?: PullRequestFilter[];\n\t/**\n\t * Relationship filters the ACCOUNT-WIDE pull-request read can express as an exact OR union.\n\t * This is independent from `supportedPullRequestFilters`, which describes repo-scoped reads.\n\t */\n\tsupportedAccountWidePullRequestFilters?: PullRequestFilter[];\n\t/**\n\t * What the filtered pull-request search can express server-side. Absent means the provider has\n\t * no such search and the facade refuses it rather than returning an unfiltered page.\n\t */\n\tsupportedPullRequestSearch?: PullRequestSearchCapabilities;\n\t/**\n\t * Maximum results the provider will serve for one pull-request search facet. Matches beyond it are unreachable\n\t * and are reported as a succeeded omission carrying this limit plus the provider's pre-ceiling facet count.\n\t */\n\tpullRequestSearchResultLimit?: number;\n\t/** Filters the REPO-scoped issue read can express. */\n\tsupportedIssueFilters?: IssueFilter[];\n\t/**\n\t * Filters the ACCOUNT-WIDE issue read can express, which is NOT the same set as\n\t * {@link ProviderMetadata.supportedIssueFilters}: the two reads are different provider queries.\n\t *\n\t * Unfiltered, each provider's account-wide read is that provider's own definition of \"my issues\" — GitHub/GHE\n\t * union authored + assigned + mentioned, Azure drains assigned + authored, and GitLab reads assigned-to-me.\n\t * A consumer replacing a narrower tool (`gk`'s `assignee:@me`) must select the `Assignee` filter wherever the\n\t * provider's default is wider.\n\t *\n\t * A filter listed here narrows that read server-side. Absent/empty means the read can't be narrowed at all,\n\t * so the facade refuses a filtered request rather than serving the unnarrowed union as if it had been\n\t * filtered. GitLab lists `Assignee` and `Author` because the SDK's account-wide input exposes both username\n\t * axes; it omits `Mention` because that REST read has no first-class mention filter.\n\t */\n\tsupportedAccountWideIssueFilters?: IssueFilter[];\n\t/**\n\t * Sort keys the REPO-scoped issue read can express server-side — and, for an issue tracker (Jira/Linear/Trello),\n\t * its project-scoped read, which is the only issue surface a tracker has.\n\t *\n\t * Absent/empty means the read can't be ordered at all, so a request carrying `sort` is refused rather than\n\t * served in whatever order the provider felt like. Present, it is a promise: every key here reaches the\n\t * provider query.\n\t *\n\t * A key listed here is expressible on ONE provider query, which is what this read is when it is given ONE\n\t * scope. Given several (GitLab across repositories, Azure across projects, a tracker across projects) it merges\n\t * their results here and can only honor a key a normalized issue carries, so it additionally refuses\n\t * `priority`/`dueDate`/`resolved` — see `getIssueComparator`. That depends on the caller's scope count rather\n\t * than on the provider, which is why it is a runtime refusal and not a fourth table: encoding it here would\n\t * under-report the single-scope read, which really does support those keys.\n\t */\n\tsupportedIssueSorts?: IssueSorting[];\n\t/**\n\t * Sort keys the ACCOUNT-WIDE issue read can express server-side, which is NOT the same set as\n\t * {@link ProviderMetadata.supportedIssueSorts} — for GitLab the two reads are different APIs (GraphQL vs REST)\n\t * with genuinely different vocabularies, not one narrowed twice.\n\t *\n\t * Absent means the account-wide read can't be ordered (or doesn't exist). An issue tracker leaves this empty\n\t * and reports under `supportedIssueSorts`, so reading a tracker's capability from here under-reports it.\n\t *\n\t * Unlike {@link ProviderMetadata.supportedIssueSorts} this needs no companion runtime refusal, because every\n\t * provider's account-wide read is a union of several queries with no scope count for a caller to reduce: it\n\t * ALWAYS merges. So the keys a merge can't order by are simply absent here — the table states what the read can\n\t * honor, which is what makes intersecting against it sufficient.\n\t */\n\tsupportedAccountWideIssueSorts?: IssueSorting[];\n\t/**\n\t * Whether issue list reads (including Azure project/repository and account-wide reads) can be asked for a `state` other than open, and honor it server-side.\n\t *\n\t * A tracker read is open-only unless asked otherwise, so absent does not mean the read returns every state: it\n\t * means only `'open'` is expressible, and `'closed'`/`'all'` are refused rather than served as the open list.\n\t * Server-side, because each read drains to a page backstop: dropping states afterwards would let a project full\n\t * of done work spend that budget before reaching the open issues.\n\t */\n\tsupportsIssueStates?: boolean;\n\t/**\n\t * What the provider's FILTERED issue search (`searchIssuesPage`, and the `countIssues` probe over the same\n\t * criteria) can express server-side. A third, wider surface than either filter set above: it is not bound to\n\t * the user at all, so it takes relationships those reads have no way to name (`any-assignee`, `unassigned`),\n\t * plus free text and issue attributes.\n\t *\n\t * Absent means the provider has NO filtered issue search and the read is refused. Present, it is a promise:\n\t * every field declared here reaches the provider query, so a consumer that intersects against it never has a\n\t * read refused, and a criterion is never silently ignored.\n\t */\n\tsupportedIssueSearch?: IssueSearchCapabilities;\n\t/**\n\t * The maximum number of results the provider's filtered issue search will serve for ONE query, however it is\n\t * paged. Matches past it are UNREACHABLE, not merely unfetched, which is why a read that hits this reports an\n\t * omission with `recovery: 'none'` and the total match count rather than offering a \"load more\".\n\t *\n\t * Absent means the provider declares no ceiling, in which case a truncated read falls back to generic wording\n\t * instead of quoting a limit that was never published.\n\t */\n\tissueSearchResultLimit?: number;\n\t/**\n\t * Whether the filtered searches reach the provider with scope names verbatim — as encoded URL segments, or\n\t * matched against the names discovery reported — rather than inside a query string the provider sanitizes.\n\t *\n\t * Relaxes the scope-name rule (`isUsableSearchScopeName`) for that provider to refuse only blank names and\n\t * control characters: a space or a quote can't split or alter a scope that is never parsed as a query, and\n\t * refusing them would refuse real names. Absent for a query-string search (GitHub's), where both do.\n\t */\n\texactSearchScopeNames?: boolean;\n}\n\nexport type ProvidersMetadata = { [Id in IntegrationIds]: ProviderMetadata & { id: Id } };\n\n/**\n * GitHub and GitHub Enterprise express every criterion as a search qualifier on the same GraphQL `search` field,\n * so the two share one declaration — a GHE instance running the same search syntax has the same capability, and\n * two copies of this table would be free to drift.\n *\n * Every entry is a claim the implementation must keep: `searchIssuesPage` emits a qualifier for each of these,\n * and a test asserts that (see the `issueSearch` capability tests) so the table can't quietly outrun the code.\n */\nconst githubIssueSearchCapabilities: IssueSearchCapabilities = {\n\t// `author:@me` / `assignee:@me` / `mentions:@me` / `assignee:*` / `no:assignee`, each its own aliased search.\n\trelationships: ['authored', 'assigned', 'mentioned', 'any-assignee', 'unassigned'],\n\ttext: true,\n\tlabels: true,\n\tmilestone: true,\n\tupdatedAfter: true,\n\tcreatedAfter: true,\n\t// `-linked:pr`.\n\twithoutLinkedPullRequest: true,\n\t// `is:open` / `is:closed`, or neither for all states.\n\tstates: true,\n\t// `sort:created-desc`, `sort:updated`, `sort:comments-asc`, … — see `githubIssueSorts`.\n\tsorts: githubIssueSorts,\n};\n\n/**\n * The ordering vocabulary of GitHub's filtered PR search: `created` and `updated`, both directions.\n *\n * Hand-declared rather than derived from `@gitkraken/provider-apis` (which has no PR-sort surface), and narrower\n * than the issue set on purpose: the merged relationship × state facets can only be re-ordered by a field a\n * `PullRequestShape` carries (see `getPullRequestComparator`), and GitHub PRs have no priority and no relevance\n * that orders stably under the result ceiling. A parity test pins this to `gitHubPullRequestSortQualifiers`' keys\n * so the capability can't outrun the emitter.\n */\nconst githubPullRequestSorts: PullRequestSorting[] = ['updated:desc', 'updated:asc', 'created:desc', 'created:asc'];\n\n/** GitHub and GHE use the same filtered pull-request search syntax and result ceiling. */\nconst githubPullRequestSearchCapabilities: PullRequestSearchCapabilities = {\n\trelationships: [\n\t\tPullRequestFilter.Author,\n\t\tPullRequestFilter.Assignee,\n\t\tPullRequestFilter.ReviewRequested,\n\t\tPullRequestFilter.Reviewed,\n\t\tPullRequestFilter.Mention,\n\t],\n\tstates: ['open', 'closed', 'merged', 'all'],\n\ttext: true,\n\tupdatedAfter: true,\n\tcreatedAfter: true,\n\tincludeArchived: true,\n\tdraft: true,\n\trepositoryScope: true,\n\torganizationScope: true,\n\t// `sort:updated`, `sort:updated-asc`, `sort:created-desc`, `sort:created-asc` — see `githubPullRequestSorts`.\n\tsorts: githubPullRequestSorts,\n};\n\n/**\n * Bitbucket Data Center's filtered pull-request search (`bitbucket-server/pullRequestSearch.ts`), declared from what\n * its REST API can express rather than from what a PR shape carries:\n * - relationships: `role=AUTHOR`, and a reviewer's `UNAPPROVED` status for a pending review versus `APPROVED` or\n * `NEEDS_WORK` for one already given. A Bitbucket pull request has no assignee, and nothing filters by mention.\n * - text is `filterText` (title or description), draft is `draft`, and archived repositories are excluded unless\n * asked for — all re-checked on each row, since the dashboard read has neither filter.\n * - no date filters and no `created` ordering: `order` is only `NEWEST`/`OLDEST` by last update, and filtering a\n * date on the rows read would page through everything before it.\n * - no organization scope: there is no project-wide pull-request list, only per repository and the dashboard.\n */\nconst bitbucketServerPullRequestSearchCapabilities: PullRequestSearchCapabilities = {\n\trelationships: [PullRequestFilter.Author, PullRequestFilter.ReviewRequested, PullRequestFilter.Reviewed],\n\tstates: ['open', 'closed', 'merged', 'all'],\n\ttext: true,\n\tupdatedAfter: false,\n\tcreatedAfter: false,\n\tincludeArchived: true,\n\tdraft: true,\n\trepositoryScope: true,\n\torganizationScope: false,\n\tsorts: ['updated:desc', 'updated:asc'],\n};\n\n/**\n * Azure DevOps Server's filtered pull-request search. Azure's pull request query narrows only by creator, reviewer,\n * status and repository, so the provider drains each facet and applies text, draft and dates to the complete facet\n * before merging — so a criterion never narrows a page after its count, and the only sort keys are the two a merged\n * page can be re-ordered by. What text and `updatedAfter` match is bounded by the list endpoint: see\n * `toAzurePullRequestSearchFilter`.\n *\n * `Assignee` and `ReviewRequested` both read by reviewer: Azure has no assignee distinct from its reviewers.\n * `Reviewed` and `Mention` are absent because the pull request query has no axis for either, and `includeArchived`\n * because Azure has no archived repositories to exclude.\n */\nconst azureServerPullRequestSearchCapabilities: PullRequestSearchCapabilities = {\n\trelationships: [PullRequestFilter.Author, PullRequestFilter.Assignee, PullRequestFilter.ReviewRequested],\n\tstates: ['open', 'closed', 'merged', 'all'],\n\ttext: true,\n\tupdatedAfter: true,\n\tcreatedAfter: true,\n\tincludeArchived: false,\n\tdraft: true,\n\trepositoryScope: true,\n\torganizationScope: true,\n\tsorts: azurePullRequestSearchSorts,\n};\n\n/**\n * Azure DevOps Server's filtered work-item search: one WIQL query per collection, every criterion a clause of it.\n * `mentioned` is absent because `@RecentMentions` only reaches back 30 days; `milestone` and\n * `withoutLinkedPullRequest` because WIQL has no flat-query clause for either. See `azure/search.ts`.\n */\nconst azureServerIssueSearchCapabilities: IssueSearchCapabilities = {\n\trelationships: azureWorkItemSearchRelationships,\n\ttext: true,\n\tlabels: true,\n\tmilestone: false,\n\tupdatedAfter: true,\n\tcreatedAfter: true,\n\twithoutLinkedPullRequest: false,\n\tstates: true,\n\tsorts: azureWorkItemSearchSorts,\n};\n\nexport const providersMetadata: ProvidersMetadata = {\n\t[GitCloudHostIntegrationId.GitHub]: {\n\t\tdomain: 'github.com',\n\t\tid: GitCloudHostIntegrationId.GitHub,\n\t\tname: 'GitHub',\n\t\ttype: 'git',\n\t\ticonKey: GitCloudHostIntegrationId.GitHub,\n\t\tissuesPagingMode: PagingMode.Repos,\n\t\tpullRequestsPagingMode: PagingMode.Repos,\n\t\t// Use 'username' property on account for PR filters\n\t\tsupportedPullRequestFilters: [\n\t\t\tPullRequestFilter.Author,\n\t\t\tPullRequestFilter.Assignee,\n\t\t\tPullRequestFilter.ReviewRequested,\n\t\t\tPullRequestFilter.Mention,\n\t\t],\n\t\tsupportedAccountWidePullRequestFilters: [\n\t\t\tPullRequestFilter.Author,\n\t\t\tPullRequestFilter.Assignee,\n\t\t\tPullRequestFilter.ReviewRequested,\n\t\t\tPullRequestFilter.Reviewed,\n\t\t\tPullRequestFilter.Mention,\n\t\t],\n\t\tsupportedPullRequestSearch: githubPullRequestSearchCapabilities,\n\t\tpullRequestSearchResultLimit: githubSearchResultLimit,\n\t\t// Use 'username' property on account for issue filters\n\t\tsupportedIssueFilters: [IssueFilter.Author, IssueFilter.Assignee, IssueFilter.Mention],\n\t\t// The account-wide read is three independent searches (`author:@me`, `assignee:@me`, `mentions:@me`) behind\n\t\t// one composite cursor, so any subset of them is expressible.\n\t\tsupportedAccountWideIssueFilters: [IssueFilter.Author, IssueFilter.Assignee, IssueFilter.Mention],\n\t\t// One `search` field serves all three issue reads (repo-scoped, account-wide, filtered search), so the same\n\t\t// qualifiers are expressible on each — the account-wide one narrowed to what its three-alias merge can order.\n\t\tsupportedIssueSorts: githubIssueSorts,\n\t\tsupportedAccountWideIssueSorts: githubAccountWideIssueSorts,\n\t\tsupportedIssueSearch: githubIssueSearchCapabilities,\n\t\tissueSearchResultLimit: githubSearchResultLimit,\n\t\tscopes: ['repo', 'read:user', 'user:email'],\n\t},\n\t[GitSelfManagedHostIntegrationId.CloudGitHubEnterprise]: {\n\t\tdomain: '',\n\t\tid: GitSelfManagedHostIntegrationId.CloudGitHubEnterprise,\n\t\tname: 'GitHub Enterprise',\n\t\ttype: 'git',\n\t\ticonKey: 'github-enterprise',\n\t\tissuesPagingMode: PagingMode.Repos,\n\t\tpullRequestsPagingMode: PagingMode.Repos,\n\t\t// Use 'username' property on account for PR filters\n\t\tsupportedPullRequestFilters: [\n\t\t\tPullRequestFilter.Author,\n\t\t\tPullRequestFilter.Assignee,\n\t\t\tPullRequestFilter.ReviewRequested,\n\t\t\tPullRequestFilter.Mention,\n\t\t],\n\t\tsupportedAccountWidePullRequestFilters: [\n\t\t\tPullRequestFilter.Author,\n\t\t\tPullRequestFilter.Assignee,\n\t\t\tPullRequestFilter.ReviewRequested,\n\t\t\tPullRequestFilter.Reviewed,\n\t\t\tPullRequestFilter.Mention,\n\t\t],\n\t\tsupportedPullRequestSearch: githubPullRequestSearchCapabilities,\n\t\tpullRequestSearchResultLimit: githubSearchResultLimit,\n\t\t// Use 'username' property on account for issue filters\n\t\tsupportedIssueFilters: [IssueFilter.Author, IssueFilter.Assignee, IssueFilter.Mention],\n\t\t// The account-wide read is three independent searches (`author:@me`, `assignee:@me`, `mentions:@me`) behind\n\t\t// one composite cursor, so any subset of them is expressible.\n\t\tsupportedAccountWideIssueFilters: [IssueFilter.Author, IssueFilter.Assignee, IssueFilter.Mention],\n\t\t// One `search` field serves all three issue reads (repo-scoped, account-wide, filtered search), so the same\n\t\t// qualifiers are expressible on each — the account-wide one narrowed to what its three-alias merge can order.\n\t\tsupportedIssueSorts: githubIssueSorts,\n\t\tsupportedAccountWideIssueSorts: githubAccountWideIssueSorts,\n\t\tsupportedIssueSearch: githubIssueSearchCapabilities,\n\t\tissueSearchResultLimit: githubSearchResultLimit,\n\t\tscopes: ['repo', 'read:user', 'user:email'],\n\t},\n\t[GitCloudHostIntegrationId.GitLab]: {\n\t\tdomain: 'gitlab.com',\n\t\tid: GitCloudHostIntegrationId.GitLab,\n\t\tname: 'GitLab',\n\t\ttype: 'git',\n\t\ticonKey: GitCloudHostIntegrationId.GitLab,\n\t\tissuesPagingMode: PagingMode.Repo,\n\t\tpullRequestsPagingMode: PagingMode.Repo,\n\t\t// Use 'username' property on account for PR filters\n\t\tsupportedPullRequestFilters: [\n\t\t\tPullRequestFilter.Author,\n\t\t\tPullRequestFilter.Assignee,\n\t\t\tPullRequestFilter.ReviewRequested,\n\t\t],\n\t\tsupportedAccountWidePullRequestFilters: [\n\t\t\tPullRequestFilter.Author,\n\t\t\tPullRequestFilter.Assignee,\n\t\t\tPullRequestFilter.ReviewRequested,\n\t\t],\n\t\t// Use 'username' property on account for issue filters\n\t\tsupportedIssueFilters: [IssueFilter.Author, IssueFilter.Assignee],\n\t\t// The account-wide read drains one `scope=assigned_to_me` pass and one `scope=all` + `authorUsername` pass,\n\t\t// unioned, so either axis is expressible on its own. Mention is absent because GitLab's REST issue read has\n\t\t// no first-class mention filter to narrow with.\n\t\tsupportedAccountWideIssueFilters: [IssueFilter.Assignee, IssueFilter.Author],\n\t\t// Two different surfaces, not one narrowed twice: the repository-scoped read is GraphQL and the\n\t\t// account-wide one is REST, and REST has neither `title` nor `closed_at`.\n\t\tsupportedIssueSorts: gitlabIssueSorts,\n\t\tsupportedAccountWideIssueSorts: gitlabAccountWideIssueSorts,\n\t\tscopes: ['api', 'read_user', 'read_repository'],\n\t},\n\t[GitSelfManagedHostIntegrationId.CloudGitLabSelfHosted]: {\n\t\tdomain: '',\n\t\tid: GitSelfManagedHostIntegrationId.CloudGitLabSelfHosted,\n\t\tname: 'GitLab Self-Hosted',\n\t\ttype: 'git',\n\t\ticonKey: 'gitlab-self-hosted',\n\t\tissuesPagingMode: PagingMode.Repo,\n\t\tpullRequestsPagingMode: PagingMode.Repo,\n\t\t// Use 'username' property on account for PR filters\n\t\tsupportedPullRequestFilters: [\n\t\t\tPullRequestFilter.Author,\n\t\t\tPullRequestFilter.Assignee,\n\t\t\tPullRequestFilter.ReviewRequested,\n\t\t],\n\t\tsupportedAccountWidePullRequestFilters: [\n\t\t\tPullRequestFilter.Author,\n\t\t\tPullRequestFilter.Assignee,\n\t\t\tPullRequestFilter.ReviewRequested,\n\t\t],\n\t\t// Use 'username' property on account for issue filters\n\t\tsupportedIssueFilters: [IssueFilter.Author, IssueFilter.Assignee],\n\t\t// The account-wide read drains one `scope=assigned_to_me` pass and one `scope=all` + `authorUsername` pass,\n\t\t// unioned, so either axis is expressible on its own. Mention is absent because GitLab's REST issue read has\n\t\t// no first-class mention filter to narrow with.\n\t\tsupportedAccountWideIssueFilters: [IssueFilter.Assignee, IssueFilter.Author],\n\t\t// Two different surfaces, not one narrowed twice: the repository-scoped read is GraphQL and the\n\t\t// account-wide one is REST, and REST has neither `title` nor `closed_at`.\n\t\tsupportedIssueSorts: gitlabIssueSorts,\n\t\tsupportedAccountWideIssueSorts: gitlabAccountWideIssueSorts,\n\t\tscopes: ['api', 'read_user', 'read_repository'],\n\t},\n\t[GitCloudHostIntegrationId.Bitbucket]: {\n\t\tdomain: 'bitbucket.org',\n\t\tid: GitCloudHostIntegrationId.Bitbucket,\n\t\tname: 'Bitbucket',\n\t\ttype: 'git',\n\t\ticonKey: GitCloudHostIntegrationId.Bitbucket,\n\t\tpullRequestsPagingMode: PagingMode.Repo,\n\t\t// Use 'id' property on account for PR filters (reviewer filter keyed by account id / reviewerId)\n\t\tsupportedPullRequestFilters: [PullRequestFilter.Author, PullRequestFilter.ReviewRequested],\n\t\tsupportedAccountWidePullRequestFilters: [PullRequestFilter.Author, PullRequestFilter.ReviewRequested],\n\t\tscopes: ['account:read', 'repository:read', 'pullrequest:read', 'issue:read'],\n\t},\n\t[GitSelfManagedHostIntegrationId.BitbucketServer]: {\n\t\tdomain: '',\n\t\tid: GitSelfManagedHostIntegrationId.BitbucketServer,\n\t\tname: 'Bitbucket Data Center',\n\t\ttype: 'git',\n\t\ticonKey: GitSelfManagedHostIntegrationId.BitbucketServer,\n\t\tpullRequestsPagingMode: PagingMode.Repo,\n\t\tsupportedPullRequestFilters: [PullRequestFilter.Author, PullRequestFilter.ReviewRequested],\n\t\tsupportedAccountWidePullRequestFilters: [PullRequestFilter.Author, PullRequestFilter.ReviewRequested],\n\t\tsupportedPullRequestSearch: bitbucketServerPullRequestSearchCapabilities,\n\t\t// No `pullRequestSearchResultLimit`: nothing caps how far a search pages.\n\t\tscopes: ['Project (Read)', 'Repository (Write)'],\n\t},\n\t[GitCloudHostIntegrationId.AzureDevOps]: {\n\t\tsupportsIssueStates: true,\n\t\tdomain: 'dev.azure.com',\n\t\tid: GitCloudHostIntegrationId.AzureDevOps,\n\t\tname: 'Azure DevOps',\n\t\ttype: 'git',\n\t\ticonKey: GitCloudHostIntegrationId.AzureDevOps,\n\t\tissuesPagingMode: PagingMode.Project,\n\t\tpullRequestsPagingMode: PagingMode.Repo,\n\t\t// Use 'id' property on account for PR filters (reviewer filter keyed by account id / reviewerId)\n\t\tsupportedPullRequestFilters: [\n\t\t\tPullRequestFilter.Author,\n\t\t\tPullRequestFilter.Assignee,\n\t\t\tPullRequestFilter.ReviewRequested,\n\t\t],\n\t\tsupportedAccountWidePullRequestFilters: [\n\t\t\tPullRequestFilter.Author,\n\t\t\tPullRequestFilter.Assignee,\n\t\t\tPullRequestFilter.ReviewRequested,\n\t\t],\n\t\t// Use 'name' property on account for issue filters\n\t\tsupportedIssueFilters: [IssueFilter.Author, IssueFilter.Assignee, IssueFilter.Mention],\n\t\t// The account-wide read drains one (project × assignee) and one (project × author) query per project, so\n\t\t// either axis is expressible on its own. There is no mention query to narrow to.\n\t\tsupportedAccountWideIssueFilters: [IssueFilter.Author, IssueFilter.Assignee],\n\t\t// Both reads emit the same WIQL, but the account-wide one drains every (project x relationship) query and\n\t\t// merges the results, so it can only honor keys a normalized issue carries — `resolved` and `priority` are\n\t\t// dropped from that surface for the same reason they are dropped from GitLab's.\n\t\tsupportedIssueSorts: azureIssueSorts,\n\t\tsupportedAccountWideIssueSorts: azureAccountWideIssueSorts,\n\t\tscopes: ['vso.code', 'vso.identity', 'vso.project', 'vso.profile', 'vso.work'],\n\t},\n\t[GitSelfManagedHostIntegrationId.AzureDevOpsServer]: {\n\t\tsupportsIssueStates: true,\n\t\tdomain: '',\n\t\tid: GitSelfManagedHostIntegrationId.AzureDevOpsServer,\n\t\tname: 'Azure DevOps Server',\n\t\ttype: 'git',\n\t\ticonKey: GitCloudHostIntegrationId.AzureDevOps,\n\t\tissuesPagingMode: PagingMode.Project,\n\t\tpullRequestsPagingMode: PagingMode.Repo,\n\t\t// Use 'id' property on account for PR filters (reviewer filter keyed by account id / reviewerId)\n\t\tsupportedPullRequestFilters: [\n\t\t\tPullRequestFilter.Author,\n\t\t\tPullRequestFilter.Assignee,\n\t\t\tPullRequestFilter.ReviewRequested,\n\t\t],\n\t\tsupportedAccountWidePullRequestFilters: [\n\t\t\tPullRequestFilter.Author,\n\t\t\tPullRequestFilter.Assignee,\n\t\t\tPullRequestFilter.ReviewRequested,\n\t\t],\n\t\t// Use 'name' property on account for issue filters\n\t\tsupportedIssueFilters: [IssueFilter.Author, IssueFilter.Assignee, IssueFilter.Mention],\n\t\t// The account-wide read drains one (project × assignee) and one (project × author) query per project, so\n\t\t// either axis is expressible on its own. There is no mention query to narrow to.\n\t\tsupportedAccountWideIssueFilters: [IssueFilter.Author, IssueFilter.Assignee],\n\t\t// Both reads emit the same WIQL, but the account-wide one drains every (project x relationship) query and\n\t\t// merges the results, so it can only honor keys a normalized issue carries — `resolved` and `priority` are\n\t\t// dropped from that surface for the same reason they are dropped from GitLab's.\n\t\tsupportedIssueSorts: azureIssueSorts,\n\t\tsupportedAccountWideIssueSorts: azureAccountWideIssueSorts,\n\t\tsupportedPullRequestSearch: azureServerPullRequestSearchCapabilities,\n\t\tsupportedIssueSearch: azureServerIssueSearchCapabilities,\n\t\tissueSearchResultLimit: azureWorkItemSearchResultLimit,\n\t\texactSearchScopeNames: true,\n\t\tscopes: ['vso.code', 'vso.identity', 'vso.project', 'vso.profile', 'vso.work'],\n\t},\n\t[IssuesCloudHostIntegrationId.Jira]: {\n\t\tdomain: 'atlassian.net',\n\t\tid: IssuesCloudHostIntegrationId.Jira,\n\t\tname: 'Jira',\n\t\ttype: 'issues',\n\t\ticonKey: IssuesCloudHostIntegrationId.Jira,\n\t\tscopes: [\n\t\t\t'read:status:jira',\n\t\t\t'read:application-role:jira',\n\t\t\t'read:attachment:jira',\n\t\t\t'write:attachment:jira',\n\t\t\t'read:comment:jira',\n\t\t\t'read:project-category:jira',\n\t\t\t'read:project:jira',\n\t\t\t'read:issue.vote:jira',\n\t\t\t'read:field-configuration:jira',\n\t\t\t'write:issue:jira',\n\t\t\t'read:issue-security-level:jira',\n\t\t\t'write:issue.property:jira',\n\t\t\t'read:issue.changelog:jira',\n\t\t\t'read:avatar:jira',\n\t\t\t'read:issue-meta:jira',\n\t\t\t'read:permission:jira',\n\t\t\t'offline_access',\n\t\t\t'read:issue:jira',\n\t\t\t'read:me',\n\t\t\t'read:audit-log:jira',\n\t\t\t'read:project.component:jira',\n\t\t\t'read:group:jira',\n\t\t\t'read:project-role:jira',\n\t\t\t'write:comment:jira',\n\t\t\t'read:label:jira',\n\t\t\t'write:comment.property:jira',\n\t\t\t'read:issue-details:jira',\n\t\t\t'read:issue-type-hierarchy:jira',\n\t\t\t'read:issue.transition:jira',\n\t\t\t'read:user:jira',\n\t\t\t'read:field:jira',\n\t\t\t'read:issue-type:jira',\n\t\t\t'read:project.property:jira',\n\t\t\t'read:comment.property:jira',\n\t\t\t'read:project-version:jira',\n\t\t],\n\t\tsupportedIssueFilters: [IssueFilter.Author, IssueFilter.Assignee, IssueFilter.Mention],\n\t\t// A tracker's issues live under resource -> project, so it has no account-wide surface to declare: its\n\t\t// capability is reported under `issues`, which is what `listIssueTrackerIssuesPage` validates against.\n\t\tsupportedIssueSorts: jiraIssueSorts,\n\t\t// `statusCategory` clauses in the same JQL, shared with Server through `jiraHelpers`.\n\t\tsupportsIssueStates: true,\n\t},\n\t[IssuesSelfManagedHostIntegrationId.JiraServer]: {\n\t\t// Self-hosted: there is no canonical domain, so every read is addressed by the connection's own host\n\t\t// (see `JiraServerIntegration.apiBaseUrl`), exactly as the self-managed git hosts do.\n\t\tdomain: '',\n\t\tid: IssuesSelfManagedHostIntegrationId.JiraServer,\n\t\tname: 'Jira Data Center',\n\t\ttype: 'issues',\n\t\t// Reuses Jira's glicon: it is the same product, and the id only selects an icon.\n\t\ticonKey: IssuesCloudHostIntegrationId.Jira,\n\t\t// Jira Cloud's entries are Atlassian OAuth scope strings, which a self-hosted instance doesn't issue:\n\t\t// its token is a PAT the backend stores as-is, so there is no scope set to request.\n\t\tscopes: [],\n\t\t// The same JQL clauses Cloud narrows with — `jiraHelpers` builds one query for both.\n\t\tsupportedIssueFilters: [IssueFilter.Author, IssueFilter.Assignee, IssueFilter.Mention],\n\t\t// One JQL `ORDER BY` builder serves Cloud and Server, so they share a surface (see `issueSorts.ts`).\n\t\tsupportedIssueSorts: jiraIssueSorts,\n\t\tsupportsIssueStates: true,\n\t},\n\t[IssuesCloudHostIntegrationId.Linear]: {\n\t\tdomain: 'linear.app',\n\t\tid: IssuesCloudHostIntegrationId.Linear,\n\t\tname: 'Linear',\n\t\ttype: 'issues',\n\t\ticonKey: IssuesCloudHostIntegrationId.Linear,\n\t\tscopes: [],\n\t\t// The user-scoped tracker read scopes Linear's \"my issues\" by the viewer's id: assigned issues, plus the\n\t\t// GitHub-synced issues the viewer created unless `Assignee` is asked for by name. Author/mention aren't supported.\n\t\tsupportedIssueFilters: [IssueFilter.Assignee],\n\t\t// Both directions, and one table for both reads: they are the same root `issues` query taking the same\n\t\t// `sort` argument, so there is no account-wide narrowing to declare.\n\t\tsupportedIssueSorts: linearIssueSorts,\n\t\t// A workflow-state type clause on both reads (`completed`/`canceled`/`duplicate` are closed), the same types\n\t\t// the SDK normalizes to a terminal category (`DONE`, or `CANCELED` for the last two).\n\t\tsupportsIssueStates: true,\n\t},\n\t[IssuesCloudHostIntegrationId.Trello]: {\n\t\tdomain: 'trello.com',\n\t\tid: IssuesCloudHostIntegrationId.Trello,\n\t\tname: 'Trello',\n\t\ttype: 'issues',\n\t\ticonKey: IssuesCloudHostIntegrationId.Trello,\n\t\tscopes: [],\n\t\t// Trello cards are filtered by the assignee (member) only; author/mention have no Trello equivalent.\n\t\tsupportedIssueFilters: [IssueFilter.Assignee],\n\t\t// `sort:edited` / `sort:-edited`. Trello's other search sorts (`created`, `due`) have no card-order effect.\n\t\tsupportedIssueSorts: trelloIssueSorts,\n\t\t// No `supportsIssueStates`: a card has no state beyond being archived, and the board read always sends\n\t\t// `-is:archived`, so `'closed'`/`'all'` are refused rather than answered with the open cards.\n\t},\n\t[IssuesCloudHostIntegrationId.Asana]: {\n\t\tdomain: 'app.asana.com',\n\t\tid: IssuesCloudHostIntegrationId.Asana,\n\t\tname: 'Asana',\n\t\ttype: 'issues',\n\t\ticonKey: IssuesCloudHostIntegrationId.Asana,\n\t\tscopes: [],\n\t\t// A task has a single assignee and no author/mention query; the project read is narrowed to the viewer by\n\t\t// assignee id after the drain, since Asana's task list can't scope a project to an assignee.\n\t\tsupportedIssueFilters: [IssueFilter.Assignee],\n\t\t// Empty: Asana's task list has no ordering parameter, so a read carrying `sort` is refused rather than served in\n\t\t// whatever order Asana returns.\n\t\tsupportedIssueSorts: asanaIssueSorts,\n\t\t// Completion is the only state Asana has: open reads incomplete tasks, closed the completed ones.\n\t\tsupportsIssueStates: true,\n\t},\n};\n\nexport function isGitHubDotCom(domain: string | null | undefined): boolean {\n\treturn equalsIgnoreCase(domain, 'github.com');\n}\n\nexport function isGitLabDotCom(domain: string | null | undefined): boolean {\n\treturn equalsIgnoreCase(domain, 'gitlab.com');\n}\n\n// Anchor the `visualstudio.com` alternative on a label boundary (`^` or `.`) rather than `\\b`: `\\b` treats a\n// hyphen as a word boundary, so `\\bvisualstudio\\.com$` matched attacker-controlled hosts like\n// `evil-visualstudio.com` and classified them as Azure cloud, changing their auth/URL handling.\nconst azureCloudDomainRegex = /^dev\\.azure\\.com$|(?:^|\\.)visualstudio\\.com$/i;\nexport function isAzureCloudDomain(domain: string | undefined): boolean {\n\treturn domain != null && azureCloudDomainRegex.test(domain);\n}\n\nconst bitbucketCloudDomainRegex = /^bitbucket\\.org$/i;\nexport function isBitbucketCloudDomain(domain: string | undefined): boolean {\n\treturn domain != null && bitbucketCloudDomainRegex.test(domain);\n}\n\nexport function supportsCodeSuggest(provider: ProviderReference): boolean {\n\treturn isGitHubDotCom(provider.domain);\n}\n"],"mappings":"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"}