fix: df and more debug

This commit is contained in:
Andras Bacsai
2022-07-25 11:25:36 +00:00
parent 2e7c96b2eb
commit 5f3aae066a
3 changed files with 4 additions and 1 deletions

View File

@@ -86,6 +86,7 @@ export async function gitHubEvents(request: FastifyRequest<GitHubEvents>): Promi
projectId = repository.id;
branch = body.pull_request.head.ref.includes('/') ? body.pull_request.head.ref.split('/')[2] : body.pull_request.head.ref;
}
console.log({repository, projectId, branch})
if (!projectId || !branch) {
throw { status: 500, message: 'Cannot parse projectId or branch from the webhook?!' }
}