1
0
mirror of https://github.com/emilk/egui.git synced 2026-06-26 22:53:14 -04:00

Release 0.23.0 - New image API

This commit is contained in:
Emil Ernerfeldt
2023-09-27 16:46:56 +02:00
parent 9b2bcdb4a2
commit 5a0186fa2b
25 changed files with 240 additions and 63 deletions

View File

@@ -3,7 +3,8 @@
"""
Summarizes recent PRs based on their GitHub labels.
The result can be copy-pasted into CHANGELOG.md, though it often needs some manual editing too.
The result can be copy-pasted into CHANGELOG.md,
though it often needs some manual editing too.
"""
import multiprocessing
@@ -89,7 +90,9 @@ def fetch_pr_info(pr_number: int) -> Optional[PrInfo]:
def get_commit_info(commit: Any) -> CommitInfo:
match = re.match(r"(.*) \(#(\d+)\)", commit.summary)
if match:
return CommitInfo(hexsha=commit.hexsha, title=str(match.group(1)), pr_number=int(match.group(2)))
title = str(match.group(1))
pr_number = int(match.group(2))
return CommitInfo(hexsha=commit.hexsha, title=title, pr_number=pr_number)
else:
return CommitInfo(hexsha=commit.hexsha, title=commit.summary, pr_number=None)
@@ -104,8 +107,9 @@ def print_section(crate: str, items: List[str]) -> None:
if 0 < len(items):
print(f"#### {crate}")
for line in items:
line = remove_prefix(line, f"{crate}: ")
line = remove_prefix(line, f"[{crate}] ")
line = remove_prefix(line, f"{crate}: ")
line = remove_prefix(line, f"`{crate}`: ")
print(f"* {line}")
print()
@@ -152,9 +156,16 @@ def main() -> None:
summary = f"{title} [{hexsha[:7]}](https://github.com/{OWNER}/{REPO}/commit/{hexsha})"
unsorted_commits.append(summary)
else:
title = pr_info.pr_title if pr_info else title # We prefer the PR title if available
# We prefer the PR title if available
title = pr_info.pr_title if pr_info else title
labels = pr_info.labels if pr_info else []
if 'exclude from changlog' in labels:
continue
if 'typo' in labels:
# We get so many typo PRs. Let's not flood the changelog with them.
continue
summary = f"{title} [#{pr_number}](https://github.com/{OWNER}/{REPO}/pull/{pr_number})"
if INCLUDE_LABELS and 0 < len(labels):
@@ -165,9 +176,6 @@ def main() -> None:
if gh_user_name not in OFFICIAL_DEVS:
summary += f" (thanks [@{gh_user_name}](https://github.com/{gh_user_name})!)"
if 'typo' in labels:
continue # We get so many typo PRs. Let's not flood the changelog with them.
added = False
for crate in crate_names: