feat(web): add per-integration enable/disable toggle (#2364)

Co-authored-by: Carlos Florencio <carlosmflorencio@gmail.com>
This commit is contained in:
Clément Fiere
2026-08-07 20:01:07 +02:00
committed by GitHub
parent 58f6533ab1
commit 312dc0657f
54 changed files with 2504 additions and 257 deletions
@@ -1,37 +1,9 @@
import { GitHubIntegrationPage } from "@/components/github/github-settings";
import { StateHydrator } from "@/components/state-hydrator";
import { normalizeGitHubStatus } from "@/hooks/domains/github/use-github-status";
import { fetchGitHubStatus } from "@/lib/api/domains/github-api";
type IntegrationsGitHubPageProps = {
workspaceId?: string;
};
export default async function IntegrationsGitHubPage({
workspaceId,
}: IntegrationsGitHubPageProps = {}) {
const status = workspaceId
? await fetchGitHubStatus(workspaceId, { cache: "no-store" }).catch(() => null)
: null;
const statusWorkspaceId = workspaceId ?? status?.workspace_id;
const initialState =
status && statusWorkspaceId
? {
githubStatus: {
byWorkspaceId: {
[statusWorkspaceId]: {
status: normalizeGitHubStatus(status),
loaded: true,
loading: false,
},
},
},
}
: {};
return (
<>
<StateHydrator initialState={initialState} />
<GitHubIntegrationPage workspaceId={workspaceId} />
</>
);
export default function IntegrationsGitHubPage({ workspaceId }: IntegrationsGitHubPageProps = {}) {
return <GitHubIntegrationPage workspaceId={workspaceId} />;
}