From 446d135581752e49bd36aacff2a55b678e231c0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=BB=BA=E5=B9=B3?= Date: Wed, 23 Apr 2025 15:12:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E5=90=88=E5=B9=B6=E9=98=B2?= =?UTF-8?q?=E6=AD=A2=E5=A4=9A=E6=AC=A1=E5=86=99=E5=85=A5=E5=8E=86=E5=8F=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/pr/views.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/pr/views.py b/apps/pr/views.py index a6792f2..d8e2be0 100644 --- a/apps/pr/views.py +++ b/apps/pr/views.py @@ -93,9 +93,10 @@ class WebHookView(View): if json_data.get('object_kind') == 'merge_request': labels = json_data["labels"] if labels and labels[0].get("title"): - provider.save_pr_agent_log( - request_data=json_data, project_id=project_config.get("project_id") - ) + if json_data.get("object_attributes").get("detailed_merge_status") == "mergeable": + provider.save_pr_agent_log( + request_data=json_data, project_id=project_config.get("project_id") + ) # TODO:暂时官方没适配gitea # elif GIT_TYPE == "gitea": # if json_data.get("action") == "opened":