Add changelog bundle --infer option and config - #3906
Conversation
There was a problem hiding this comment.
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.
| var source = row.Source switch | ||
| { | ||
| GitRangePrSourceKind.Pool => "pool", | ||
| GitRangePrSourceKind.Pool => "cdn", |
There was a problem hiding this comment.
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?
Summary
Adds a new
--inferoption to thechangelog bundlecommand and a matchingbundle.infer_missing_changelogs: trueoption 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):prs:).changelog add: body release notes or title,pivot.*labels,rules.create).missingif the PR cannot be fetched.There is no CLI flag, profile field, or
changelog.ymlkey to skip step 2. Docs describe inferral as inherent.--dry-runstill reportsinferred (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
--infer(profile and option mode; git-ref only)bundle.infer_missing_changelogs: trueorbundle.profiles.<name>.infer_missing_changelogs: trueReviewer 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.