Skip to content

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

Add review requested at (#36877)

Saxon Fletcherb05457666fc1
diff --git a/apps/studio/components/interfaces/BranchManagement/BranchManagement.tsx b/apps/studio/components/interfaces/BranchManagement/BranchManagement.tsx
index c68ecf3f6d2..3e1e963f8a1 100644
--- a/apps/studio/components/interfaces/BranchManagement/BranchManagement.tsx
+++ b/apps/studio/components/interfaces/BranchManagement/BranchManagement.tsx
@@ -1,6 +1,6 @@
import { PermissionAction } from '@supabase/shared-types/out/constants'
import { partition } from 'lodash'
-import { MessageCircle } from 'lucide-react'
+import { GitMerge, MessageCircle } from 'lucide-react'
import { useRouter } from 'next/router'
import { useState } from 'react'
import { toast } from 'sonner'
@@ -14,6 +14,7 @@ import { DocsButton } from 'components/ui/DocsButton'
import NoPermission from 'components/ui/NoPermission'
import { useBranchDeleteMutation } from 'data/branches/branch-delete-mutation'
import { useBranchesDisableMutation } from 'data/branches/branches-disable-mutation'
+import { useBranchUpdateMutation } from 'data/branches/branch-update-mutation'
import { Branch, useBranchesQuery } from 'data/branches/branches-query'
import { useGitHubConnectionsQuery } from 'data/integrations/github-connections-query'
import { useCheckPermissions } from 'hooks/misc/useCheckPermissions'
@@ -28,6 +29,7 @@ import TextConfirmModal from 'ui-patterns/Dialogs/TextConfirmModal'
import { BranchLoader, BranchManagementSection, BranchRow } from './BranchPanels'
import { PreviewBranchesEmptyState, PullRequestsEmptyState } from './EmptyStates'
import { Overview } from './Overview'
+import { ReviewRow } from './ReviewRow'
type Tab = 'overview' | 'prs' | 'branches'
@@ -80,6 +82,13 @@ const BranchManagement = () => {
new Date(a.updated_at) < new Date(b.updated_at) ? 1 : -1
)
const branchesWithPRs = previewBranches.filter((branch) => branch.pr_number !== undefined)
+ const branchesReadyForReview = previewBranches.filter(
+ (branch) => branch.review_requested_at !== undefined && branch.review_requested_at !== null
+ )
+
+ const currentBranch = branches?.find((branch) => branch.project_ref === ref)
+ const isCurrentBranchReadyForReview =
+ currentBranch?.review_requested_at !== undefined && currentBranch?.review_requested_at !== null
const githubConnection = connections?.find((connection) => connection.project.ref === projectRef)
const repo = githubConnection?.repository.name ?? ''
@@ -109,6 +118,15 @@ const BranchManagement = () => {
},
})
+ const { mutate: updateBranch } = useBranchUpdateMutation({
+ onSuccess: () => {
+ toast.success('Branch updated successfully')
+ },
+ onError: (error) => {
+ toast.error(`Failed to update branch: ${error.message}`)
+ },
+ })
+
const generateCreatePullRequestURL = (branch?: string) => {
if (githubConnection === undefined) return 'https://github.com'
@@ -129,6 +147,16 @@ const BranchManagement = () => {
disableBranching({ projectRef, branchIds: previewBranches?.map((branch) => branch.id) })
}
+ const handleReadyForReview = () => {
+ if (!currentBranch?.id || !projectRef) return
+ updateBranch({
+ id: currentBranch.id,
+ projectRef,
+ requestReview: true,
+ })
+ router.push(`/project/${currentBranch.project_ref}/merge`)
+ }
+
return (
<>
<ScaffoldContainer>
@@ -155,7 +183,7 @@ const BranchManagement = () => {
}`}
onClick={() => setTab('prs')}
>
- Pull requests
+ Merge requests
</Button>
<Button
type="default"
@@ -237,30 +265,70 @@ const BranchManagement = () => {
/>
)}
{tab === 'prs' && (
- <BranchManagementSection
- header={`${branchesWithPRs.length} branches with pull requests found`}
- >
- {branchesWithPRs.length > 0 ? (
- branchesWithPRs.map((branch) => {
- return (
- <BranchRow
- key={branch.id}
- repo={repo}
- branch={branch}
- generateCreatePullRequestURL={generateCreatePullRequestURL}
- onSelectDeleteBranch={() => setSelectedBranchToDelete(branch)}
- />
- )
- })
- ) : (
- <PullRequestsEmptyState
- url={generateCreatePullRequestURL()}
- hasBranches={previewBranches.length > 0}
- githubConnection={githubConnection}
- gitlessBranching={gitlessBranching}
- />
+ <div className="space-y-4">
+ {gitlessBranching && (
+ <BranchManagementSection
+ header={`${branchesReadyForReview.length} branches ready for review`}
+ >
+ {isBranch && !isCurrentBranchReadyForReview && currentBranch && (
+ <div className="bg-background px-6 py-4">
+ <div className="flex items-center justify-between">
+ <div className="flex items-center gap-2 text-sm text-foreground-light">
+ <GitMerge
+ strokeWidth={1.5}
+ size={16}
+ className="text-brand"
+ />
+ Mark{' '}
+ <span className="text-foreground">{currentBranch.name}</span>{' '}
+ ready for review
+ </div>
+ <Button
+ type="primary"
+ size="tiny"
+ onClick={handleReadyForReview}
+ >
+ Ready for review
+ </Button>
+ </div>
+ </div>
+ )}
+ {branchesReadyForReview.length > 0 ? (
+ branchesReadyForReview.map((branch) => {
+ return <ReviewRow key={branch.id} branch={branch} />
+ })
+ ) : (
+ <div className="px-6 py-4 text-sm text-foreground-light">
+ No branches are currently ready for review
+ </div>
+ )}
+ </BranchManagementSection>
)}
- </BranchManagementSection>
+ <BranchManagementSection
+ header={`${branchesWithPRs.length} branches with pull requests`}
+ >
+ {branchesWithPRs.length > 0 ? (
+ branchesWithPRs.map((branch) => {
+ return (
+ <BranchRow
+ key={branch.id}
+ repo={repo}
+ branch={branch}
+ generateCreatePullRequestURL={generateCreatePullRequestURL}
+ onSelectDeleteBranch={() => setSelectedBranchToDelete(branch)}
+ />
+ )
+ })
+ ) : (
+ <PullRequestsEmptyState
+ url={generateCreatePullRequestURL()}
+ hasBranches={previewBranches.length > 0}
+ githubConnection={githubConnection}
+ gitlessBranching={gitlessBranching}
+ />
+ )}
+ </BranchManagementSection>
+ </div>
)}
{tab === 'branches' && (
<BranchManagementSection
diff --git a/apps/studio/components/interfaces/BranchManagement/DatabaseDiffPanel.tsx b/apps/studio/components/interfaces/BranchManagement/DatabaseDiffPanel.tsx
index 9a04a071d04..3b116c90e79 100644
--- a/apps/studio/components/interfaces/BranchManagement/DatabaseDiffPanel.tsx
+++ b/apps/studio/components/interfaces/BranchManagement/DatabaseDiffPanel.tsx
@@ -49,9 +49,9 @@ const DatabaseDiffPanel = ({
<CardTitle>
<Link
href={`/project/${currentBranchRef}/database/schema`}
- className="text-foreground-light flex items-center gap-2"
+ className="flex items-center gap-2"
>
- <Database strokeWidth={1.5} size={16} />
+ <Database strokeWidth={1.5} size={16} className="text-foreground-muted" />
Schema Changes
</Link>
</CardTitle>
diff --git a/apps/studio/components/interfaces/BranchManagement/EdgeFunctionsDiffPanel.tsx b/apps/studio/components/interfaces/BranchManagement/EdgeFunctionsDiffPanel.tsx
index 8a65e3c9ca9..eb003f42937 100644
--- a/apps/studio/components/interfaces/BranchManagement/EdgeFunctionsDiffPanel.tsx
+++ b/apps/studio/components/interfaces/BranchManagement/EdgeFunctionsDiffPanel.tsx
@@ -81,23 +81,19 @@ const FunctionDiff = ({
return (
<Card>
- <CardHeader className="space-y-0 px-4">
- {/* Function title */}
+ <CardHeader>
<CardTitle>
<Link
href={`/project/${currentBranchRef}/functions/${functionSlug}`}
className="flex items-center gap-2"
>
- <Code strokeWidth={1.5} size={16} className="text-foreground-light" />
+ <Code strokeWidth={1.5} size={16} className="text-foreground-muted" />
{functionSlug}
</Link>
</CardTitle>
-
- {/* File list sidebar will be shown instead of top tabs */}
</CardHeader>
<CardContent className="p-0 h-96">
<div className="flex h-full min-h-0">
- {/* Sidebar file list */}
<div className="w-48 border-r bg-surface-200 flex flex-col overflow-y-auto">
<ul className="divide-y divide-border">
{fileInfos.map((fileInfo) => (
@@ -124,8 +120,6 @@ const FunctionDiff = ({
))}
</ul>
</div>
-
- {/* Diff viewer */}
<div className="flex-1 min-h-0">
<DiffViewer
language={language}
@@ -178,8 +172,8 @@ const EdgeFunctionsDiffPanel = ({
</div>
</div>
)}
-
- {diffResults.removedSlugs.length > 0 && (
+ {/* TODO: Removing functions is not supported yet */}
+ {/* {diffResults.removedSlugs.length > 0 && (
<div>
<div className="space-y-4">
{diffResults.removedSlugs.map((slug) => (
@@ -194,7 +188,7 @@ const EdgeFunctionsDiffPanel = ({
))}
</div>
</div>
- )}
+ )} */}
{diffResults.modifiedSlugs.length > 0 && (
<div className="space-y-4">
diff --git a/apps/studio/components/interfaces/BranchManagement/ReviewRow.tsx b/apps/studio/components/interfaces/BranchManagement/ReviewRow.tsx
new file mode 100644
index 00000000000..4dd71e3d8b2
--- /dev/null
+++ b/apps/studio/components/interfaces/BranchManagement/ReviewRow.tsx
@@ -0,0 +1,101 @@
+import dayjs from 'dayjs'
+import { MoreVertical, X } from 'lucide-react'
+import { useRouter } from 'next/router'
+
+import { useParams } from 'common'
+import { useBranchUpdateMutation } from 'data/branches/branch-update-mutation'
+import type { Branch } from 'data/branches/branches-query'
+import { branchKeys } from 'data/branches/keys'
+import {
+ Button,
+ DropdownMenu,
+ DropdownMenuContent,
+ DropdownMenuItem,
+ DropdownMenuTrigger,
+} from 'ui'
+import { toast } from 'sonner'
+import { useQueryClient } from '@tanstack/react-query'
+import { useSelectedProject } from 'hooks/misc/useSelectedProject'
+
+interface ReviewRowProps {
+ branch: Branch
+}
+
+export const ReviewRow = ({ branch }: ReviewRowProps) => {
+ const router = useRouter()
+ const project = useSelectedProject()
+ const { ref: projectRef } = useParams()
+ const queryClient = useQueryClient()
+
+ const { mutate: updateBranch, isLoading: isUpdating } = useBranchUpdateMutation({
+ onSuccess: () => {
+ toast.success('Branch marked as not ready for review')
+ queryClient.invalidateQueries({
+ queryKey: branchKeys.list(project?.parent_project_ref || projectRef),
+ })
+ },
+ onError: (error) => {
+ toast.error(`Failed to update branch: ${error.message}`)
+ },
+ })
+
+ const handleRowClick = () => {
+ router.push(`/project/${branch.project_ref}/merge`)
+ }
+
+ const handleNotReadyForReview = (e?: Event) => {
+ e?.preventDefault()
+ e?.stopPropagation()
+ if (!projectRef) return
+
+ updateBranch({
+ id: branch.id,
+ projectRef,
+ requestReview: false,
+ })
+ }
+
+ const formattedReviewDate = branch.review_requested_at
+ ? dayjs(branch.review_requested_at).format('MMM DD, YYYY HH:mm')
+ : ''
+
+ return (
+ <div
+ className="w-full flex items-center justify-between px-6 py-3 hover:bg-surface-100 cursor-pointer transition-colors"
+ onClick={handleRowClick}
+ >
+ <div className="flex items-center gap-x-4">
+ <div className="flex gap-4">
+ <h4 className="text-sm text-foreground" title={branch.name}>
+ {branch.name}
+ </h4>
+ <p className="text-foreground-light">{formattedReviewDate}</p>
+ </div>
+ </div>
+
+ <div className="flex items-center gap-x-2">
+ <DropdownMenu>
+ <DropdownMenuTrigger asChild>
+ <Button
+ type="text"
+ icon={<MoreVertical />}
+ className="px-1"
+ onClick={(e) => e.stopPropagation()}
+ />
+ </DropdownMenuTrigger>
+ <DropdownMenuContent className="w-56" side="bottom" align="end">
+ <DropdownMenuItem
+ className="gap-x-2"
+ disabled={isUpdating}
+ onClick={(e) => e.stopPropagation()}
+ onSelect={handleNotReadyForReview}
+ >
+ <X size={14} />
+ Not ready for review
+ </DropdownMenuItem>
+ </DropdownMenuContent>
+ </DropdownMenu>
+ </div>
+ </div>
+ )
+}
diff --git a/apps/studio/components/layouts/AppLayout/BranchDropdown.tsx b/apps/studio/components/layouts/AppLayout/BranchDropdown.tsx
index b8e7d49c263..af8a2f25e6c 100644
--- a/apps/studio/components/layouts/AppLayout/BranchDropdown.tsx
+++ b/apps/studio/components/layouts/AppLayout/BranchDropdown.tsx
@@ -15,6 +15,7 @@ import { useState } from 'react'
import { useParams } from 'common'
import ShimmeringLoader from 'components/ui/ShimmeringLoader'
import { Branch, useBranchesQuery } from 'data/branches/branches-query'
+import { useBranchUpdateMutation } from 'data/branches/branch-update-mutation'
import { useSelectedProject } from 'hooks/misc/useSelectedProject'
import { useAppStateSnapshot } from 'state/app-state'
import {
@@ -35,6 +36,7 @@ import {
} from 'ui'
import { sanitizeRoute } from './ProjectDropdown'
import { useFlag } from 'hooks/ui/useFlag'
+import { toast } from 'sonner'
const BranchLink = ({
branch,
@@ -82,6 +84,16 @@ export const BranchDropdown = () => {
const projectRef = projectDetails?.parent_project_ref || ref
+ const { mutate: updateBranch, isLoading: isUpdatingBranch } = useBranchUpdateMutation({
+ onSuccess: (_, variables) => {
+ if (variables.requestReview) {
+ router.push(`/project/${ref}/merge`)
+ }
+ setOpen(false)
+ toast.success('Branch marked as ready for review')
+ },
+ })
+
const {
data: branches,
isLoading,
@@ -166,16 +178,30 @@ export const BranchDropdown = () => {
<>
<CommandItem_Shadcn_
className="cursor-pointer w-full"
+ disabled={isUpdatingBranch}
onSelect={() => {
- setOpen(false)
- router.push(`/project/${ref}/merge`)
+ if (selectedBranch?.review_requested_at) {
+ router.push(`/project/${ref}/merge`)
+ } else {
+ if (selectedBranch?.id && projectRef) {
+ updateBranch({
+ id: selectedBranch.id,
+ projectRef,
+ requestReview: true,
+ })
+ }
+ }
}}
onClick={() => setOpen(false)}
>
- <Link href={`/project/${ref}/merge`} className="w-full flex items-center gap-2">
+ <div className="w-full flex items-center gap-2">
<GitMerge size={14} strokeWidth={1.5} />
- Review changes
- </Link>
+ {isUpdatingBranch
+ ? 'Updating...'
+ : selectedBranch?.review_requested_at
+ ? 'Review changes'
+ : 'Ready for review'}
+ </div>
</CommandItem_Shadcn_>
</>
)}
diff --git a/apps/studio/data/branches/branch-update-mutation.ts b/apps/studio/data/branches/branch-update-mutation.ts
index 695ac0e9cad..f7e8224242a 100644
--- a/apps/studio/data/branches/branch-update-mutation.ts
+++ b/apps/studio/data/branches/branch-update-mutation.ts
@@ -11,6 +11,7 @@ export type BranchUpdateVariables = {
branchName?: string
gitBranch?: string
persistent?: boolean
+ requestReview?: boolean
}
export async function updateBranch({
@@ -18,6 +19,7 @@ export async function updateBranch({
branchName,
gitBranch,
persistent,
+ requestReview,
}: BranchUpdateVariables) {
const { data, error } = await patch('/v1/branches/{branch_id}', {
params: {
@@ -27,6 +29,7 @@ export async function updateBranch({
branch_name: branchName,
git_branch: gitBranch,
persistent,
+ request_review: requestReview,
},
})
diff --git a/apps/studio/data/branches/branches-query.ts b/apps/studio/data/branches/branches-query.ts
index b9ba11d7515..d83de6a6f4a 100644
--- a/apps/studio/data/branches/branches-query.ts
+++ b/apps/studio/data/branches/branches-query.ts
@@ -25,6 +25,7 @@ export async function getBranches({ projectRef }: BranchesVariables, signal?: Ab
handleError(error)
}
}
+
return data
}
diff --git a/apps/studio/pages/project/[ref]/merge.tsx b/apps/studio/pages/project/[ref]/merge.tsx
index ec695e8e416..31e8a08abae 100644
--- a/apps/studio/pages/project/[ref]/merge.tsx
+++ b/apps/studio/pages/project/[ref]/merge.tsx
@@ -10,18 +10,38 @@ import { useProjectByRef, useSelectedProject } from 'hooks/misc/useSelectedProje
import { useBranchesQuery } from 'data/branches/branches-query'
import { useBranchMergeMutation } from 'data/branches/branch-merge-mutation'
import { useBranchPushMutation } from 'data/branches/branch-push-mutation'
+import { useBranchDeleteMutation } from 'data/branches/branch-delete-mutation'
+import { useBranchUpdateMutation } from 'data/branches/branch-update-mutation'
import { useBranchMergeDiff } from 'hooks/branches/useBranchMergeDiff'
import { useWorkflowManagement } from 'hooks/branches/useWorkflowManagement'
import DatabaseDiffPanel from 'components/interfaces/BranchManagement/DatabaseDiffPanel'
import EdgeFunctionsDiffPanel from 'components/interfaces/BranchManagement/EdgeFunctionsDiffPanel'
import { OutOfDateNotice } from 'components/interfaces/BranchManagement/OutOfDateNotice'
-import { Badge, Button, NavMenu, NavMenuItem, cn, Alert } from 'ui'
+import {
+ Badge,
+ Button,
+ NavMenu,
+ NavMenuItem,
+ cn,
+ DropdownMenuTrigger,
+ DropdownMenuItem,
+ DropdownMenuContent,
+ DropdownMenu,
+} from 'ui'
import ConfirmationModal from 'ui-patterns/Dialogs/ConfirmationModal'
import { toast } from 'sonner'
import type { NextPageWithLayout } from 'types'
import { ScaffoldContainer } from 'components/layouts/Scaffold'
-import { GitBranchIcon, GitMerge, Shield, ExternalLink, AlertTriangle } from 'lucide-react'
+import {
+ GitBranchIcon,
+ GitMerge,
+ Shield,
+ ExternalLink,
+ AlertTriangle,
+ X,
+ MoreVertical,
+} from 'lucide-react'
import Link from 'next/link'
import { ButtonTooltip } from 'components/ui/ButtonTooltip'
import WorkflowLogsCard from 'components/interfaces/BranchManagement/WorkflowLogsCard'
@@ -107,6 +127,13 @@ const MergePage: NextPageWithLayout = () => {
setWorkflowFinalStatus(status)
refetchDiff()
edgeFunctionsDiff.clearDiffsOptimistically()
+ if (parentProjectRef && currentBranch?.id) {
+ updateBranch({
+ id: currentBranch.id,
+ projectRef: parentProjectRef,
+ requestReview: false,
+ })
+ }
},
})
@@ -118,6 +145,10 @@ const MergePage: NextPageWithLayout = () => {
: currentWorkflowRun?.status &&
['MIGRATIONS_FAILED', 'FUNCTIONS_FAILED'].includes(currentWorkflowRun.status)
+ const hasCurrentWorkflowCompleted = workflowFinalStatus
+ ? workflowFinalStatus === 'FUNCTIONS_DEPLOYED'
+ : currentWorkflowRun?.status === 'FUNCTIONS_DEPLOYED'
+
const isWorkflowRunning =
currentWorkflowRun?.status === 'RUNNING_MIGRATIONS' ||
currentWorkflowRun?.status === 'CREATING_PROJECT'
@@ -168,6 +199,25 @@ const MergePage: NextPageWithLayout = () => {
},
})
+ const { mutate: deleteBranch, isLoading: isDeleting } = useBranchDeleteMutation({
+ onSuccess: () => {
+ toast.success('Branch closed successfully')
+ router.push(`/project/${parentProjectRef}/branches`)
+ },
+ onError: (error) => {
+ toast.error(`Failed to close branch: ${error.message}`)
+ },
+ })
+
+ const { mutate: updateBranch } = useBranchUpdateMutation({
+ onSuccess: () => {
+ toast.success('Branch updated successfully')
+ },
+ onError: (error) => {
+ toast.error(`Failed to update branch: ${error.message}`)
+ },
+ })
+
const handlePush = () => {
if (!currentBranch?.id || !parentProjectRef) return
pushBranch({
@@ -176,6 +226,14 @@ const MergePage: NextPageWithLayout = () => {
})
}
+ const handleCloseBranch = () => {
+ if (!currentBranch?.id || !parentProjectRef) return
+ deleteBranch({
+ id: currentBranch.id,
+ projectRef: parentProjectRef,
+ })
+ }
+
const handleMerge = () => {
if (!currentBranch?.id || !parentProjectRef || !ref) return
setIsSubmitting(true)
@@ -187,6 +245,15 @@ const MergePage: NextPageWithLayout = () => {
})
}
+ const handleReadyForReview = () => {
+ if (!currentBranch?.id || !parentProjectRef) return
+ updateBranch({
+ id: currentBranch.id,
+ projectRef: parentProjectRef,
+ requestReview: true,
+ })
+ }
+
const handleShowConfirmDialog = () => {
setShowConfirmDialog(true)
}
@@ -204,7 +271,7 @@ const MergePage: NextPageWithLayout = () => {
() => [
{
label: 'Branches',
- href: `/project/${parentProjectRef}/branches`,
+ href: `/project/${project?.ref}/branches?tab=prs`,
},
],
[parentProjectRef]
@@ -281,10 +348,21 @@ const MergePage: NextPageWithLayout = () => {
const isMergeDisabled =
!combinedHasChanges || isCombinedDiffLoading || isBranchOutOfDateOverall || isWorkflowRunning
+ const isReadyForReview = !!currentBranch?.review_requested_at
+
// Update primary actions - remove push button if branch is out of date (it will be in the notice)
const primaryActions = (
<div className="flex items-end gap-2">
- {isMergeDisabled ? (
+ {!isReadyForReview ? (
+ <Button
+ type="primary"
+ onClick={handleReadyForReview}
+ disabled={!combinedHasChanges || isCombinedDiffLoading}
+ icon={<Shield size={16} strokeWidth={1.5} className="text-brand" />}
+ >
+ Ready for review
+ </Button>
+ ) : isMergeDisabled ? (
<ButtonTooltip
tooltip={{
content: {
@@ -314,6 +392,27 @@ const MergePage: NextPageWithLayout = () => {
Merge branch
</Button>
)}
+ <DropdownMenu>
+ <DropdownMenuTrigger asChild>
+ <Button type="default" className="px-1.5" icon={<MoreVertical />} />
+ </DropdownMenuTrigger>
+ <DropdownMenuContent side="bottom" align="end" className="w-52">
+ <DropdownMenuItem
+ className="gap-x-2"
+ onClick={() => {
+ if (!currentBranch?.id || !parentProjectRef) return
+ updateBranch({
+ id: currentBranch.id,
+ projectRef: parentProjectRef,
+ requestReview: false,
+ })
+ router.push(`/project/${project?.ref}/branches?tab=prs`)
+ }}
+ >
+ Not ready for review
+ </DropdownMenuItem>
+ </DropdownMenuContent>
+ </DropdownMenu>
</div>
)
@@ -342,8 +441,12 @@ const MergePage: NextPageWithLayout = () => {
const pageSubtitle = () => {
if (!currentBranch?.created_at) return 'Branch information unavailable'
- const createdTime = dayjs(currentBranch.created_at).fromNow()
- return `Branch created ${createdTime}`
+ if (!currentBranch?.review_requested_at) {
+ return 'Not ready for review'
+ }
+
+ const reviewRequestedTime = dayjs(currentBranch.review_requested_at).fromNow()
+ return `Review requested ${reviewRequestedTime}`
}
return (
@@ -402,6 +505,16 @@ const MergePage: NextPageWithLayout = () => {
>
<Link href={`/project/${parentProjectRef}/branches`}>Create new branch</Link>
</Button>
+ ) : hasCurrentWorkflowCompleted ? (
+ <Button
+ type="default"
+ onClick={handleCloseBranch}
+ loading={isDeleting}
+ icon={<X size={16} strokeWidth={1.5} />}
+ className="shrink-0"
+ >
+ Close branch
+ </Button>
) : undefined
}
/>
diff --git a/packages/api-types/types/api.d.ts b/packages/api-types/types/api.d.ts
index 7bc97e5da1a..76b8ed8d853 100644
--- a/packages/api-types/types/api.d.ts
+++ b/packages/api-types/types/api.d.ts
@@ -2686,6 +2686,9 @@ export interface components {
}
StorageConfigResponse: {
features: {
+ icebergCatalog?: {
+ enabled: boolean
+ }
imageTransformation: {
enabled: boolean
}
@@ -3062,6 +3065,9 @@ export interface components {
}
UpdateStorageConfigBody: {
features?: {
+ icebergCatalog?: {
+ enabled: boolean
+ }
imageTransformation: {
enabled: boolean
}
diff --git a/packages/api-types/types/platform.d.ts b/packages/api-types/types/platform.d.ts
index 4657cd1d0b9..be06c9dfb0d 100644
--- a/packages/api-types/types/platform.d.ts
+++ b/packages/api-types/types/platform.d.ts
@@ -4607,6 +4607,8 @@ export interface components {
created_by: string
/** Format: uuid */
id: string
+ /** Format: date-time */
+ last_used_at: string | null
/** Format: uuid */
oauth_app_id: string
}
@@ -6129,6 +6131,8 @@ export interface components {
created_by: string
/** Format: uuid */
id: string
+ /** Format: date-time */
+ last_used_at: string | null
/** Format: uuid */
oauth_app_id: string
}[]
@@ -7632,6 +7636,9 @@ export interface components {
}
StorageConfigResponse: {
features: {
+ icebergCatalog?: {
+ enabled: boolean
+ }
imageTransformation: {
enabled: boolean
}
@@ -8515,6 +8522,9 @@ export interface components {
}
UpdateStorageConfigBody: {
features?: {
+ icebergCatalog?: {
+ enabled: boolean
+ }
imageTransformation: {
enabled: boolean
}