From ca52051a1dcc7db97f73b84909769858ba184aa1 Mon Sep 17 00:00:00 2001 From: Guy Vago Date: Tue, 14 Apr 2026 15:57:58 +0300 Subject: [PATCH] fix(gerrit): explicitly set git provider in server startup The Gerrit server's start() function did not set CONFIG.GIT_PROVIDER to "gerrit", relying instead on implicit URL format detection to determine the provider. This could cause the wrong provider to be selected. Other servers (bitbucket_app, gitlab_webhook) explicitly set their git provider during startup. This commit adds the same explicit configuration to the Gerrit server for consistency and correctness. --- pr_agent/servers/gerrit_server.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pr_agent/servers/gerrit_server.py b/pr_agent/servers/gerrit_server.py index 1783f6b994..26f6ad8616 100644 --- a/pr_agent/servers/gerrit_server.py +++ b/pr_agent/servers/gerrit_server.py @@ -64,6 +64,7 @@ async def root(): def start(): + get_settings().set("CONFIG.GIT_PROVIDER", "gerrit") # to prevent adding help messages with the output get_settings().set("CONFIG.CLI_MODE", True) middleware = [Middleware(RawContextMiddleware)]