open-agents/apps/web/lib/github/installation-url.ts
openharness[bot] bd35727d16
fix: resolve manage repo access 404 by using app slug (#326)
Co-authored-by: nicoalbanese <49612682+nicoalbanese@users.noreply.github.com>
2026-03-02 14:26:12 +00:00

13 lines
313 B
TypeScript

export function getInstallationManageUrl(
installationId: number,
fallbackUrl?: string | null,
): string | null {
const appSlug = process.env.NEXT_PUBLIC_GITHUB_APP_SLUG;
if (appSlug) {
return `https://github.com/apps/${appSlug}/installations/${installationId}`;
}
return fallbackUrl ?? null;
}