From 0392b51264399bb97c3c43f7cd588e5949560716 Mon Sep 17 00:00:00 2001 From: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com> Date: Mon, 26 Oct 2026 10:11:46 +0000 Subject: [PATCH] chore: Include package name in readme generator --- .github/scripts/generate_patches_readme.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/scripts/generate_patches_readme.py b/.github/scripts/generate_patches_readme.py index 2d7525003..abcba2aeb 100644 --- a/.github/scripts/generate_patches_readme.py +++ b/.github/scripts/generate_patches_readme.py @@ -60,7 +60,7 @@ def pkg_label(name, form_factor): # The same package name can be used by different apps for each form factor. # JSON structure: compatiblePackages is a list of objects with # { packageName, name, formFactor, targets: [{ version, isExperimental, description }] } -by_pkg = {} # (packageName, formFactor) -> { name, emoji, patches, targets } +by_pkg = {} # (packageName, formFactor) -> { name, package, emoji, patches, targets } universal = {} for patch in data["patches"]: @@ -78,6 +78,7 @@ for patch in data["patches"]: if key not in by_pkg: by_pkg[key] = { "name": pkg_label(name, form_factor), + "package": pkg, "emoji": pkg_emoji(form_factor), "patches": {}, "targets": pkg_entry.get("targets", []), @@ -143,19 +144,20 @@ def versions_table(targets): return "\n".join(rows) -def spoiler(label, count, targets, tbl, expanded=False): +def spoiler(label, package, count, targets, tbl, expanded=False): """Wrap a patches table in a
spoiler with a versions sub-table. If expanded=True, the spoiler is open by default (for repos with few patches). """ noun = "patch" if count == 1 else "patches" vtbl = versions_table(targets) + package_line = f"**Package name:** `{package}`\n\n" versions_section = f"**🎯 Supported versions:**\n\n{vtbl}\n\n" if vtbl else "" tag = "
" if expanded else "
" return f"""{tag} {label}  â€¢  {count} {noun}
-{versions_section}{tbl} +{package_line}{versions_section}{tbl}
""" @@ -172,7 +174,7 @@ def build_content(expanded=False): for entry in by_pkg.values(): patches = list(entry["patches"].values()) label = f"{entry['emoji']} {entry['name']}" - lines.append(spoiler(label, len(patches), entry["targets"], patches_table(patches), expanded)) + lines.append(spoiler(label, entry["package"], len(patches), entry["targets"], patches_table(patches), expanded)) lines.append("") # Universal patches (no specific app)