Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

fix link for private apps

Thiago Araujo da Silva88afa49edc53
diff --git a/backend/src/services/github-app/github-app-service.ts b/backend/src/services/github-app/github-app-service.ts
index 6a7710c516..d1955bd316 100644
--- a/backend/src/services/github-app/github-app-service.ts
+++ b/backend/src/services/github-app/github-app-service.ts
@@ -223,6 +223,8 @@ export const gitHubAppServiceFactory = ({
slug: app.slug,
clientId: app.clientId,
owner: app.owner ?? null,
+ host: app.host ?? null,
+ instanceType: app.instanceType === "server" ? "server" : "cloud",
connectionCount: countByAppId.get(app.id) ?? 0,
createdAt: app.createdAt,
updatedAt: app.updatedAt
@@ -231,7 +233,8 @@ export const gitHubAppServiceFactory = ({
const {
INF_APP_CONNECTION_GITHUB_APP_ID,
INF_APP_CONNECTION_GITHUB_APP_SLUG,
- INF_APP_CONNECTION_GITHUB_APP_CLIENT_ID
+ INF_APP_CONNECTION_GITHUB_APP_CLIENT_ID,
+ INF_APP_CONNECTION_GITHUB_APP_HOST
} = getConfig();
const sharedApp: TSanitizedGitHubApp | null =
@@ -245,6 +248,8 @@ export const gitHubAppServiceFactory = ({
slug: INF_APP_CONNECTION_GITHUB_APP_SLUG,
clientId: INF_APP_CONNECTION_GITHUB_APP_CLIENT_ID ?? null,
owner: null,
+ host: INF_APP_CONNECTION_GITHUB_APP_HOST ?? null,
+ instanceType: null,
connectionCount: countByAppId.get(null) ?? 0,
createdAt: null,
updatedAt: null
@@ -363,6 +368,8 @@ export const gitHubAppServiceFactory = ({
slug: existing.slug,
clientId: existing.clientId,
owner: existing.owner ?? null,
+ host: existing.host ?? null,
+ instanceType: existing.instanceType === "server" ? "server" : "cloud",
connectionCount: 0,
createdAt: existing.createdAt,
updatedAt: existing.updatedAt
diff --git a/backend/src/services/github-app/github-app-types.ts b/backend/src/services/github-app/github-app-types.ts
index 5e86f40dab..de53b06b73 100644
--- a/backend/src/services/github-app/github-app-types.ts
+++ b/backend/src/services/github-app/github-app-types.ts
@@ -85,6 +85,8 @@ export const SanitizedGitHubAppSchema = z.object({
slug: z.string(),
clientId: z.string().nullable(),
owner: z.string().nullable(),
+ host: z.string().nullable(),
+ instanceType: z.enum(["cloud", "server"]).nullable(),
connectionCount: z.number(),
createdAt: z.date().nullable(),
updatedAt: z.date().nullable()
diff --git a/frontend/src/hooks/api/gitHubApps/types.ts b/frontend/src/hooks/api/gitHubApps/types.ts
index f684dc6eca..8bf5e734c0 100644
--- a/frontend/src/hooks/api/gitHubApps/types.ts
+++ b/frontend/src/hooks/api/gitHubApps/types.ts
@@ -7,6 +7,8 @@ export type TGitHubApp = {
slug: string;
clientId: string | null;
owner: string | null;
+ host: string | null;
+ instanceType: "cloud" | "server" | null;
connectionCount: number;
createdAt: string | null;
updatedAt: string | null;
diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/GitHubAppSelector.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/GitHubAppSelector.tsx
index f29f6d7cbd..4224e27a79 100644
--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/GitHubAppSelector.tsx
+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/GitHubAppSelector.tsx
@@ -226,7 +226,7 @@ export const GitHubAppSelector = ({
onClick={(e) => {
e.stopPropagation();
window.open(
- buildGitHubAppUrl(app.slug, host, instanceType),
+ buildGitHubAppUrl(app.slug, app.host, app.instanceType ?? instanceType),
"_blank",
"noopener,noreferrer"
);
@@ -367,7 +367,9 @@ export const GitHubAppSelector = ({
className="mb-1"
helperText={
<>
- github.com/apps/
+ {`${buildGitHubHostUrl(host).replace("https://", "")}/${
+ instanceType === "server" ? "github-apps" : "apps"
+ }/`}
<span className="font-mono text-mineshaft-200">
{GITHUB_APP_NAME_PREFIX}
{newAppName.trim() ? slugify(newAppName, { lowercase: true }) : "your-app"}
@@ -457,7 +459,11 @@ export const GitHubAppSelector = ({
onClick={(e) => {
e.stopPropagation();
window.open(
- buildGitHubAppUrl(sharedApp.slug, host, instanceType),
+ buildGitHubAppUrl(
+ sharedApp.slug,
+ sharedApp.host,
+ sharedApp.instanceType ?? instanceType
+ ),
"_blank",
"noopener,noreferrer"
);