From 34cc434459e555f651aa6c6536c632a7e305b7f6 Mon Sep 17 00:00:00 2001 From: Tal Date: Sat, 5 Jul 2025 09:07:47 +0300 Subject: [PATCH] Update gitlab_webhook.py --- pr_agent/servers/gitlab_webhook.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pr_agent/servers/gitlab_webhook.py b/pr_agent/servers/gitlab_webhook.py index c020ec44..60f13501 100644 --- a/pr_agent/servers/gitlab_webhook.py +++ b/pr_agent/servers/gitlab_webhook.py @@ -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}")