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":