From fdeb4fe74d53c9c7f035af763ce991f8b7814ddc Mon Sep 17 00:00:00 2001 From: Meni Yakove Date: Thu, 7 Aug 2025 14:14:18 +0300 Subject: [PATCH] fix: only run conventional title check when feature is enabled Adds conditional check for `github_webhook.conventional_title` before running conventional title validation on PR edits. This prevents unnecessary processing when the conventional title feature is disabled in the repository configuration. --- webhook_server/libs/pull_request_handler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webhook_server/libs/pull_request_handler.py b/webhook_server/libs/pull_request_handler.py index 0bfd7e19..1236ec64 100644 --- a/webhook_server/libs/pull_request_handler.py +++ b/webhook_server/libs/pull_request_handler.py @@ -66,7 +66,7 @@ async def process_pull_request_webhook_data(self, pull_request: PullRequest) -> if hook_action == "edited": await self.set_wip_label_based_on_title(pull_request=pull_request) - if self.hook_data["changes"].get("title"): + if self.github_webhook.conventional_title and self.hook_data["changes"].get("title"): self.logger.info(f"{self.log_prefix} PR title changed, running conventional title check") await self.runner_handler.run_conventional_title_check(pull_request=pull_request)