INNER CODE UNIT · Python
build_content
MorpheApp/morphe-patches · .github/scripts/generate_patches_readme.py:145
def build_content(expanded=False):
"""Build the full generated patches section."""
lines = [
f"> **[v{ver}](https://github.com/{owner}/{repo}/releases/tag/v{ver})**"
f" • `{branch}` • "
f"{total} patches total"
]
# One spoiler per app, in the order they appear in the JSON
for pkg, entry in by_pkg.items():
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("")
# Universal patches (no specific app)
if universal:
uni_patches = list(universal.values())