On this page
Status command that displays a project summary including current version, branch, last tag, and changelog coverage for unreleased work.
#rlsbl.commands.status
#rlsbl.commands.status
Status command that displays a project summary including current version, branch, last tag, and changelog coverage for unreleased work.
#_compare_versions
def _compare_versions(local, remote)Compare two semver version strings.
Returns "AHEAD" if local > remote, "BEHIND" if local < remote, "SAME" if equal, or "ERROR" if either version cannot be parsed.
#_collect_status
def _collect_status(registry, target_path='.', *, tag_glob=None, ctx, project=None, flags=None, changes_dir=None, scope=None)Collect status data as a dict.
When tag_glob is set (monorepo mode), it scopes the release record read so coverage is computed against this project's own releases.
When scope is set (monorepo mode), unreleased commits are filtered to those touching a file the scope's members own, so the count reflects actual project-specific changes. A releasable's scope spans every member -- a commit touching ANY member is the releasable's commit -- and a root member's scope covers every file no other member claims.
changes_dir overrides where the JSONL changelog lives; releasable members keep theirs under the releasable, not the member package.
When flags contains "registry": True, queries the package registry for the latest published version and computes drift.
Returns (data, latest) -- the machine payload and the :class:~rlsbl.release_record.LatestReleaseFact it was built from. The fact comes back because the payload flattens it into two nullable fields, and the human line is rendered by the fact's OWN renderer (label()) rather than by a second annotation pass over those fields.
Exits and prints an error if the project does not exist.
#run_cmd
def run_cmd(registry, args, flags, ctx)Status command handler.
Shows a quick 'where am I' summary: package info, git state, changelog, CI. Returns the collected status dict -- the caller (the CLI handler) hands it to the framework as the command's machine payload. Human output is printed here unless flags["json"] is set, in which case machine mode owns stdout and nothing human may reach it.