fix: repair bad merge in review-optimizations authorization checks
Duplicate and mangled if-blocks from the merge of #2605 caused a syntax error that broke type-checking.
This commit is contained in:
parent
91b692c1a0
commit
1fada04c22
1 changed files with 0 additions and 6 deletions
|
|
@ -384,10 +384,6 @@ export async function createPullRequest({
|
||||||
const authorizedRepository = (
|
const authorizedRepository = (
|
||||||
authorizedEvent.event as { repository?: { full_name?: string | null } | null }
|
authorizedEvent.event as { repository?: { full_name?: string | null } | null }
|
||||||
).repository
|
).repository
|
||||||
if (
|
|
||||||
full_repo_name &&
|
|
||||||
authorizedRepository?.full_name &&
|
|
||||||
authorizedRepository.full_name !== full_repo_name
|
|
||||||
if (full_repo_name && !authorizedRepository?.full_name) {
|
if (full_repo_name && !authorizedRepository?.full_name) {
|
||||||
return createErrorResponse("Repository not found for this optimization event")
|
return createErrorResponse("Repository not found for this optimization event")
|
||||||
}
|
}
|
||||||
|
|
@ -398,8 +394,6 @@ export async function createPullRequest({
|
||||||
) {
|
) {
|
||||||
return createErrorResponse("Repository mismatch for optimization event")
|
return createErrorResponse("Repository mismatch for optimization event")
|
||||||
}
|
}
|
||||||
return createErrorResponse("Repository mismatch for optimization event")
|
|
||||||
}
|
|
||||||
|
|
||||||
const cfapiUrl = process.env.CODEFLASH_CFAPI_URL
|
const cfapiUrl = process.env.CODEFLASH_CFAPI_URL
|
||||||
const session = await auth0.getAccessToken()
|
const session = await auth0.getAccessToken()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue