mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-07 22:30:38 +08:00
Update gitlab_webhook.py
This commit is contained in:
@ -237,7 +237,6 @@ async def gitlab_webhook(background_tasks: BackgroundTasks, request: Request):
|
||||
# Apply repo settings before checking push commands or handle_push_trigger
|
||||
apply_repo_settings(url)
|
||||
|
||||
commands_on_push = get_settings().get(f"gitlab.push_commands", {})
|
||||
commands_on_push = get_settings().get(f"gitlab.push_commands", {})
|
||||
handle_push_trigger = get_settings().get(f"gitlab.handle_push_trigger", False)
|
||||
if not commands_on_push or not handle_push_trigger:
|
||||
@ -286,8 +285,8 @@ def handle_ask_line(body, data):
|
||||
question = body.replace('/ask', '').strip()
|
||||
path = data['object_attributes']['position']['new_path']
|
||||
side = 'RIGHT' # if line_range_['start']['type'] == 'new' else 'LEFT'
|
||||
comment_id = data['object_attributes']["discussion_id"]
|
||||
get_logger().info("Handling line comment")
|
||||
_id = data['object_attributes']["discussion_id"]
|
||||
get_logger().info("Handling line ")
|
||||
body = f"/ask_line --line_start={start_line} --line_end={end_line} --side={side} --file_name={path} --comment_id={comment_id} {question}"
|
||||
except Exception as e:
|
||||
get_logger().error(f"Failed to handle ask line comment: {e}")
|
||||
|
Reference in New Issue
Block a user