mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-12-11 18:35:18 +00:00
feat: keep manual comments working when commenting draft MRs
closes #1160
This commit is contained in:
parent
6a5ff2fa3b
commit
c9ed271eaf
1 changed files with 1 additions and 5 deletions
|
|
@ -138,11 +138,7 @@ async def gitlab_webhook(background_tasks: BackgroundTasks, request: Request):
|
|||
if 'merge_request' in data:
|
||||
mr = data['merge_request']
|
||||
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}")
|
||||
body = data.get('object_attributes', {}).get('note')
|
||||
if data.get('object_attributes', {}).get('type') == 'DiffNote' and '/ask' in body: # /ask_line
|
||||
|
|
|
|||
Loading…
Reference in a new issue