Update gitlab_webhook.py

This commit is contained in:
Paolo Mainardi
2024-08-22 21:14:49 +02:00
committed by GitHub
parent 61837c69a3
commit 8793f8d9b0

View File

@ -124,7 +124,7 @@ async def gitlab_webhook(background_tasks: BackgroundTasks, request: Request):
return JSONResponse(status_code=status.HTTP_200_OK, content=jsonable_encoder({"message": "success"}))
log_context["sender"] = sender
should_skip_draft = get_settings().get("GITLAB.SKIP_DRAFT_MR", True)
should_skip_draft = get_settings().get("GITLAB.SKIP_DRAFT_MR", False)
if data.get('object_kind') == 'merge_request' and data['object_attributes'].get('action') in ['open', 'reopen']:
url = data['object_attributes'].get('url')
draft = data['object_attributes'].get('draft')