Skip to content

Conversation

@bdraco
Copy link
Member

@bdraco bdraco commented Dec 10, 2025

Description:

Fixes a bug in the release notes generator where PRs that were already included in the previous release cycle would incorrectly appear in the new release's notes.

The Problem:

When generating release notes for version 2025.12.0, the script compares 2025.11.5...2025.12.0b1. This comparison shows commits reachable from 2025.12.0b1 but not from 2025.11.5.

Due to the backmerge workflow (merging beta into dev after releases), commits from the previous beta cycle are in dev's history. Since 2025.11.5 is on the release branch and 2025.12.0b1 is on dev, PRs that were in the 2025.11.0 betas appear as "new" commits even though they were already released.

The Fix:

  • Renamed _get_patch_release_prs() to _get_previous_release_prs()
  • The method now collects PRs from both beta releases AND patch releases of the previous version
  • These PRs are excluded when generating release notes for the next version
  • This ensures PRs are only listed in the release where they first appeared

Example:

  • PR #11953 was included in 2025.11.0b4
  • Due to the betadev backmerge, the commit appears in git log 2025.11.5...2025.12.0b1
  • Previously: It incorrectly appeared in 2025.12.0 release notes
  • Now: It is correctly excluded from 2025.12.0 release notes

Related issue (if applicable): N/A

Pull request in esphome with YAML changes (if applicable): N/A

Checklist:

  • I am merging into next because this is new documentation that has a matching pull-request in esphome as linked above.
    or

  • I am merging into current because this is a fix, change and/or adjustment in the current documentation and is not for a new component or feature.

  • Link added in /components/_index.md when creating new documents for new components or cookbook. (N/A - script change only)

@esphome esphome bot added the next label Dec 10, 2025
@netlify
Copy link

netlify bot commented Dec 10, 2025

Deploy Preview for esphome ready!

Name Link
🔨 Latest commit 1c4e4b3
🔍 Latest deploy log https://app.netlify.com/projects/esphome/deploys/6938f9f17bfbca00071cff6c
😎 Deploy Preview https://deploy-preview-5758--esphome.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@bdraco bdraco marked this pull request as ready for review December 10, 2025 04:46
Copilot AI review requested due to automatic review settings December 10, 2025 04:46
@netlify
Copy link

netlify bot commented Dec 10, 2025

Deploy Preview for esphome ready!

Name Link
🔨 Latest commit db970e6
🔍 Latest deploy log https://app.netlify.com/projects/esphome/deploys/6938fa6346ef310008f0a37c
😎 Deploy Preview https://deploy-preview-5758--esphome.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Contributor

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 fixes a bug in the release notes generator where pull requests from previous release beta versions were incorrectly appearing in new release notes due to the backmerge workflow between beta and dev branches.

Key Changes:

  • Refactored PR collection logic to use a generic _collect_prs_from_tags() helper method
  • Renamed _get_patch_release_prs() to _get_previous_release_prs() and extended it to collect PRs from both beta releases and patch releases
  • Updated discover_prs() to exclude all PRs from the previous release cycle (betas + patches), not just patches

@netlify
Copy link

netlify bot commented Dec 10, 2025

Deploy Preview for esphome ready!

Name Link
🔨 Latest commit c1b62df
🔍 Latest deploy log https://app.netlify.com/projects/esphome/deploys/6938fc245ef52b00081a7f6b
😎 Deploy Preview https://deploy-preview-5758--esphome.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@swoboda1337 swoboda1337 merged commit bbedc45 into next Dec 10, 2025
5 checks passed
@swoboda1337 swoboda1337 deleted the fix_release_notes_gen_exclude_beta_patches branch December 10, 2025 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants