From b24f7b35336f320e0b63feb9203e5999f3df435e Mon Sep 17 00:00:00 2001 From: eya46 <61458340+eya46@users.noreply.github.com> Date: Mon, 29 Jan 2024 20:24:26 +0800 Subject: [PATCH] Update def handle_pr_close MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 先处理pr再触发registry更新 --- src/plugins/publish/__init__.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/plugins/publish/__init__.py b/src/plugins/publish/__init__.py index 15b78154..de64f339 100644 --- a/src/plugins/publish/__init__.py +++ b/src/plugins/publish/__init__.py @@ -95,12 +95,6 @@ async def handle_pr_close( ) logger.info(f"议题 #{related_issue_number} 已关闭") - # 如果商店更新则触发 registry 更新 - if event.payload.pull_request.merged: - await trigger_registry_update(bot, repo_info, publish_type, issue) - else: - logger.info("拉取请求未合并,跳过触发商店列表更新") - try: run_shell_command( [ @@ -124,6 +118,12 @@ async def handle_pr_close( else: logger.info("发布的拉取请求未合并,已跳过") + # 如果商店更新则触发 registry 更新 + if event.payload.pull_request.merged: + await trigger_registry_update(bot, repo_info, publish_type, issue) + else: + logger.info("拉取请求未合并,跳过触发商店列表更新") + async def check_rule( event: IssuesOpened | IssuesReopened | IssuesEdited | IssueCommentCreated,