Skip to content

Commit 284b074

Browse files
committed
Merge branch 'main' into devin/1745584099-add-organization-id-overall-reviews
2 parents 4dfcab3 + 465de65 commit 284b074

File tree

75 files changed

+2509
-257
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+2509
-257
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Notify Supabase Failure
2+
3+
on:
4+
check_run:
5+
types: [completed]
6+
7+
jobs:
8+
notify_slack:
9+
runs-on: ubuntu-latest
10+
if: |
11+
github.event.check_run.app.name == 'Supabase' &&
12+
github.event.check_run.conclusion == 'failure'
13+
# github.event.check_run.check_suite.head_branch == 'main'
14+
steps:
15+
- name: Slack Notification for Supabase Failure
16+
uses: tokorom/action-slack-incoming-webhook@d57bf1eb618f3dae9509afefa70d5774ad3d42bf # v1.3.0
17+
env:
18+
INCOMING_WEBHOOK_URL: ${{ secrets.SLACK_CLI_CI_WEBHOOK_URL }}
19+
with:
20+
text: "Supabase Preview Deployment Failure"
21+
attachments: |
22+
[
23+
{
24+
"color": "bad",
25+
"fields": [
26+
{
27+
"title": "Branch",
28+
"value": "main"
29+
},
30+
{
31+
"title": "Check Name",
32+
"value": "${{ github.event.check_run.name }}"
33+
},
34+
{
35+
"title": "Result",
36+
"value": "failure"
37+
},
38+
{
39+
"title": "Check Run URL",
40+
"value": "${{ github.event.check_run.html_url }}"
41+
}
42+
]
43+
}
44+
]

frontend/apps/app/app/(app)/app/(root)/invitations/tokens/[token]/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { PageProps } from '@/app/types'
22
import { getInvitationData } from '@/features/invitations/actions'
33
import { InvitationCard } from '@/features/invitations/components/InvitationCard'
4-
import { notFound } from 'next/navigation'
4+
55
import * as v from 'valibot'
66

