diff --git a/studio/components/interfaces/BranchManagement/BranchManagement.tsx b/studio/components/interfaces/BranchManagement/BranchManagement.tsx index f846b7c3241..43747e3daad 100644 --- a/studio/components/interfaces/BranchManagement/BranchManagement.tsx +++ b/studio/components/interfaces/BranchManagement/BranchManagement.tsx @@ -70,6 +70,10 @@ const BranchManagement = () => { } = useBranchesQuery({ projectRef }) const [[mainBranch], previewBranches] = partition(branches, (branch) => branch.is_default) const branchesWithPRs = previewBranches.filter((branch) => branch.pr_number !== undefined) + const prNumbers = + branches !== undefined + ? (branchesWithPRs.map((branch) => branch.pr_number).filter(Boolean) as number[]) + : undefined const githubIntegration = integrations?.find( (integration) => @@ -92,7 +96,7 @@ const BranchManagement = () => { organizationIntegrationId: githubIntegration?.id, repoOwner, repoName, - target: mainBranch?.git_branch, + prNumbers, }) const pullRequests = allPullRequests ?? [] diff --git a/studio/components/interfaces/BranchManagement/BranchPanels.tsx b/studio/components/interfaces/BranchManagement/BranchPanels.tsx index 47d0597a03c..d8ab75c738c 100644 --- a/studio/components/interfaces/BranchManagement/BranchPanels.tsx +++ b/studio/components/interfaces/BranchManagement/BranchPanels.tsx @@ -139,6 +139,7 @@ export const BranchRow = ({ )} + {isMain ? (