From f3254958ad7bab6fe746d2dbf7a2d4945302be3b Mon Sep 17 00:00:00 2001 From: LiHaohua Date: Thu, 23 Jul 2026 14:27:17 +0800 Subject: [PATCH] =?UTF-8?q?chore(workflows):=20sync=20=E2=80=94=20write=20?= =?UTF-8?q?author.github=20for=20all=20portal=20submissions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Mirror of packages fix: source-repo and deb-fallback branches now default author.github to the uploader's login so the store never shows @undefined. Co-authored-by: Cursor --- packages-workflows/process-web-submission.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/packages-workflows/process-web-submission.yml b/packages-workflows/process-web-submission.yml index cdb08ab..898bbe5 100644 --- a/packages-workflows/process-web-submission.yml +++ b/packages-workflows/process-web-submission.yml @@ -215,9 +215,13 @@ jobs: "summary": store.get("summary", ""), "categories": store.get("categories", []), "screenshots": store.get("screenshots", [])} - for k in ("description", "locales", "license", "source_repo", "icon", "permissions"): + for k in ("description", "locales", "license", "source_repo", "icon", "permissions", "author"): if store.get(k): meta[k] = store[k] + # A portal submission always has a known uploader; default the + # displayed author to their GitHub login so the store never + # renders "@undefined". + meta.setdefault("author", {"github": os.environ.get("SUBMITTER", "")}) shots = dest / "screenshots" shots.mkdir(exist_ok=True) for srel in meta["screenshots"]: @@ -259,7 +263,8 @@ jobs: desc = subprocess.run(["dpkg-deb", "-f", "/tmp/pkg.deb", "Description"], capture_output=True, text=True).stdout.strip() meta = {"title": title, "summary": desc.splitlines()[0] if desc else "", - "categories": [], "screenshots": []} + "categories": [], "screenshots": [], + "author": {"github": os.environ.get("SUBMITTER", "")}} if icon_rel: meta["icon"] = icon_rel (dest / "meta.json").write_text(json.dumps(meta, indent=2, ensure_ascii=False))