From 3b071ccb4e8a5d9ba64456b379185dffbed7372e Mon Sep 17 00:00:00 2001 From: Abhinav Kumar Date: Wed, 2 Jul 2025 19:11:53 +0530 Subject: [PATCH] apply repository settings before processing push commands in GitLab webhook --- pr_agent/servers/gitlab_webhook.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pr_agent/servers/gitlab_webhook.py b/pr_agent/servers/gitlab_webhook.py index af777a9a..a699f190 100644 --- a/pr_agent/servers/gitlab_webhook.py +++ b/pr_agent/servers/gitlab_webhook.py @@ -234,6 +234,8 @@ async def gitlab_webhook(background_tasks: BackgroundTasks, request: Request): get_logger().info(f"Skipping draft MR: {url}") return JSONResponse(status_code=status.HTTP_200_OK, content=jsonable_encoder({"message": "success"})) + # 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", {}) handle_push_trigger = get_settings().get(f"gitlab.handle_push_trigger", False) if not commands_on_push or not handle_push_trigger: