INNER CODE UNIT · Python
pkg_emoji
MorpheApp/morphe-patches · .github/scripts/generate_patches_readme.py:40
def pkg_emoji(pkg):
"""Return a standard package emoji regardless of the package name."""
return "📦"
# Group patches by package; patches with no compatiblePackages are universal.
# JSON structure: compatiblePackages is a list of objects with
# { packageName, name, targets: [{ version, isExperimental, description }] }
by_pkg = {} # packageName -> { name, emoji, patches, targets }
universal = {}
for patch in data["patches"]:
cp = patch.get("compatiblePackages")
if not cp:
# Deduplicate universal patches by name
if patch["name"] not in universal:
universal[patch["name"]] = patch
continue
for pkg_entry in cp: