mirror of
https://github.com/LiteyukiStudio/LiteyukiBot.git
synced 2024-11-23 11:27:38 +08:00
📦 docs: 资源商店新增发布资源功能
This commit is contained in:
parent
5537bc32df
commit
b5d3c6aaa8
@ -66,9 +66,9 @@ def pre_check(github: Github, issue: Issue, repo: Repository) -> err:
|
|||||||
z.extractall(f"tmp/{name}")
|
z.extractall(f"tmp/{name}")
|
||||||
# 检测包内metadata.yml文件
|
# 检测包内metadata.yml文件
|
||||||
data = yaml.load(open(f"tmp/{name}/metadata.yml"), Loader=yaml.SafeLoader)
|
data = yaml.load(open(f"tmp/{name}/metadata.yml"), Loader=yaml.SafeLoader)
|
||||||
except Exception:
|
except Exception as e:
|
||||||
issue.get_comment(cid).edit("解析资源包失败,可能是格式问题或metadata.yml不存在.")
|
issue.get_comment(cid).edit("解析资源包失败,可能是格式问题或metadata.yml不存在: " + str(e))
|
||||||
return ValueError("解析资源包失败,可能是格式问题或metadata.yml不存在.")
|
return e
|
||||||
|
|
||||||
# 检测必要字段 name,description,version
|
# 检测必要字段 name,description,version
|
||||||
if not all((data.get("name"), data.get("description"), data.get("version"))):
|
if not all((data.get("name"), data.get("description"), data.get("version"))):
|
||||||
|
Loading…
Reference in New Issue
Block a user