fix(github): link org installs to the app page instead of a 404#3069
Merged
Conversation
|
React Doctor found no issues in the changed files. 🎉 Reviewed by React Doctor for commit |
Contributor
|
Reviews (1): Last reviewed commit: "link org GitHub installs to the app page" | Re-trigger Greptile |
There was a problem hiding this comment.
Clean URL fix: org installs now link to the public app page instead of a settings page that 404s for non-owners. The bot's two concerns (duplicate constant, case-sensitivity inconsistency) were both addressed in the current diff — shared constant extracted to a new integrations file, and both functions now use toLowerCase(). Tests cover the new behavior including case-insensitive matching.
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.
Problem
The "Manage on GitHub" gear in Settings → GitHub (and the Settings button in the onboarding GitHub panel) links to GitHub's per-installation settings page for an org install:
https://github.com/organizations/<org>/settings/installations/<id>.That page is org-owner-only, so it 404s for any org member who isn't an owner. Cory hit this on the PostHog org's shared
posthogapp installation.I confirmed against the live GitHub API that this is not a stale/wrong ID or a bad URL format:
99844466is an Organization install of theposthogGitHub App.html_urlis exactly the URL the app builds (and the one that 404s).Changes
https://github.com/apps/posthog, which loads for everyone (owners land on Configure, members get request/install).githubInstallationSettingsUrlinpackages/core/src/settings/githubRepoSummary.ts(the reported Settings gear).buildInstallationSettingsUrlinpackages/core/src/onboarding/githubConnectPanel.ts(the onboarding panel, same latent bug).https://github.com/settings/installations/<id>link, which that user can access.No visual UI change: this only changes where the existing gear/button navigates.
How did you test this?
pnpm --filter @posthog/core test: 1851 passed.pnpm --filter @posthog/core typecheckandpnpm --filter @posthog/ui typecheck: clean. Pre-commitpnpm typecheck(full workspace) also passed.biome linton the changed files: clean.https://github.com/apps/posthogloads as a valid public app page.Automatic notifications