Skip to content

Fix PR description including already shipped PRs when using fixedMajorVersion#317

Merged
Songmu merged 2 commits intoSongmu:mainfrom
Konboi:fix-multi-ver-description
Feb 25, 2026
Merged

Fix PR description including already shipped PRs when using fixedMajorVersion#317
Songmu merged 2 commits intoSongmu:mainfrom
Konboi:fix-multi-ver-description

Conversation

@Konboi
Copy link
Contributor

@Konboi Konboi commented Feb 22, 2026

Why

When tagpr.fixedMajorVersion is configured (e.g., maintaining v1.x on one branch and v2.x on another), the release PR description incorrectly lists PRs that were already shipped under a different major version line.

This happens because gh2changelog picks the globally latest tag as previousTag for GitHub's GenerateReleaseNotes API without considering the major version filter. For example, when releasing v1.121.2, it compares against v2.4.0 instead of v1.121.1, causing all PRs between those two tags to appear in the description.

ref: cloudbees-oss/smart-tests-cli#1244 and cloudbees-oss/smart-tests-cli#1245

What

  • Added FilteredMajorVersion option to gh2changelog that filters semver tags by major version before selecting previousTag
  • Passed fixedMajorVersion from the tagpr config into gh2changelog via the new option
  • This ensures the changelog comparison stays within the same major version line

@Songmu Songmu merged commit 27fc089 into Songmu:main Feb 25, 2026
3 checks passed
This was referenced Feb 25, 2026
Konboi added a commit to cloudbees-oss/smart-tests-cli that referenced this pull request Feb 25, 2026
ono-max pushed a commit to cloudbees-oss/smart-tests-cli that referenced this pull request Mar 4, 2026
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