From 795a6f3f76aaebe984567c08bcbee686f2ced7f5 Mon Sep 17 00:00:00 2001 From: snowykami Date: Wed, 18 Sep 2024 01:31:03 +0800 Subject: [PATCH] =?UTF-8?q?:package:=20docs:=20=E4=BF=AE=E6=94=B9=E5=8F=91?= =?UTF-8?q?=E5=B8=83=E6=8C=89=E9=92=AE=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- liteyuki_flow/resource_handler.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/liteyuki_flow/resource_handler.py b/liteyuki_flow/resource_handler.py index 27656b61..5d33f1fc 100644 --- a/liteyuki_flow/resource_handler.py +++ b/liteyuki_flow/resource_handler.py @@ -139,10 +139,12 @@ def add_resource(github: Github, issue: Issue, repo: Repository) -> err: if cm.body.startswith(("通过", "pass",)): # 检测用户是否是管理员 if cm.user.login not in [u.login for u in repo.get_collaborators()]: + issue.edit(state="open") push_publish_result(issue, "❌ 你不是仓库管理员,无法发布资源包。") return ValueError("你不是仓库管理员,无法发布资源包。") break else: + issue.edit(state="open") push_publish_result(issue, "❌ 管理员未审核。") return ValueError("管理员未审核。") @@ -186,6 +188,7 @@ def add_resource(github: Github, issue: Issue, repo: Repository) -> err: push_publish_result(issue, f"✅ 资源包 {name} 已发布!商店页面稍后就会更新。") return nil except Exception as e: + issue.edit(state="open") push_publish_result(issue, f"❌ 发布失败: {str(e)}") return e