Fixing auto-backport to use v4.25.0 as latest release #3963
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
The
gh release listcommand sorts by when a release was created, not when it was published. This caused it to backport fixes tov4.24.xright now, instead ofv4.25.x.Example output from running
gh release list --limit 3 --exclude-pre-releases --exclude-drafts --json tagName,publishedAt,createdAt:[ { "createdAt": "2026-01-14T13:56:25Z", "publishedAt": "2026-01-14T13:59:00Z", "tagName": "v4.24.2" }, { "createdAt": "2026-01-14T13:26:34Z", "publishedAt": "2026-01-15T13:28:55Z", "tagName": "v4.25.0" }, { "createdAt": "2025-12-15T06:31:31Z", "publishedAt": "2025-12-15T08:03:08Z", "tagName": "v4.24.1" } ]This problem happened because v4.24.2 was released after the draft-release for v4.25.0 was created.
This fix gets the last 10 releases and sorts them by published date first.
Related Issue(s)
Verification/QA
kind/*andbackport*label to this PR for proper release notes groupingSummary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.