mirror of
https://github.com/minetest/contentdb.git
synced 2024-12-22 22:12:24 +01:00
Ignore merge commits in release notes generation
This commit is contained in:
parent
59fad153ae
commit
813db2b8f9
@ -153,7 +153,9 @@ def get_commit_list(git_url: str, start: str, end: str) -> List[str]:
|
|||||||
|
|
||||||
def get_release_notes(git_url: str, start: str, end: str) -> Optional[str]:
|
def get_release_notes(git_url: str, start: str, end: str) -> Optional[str]:
|
||||||
commits = get_commit_list(git_url, start, end)
|
commits = get_commit_list(git_url, start, end)
|
||||||
|
commits = [x for x in commits if not x.startswith("Merge ")]
|
||||||
if len(commits) == 0:
|
if len(commits) == 0:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
return normalize_line_endings("\n".join(map(lambda x: f"- {x}", commits)) + f"\n<!-- auto from {start} to {end} -->")
|
text = "\n".join(map(lambda x: f"- {x}", commits)) + f"\n<!-- auto from {start[0:5]} to {end[0:5]} -->"
|
||||||
|
return normalize_line_endings(text)
|
||||||
|
Loading…
Reference in New Issue
Block a user