@gitkraken/core-gitlens 0.52.0 → 0.53.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 (51) hide show
  1. package/CHANGELOG.md +8 -1
  2. package/dist/_types/provider-apis/types/exportedTypes/github.d.ts +75 -0
  3. package/dist/_types/provider-apis/types/exportedTypes/types.d.ts +7 -0
  4. package/dist/plus/git-github/api/issueWrites.js +1 -1
  5. package/dist/plus/git-github/api/issueWrites.js.map +1 -1
  6. package/dist/plus/integrations/authentication/cloudIntegrationAuthenticationProvider.d.ts +5 -1
  7. package/dist/plus/integrations/authentication/cloudIntegrationAuthenticationProvider.js +44 -20
  8. package/dist/plus/integrations/authentication/cloudIntegrationAuthenticationProvider.js.map +1 -1
  9. package/dist/plus/integrations/authentication/cloudIntegrationObservations.d.ts +49 -0
  10. package/dist/plus/integrations/authentication/cloudIntegrationObservations.js +118 -0
  11. package/dist/plus/integrations/authentication/cloudIntegrationObservations.js.map +1 -0
  12. package/dist/plus/integrations/authentication/configuredIntegrationService.d.ts +38 -25
  13. package/dist/plus/integrations/authentication/configuredIntegrationService.js +376 -141
  14. package/dist/plus/integrations/authentication/configuredIntegrationService.js.map +1 -1
  15. package/dist/plus/integrations/authentication/integrationAuthenticationService.d.ts +8 -2
  16. package/dist/plus/integrations/authentication/integrationAuthenticationService.js +34 -4
  17. package/dist/plus/integrations/authentication/integrationAuthenticationService.js.map +1 -1
  18. package/dist/plus/integrations/authentication/models.d.ts +6 -0
  19. package/dist/plus/integrations/authentication/models.js +9 -1
  20. package/dist/plus/integrations/authentication/models.js.map +1 -1
  21. package/dist/plus/integrations/authentication/observedAuthenticationProvider.d.ts +13 -2
  22. package/dist/plus/integrations/authentication/observedAuthenticationProvider.js +68 -30
  23. package/dist/plus/integrations/authentication/observedAuthenticationProvider.js.map +1 -1
  24. package/dist/plus/integrations/index.d.ts +2 -1
  25. package/dist/plus/integrations/index.js.map +1 -1
  26. package/dist/plus/integrations/integrationService.d.ts +8 -0
  27. package/dist/plus/integrations/integrationService.js +148 -36
  28. package/dist/plus/integrations/integrationService.js.map +1 -1
  29. package/dist/plus/integrations/manager.d.ts +3 -0
  30. package/dist/plus/integrations/models/integration.d.ts +4 -0
  31. package/dist/plus/integrations/models/integration.js +61 -16
  32. package/dist/plus/integrations/models/integration.js.map +1 -1
  33. package/dist/plus/integrations/models/issueRelationships.d.ts +31 -0
  34. package/dist/plus/integrations/models/issueRelationships.js +0 -0
  35. package/dist/plus/integrations/models/publicIntegration.d.ts +0 -1
  36. package/dist/plus/integrations/providers/github.d.ts +8 -0
  37. package/dist/plus/integrations/providers/github.js +162 -2
  38. package/dist/plus/integrations/providers/github.js.map +1 -1
  39. package/dist/plus/integrations/providers/issueSorts.d.ts +0 -1
  40. package/dist/plus/integrations/providers/providerApiClient.d.ts +1 -1
  41. package/dist/plus/integrations/providers/providerApiClient.js +33 -14
  42. package/dist/plus/integrations/providers/providerApiClient.js.map +1 -1
  43. package/dist/plus/integrations/providers/providerErrors.d.ts +1 -0
  44. package/dist/plus/integrations/providers/providerErrors.js +1 -2
  45. package/dist/plus/integrations/providers/providerErrors.js.map +1 -1
  46. package/dist/plus/integrations/providers/providersApi.d.ts +2 -1
  47. package/dist/plus/integrations/providers/providersApi.js +2 -0
  48. package/dist/plus/integrations/providers/providersApi.js.map +1 -1
  49. package/dist/plus/integrations/reads/drains.d.ts +0 -1
  50. package/docs/integrations.md +36 -0
  51. package/package.json +2 -2
@@ -1,7 +1,6 @@
1
1
  import { ResourceDescriptor } from "../../../git/models/resourceDescriptor.js";
2
2
  import { PullRequest, PullRequestFilter, PullRequestStateFilter } from "../../../git/models/pullRequest.js";
3
3
  import { IntegrationIds } from "../constants.js";
4
- import "../providerFilters.js";
5
4
  import { ProviderWarning } from "../results.js";
6
5
  import { ProviderSweepTarget, PullRequestSweepOptions } from "../manager.js";
7
6
  import { IntegrationResult } from "../models/publicIntegration.js";
@@ -901,6 +901,42 @@ What holds for all of them:
901
901
  - An Asana task's tags are its labels and its likes, a thumbs-up on the task, its reactions. Its comments are stories, which a task doesn't
902
902
  count, so reading them would cost a request per task. Asana has no batch read.
903
903
 
904
+ ### GitHub.com issue relationships
905
+
906
+ Call `getIssueRelationships` with `providerId`, `connectionId` and an `issue` containing `owner`, `repo` and
907
+ `number`. Supply `expectedNodeId` on the issue to verify its identity. Set `expectedLogin` to have Core verify
908
+ the GitHub login with the selected connection. A successful read returns the canonical issue, its nullable
909
+ parent, a page of direct children, overall completion progress, and a `connectionProof`. For the next page,
910
+ repeat the original scope and pass `pageInfo.endCursor` as `cursor` and the proof as `expectedConnectionProof`.
911
+ GitHub’s aggregate completion count on a paginated list can lag a recent write.
912
+
913
+ Call `writeIssueRelationship` with the same connection, an action, and `parent` and `child` targets. Every write
914
+ target includes its repository owner, repository name, issue number and `expectedNodeId`. Use `add` to attach
915
+ an issue, `remove` to detach it, or `reorder` with a pinned sibling in either `placement.before` or
916
+ `placement.after`. GitHub enforces the credential's permissions at write time. Hosts with their own account
917
+ session can pass a synchronous currency check as the second argument to either method. Core checks
918
+ it alongside the GitHub credential before each mutation, including the attach that follows a detach.
919
+
920
+ Hosts that publish the result after further asynchronous work can pass `captureCurrency` as the third
921
+ argument to either method. When Core binds the selected credential it calls this callback with a
922
+ synchronous `isCurrent()` check. Run that check immediately before publishing issue details. Core withholds
923
+ a retired credential’s read results and reports a superseded write receipt as `unknown` with an `unconfirmed`
924
+ outcome. An HTTP 401 on a current credential arms recovery for the next operation.
925
+
926
+ Custom authentication providers must fire `onDidChange` synchronously whenever a credential is retired or
927
+ replaced, including sign-out followed by sign-in with the same token. Core uses that signal to retire
928
+ outstanding relationship proofs. The event has no connection ID, so a change to one host-managed account
929
+ also retires proofs for other accounts from that provider. Looking up another descriptor for the same
930
+ credential preserves its proof.
931
+
932
+ For a replacement, read the child's relationships before approval. Supply the approved old parent as
933
+ `replaceParent` on the add and return the read's `connectionProof` as `expectedConnectionProof`.
934
+ The proof expires when the selected credential changes or the manager is recreated. GitHub processes the
935
+ detach and attach separately. On failure, inspect `phase`, `outcome` and `detached`. A confirmed detach
936
+ followed by a failed attach can leave the child parentless. Refresh the child and both parents before
937
+ deciding whether to retry. GitHub can hide private resources behind a not-found response.
938
+ [GitHub GraphQL issue reference](https://docs.github.com/en/graphql/reference/issues)
939
+
904
940
  ### GitHub issue writes
905
941
 
906
942
  Use the selected GitHub connection ID from `getConfigured()` together with `providerId`, `owner`, and `repo`.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@gitkraken/core-gitlens",
3
3
  "description": "GitLens core — shared Git / AI / GitHub primitives for internal GitKraken consumption",
4
- "version": "0.52.0",
4
+ "version": "0.53.0",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "author": {
7
7
  "name": "GitKraken",
@@ -263,7 +263,7 @@
263
263
  }
264
264
  },
265
265
  "dependencies": {
266
- "@gitkraken/provider-apis": "0.70.0",
266
+ "@gitkraken/provider-apis": "0.71.0",
267
267
  "@octokit/graphql": "9.0.4",
268
268
  "@octokit/request": "10.0.14",
269
269
  "@octokit/request-error": "7.1.1",