Repository navigation
Bundle the original pull request instead of its backport - #4465
Merged
Merged
Conversation
When bundling a commit range, a pull request with a label listed in bundle.backports.labels is replaced by the pull request it was backported from. Kibana patch ranges produced no entries before, because backports carry no release note. The original is found through a cherry-pick trailer, commit subjects, the title, or the body, and only a merged pull request on the default branch counts. Repositories without the setting behave as before. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Review of the backport tracing found five ways it could drop a change or abort. The title no longer narrows the originals when a commit names another one. An oversized number is skipped instead of throwing. The commits and labels of a pull request are read page by page. Validation fails on any GraphQL error except NOT_FOUND. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
A subject such as "Follow up on #10" mentions an earlier pull request and is not a cherry-picked change of its own, so it no longer adds #10 as an original. The validation test now injects its error into the validation query and asserts that query ran. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
A backport of an already-squashed backport ends its subject with the original and the release-branch backport, for example "Second (#21) (#201)". Keeping only the last number lost #21 once validation dropped #201. The whole ending is kept now, and validation removes what is not an original. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Contributor
Docs preview (local build)Handbook preview: https://docs-v3-preview.elastic.dev/elastic/docs-builder/pull/4465/ Sample changed pages: |
lcawl
reviewed
Oct 14, 2026
The docs said reverts are never traced, which read as if they were left out of the bundle. They are only not replaced by an original; a revert keeps its own entry. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Skipping titles that start with Revert hid pull requests that belong in the release notes. A labeled pull request is now traced whatever its title. Handling reverts needs a mechanism of its own, so the title check and the title field it needed are removed. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
When bundling a commit range, a pull request with a configured backport label is replaced by the pull request it was backported from. A Kibana 9.5.5 patch range now yields 48 entries instead of none.
Affects: Release notes, Configuration
Prompt summary: Release notes for a patch release are built from a commit range, and the range holds backports instead of the changes they copy. The bundler should trace each backport to its original pull request, so the entry, labels, and links come from where the change was authored. The behavior is opt-in per repository.
Why
A backport carries no release note and often excludes itself through
create.excluderules such as Kibana'sbackportrule. A patch range therefore resolves to no entries. Elasticsearch only works because the bundler infers an entry from the backport's own metadata, and links to the backport.What
Opt-in setting
bundle.backports.labelslists exact label names. Glob characters are an error, becausebackport*also matches opt-out labels such asbackport-skip. Without the setting, nothing changes.Finding the original
BackportReferencesreads acherry picked from committrailer, commit subjects, the title, and the body.GitHubBackportServiceresolves trailers and checks every candidate in batched GraphQL. A number counts only when it is a merged pull request on the default branch of the same repository. This drops issue numbers and links to other repositories. Reverts are never traced.Range bundling
The range query now returns each pull request's title and labels.
BackportTracerreplaces labeled backports with their originals in order, merges duplicates, and keeps a backport whose original is not found. Create rules then run on the original. The run report gains a Backports section that lists traced and unresolved pull requests.Verify
Live check:
release unified bundle current --products kibanawith a Kibanachangelog.ymlthat setsbundle.backports.labels: [backport]andGITHUB_TOKENset. The run takes about 11 minutes.Out of scope: Other changelog commands and the Kibana and Elasticsearch
changelog.ymlfiles. Each repository opts in with its own config.🤖 Generated with Claude Code