Skip to content

fix: preserve New Contributors section with --group-by-type#4

Merged
barredterra merged 4 commits intomainfrom
copilot/preserve-new-contributors-section
Feb 14, 2026
Merged

fix: preserve New Contributors section with --group-by-type#4
barredterra merged 4 commits intomainfrom
copilot/preserve-new-contributors-section

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 3, 2026

GitHub's auto-generated "New Contributors" section was dropped when grouping release notes by conventional commit type.

Root Cause

The serialize() method filtered out lines without a change object. New contributor lines have is_new_contributor=True but change=None, so they were discarded during grouping.

Changes

  • models/release_notes.py: Collect new contributor lines in separate list, emit as dedicated section after type-grouped changes
  • tests/test_release_notes.py: Add tests for grouped and non-grouped cases

Before/After

Before:

## Features
* Added new dashboard (...)

## Bug Fixes
* Fixed login bug (...)

**Authors**: @alice, @bob

After:

## Features
* Added new dashboard (...)

## Bug Fixes
* Fixed login bug (...)

## New Contributors
* @alice made their first contribution in #1
* @bob made their first contribution in #2

**Authors**: @alice, @bob

The section now appears after all change groups but before Authors/Reviewers, matching GitHub's convention.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/nonexistent-owner/nonexistent-repo
    • Triggering command: /usr/bin/python python -m pytest -x --tb=line -v (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>The new contributors section gets lost when --group-by-type is used</issue_title>
<issue_description>The section looks roughly like this

## New Contributors
* @barredterra made their first contribution in https://github.com/barredterra/pretty_release_notes/pull/1

We need to preserve it when --group-by-type is active.</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits February 3, 2026 15:22
Co-authored-by: barredterra <14891507+barredterra@users.noreply.github.com>
Co-authored-by: barredterra <14891507+barredterra@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix issue with new contributors section in grouped output Preserve New Contributors section with --group-by-type Feb 3, 2026
Copilot AI requested a review from barredterra February 3, 2026 15:34
@barredterra barredterra marked this pull request as ready for review February 14, 2026 14:54
@barredterra barredterra changed the title Preserve New Contributors section with --group-by-type fix: preserve New Contributors section with --group-by-type Feb 14, 2026
@barredterra barredterra merged commit 04d8c67 into main Feb 14, 2026
3 checks passed
@barredterra barredterra deleted the copilot/preserve-new-contributors-section branch February 14, 2026 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The new contributors section gets lost when --group-by-type is used

2 participants