mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-02 11:50:37 +08:00
Merge pull request #1177 from paolomainardi/patch-2
feat: keep manual comments working when commenting draft MRs
This commit is contained in:
@ -138,11 +138,7 @@ async def gitlab_webhook(background_tasks: BackgroundTasks, request: Request):
|
|||||||
if 'merge_request' in data:
|
if 'merge_request' in data:
|
||||||
mr = data['merge_request']
|
mr = data['merge_request']
|
||||||
url = mr.get('url')
|
url = mr.get('url')
|
||||||
draft = mr.get('draft')
|
|
||||||
if draft:
|
|
||||||
get_logger().info(f"Skipping draft MR: {url}")
|
|
||||||
return JSONResponse(status_code=status.HTTP_200_OK, content=jsonable_encoder({"message": "success"}))
|
|
||||||
|
|
||||||
get_logger().info(f"A comment has been added to a merge request: {url}")
|
get_logger().info(f"A comment has been added to a merge request: {url}")
|
||||||
body = data.get('object_attributes', {}).get('note')
|
body = data.get('object_attributes', {}).get('note')
|
||||||
if data.get('object_attributes', {}).get('type') == 'DiffNote' and '/ask' in body: # /ask_line
|
if data.get('object_attributes', {}).get('type') == 'DiffNote' and '/ask' in body: # /ask_line
|
||||||
|
Reference in New Issue
Block a user