INNER CODE UNIT · Python
get_commit_list
deltazefiro/Amarok-Hider · .github/scripts/summarize_translation_contrib.py:32
def get_commit_list(start: str, end: str) -> List[str]:
"""Get list of commits between start and end."""
commit_range = f"{start}..{end}" if start else end
try:
result = subprocess.run(
["git", "log", "--format=%H", "--grep=Translation", commit_range],
capture_output=True,
text=True,
check=True,
)
commits = [
line.strip() for line in result.stdout.strip().split("\n") if line.strip()
]
return commits
except subprocess.CalledProcessError as e:
print(f"Error: Failed to get commit list", file=sys.stderr)
print(f"Git error: {e.stderr}", file=sys.stderr)