generate_changelog.py: add sections for "Performance" and "Removed"

This commit is contained in:
Emil Ernerfeldt 2025-01-29 13:07:05 +01:00
parent 6be17136f2
commit 8d2c8c203c
1 changed files with 8 additions and 0 deletions

View File

@ -154,6 +154,8 @@ def changelog_from_prs(pr_infos: List[PrInfo], crate_name: str) -> str:
fixed = [] fixed = []
added = [] added = []
performance = []
removed = []
rest = [] rest = []
for pr in pr_infos: for pr in pr_infos:
summary = pr_summary(pr, crate_name) summary = pr_summary(pr, crate_name)
@ -161,6 +163,10 @@ def changelog_from_prs(pr_infos: List[PrInfo], crate_name: str) -> str:
fixed.append(pr) fixed.append(pr)
elif summary.startswith("Add") or "feature" in pr.labels: elif summary.startswith("Add") or "feature" in pr.labels:
added.append(pr) added.append(pr)
elif "performance" in pr.labels:
performance.append(pr)
elif summary.startswith("Remove"):
removed.append(pr)
else: else:
rest.append(pr) rest.append(pr)
@ -168,7 +174,9 @@ def changelog_from_prs(pr_infos: List[PrInfo], crate_name: str) -> str:
result += pr_info_section(added, crate_name=crate_name, heading="⭐ Added") 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(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(fixed, crate_name=crate_name, heading="🐛 Fixed")
result += pr_info_section(performance, crate_name=crate_name, heading="🚀 Performance")
return result.rstrip() return result.rstrip()