mirror of
https://github.com/codeflash-ai/codeflash-internal.git
synced 2026-05-04 18:25:18 +00:00
Update js/cf-webapp/src/app/(dashboard)/review-optimizations/[traceId]/action.ts
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
This commit is contained in:
parent
0fe3ca8c0a
commit
e82dab3c13
1 changed files with 9 additions and 0 deletions
|
|
@ -384,6 +384,13 @@ export async function createPullRequest({
|
|||
const authorizedRepository = (
|
||||
authorizedEvent.event as { repository?: { full_name?: string | null } | null }
|
||||
).repository
|
||||
if (
|
||||
full_repo_name &&
|
||||
authorizedRepository?.full_name &&
|
||||
authorizedRepository.full_name !== full_repo_name
|
||||
if (full_repo_name && !authorizedRepository?.full_name) {
|
||||
return createErrorResponse("Repository not found for this optimization event")
|
||||
}
|
||||
if (
|
||||
full_repo_name &&
|
||||
authorizedRepository?.full_name &&
|
||||
|
|
@ -391,6 +398,8 @@ export async function createPullRequest({
|
|||
) {
|
||||
return createErrorResponse("Repository mismatch for optimization event")
|
||||
}
|
||||
return createErrorResponse("Repository mismatch for optimization event")
|
||||
}
|
||||
|
||||
const cfapiUrl = process.env.CODEFLASH_CFAPI_URL
|
||||
const session = await auth0.getAccessToken()
|
||||
|
|
|
|||
Loading…
Reference in a new issue