(category: str, commits: list[CommitRow])
| 571 | |
| 572 | |
| 573 | def render_category_markdown(category: str, commits: list[CommitRow]) -> str: |
| 574 | lines = [get_markdown_header(category), f'## {category}\n\n'] |
| 575 | topics = ordered_values((commit.topic for commit in commits), PR_TYPES) |
| 576 | for topic in topics: |
| 577 | topic_commits = [commit for commit in commits if commit.topic == topic] |
| 578 | if not topic_commits: |
| 579 | continue |
| 580 | lines.append(f'### {topic}\n\n') |
| 581 | for commit in topic_commits: |
| 582 | lines.append( |
| 583 | f'- {markdown_entry_text(commit)} ({get_hash_or_pr_url(commit)})\n' |
| 584 | ) |
| 585 | lines.append('\n') |
| 586 | return ''.join(lines) |
| 587 | |
| 588 | |
| 589 | def write_csv(path: Path, rows: list[CommitRow]) -> None: |
no test coverage detected