Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
show creation info on info card
Thiago Araujo da Silvac492445cc2a7
diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/GitHubAppSelector.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/GitHubAppSelector.tsxindex 4224e27a79..6eb5417d67 100644--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/GitHubAppSelector.tsx+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/GitHubAppSelector.tsx@@ -48,6 +48,9 @@ type Props = {onChange: (app: TGitHubApp | null) => void;host?: string;instanceType?: "cloud" | "server";+ // Name of the gateway/pool the parent form will route the app creation through, when one is+ // selected. Surfaced in the create view so the user knows how Infisical reaches GitHub.+ gatewayLabel?: string | null;// Kicks off the GitHub App manifest creation flow on the parent form (redirects to GitHub).// Returns false when the parent form is invalid so we can return to the list view.onCreateApp: (params: { name: string; githubOrg: string }) => Promise<boolean> | void;@@ -65,6 +68,7 @@ export const GitHubAppSelector = ({onChange,host,instanceType,+ gatewayLabel,onCreateApp,isCreating,projectId@@ -399,8 +403,20 @@ export const GitHubAppSelector = ({<div className="mt-3 flex items-start gap-2 rounded-md border border-mineshaft-500 bg-mineshaft-700/40 px-3 py-2.5 text-xs leading-relaxed text-mineshaft-300"><FontAwesomeIcon icon={faCircleInfo} className="mt-0.5 text-mineshaft-400" /><span>- You'll be redirected to GitHub to complete the private app setup. GitHub- fails the setup if you're signed out, so{" "}+ The app will be created on{" "}+ <span className="font-medium text-mineshaft-100">+ {buildGitHubHostUrl(host).replace("https://", "")}+ </span>+ {gatewayLabel ? (+ <>+ {" "}+ through the{" "}+ <span className="font-medium text-mineshaft-100">{gatewayLabel}</span>{" "}+ gateway+ </>+ ) : null}+ . You'll be redirected to complete the private app setup. GitHub fails the+ setup if you're signed out, so{" "}<ahref={`${buildGitHubHostUrl(host)}/login`}target="_blank"diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/GitHubConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/GitHubConnectionForm.tsxindex 1f0e315d5c..9b06072d5b 100644--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/GitHubConnectionForm.tsx+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/GitHubConnectionForm.tsx@@ -1,6 +1,7 @@import { useEffect, useState } from "react";import { Controller, FormProvider, useForm } from "react-hook-form";import { zodResolver } from "@hookform/resolvers/zod";+import { useQuery } from "@tanstack/react-query";import { z } from "zod";import { createNotification } from "@app/components/notifications";@@ -44,6 +45,8 @@ import {useGetAppConnectionOption} from "@app/hooks/api/appConnections";import { AppConnection } from "@app/hooks/api/appConnections/enums";+import { gatewayPoolsQueryKeys } from "@app/hooks/api/gateway-pools/queries";+import { gatewaysQueryKeys } from "@app/hooks/api/gateways/queries";import { TGitHubApp, useListGitHubApps } from "@app/hooks/api/gitHubApps";import { GitHubFormData } from "../../../OauthCallbackPage/OauthCallbackPage.types";@@ -166,6 +169,24 @@ export const GitHubConnectionForm = ({ appConnection, projectId, onSubmit }: Proconst gatewayId = watch("gatewayId");const gatewayPoolId = watch("gatewayPoolId");+ // Resolve the selected gateway/pool name so the create-app modal can tell the user how Infisical+ // will reach GitHub. Both lists are already cached by the gateway picker above.+ const { data: gateways } = useQuery({+ ...gatewaysQueryKeys.list(),+ enabled: Boolean(gatewayId)+ });+ const { data: gatewayPools } = useQuery({+ ...gatewayPoolsQueryKeys.list(),+ enabled: Boolean(gatewayPoolId)+ });++ const getGatewayLabel = () => {+ if (gatewayPoolId) return gatewayPools?.find((pool) => pool.id === gatewayPoolId)?.name ?? null;+ if (gatewayId) return gateways?.find((gateway) => gateway.id === gatewayId)?.name ?? null;+ return null;+ };+ const gatewayLabel = getGatewayLabel();+const returnUrl = useGetAppConnectionOauthReturnUrl();const sharedApp = gitHubApps.find((app) => app.id === null) ?? null;@@ -550,8 +571,9 @@ export const GitHubConnectionForm = ({ appConnection, projectId, onSubmit }: ProisLoading={isGitHubAppsLoading}value={selectedGitHubApp}onChange={setSelectedGitHubApp}- host={instanceType === "server" ? watch("credentials.host") : undefined}+ host={watch("credentials.host")}instanceType={instanceType}+ gatewayLabel={gatewayLabel}onCreateApp={handleCreateApp}isCreating={isRedirecting}projectId={projectId}