Skip to content

Add changelog bundle --infer option and config - #3906

Open
lcawl wants to merge 3 commits into
mainfrom
bundle-infer-option
Open

Add changelog bundle --infer option and config#3906
lcawl wants to merge 3 commits into
mainfrom
bundle-infer-option

Conversation

@lcawl

@lcawl lcawl commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a new --infer option to the changelog bundle command and a matching bundle.infer_missing_changelogs: true option to the changelog configuration file.

Background

changelog bundle --start-git-ref/--end-git-ref (commit-range / date-promotion mode) always uses this ladder (GitRangeEntryResolver, #3848):

  1. Match a checked-in pool file (filename digits or YAML prs:).
  2. Else synthesize an in-memory entry from the GitHub PR (same path as changelog add: body release notes or title, pivot.* labels, rules.create).
  3. Else report missing if the PR cannot be fetched.

There is no CLI flag, profile field, or changelog.yml key to skip step 2. Docs describe inferral as inherent. --dry-run still reports inferred (PR body|title); it does not disable it.

--prs / URL lists never infer; they only warn. Inferral is git-ref-only.

My concern with that behaviour is that it seems to assume that the omission of the changelog was a mistake. However, a PR in the git range with no changelog file in the pool is not necessarily a failure. Developers can omit a changelog when the change is not note-worthy. The PRs in the git range are a superset of notable changelogs.

Implementation details

Git-ref bundling is no longer generates missing changelogs by default (you can turn it on or off by choice). Unmatched PRs get the same warning as --prs (No changelog file found for PR: …) and are omitted; the bundle still writes if any pool hits remain. Synthesized GitHub copy is opt-in.

How to turn inferral on

  • CLI: --infer (profile and option mode; git-ref only)
  • YAML: bundle.infer_missing_changelogs: true or bundle.profiles.<name>.infer_missing_changelogs: true

Reviewer notes

If it's preferred to have this default to "true" that's fine by me. The important part is that it's possible to turn it off for teams that want to dig into the errors rather than just filling the gaps automatically.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Requesting changes for a logic regression: in profile mode, bundle.profiles.<name>.infer_missing_changelogs: false is currently overridden by bundle-level true, so per-profile disablement of inferral does not work.


What is this? | From workflow: PR Review

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

Comment thread src/services/Elastic.Changelog/Bundling/ChangelogBundlingService.cs Outdated
@lcawl
lcawl marked this pull request as ready for review August 20, 2026 21:30
Comment thread src/tooling/docs-builder/Commands/ChangelogCommand.cs
var source = row.Source switch
{
GitRangePrSourceKind.Pool => "pool",
GitRangePrSourceKind.Pool => "cdn",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pool currently means "matched from the entry pool" (CDN or local directory), but this label now hardcodes it to cdn. In --force-local / bundle.use_local_changelogs: true git-range runs, the dry-run table will claim entries were sourced from CDN even when they came from local files.

Could we keep this source-neutral (e.g. pool) or thread sourcing context into report rendering so local runs show local?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant