meta_package_manager.labels moduleΒΆ

Utilities to generate the extra labels and labeller rules for GitHub issues and PRs.

The content and file rules produced here are a convenience: they pre-label a freshly filed issue or PR to save the maintainer a first pass. They never replace the manual review and classification, and nothing downstream treats them as authoritative. They are therefore tuned for precision over recall: a rule is encoded only when its signal is unambiguous (see generate_content_rules() and generate_file_rules()), and a manager with no unambiguous term simply gets no content rule and is labelled by hand.

meta_package_manager.labels.generate_labels(all_labels, groups, prefix, color)[source]ΒΆ

Generate labels.

A dedicated label is produced for each entry of the all_labels parameter, unless it is part of a group. In which case a dedicated label for that group will be created.

Returns the {label_id: label_name} map and the list of (label_name, color, description) rows to register, leaving the caller to fold them into the global LABELS registry. Kept pure (no global mutation) so it can be called repeatedly without double-populating the registry.

Return type:

tuple[dict[str, str], list[tuple[str, str, str]]]

meta_package_manager.labels.MANAGER_LABEL_COLOR = '#bfdadc'ΒΆ

Color GitHub paints every πŸ“¦ manager: * label with.

Also the color of the badge each manager’s documentation page links its label with, hard-coded in docs/_static/custom.css since a stylesheet cannot read this module; test_manager_label_badge_color keeps the two in step.

meta_package_manager.labels.MANAGER_LABEL_GROUPS: TLabelGroup = {'asdf-based': frozenset({'asdf', 'mise'}), 'bash-based': frozenset({'basalt', 'bpkg'}), 'conda-based': frozenset({'conda', 'mamba', 'micromamba', 'pixi'}), 'dpkg-based': frozenset({'apt', 'apt-mint', 'deb-get', 'fink', 'nala', 'opkg', 'pacstall'}), 'fish-based': frozenset({'fisher', 'oh-my-fish'}), 'homebrew': frozenset({'brew', 'cask', 'zerobrew'}), 'neovim-based': frozenset({'bob', 'lazy', 'mason', 'vim-pack'}), 'npm-based': frozenset({'bun', 'npm', 'pnpm', 'volta', 'yarn', 'yarn-berry'}), 'pacman-based': frozenset({'dkp-pacman', 'pacaur', 'pacman', 'pamac', 'paru', 'pikaur', 'trizen', 'yay'}), 'pkg-based': frozenset({'pkg', 'ports'}), 'pypi-based': frozenset({'pip', 'pipx', 'uv', 'uvx'}), 'rpm-based': frozenset({'dnf', 'dnf5', 'urpmi', 'yum', 'zypper'}), 'scoop-based': frozenset({'scoop', 'sfsu'}), 'vscode-based': frozenset({'vscode', 'vscodium'}), 'zsh-based': frozenset({'antidote', 'antigen', 'zim', 'zinit', 'zplug'})}ΒΆ

Managers sharing the same ecosystem are grouped together under the same label.

Grouping is by ecosystem (the underlying packaging system), not by installation paradigm. For example, source-based helpers like Pacstall and AUR helpers are grouped with their ecosystem (dpkg-based and pacman-based respectively), even though they build from source rather than fetching pre-built binaries. fink follows the same rule over its platform: it manages .deb packages through dpkg, so it groups with the other dpkg front-ends despite being the only macOS one among them.

pypi-based is named for the registry rather than for a tool, because no single tool is common to it: uv reimplements resolution and installation from scratch and touches no pip code. What the four share is the index they all resolve against, which is the level a report lands at.

The host-program groups (bash-based, fish-based, neovim-based, zsh-based) widen that reading, and deliberately so: plugin managers share no backend at all, each cloning straight from upstream Git into its own tree. What they share is the host program a report is about, which is what the label has to answer. An issue mentioning a Neovim plugin is about the same corner of mpm whether it arrives through vim-pack or lazy, so both carry one label and one tracker search. The groups stay separate along that same line, one per host program: zinit and antidote host Zsh plugins, not Neovim ones, and a report about either belongs nowhere near the editor label. Grouping all of them under a single shell-plugin label was considered and rejected on the same grounds, since it would answer with mpm’s implementation shape (an interpreter-keyed manager wrapping every call in zsh -c or fish -c) where the reporter filed against a shell.

mason is the one member of those groups that manages no plugins at all, installing ordinary developer tools rather than editor Lua. It groups under neovim-based anyway, because the host program is the axis: Neovim is what a mason report is about, and it is also what mpm keys the manager on, the three sharing one module and one nvim binary. Naming the group for the editor rather than for plugins is what lets it hold mason without straining.

bob stretches that naming one step further, and is the member to check the axis against. It installs Neovim itself rather than anything into it, and is the only member mpm does not key on the nvim binary, being its own executable in its own definition. It groups here regardless, because the axis is what a report is about and every bob report is about Neovim: leaving it out would split the editor across two labels and two tracker searches, which is the split this group exists to prevent. volta is the same call already taken elsewhere, kept under npm-based though it manages a runtime too.

sheldon is the one shell plugin manager left ungrouped, and it fails both halves of that test: it manages plugins for any shell rather than for one, and it is a compiled binary rather than a sourced function, so it shares neither a host program nor the interpreter wrapper with the groups above.

asdf-based is the plain reading again: mise resolves asdf’s plugins directly through its asdf: backend, so the two share one plugin ecosystem and one class of report. volta stays under npm-based despite also managing a runtime, because what it installs is npm packages.

conda-based follows pypi-based: pixi shares no code with conda, reimplementing resolution and installation on top of rattler, but both resolve conda packages from the same channels, conda-forge by default. The registry is the level a report lands at, so the two share one label even though their CLIs have nothing else in common.

meta_package_manager.labels.all_manager_label_ids = frozenset({'am', 'antidote', 'antigen', 'apk', 'apm', 'apt', 'apt-cyg', 'apt-mint', 'asdf', 'basalt', 'bin', 'bob', 'bpkg', 'brew', 'bun', 'cargo', 'cask', 'cave', 'choco', 'chromebrew', 'clib', 'composer', 'conda', 'cpan', 'deb-get', 'dkp-pacman', 'dnf', 'dnf5', 'dotnet', 'elan', 'emerge', 'eopkg', 'fink', 'fisher', 'flatpak', 'fwupd', 'gcloud', 'gem', 'getnf', 'gext', 'gh-ext', 'ghcup', 'guix', 'haxelib', 'jpm', 'juliaup', 'krew', 'lazy', 'luarocks', 'macports', 'mamba', 'mas', 'mason', 'micro', 'micromamba', 'miktex', 'mise', 'mpm', 'nala', 'nimble', 'nix', 'npm', 'oh-my-fish', 'ollama', 'opam', 'opkg', 'pacaur', 'pacman', 'pacstall', 'pamac', 'paru', 'pikaur', 'pip', 'pipx', 'pixi', 'pkcon', 'pkg', 'pkg-tools', 'pkgin', 'pnpm', 'ports', 'pwsh-gallery', 'pyenv', 'raco', 'rustup', 'scoop', 'sdkman', 'sfsu', 'sheldon', 'slapt-get', 'snap', 'soar', 'sorcery', 'spack', 'steamcmd', 'stew', 'sun-tools', 'swupd', 'tazpkg', 'tlmgr', 'topgrade', 'trizen', 'urpmi', 'uv', 'uvx', 'vagrant', 'vcpkg', 'vim-pack', 'volta', 'vscode', 'vscodium', 'winget', 'xbps', 'xcodes', 'yarn', 'yarn-berry', 'yay', 'yazi', 'yum', 'zef', 'zerobrew', 'zeroinstall', 'zim', 'zinit', 'zplug', 'zypper'})ΒΆ

Adds mpm as its own manager alongside all those implemented.

meta_package_manager.labels.MANAGER_LABELS = {'am': 'πŸ“¦ manager: am', 'antidote': 'πŸ“¦ manager: zsh-based', 'antigen': 'πŸ“¦ manager: zsh-based', 'apk': 'πŸ“¦ manager: apk', 'apm': 'πŸ“¦ manager: apm', 'apt': 'πŸ“¦ manager: dpkg-based', 'apt-cyg': 'πŸ“¦ manager: apt-cyg', 'apt-mint': 'πŸ“¦ manager: dpkg-based', 'asdf': 'πŸ“¦ manager: asdf-based', 'basalt': 'πŸ“¦ manager: bash-based', 'bin': 'πŸ“¦ manager: bin', 'bob': 'πŸ“¦ manager: neovim-based', 'bpkg': 'πŸ“¦ manager: bash-based', 'brew': 'πŸ“¦ manager: homebrew', 'bun': 'πŸ“¦ manager: npm-based', 'cargo': 'πŸ“¦ manager: cargo', 'cask': 'πŸ“¦ manager: homebrew', 'cave': 'πŸ“¦ manager: cave', 'choco': 'πŸ“¦ manager: choco', 'chromebrew': 'πŸ“¦ manager: chromebrew', 'clib': 'πŸ“¦ manager: clib', 'composer': 'πŸ“¦ manager: composer', 'conda': 'πŸ“¦ manager: conda-based', 'cpan': 'πŸ“¦ manager: cpan', 'deb-get': 'πŸ“¦ manager: dpkg-based', 'dkp-pacman': 'πŸ“¦ manager: pacman-based', 'dnf': 'πŸ“¦ manager: rpm-based', 'dnf5': 'πŸ“¦ manager: rpm-based', 'dotnet': 'πŸ“¦ manager: dotnet', 'elan': 'πŸ“¦ manager: elan', 'emerge': 'πŸ“¦ manager: emerge', 'eopkg': 'πŸ“¦ manager: eopkg', 'fink': 'πŸ“¦ manager: dpkg-based', 'fisher': 'πŸ“¦ manager: fish-based', 'flatpak': 'πŸ“¦ manager: flatpak', 'fwupd': 'πŸ“¦ manager: fwupd', 'gcloud': 'πŸ“¦ manager: gcloud', 'gem': 'πŸ“¦ manager: gem', 'getnf': 'πŸ“¦ manager: getnf', 'gext': 'πŸ“¦ manager: gext', 'gh-ext': 'πŸ“¦ manager: gh-ext', 'ghcup': 'πŸ“¦ manager: ghcup', 'guix': 'πŸ“¦ manager: guix', 'haxelib': 'πŸ“¦ manager: haxelib', 'jpm': 'πŸ“¦ manager: jpm', 'juliaup': 'πŸ“¦ manager: juliaup', 'krew': 'πŸ“¦ manager: krew', 'lazy': 'πŸ“¦ manager: neovim-based', 'luarocks': 'πŸ“¦ manager: luarocks', 'macports': 'πŸ“¦ manager: macports', 'mamba': 'πŸ“¦ manager: conda-based', 'mas': 'πŸ“¦ manager: mas', 'mason': 'πŸ“¦ manager: neovim-based', 'micro': 'πŸ“¦ manager: micro', 'micromamba': 'πŸ“¦ manager: conda-based', 'miktex': 'πŸ“¦ manager: miktex', 'mise': 'πŸ“¦ manager: asdf-based', 'mpm': 'πŸ“¦ manager: mpm', 'nala': 'πŸ“¦ manager: dpkg-based', 'nimble': 'πŸ“¦ manager: nimble', 'nix': 'πŸ“¦ manager: nix', 'npm': 'πŸ“¦ manager: npm-based', 'oh-my-fish': 'πŸ“¦ manager: fish-based', 'ollama': 'πŸ“¦ manager: ollama', 'opam': 'πŸ“¦ manager: opam', 'opkg': 'πŸ“¦ manager: dpkg-based', 'pacaur': 'πŸ“¦ manager: pacman-based', 'pacman': 'πŸ“¦ manager: pacman-based', 'pacstall': 'πŸ“¦ manager: dpkg-based', 'pamac': 'πŸ“¦ manager: pacman-based', 'paru': 'πŸ“¦ manager: pacman-based', 'pikaur': 'πŸ“¦ manager: pacman-based', 'pip': 'πŸ“¦ manager: pypi-based', 'pipx': 'πŸ“¦ manager: pypi-based', 'pixi': 'πŸ“¦ manager: conda-based', 'pkcon': 'πŸ“¦ manager: pkcon', 'pkg': 'πŸ“¦ manager: pkg-based', 'pkg-tools': 'πŸ“¦ manager: pkg-tools', 'pkgin': 'πŸ“¦ manager: pkgin', 'pnpm': 'πŸ“¦ manager: npm-based', 'ports': 'πŸ“¦ manager: pkg-based', 'pwsh-gallery': 'πŸ“¦ manager: pwsh-gallery', 'pyenv': 'πŸ“¦ manager: pyenv', 'raco': 'πŸ“¦ manager: raco', 'rustup': 'πŸ“¦ manager: rustup', 'scoop': 'πŸ“¦ manager: scoop-based', 'sdkman': 'πŸ“¦ manager: sdkman', 'sfsu': 'πŸ“¦ manager: scoop-based', 'sheldon': 'πŸ“¦ manager: sheldon', 'slapt-get': 'πŸ“¦ manager: slapt-get', 'snap': 'πŸ“¦ manager: snap', 'soar': 'πŸ“¦ manager: soar', 'sorcery': 'πŸ“¦ manager: sorcery', 'spack': 'πŸ“¦ manager: spack', 'steamcmd': 'πŸ“¦ manager: steamcmd', 'stew': 'πŸ“¦ manager: stew', 'sun-tools': 'πŸ“¦ manager: sun-tools', 'swupd': 'πŸ“¦ manager: swupd', 'tazpkg': 'πŸ“¦ manager: tazpkg', 'tlmgr': 'πŸ“¦ manager: tlmgr', 'topgrade': 'πŸ“¦ manager: topgrade', 'trizen': 'πŸ“¦ manager: pacman-based', 'urpmi': 'πŸ“¦ manager: rpm-based', 'uv': 'πŸ“¦ manager: pypi-based', 'uvx': 'πŸ“¦ manager: pypi-based', 'vagrant': 'πŸ“¦ manager: vagrant', 'vcpkg': 'πŸ“¦ manager: vcpkg', 'vim-pack': 'πŸ“¦ manager: neovim-based', 'volta': 'πŸ“¦ manager: npm-based', 'vscode': 'πŸ“¦ manager: vscode-based', 'vscodium': 'πŸ“¦ manager: vscode-based', 'winget': 'πŸ“¦ manager: winget', 'xbps': 'πŸ“¦ manager: xbps', 'xcodes': 'πŸ“¦ manager: xcodes', 'yarn': 'πŸ“¦ manager: npm-based', 'yarn-berry': 'πŸ“¦ manager: npm-based', 'yay': 'πŸ“¦ manager: pacman-based', 'yazi': 'πŸ“¦ manager: yazi', 'yum': 'πŸ“¦ manager: rpm-based', 'zef': 'πŸ“¦ manager: zef', 'zerobrew': 'πŸ“¦ manager: homebrew', 'zeroinstall': 'πŸ“¦ manager: zeroinstall', 'zim': 'πŸ“¦ manager: zsh-based', 'zinit': 'πŸ“¦ manager: zsh-based', 'zplug': 'πŸ“¦ manager: zsh-based', 'zypper': 'πŸ“¦ manager: rpm-based'}ΒΆ

Maps all manager IDs to their labels.

meta_package_manager.labels.PLATFORM_LABELS = {'ALT Linux': 'πŸ–₯ platform: Linux', 'AlmaLinux': 'πŸ–₯ platform: Linux', 'Alpine Linux': 'πŸ–₯ platform: Linux', 'Amazon Linux': 'πŸ–₯ platform: Linux', 'Android': 'πŸ–₯ platform: Linux', 'Arch Linux': 'πŸ–₯ platform: Linux', 'Buildroot': 'πŸ–₯ platform: Linux', 'CachyOS': 'πŸ–₯ platform: Linux', 'CentOS': 'πŸ–₯ platform: Linux', 'ChromeOS': 'πŸ–₯ platform: Linux', 'Clear Linux OS': 'πŸ–₯ platform: Linux', 'CloudLinux OS': 'πŸ–₯ platform: Linux', 'Cygwin': 'πŸ–₯ platform: Unix', 'Debian': 'πŸ–₯ platform: Linux', 'DragonFly BSD': 'πŸ–₯ platform: BSD', 'EndeavourOS': 'πŸ–₯ platform: Linux', 'Exherbo Linux': 'πŸ–₯ platform: Linux', 'Fedora': 'πŸ–₯ platform: Linux', 'FreeBSD': 'πŸ–₯ platform: BSD', 'GNU/Hurd': 'πŸ–₯ platform: Unix', 'Generic Linux': 'πŸ–₯ platform: Linux', 'Gentoo Linux': 'πŸ–₯ platform: Linux', 'Guix System': 'πŸ–₯ platform: Linux', 'Haiku': 'πŸ–₯ platform: Unix', 'IBM AIX': 'πŸ–₯ platform: Unix', 'IBM PowerKVM': 'πŸ–₯ platform: Linux', 'IBM i': 'πŸ–₯ platform: Unix', 'KVM for IBM z Systems': 'πŸ–₯ platform: Linux', 'Kali Linux': 'πŸ–₯ platform: Linux', 'Linux Mint': 'πŸ–₯ platform: Linux', 'Mageia': 'πŸ–₯ platform: Linux', 'Mandriva Linux': 'πŸ–₯ platform: Linux', 'Manjaro Linux': 'πŸ–₯ platform: Linux', 'MidnightBSD': 'πŸ–₯ platform: BSD', 'NetBSD': 'πŸ–₯ platform: BSD', 'NixOS': 'πŸ–₯ platform: Linux', 'Nobara': 'πŸ–₯ platform: Linux', 'OpenBSD': 'πŸ–₯ platform: BSD', 'OpenWrt': 'πŸ–₯ platform: Linux', 'Oracle Linux': 'πŸ–₯ platform: Linux', 'Parallels': 'πŸ–₯ platform: Linux', 'Pidora': 'πŸ–₯ platform: Linux', 'PikaOS': 'πŸ–₯ platform: Linux', 'Raspbian': 'πŸ–₯ platform: Linux', 'RedHat Enterprise Linux': 'πŸ–₯ platform: Linux', 'Rocky Linux': 'πŸ–₯ platform: Linux', 'SUSE Linux Enterprise Server': 'πŸ–₯ platform: Linux', 'Scientific Linux': 'πŸ–₯ platform: Linux', 'Slackware': 'πŸ–₯ platform: Linux', 'SliTaz GNU/Linux': 'πŸ–₯ platform: Linux', 'Solaris': 'πŸ–₯ platform: Unix', 'Source Mage GNU/Linux': 'πŸ–₯ platform: Linux', 'SunOS': 'πŸ–₯ platform: BSD', 'Tuxedo OS': 'πŸ–₯ platform: Linux', 'Ubuntu': 'πŸ–₯ platform: Linux', 'Ultramarine': 'πŸ–₯ platform: Linux', 'Void Linux': 'πŸ–₯ platform: Linux', 'Windows': 'πŸ–₯ platform: Windows', 'Windows Subsystem for Linux v1': 'πŸ–₯ platform: Linux', 'Windows Subsystem for Linux v2': 'πŸ–₯ platform: Linux', 'XenServer': 'πŸ–₯ platform: Linux', 'illumos': 'πŸ–₯ platform: Unix', 'macOS': 'πŸ–₯ platform: macOS', 'openSUSE': 'πŸ–₯ platform: Linux'}ΒΆ

Maps all platform names to their labels.

meta_package_manager.labels.LABELS: list[tuple[str, str, str]] = [('πŸ“¦ manager: am', '#bfdadc', 'am'), ('πŸ“¦ manager: apk', '#bfdadc', 'apk'), ('πŸ“¦ manager: apm', '#bfdadc', 'apm'), ('πŸ“¦ manager: apt-cyg', '#bfdadc', 'apt-cyg'), ('πŸ“¦ manager: asdf-based', '#bfdadc', 'asdf, mise'), ('πŸ“¦ manager: bash-based', '#bfdadc', 'basalt, bpkg'), ('πŸ“¦ manager: bin', '#bfdadc', 'bin'), ('πŸ“¦ manager: cargo', '#bfdadc', 'cargo'), ('πŸ“¦ manager: cave', '#bfdadc', 'cave'), ('πŸ“¦ manager: choco', '#bfdadc', 'choco'), ('πŸ“¦ manager: chromebrew', '#bfdadc', 'chromebrew'), ('πŸ“¦ manager: clib', '#bfdadc', 'clib'), ('πŸ“¦ manager: composer', '#bfdadc', 'composer'), ('πŸ“¦ manager: conda-based', '#bfdadc', 'conda, mamba, micromamba, pixi'), ('πŸ“¦ manager: cpan', '#bfdadc', 'cpan'), ('πŸ“¦ manager: dotnet', '#bfdadc', 'dotnet'), ('πŸ“¦ manager: dpkg-based', '#bfdadc', 'apt, apt-mint, deb-get, fink, nala, opkg, pacstall'), ('πŸ“¦ manager: elan', '#bfdadc', 'elan'), ('πŸ“¦ manager: emerge', '#bfdadc', 'emerge'), ('πŸ“¦ manager: eopkg', '#bfdadc', 'eopkg'), ('πŸ“¦ manager: fish-based', '#bfdadc', 'fisher, oh-my-fish'), ('πŸ“¦ manager: flatpak', '#bfdadc', 'flatpak'), ('πŸ“¦ manager: fwupd', '#bfdadc', 'fwupd'), ('πŸ“¦ manager: gcloud', '#bfdadc', 'gcloud'), ('πŸ“¦ manager: gem', '#bfdadc', 'gem'), ('πŸ“¦ manager: getnf', '#bfdadc', 'getnf'), ('πŸ“¦ manager: gext', '#bfdadc', 'gext'), ('πŸ“¦ manager: gh-ext', '#bfdadc', 'gh-ext'), ('πŸ“¦ manager: ghcup', '#bfdadc', 'ghcup'), ('πŸ“¦ manager: guix', '#bfdadc', 'guix'), ('πŸ“¦ manager: haxelib', '#bfdadc', 'haxelib'), ('πŸ“¦ manager: homebrew', '#bfdadc', 'brew, cask, zerobrew'), ('πŸ“¦ manager: jpm', '#bfdadc', 'jpm'), ('πŸ“¦ manager: juliaup', '#bfdadc', 'juliaup'), ('πŸ“¦ manager: krew', '#bfdadc', 'krew'), ('πŸ“¦ manager: luarocks', '#bfdadc', 'luarocks'), ('πŸ“¦ manager: macports', '#bfdadc', 'macports'), ('πŸ“¦ manager: mas', '#bfdadc', 'mas'), ('πŸ“¦ manager: micro', '#bfdadc', 'micro'), ('πŸ“¦ manager: miktex', '#bfdadc', 'miktex'), ('πŸ“¦ manager: mpm', '#bfdadc', 'mpm'), ('πŸ“¦ manager: neovim-based', '#bfdadc', 'bob, lazy, mason, vim-pack'), ('πŸ“¦ manager: nimble', '#bfdadc', 'nimble'), ('πŸ“¦ manager: nix', '#bfdadc', 'nix'), ('πŸ“¦ manager: npm-based', '#bfdadc', 'bun, npm, pnpm, volta, yarn, yarn-berry'), ('πŸ“¦ manager: ollama', '#bfdadc', 'ollama'), ('πŸ“¦ manager: opam', '#bfdadc', 'opam'), ('πŸ“¦ manager: pacman-based', '#bfdadc', 'dkp-pacman, pacaur, pacman, pamac, paru, pikaur, trizen, yay'), ('πŸ“¦ manager: pkcon', '#bfdadc', 'pkcon'), ('πŸ“¦ manager: pkg-based', '#bfdadc', 'pkg, ports'), ('πŸ“¦ manager: pkg-tools', '#bfdadc', 'pkg-tools'), ('πŸ“¦ manager: pkgin', '#bfdadc', 'pkgin'), ('πŸ“¦ manager: pwsh-gallery', '#bfdadc', 'pwsh-gallery'), ('πŸ“¦ manager: pyenv', '#bfdadc', 'pyenv'), ('πŸ“¦ manager: pypi-based', '#bfdadc', 'pip, pipx, uv, uvx'), ('πŸ“¦ manager: raco', '#bfdadc', 'raco'), ('πŸ“¦ manager: rpm-based', '#bfdadc', 'dnf, dnf5, urpmi, yum, zypper'), ('πŸ“¦ manager: rustup', '#bfdadc', 'rustup'), ('πŸ“¦ manager: scoop-based', '#bfdadc', 'scoop, sfsu'), ('πŸ“¦ manager: sdkman', '#bfdadc', 'sdkman'), ('πŸ“¦ manager: sheldon', '#bfdadc', 'sheldon'), ('πŸ“¦ manager: slapt-get', '#bfdadc', 'slapt-get'), ('πŸ“¦ manager: snap', '#bfdadc', 'snap'), ('πŸ“¦ manager: soar', '#bfdadc', 'soar'), ('πŸ“¦ manager: sorcery', '#bfdadc', 'sorcery'), ('πŸ“¦ manager: spack', '#bfdadc', 'spack'), ('πŸ“¦ manager: steamcmd', '#bfdadc', 'steamcmd'), ('πŸ“¦ manager: stew', '#bfdadc', 'stew'), ('πŸ“¦ manager: sun-tools', '#bfdadc', 'sun-tools'), ('πŸ“¦ manager: swupd', '#bfdadc', 'swupd'), ('πŸ“¦ manager: tazpkg', '#bfdadc', 'tazpkg'), ('πŸ“¦ manager: tlmgr', '#bfdadc', 'tlmgr'), ('πŸ“¦ manager: topgrade', '#bfdadc', 'topgrade'), ('πŸ“¦ manager: vagrant', '#bfdadc', 'vagrant'), ('πŸ“¦ manager: vcpkg', '#bfdadc', 'vcpkg'), ('πŸ“¦ manager: vscode-based', '#bfdadc', 'vscode, vscodium'), ('πŸ“¦ manager: winget', '#bfdadc', 'winget'), ('πŸ“¦ manager: xbps', '#bfdadc', 'xbps'), ('πŸ“¦ manager: xcodes', '#bfdadc', 'xcodes'), ('πŸ“¦ manager: yazi', '#bfdadc', 'yazi'), ('πŸ“¦ manager: zef', '#bfdadc', 'zef'), ('πŸ“¦ manager: zeroinstall', '#bfdadc', 'zeroinstall'), ('πŸ“¦ manager: zsh-based', '#bfdadc', 'antidote, antigen, zim, zinit, zplug'), ('πŸ”Œ plugin', '#fef2c0', 'SwiftBar/Xbar/GNOME Shell plugin code, documentation and features'), ('πŸ–₯ platform: BSD', '#bfd4f2', 'DragonFly BSD, FreeBSD, MidnightBSD, NetBSD, OpenBSD, SunOS'), ('πŸ–₯ platform: Linux', '#bfd4f2', 'AlmaLinux, Alpine Linux, ALT Linux, Amazon Linux, Android, Arch Linux, Buildroot, CachyOS, CentOS, …'), ('πŸ–₯ platform: macOS', '#bfd4f2', 'macOS'), ('πŸ–₯ platform: Unix', '#bfd4f2', 'Cygwin, GNU/Hurd, Haiku, IBM AIX, IBM i, illumos, Solaris'), ('πŸ–₯ platform: Windows', '#bfd4f2', 'Windows')]ΒΆ

Global registry of all labels used in the project.

Structure:

("label_name", "color", "optional_description")
meta_package_manager.labels.LABEL_RENAMES: dict[str, tuple[str, ...]] = {'πŸ“¦ manager: conda-based': ('πŸ“¦ manager: conda',), 'πŸ“¦ manager: pypi-based': ('πŸ“¦ manager: pip-based',)}ΒΆ

Labels a renamed one supersedes, emitted as labelmaker’s rename-from.

Folding managers into a group orphans the labels they used to carry, and the issues already filed against those. rename-from migrates one in place, which is the only lossless move available: GitHub keeps every issue and pull request attached across a rename, whereas creating the new label and deleting the old one drops the association.

The mechanism is strictly one-to-one, so this map cannot express a merge: labelmaker errors outright when two rename-from labels both exist, and falls to on-rename-clash (error, repomatic’s default) when the target already exists. An N-to-1 fold therefore names the single source carrying the most history, leaving the remainder to a hand migration, and a fold whose target label already exists names none at all.

conda-based is the same lossless shape: only conda carries history, pixi arrives with no label of its own, and the target does not exist yet, so the fold is genuinely one-to-one.

dpkg-based, zsh-based and asdf-based were all synced into existence before their predecessors were retired, so a declared rename would only error; their orphans (fink, zinit, asdf, mise) carry no issue or pull request at all and are deleted rather than migrated. vim-based was created on those same terms, orphaning vim-pack, and has since been folded into neovim-based.

