ref(integrations): Extract GitHub installation callout from org link view#116379
Merged
evanpurkhiser merged 1 commit intoMay 28, 2026
Conversation
b40223f to
bd33822
Compare
Contributor
📊 Type Coverage Diff
🔍 3 new type safety issues introduced
Type assertions (
This is informational only and does not block the PR. |
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit bd33822. Configure here.
…view
`IntegrationOrganizationLink` was carrying GitHub-only installation
lookup logic — the `/extensions/github/installation/:id/` fetch, the
"sender verification" info banner, the "couldn't verify" warning
fallback, and the corresponding error toast — wedged in alongside the
generic org-picker flow that other providers also use. Move it into a
sibling `GitHubInstallationCallout` component so the org-link view
doesn't conflate two unrelated provider entry points, and the
GitHub-specific bits aren't fetched (or even imported) for non-GitHub
installs.
While moving, replace the previous `useApiQuery` call — which had a
`/../../...` path hack to escape `/api/0/` — with a hand-rolled
`queryOptions` factory using an unprefixed `Client({baseUrl: ''})`. The
factory mirrors the shape `apiOptions` produces (returns
`ApiResponse<T>`, uses `selectJson` to unwrap), so cache semantics match
the rest of the codebase. A long-form comment in the file explains why
this endpoint lives outside `/api/0/`.
Adds a spec for the new component covering both branches.
bd33822 to
66d7b14
Compare
Abdkhan14
approved these changes
May 28, 2026
Contributor
Abdkhan14
left a comment
There was a problem hiding this comment.
Looks good to me.
The test file can use a afterEach(() => jest.restoreAllMocks()), not the end of the world since it's used on the last test and there's only one spy, but for good hygiene.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

IntegrationOrganizationLinkwas carrying GitHub-only installation lookup logic — the/extensions/github/installation/:id/fetch, the "sender verification" info banner, the "couldn't verify" warning fallback, and the corresponding error toast — wedged in alongside the generic org-picker flow that other providers also use. This moves it into a siblingGitHubInstallationCalloutcomponent so the org-link view doesn't conflate two unrelated provider entry points, and the GitHub-specific code isn't fetched (or even imported) for non-GitHub installs.While moving, the previous
useApiQuerycall — which had a/../../...path hack to escape/api/0/— is replaced with a hand-rolledqueryOptionsfactory using an unprefixedClient({baseUrl: ''}). The factory mirrors the shapeapiOptionsproduces (returnsApiResponse<T>, usesselectJsonto unwrap), so cache semantics match the rest of the codebase. A long-form comment in the file explains why this endpoint lives outside/api/0/(it's mounted underextensions/github/in the integration package'surls.pyrather than the API URL conf).