Skip to content

fix(github): link org installs to the app page instead of a 404#3069

Merged
charlesvien merged 2 commits into
mainfrom
fix/github-settings-manage-link-404
Jul 1, 2026
Merged

fix(github): link org installs to the app page instead of a 404#3069
charlesvien merged 2 commits into
mainfrom
fix/github-settings-manage-link-404

Conversation

@charlesvien

Copy link
Copy Markdown
Member

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 posthog app installation.

I confirmed against the live GitHub API that this is not a stale/wrong ID or a bad URL format:

  • Installation 99844466 is an Organization install of the posthog GitHub App.
  • Its canonical html_url is exactly the URL the app builds (and the one that 404s).
  • Org GitHub App settings pages require org-owner access, so members get a 404. There is no per-installation GitHub URL a non-owner can open.

Changes

  • For Organization installs, both URL builders now return the GitHub App page https://github.com/apps/posthog, which loads for everyone (owners land on Configure, members get request/install).
    • githubInstallationSettingsUrl in packages/core/src/settings/githubRepoSummary.ts (the reported Settings gear).
    • buildInstallationSettingsUrl in packages/core/src/onboarding/githubConnectPanel.ts (the onboarding panel, same latent bug).
  • Personal (User) installs keep their existing 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?

  • Updated and ran the unit tests for both helpers.
  • pnpm --filter @posthog/core test: 1851 passed.
  • pnpm --filter @posthog/core typecheck and pnpm --filter @posthog/ui typecheck: clean. Pre-commit pnpm typecheck (full workspace) also passed.
  • biome lint on the changed files: clean.
  • Verified the destination https://github.com/apps/posthog loads as a valid public app page.

Automatic notifications

  • Publish to changelog?
  • Alert Sales and Marketing teams?

@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown

React Doctor found no issues in the changed files. 🎉

Reviewed by React Doctor for commit 86a4641.

@greptile-apps

greptile-apps Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Reviews (1): Last reviewed commit: "link org GitHub installs to the app page" | Re-trigger Greptile

Comment thread packages/core/src/onboarding/githubConnectPanel.ts Outdated
Comment thread packages/core/src/onboarding/githubConnectPanel.ts Outdated
@charlesvien charlesvien enabled auto-merge (squash) July 1, 2026 19:04
@charlesvien charlesvien added the Stamphog This will request an autostamp by stamphog on small changes label Jul 1, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@charlesvien charlesvien merged commit aec7743 into main Jul 1, 2026
26 checks passed
@charlesvien charlesvien deleted the fix/github-settings-manage-link-404 branch July 1, 2026 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Stamphog This will request an autostamp by stamphog on small changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant