Skip to content

Commit

Permalink
generate_changelog.py: add sections for "Performance" and "Removed"
Browse files Browse the repository at this point in the history
  • Loading branch information
emilk committed Jan 29, 2025
1 parent 6be1713 commit 8d2c8c2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions scripts/generate_changelog.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,21 +154,29 @@ def changelog_from_prs(pr_infos: List[PrInfo], crate_name: str) -> str:

fixed = []
added = []
performance = []
removed = []
rest = []
for pr in pr_infos:
summary = pr_summary(pr, crate_name)
if summary.startswith("Fix") or "bug" in pr.labels:
fixed.append(pr)
elif summary.startswith("Add") or "feature" in pr.labels:
added.append(pr)
elif "performance" in pr.labels:
performance.append(pr)
elif summary.startswith("Remove"):
removed.append(pr)
else:
rest.append(pr)

result = ""

result += pr_info_section(added, crate_name=crate_name, heading="⭐ Added")
result += pr_info_section(rest, crate_name=crate_name, heading="🔧 Changed")
result += pr_info_section(removed, crate_name=crate_name, heading="🔥 Removed")
result += pr_info_section(fixed, crate_name=crate_name, heading="🐛 Fixed")
result += pr_info_section(performance, crate_name=crate_name, heading="🚀 Performance")

return result.rstrip()

Expand Down

0 comments on commit 8d2c8c2

Please sign in to comment.