MCPcopy Create free account
hub / github.com/AstrBotDevs/AstrBot / release_commits

Function release_commits

scripts/prepare_release.py:130–148  ·  view source on GitHub ↗

Read commit subjects for the release range. Args: tag: Latest tag to use as the lower bound. When empty, all reachable commits are considered. Returns: Commit subjects formatted for changelog draft entries. Raises: ReleaseError: Git log fails.

(tag: str)

Source from the content-addressed store, hash-verified

128
129
130def release_commits(tag: str) -> list[str]:
131 """Read commit subjects for the release range.
132
133 Args:
134 tag: Latest tag to use as the lower bound. When empty, all reachable
135 commits are considered.
136
137 Returns:
138 Commit subjects formatted for changelog draft entries.
139
140 Raises:
141 ReleaseError: Git log fails.
142 """
143 log_range = f"{tag}..HEAD" if tag else "HEAD"
144 output = git(
145 ["log", "--reverse", "--pretty=format:%s (%h)", log_range],
146 capture_output=True,
147 )
148 return [line for line in output.splitlines() if line.strip()]
149
150
151def update_pyproject_version(version: str) -> Path:

Callers 1

mainFunction · 0.85

Calls 1

gitFunction · 0.85

Tested by

no test coverage detected