Skip to content

Conversation

@dmcgowan
Copy link
Member

@dmcgowan dmcgowan commented May 14, 2025

This adds support for release-note code blocks within PRs body, an approach to adding release notes done within Kubernetes and Moby.

The release notes take the place of the PR title when added to highlights.

Includes support for multiple categories and filtering out categories which have no description.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for release notes within pull request bodies using code blocks formatted as release-note, following the Kubernetes community approach. The implementation extracts release notes from PR bodies and prioritizes PRs with release notes at the top of each category in the generated changelog.

Key changes:

  • Added functionality to extract release notes from PR body text using regex pattern matching
  • Modified the template to display release notes above the standard PR link format
  • Updated change objects to include a ReleaseNote field and prioritized sorting

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
main.go Added ReleaseNote field to the change struct
github.go Extended PR info fetching to include body content and extract release notes
util.go Implemented release note extraction logic and sorting to prioritize PRs with release notes
template.go Updated template to render release notes above standard PR formatting
util_test.go Added comprehensive test coverage for release note extraction functionality
Comments suppressed due to low confidence (1)

util.go:725

  • The variable name 'changes' shadows the parameter 'changes []projectChange' from the function signature. Consider using a different name like 'categoryChanges' to avoid confusion.
		changes := categories[category]

Ignore categories with no description

Signed-off-by: Derek McGowan <[email protected]>
@dmcgowan dmcgowan merged commit 18ddfa1 into containerd:main Sep 6, 2025
1 check passed
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.

2 participants