mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-04 21:00:40 +08:00
Remove redundant toggle
This commit is contained in:
@ -51,12 +51,11 @@ async def get_body(request):
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
logging.error("Error parsing request body", e)
|
logging.error("Error parsing request body", e)
|
||||||
raise HTTPException(status_code=400, detail="Error parsing request body") from e
|
raise HTTPException(status_code=400, detail="Error parsing request body") from e
|
||||||
if get_settings().github_app.verify_signature:
|
webhook_secret = getattr(get_settings().github, 'webhook_secret', None)
|
||||||
|
if webhook_secret:
|
||||||
body_bytes = await request.body()
|
body_bytes = await request.body()
|
||||||
signature_header = request.headers.get('x-hub-signature-256', None)
|
signature_header = request.headers.get('x-hub-signature-256', None)
|
||||||
webhook_secret = getattr(get_settings().github, 'webhook_secret', None)
|
verify_signature(body_bytes, webhook_secret, signature_header)
|
||||||
if webhook_secret:
|
|
||||||
verify_signature(body_bytes, webhook_secret, signature_header)
|
|
||||||
return body
|
return body
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user