Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

fix: omit branching params when org lacks entitlement (#46388)

Ignacio Dobronich1c7af66fc72d
diff --git a/apps/studio/components/interfaces/Settings/Integrations/GithubIntegration/GitHubIntegrationConnectionForm.tsx b/apps/studio/components/interfaces/Settings/Integrations/GithubIntegration/GitHubIntegrationConnectionForm.tsx
index f21f91bbd01..43a0686d75a 100644
--- a/apps/studio/components/interfaces/Settings/Integrations/GithubIntegration/GitHubIntegrationConnectionForm.tsx
+++ b/apps/studio/components/interfaces/Settings/Integrations/GithubIntegration/GitHubIntegrationConnectionForm.tsx
@@ -217,9 +217,11 @@ export const GitHubIntegrationConnectionForm = ({
project_ref: selectedProject.ref,
repository_id: Number(selectedRepo.id),
workdir: data.supabaseDirectory,
- supabase_changes_only: data.supabaseChangesOnly,
- branch_limit: Number(data.branchLimit),
- new_branch_per_pr: data.new_branch_per_pr ?? false,
+ ...(hasAccessToBranching && {
+ supabase_changes_only: data.supabaseChangesOnly,
+ branch_limit: Number(data.branchLimit),
+ new_branch_per_pr: data.new_branch_per_pr ?? false,
+ }),
},
})
@@ -266,9 +268,11 @@ export const GitHubIntegrationConnectionForm = ({
organizationId: selectedOrganization.id,
connection: {
workdir: data.supabaseDirectory,
- supabase_changes_only: data.supabaseChangesOnly,
- branch_limit: Number(data.branchLimit),
- new_branch_per_pr: data.new_branch_per_pr ?? false,
+ ...(hasAccessToBranching && {
+ supabase_changes_only: data.supabaseChangesOnly,
+ branch_limit: Number(data.branchLimit),
+ new_branch_per_pr: data.new_branch_per_pr ?? false,
+ }),
},
})