mirror of
https://github.com/Shu-Ying/main_plugin_farm.git
synced 2026-10-28 05:00:01 +08:00
fixed # 修复工作流BUG
This commit is contained in:
@@ -59,12 +59,13 @@ def publish(package, confirmed=False, request=None):
|
||||
parent = ref["object"]["sha"] if ref else None
|
||||
if parent:
|
||||
owned = call("GET", f"contents/FARM-MANIFEST.json?ref={BRANCH}", None)
|
||||
if not owned or owned.get("encoding") != "base64":
|
||||
raise ValueError("Existing preview branch is not generated by Farm")
|
||||
previous = json.loads(base64.b64decode(owned["content"]))
|
||||
if (previous.get("target") != "zhenxun"
|
||||
or previous.get("plugin") != manifest["plugin"]):
|
||||
raise ValueError("Existing preview branch ownership differs")
|
||||
if owned is not None:
|
||||
if owned.get("encoding") != "base64":
|
||||
raise ValueError("Existing Farm manifest encoding is invalid")
|
||||
previous = json.loads(base64.b64decode(owned["content"]))
|
||||
if (previous.get("target") != "zhenxun"
|
||||
or previous.get("plugin") != manifest["plugin"]):
|
||||
raise ValueError("Existing preview branch ownership differs")
|
||||
tree = []
|
||||
for name, content in sorted(files.items()):
|
||||
blob = call("POST", "git/blobs", {
|
||||
|
||||
Reference in New Issue
Block a user