77
const paramsSchema = v.object({
@@ -10,7 +10,7 @@ const paramsSchema = v.object({
1010

1111
export default async function Page({ params }: PageProps) {
1212
const parsedParams = v.safeParse(paramsSchema, await params)
13-
if (!parsedParams.success) return notFound()
13+
if (!parsedParams.success) throw new Error('Invalid token parameters')
1414

1515
const { token } = parsedParams.output
1616
const { organizationName, currentUser } = await getInvitationData(token)

frontend/apps/app/app/(app)/app/(root)/projects/new/page.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { getOrganizationId } from '@/features/organizations/services/getOrganiza
22
import { ProjectNewPage } from '@/features/projects/pages'
33
import { createClient } from '@/libs/db/server'
44
import { getInstallations } from '@liam-hq/github'
5-
import { notFound } from 'next/navigation'
65

76
export default async function NewProjectPage() {
87
const organizationId = await getOrganizationId()
@@ -19,13 +18,13 @@ export default async function NewProjectPage() {
1918
} = await supabase.auth.getUser()
2019
if (error || !user) {
2120
console.error('Error fetching user:', error)
22-
return notFound()
21+
throw new Error('User not authenticated')
2322
}
2423

2524
const { data } = await supabase.auth.getSession()
2625

2726
if (data.session === null) {
28-
return notFound()
27+
throw new Error('Session not found')
2928
}
3029

3130
const { installations } = await getInstallations(data.session)

frontend/apps/app/app/(app)/app/(root)/projects/page.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { getOrganizationId } from '@/features/organizations/services/getOrganizationId'
22
import { ProjectsPage } from '@/features/projects/pages'
33
import { createClient } from '@/libs/db/server'
4-
import { notFound } from 'next/navigation'
54

65
export default async function Page() {
76
const organizationId = await getOrganizationId()
@@ -20,10 +19,10 @@ export default async function Page() {
2019

2120
if (error || !user) {
2221
console.error('Error fetching user:', error)
23-
return notFound()
22+
throw new Error('User not authenticated')
2423
}
2524
if (data.session === null) {
26-
return notFound()
25+
throw new Error('User not authenticated')
2726
}
2827

2928
return <ProjectsPage organizationId={organizationId} />

frontend/apps/app/app/(app)/app/(root)/settings/general/GeneralPage.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { getOrganizationDetails } from '@/features/organizations/services/organizationService'
2-
import { notFound } from 'next/navigation'
2+
33
import { GeneralPageClient } from './GeneralPageClient'
44

55
export async function GeneralPage({
@@ -11,7 +11,7 @@ export async function GeneralPage({
1111
const organization = await getOrganizationDetails(organizationId)
1212

1313
if (!organization) {
14-
return notFound()
14+
throw new Error('Organization not found')
1515
}
1616

1717
// Use the client component with useActionState for toast notifications

frontend/apps/app/app/(app)/app/(root)/settings/members/page.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { OrganizationMembersPage } from '@/features/organizations/pages/OrganizationMembersPage'
22
import { getOrganizationId } from '@/features/organizations/services/getOrganizationId'
33
import { createClient } from '@/libs/db/server'
4-
import { notFound } from 'next/navigation'
54

65
export default async function MembersPage() {
76
const organizationId = await getOrganizationId()
@@ -21,7 +20,7 @@ export default async function MembersPage() {
2120

2221
if (error || !organization) {
2322
console.error('Error fetching organization:', error)
24-
notFound()
23+
throw new Error('Organization not found')
2524
}
2625

2726
return <OrganizationMembersPage organization={organization} />
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { PageProps } from '@/app/types'
22
import { ProjectBranchesListPage } from '@/features/projects/pages/ProjectBranchesListPage/ProjectBranchesListPage'
3-
import { notFound } from 'next/navigation'
3+
44
import * as v from 'valibot'
55

66
const paramsSchema = v.object({
@@ -9,6 +9,6 @@ const paramsSchema = v.object({
99

1010
export default async function BranchesPage({ params }: PageProps) {
1111
const parsedParams = v.safeParse(paramsSchema, await params)
12-
if (!parsedParams.success) return notFound()
12+
if (!parsedParams.success) throw new Error('Invalid parameters')
1313
return <ProjectBranchesListPage projectId={parsedParams.output.projectId} />
1414
}

frontend/apps/app/app/(app)/app/(with-project)/projects/[projectId]/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { PageProps } from '@/app/types'
2-
import { notFound, redirect } from 'next/navigation'
2+
import { redirect } from 'next/navigation'
33
import * as v from 'valibot'
44

55
const paramsSchema = v.object({
@@ -8,7 +8,7 @@ const paramsSchema = v.object({
88

99
export default async function Page({ params }: PageProps) {
1010
const parsedParams = v.safeParse(paramsSchema, await params)
11-
if (!parsedParams.success) return notFound()
11+
if (!parsedParams.success) throw new Error('Invalid project parameters')
1212

1313
const { projectId } = parsedParams.output
1414

frontend/apps/app/app/(app)/app/(with-project)/projects/[projectId]/rule/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { PageProps } from '@/app/types'
2-
import { notFound } from 'next/navigation'
2+
33
import * as v from 'valibot'
44
import { RulePage } from './RulePage'
55

@@ -11,7 +11,7 @@ const paramsSchema = v.object({
1111
export default async function Page({ params }: PageProps) {
1212
// Validate and parse params
1313
const parsedParams = v.safeParse(paramsSchema, await params)
14-
if (!parsedParams.success) return notFound()
14+
if (!parsedParams.success) throw new Error('Invalid parameters')
1515

1616
const { projectId } = parsedParams.output
1717

frontend/apps/app/app/(app)/app/(with-project)/projects/[projectId]/settings/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { PageProps } from '@/app/types'
2-
import { notFound } from 'next/navigation'
2+
33
import * as v from 'valibot'
44
import { SettingsPage } from './SettingsPage'
55

@@ -11,7 +11,7 @@ const paramsSchema = v.object({
1111
export default async function Page({ params }: PageProps) {
1212
// Validate and parse params
1313
const parsedParams = v.safeParse(paramsSchema, await params)
14-
if (!parsedParams.success) return notFound()
14+
if (!parsedParams.success) throw new Error('Invalid parameters')
1515

1616
const { projectId } = parsedParams.output
1717

0 commit comments

Comments
 (0)