bash-based names no source either, for the other reason: it folds two labels rather than one, and basalt and bpkg both carry zero issues and zero pull requests, so there is no history for the single rename slot to preserve. neovim-based is that same shape, folding vim-based and mason, which likewise carry zero of each.

meta_package_manager.labels.CONTENT_RULES_STATIC: TLabelRules = [('πŸ”Œ plugin', ('gnome shell', 'gnome-shell', 'plugin', 'swiftbar', 'xbar'))]ΒΆ

Curated keywords feeding the content rules of labels not derived from the pool.

Holds bare keywords, like every other content rule: repomatic’s apply-labels does the anchoring and case-folding (see generate_content_rules()).

meta_package_manager.labels.FILE_RULES_STATIC: TLabelRules = [('πŸ”Œ plugin', ('gnome-shell/**', 'meta_package_manager/bar_plugin*', 'tests/*bar_plugin*', 'tests/*gnome*', 'tests/gnome/**')), ('πŸ“¦ manager: mpm', ('meta_package_manager/*',))]ΒΆ

File rules for labels that are not derived from the pool.

mpm gets no content rule: as the project’s own name it would match nearly every issue and PR.

meta_package_manager.labels.MANAGER_CONTENT_KEYWORDS: dict[str, tuple[str, ...]] = {'apk': ('alpine', 'alpine linux'), 'apm': ('atom',), 'apt-cyg': ('cygwin',), 'asdf-based': ('asdf-vm', 'mise-en-place'), 'cargo': ('crate', 'rust'), 'cave': ('exherbo', 'paludis'), 'choco': ('chocolatey',), 'chromebrew': ('chrome os', 'chromeos'), 'composer': ('php',), 'conda-based': ('anaconda', 'conda-forge', 'miniconda', 'prefix.dev'), 'cpan': ('perl',), 'dotnet': ('nuget',), 'dpkg-based': ('aptitude', 'debian', 'dpkg', 'ubuntu'), 'emerge': ('gentoo', 'portage'), 'eopkg': ('solus',), 'flatpak': ('flathub',), 'fwupd': ('lvfs',), 'gem': ('ruby',), 'getnf': ('nerd font', 'nerd fonts'), 'gh-ext': ('gh extension', 'github cli'), 'guix': ('gnu guix',), 'homebrew': ('homebrew',), 'mas': ('app store', 'app-store'), 'nix': ('nixos', 'nixpkgs'), 'npm-based': ('node.js', 'nodejs'), 'pacman-based': ('arch',), 'pkcon': ('packagekit',), 'pkg-based': ('freebsd', 'freebsd ports'), 'pkg-tools': ('openbsd',), 'pkgin': ('netbsd', 'pkgsrc'), 'pwsh-gallery': ('powershell', 'powershell gallery', 'psgallery', 'psresourceget'), 'pypi-based': ('pypi',), 'rpm-based': ('fedora', 'mageia', 'opensuse', 'redhat', 'rhel', 'rpm', 'suse'), 'sdkman': ('sdk man',), 'slapt-get': ('slackware',), 'snap': ('snapcraft',), 'sorcery': ('source mage',), 'steamcmd': ('valve',), 'sun-tools': ('solaris', 'svr4'), 'swupd': ('clear linux', 'clearlinux'), 'tazpkg': ('slitaz',), 'tlmgr': ('ctan', 'tex live', 'texlive'), 'vscode-based': ('visual studio', 'visual studio code'), 'xbps': ('void linux',)}ΒΆ

