On this page
Resolve abbreviated git commit hashes in changelog entries to full SHA-1 hashes and validate they exist in the repository.
#rlsbl.changelog.resolve
#rlsbl.changelog.resolve
Resolve abbreviated git commit hashes in changelog entries to full SHA-1 hashes and validate they exist in the repository.
#resolve_hash
def resolve_hash(hash_str: str, *, cwd: str | None=None) -> str | NoneResolve a (possibly abbreviated) commit hash to a full 40-char SHA.
cwd is the repository to resolve in; None means the process CWD (the historical behavior). Callers that may run from outside the target repo must pass it explicitly.
Returns None if the hash doesn't resolve in that repo.
#resolve_hashes
def resolve_hashes(hashes: list[str], *, cwd: str | None=None) -> dict[str, str | None]Batch-resolve a list of commit hashes.
cwd is the repository to resolve in; None means the process CWD.
Returns a mapping from each input hash to its full 40-char SHA, or None if it doesn't resolve.
#_git_log_hashes
def _git_log_hashes(range_spec: str) -> list[str]Get commit hashes from git log for a given range spec.
Returns a list of full 40-char SHAs, or empty list on error.
#_get_last_version_tag
def _get_last_version_tag(tag_glob: str | None=None, *, cwd=None) -> str | NoneResolve the last version tag, accepting None for tag_glob.
None means the plain v* glob (standalone repos); monorepo callers pass their project's glob. cwd selects the repository.
#_unreleased_range
def _unreleased_range(tag_glob: str | None=None, *, cwd=None) -> strReturn the git log range spec for unreleased commits.
Uses