代码合并防止多次写入历史

This commit is contained in:
张建平 2025-04-23 15:12:49 +08:00
parent f439f3d3de
commit 446d135581

View File

@ -93,9 +93,10 @@ class WebHookView(View):
if json_data.get('object_kind') == 'merge_request': if json_data.get('object_kind') == 'merge_request':
labels = json_data["labels"] labels = json_data["labels"]
if labels and labels[0].get("title"): if labels and labels[0].get("title"):
provider.save_pr_agent_log( if json_data.get("object_attributes").get("detailed_merge_status") == "mergeable":
request_data=json_data, project_id=project_config.get("project_id") provider.save_pr_agent_log(
) request_data=json_data, project_id=project_config.get("project_id")
)
# TODO暂时官方没适配gitea # TODO暂时官方没适配gitea
# elif GIT_TYPE == "gitea": # elif GIT_TYPE == "gitea":
# if json_data.get("action") == "opened": # if json_data.get("action") == "opened":