Curated ecosystem keywords feeding each manager label’s content rule.

Keyed by the manager or group ID the label derives from. These are the only content patterns a manager label gets: the bare manager IDs are deliberately left out (see generate_content_rules()). Add only terms that are both unambiguously about this manager and absent from anything mpm prints itself: the βœ“ <id> trail, the <id>: <count> summary line, the managers table (which lists every manager’s ID and CLI binary) and the $-prompt command disclosure. That rules out manager IDs and CLI names (fwupdmgr, pwsh), leaving the distro, language and brand names a human types in an issue. A manager with no such term gets no content rule and is labelled by hand.

Skip anything that doubles as a common word even once word-anchored (port, flat, mint, void): dropping the ID removed the implicit AND-guard those leaned on, so on their own they match unrelated prose.

meta_package_manager.labels.PLATFORM_CONTENT_KEYWORDS: dict[str, tuple[str, ...]] = {'BSD': ('bsd',), 'Linux': ('linux',), 'Unix': ('unix',), 'Windows': ('c:', 'microsoft', 'windows'), 'macOS': ('apple', 'mac os', 'macos', 'os x', 'osx')}ΒΆ

Curated keywords feeding each platform label’s content rule.

meta_package_manager.labels.generate_content_rules()[source]ΒΆ

Build every content rule: the static ones plus one per manager or platform label that has curated keywords.

Manager labels are driven solely by MANAGER_CONTENT_KEYWORDS, never by the bare manager IDs or CLI names. mpm enumerates every installed manager in its own output (the βœ“ <id> trail, the <id>: <count> summary line, the managers table), so a pasted trace would otherwise make every manager on the user’s system match at once: a cpan-only report came back tagged mise, pip and uv merely because they sat in the trace. The keywords are the distro, language and brand names a human types, which mpm never prints.

Keywords are emitted raw, one pattern each, because repomatic’s apply-labels applies a label as soon as any one of its patterns matches, and compiles a bare pattern case-insensitively with a \b anchor on each edge that is itself a word character. That is what the retired github/issue-labeler needed hand-built here: its all-of semantics forced a /…/i alternation to mean β€œany keyword wins”, and its case-sensitive default forced the i flag. Keep the keywords bare, and reach for the /body/flags escape hatch only for something an anchored literal cannot express.

A label with no keyword is skipped: that manager gets no content rule, only its file rule. Rules are sorted by label, and each label’s keywords among themselves, both cases folded.

Return type:

list[tuple[str, tuple[str, ...]]]

meta_package_manager.labels.generate_file_rules()[source]ΒΆ

Build every file rule: static ones plus one per manager label.

A manager label matches its members’ definition files (Python modules and bundled TOML files alike, anchored on the full stem so pkg.* never swallows pkgin.toml or pkcon.py) and any test file carrying a member’s stem or ID. Platform labels have no file rule: no file is platform-specific.

Return type:

list[tuple[str, tuple[str, ...]]]