Deprecate changelog rules.publish in favour of rules.bundle#2874
Open
Deprecate changelog rules.publish in favour of rules.bundle#2874
Conversation
cd12d72 to
a5c9169
Compare
31d5aa6 to
4516621
Compare
a5c9169 to
cb061d6
Compare
…ariable' Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
…ariable' Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
08e88c0 to
d2204fc
Compare
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
2 tasks
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.
Summary
This PR contains one enhancements and two related fixes...
Deprecate rules.publish
Extend
rules.bundlewith the full set of type/area/product-level filter capabilities fromrules.publish, so the same filtering can occur at bundle time and the output bundle already contains only the intended entries.Extended YAML shape:
Resolve the gh-release gap
The
changelog gh-releasecommand currently calls its ownCreateBundleFile, which bypassesChangelogBundlingServiceentirely. The fix is to replace that method with a call toChangelogBundlingService.BundleChangelogs, passing a--prsfilter populated from the PR URLs of the just-created changelog files. SinceChangelogBundlingServicealready loads config and appliesrules.bundle, this makesgh-releaseautomatically inherit all present and futurerules.bundlebehavior.Fix multi-product rule resolution
There was a mismatch between how rules were being applied to changelogs with multiple products:
**changelog bundle**(GetBlockerForEntry): "first-match from the entry's own product list in YAML order" — ignores which product(s) the bundle is being assembled for; YAML order is arbitrary**changelog render**(ShouldHideEntry): "any-blocks from the bundle'sProductsarray" — too aggressive; one product's exclusion rules block the entry from a different product's outputThis PR addresses the
changelog bundlebehaviour. The fix forrenderwill be in a subsequent PR. The algorithm (identical for both bundle and render) is as follows:output_productsproduct IDs (if set); else the entry's own product IDsProductsproduct IDs (EntryToBundleProducts)byProductrule for the first product ID found in the configuration; stop thereBlockerSteps to test
rules.bundleoptions to the config file. For example, copy the details that currently exist in therules.publishingto therules.bundlesection:changelog bundlecommand (for example--input-productsinstead of--prs, or by using a profile). For example:Investigationsarea where omitted from the bundle, for example:Warning: [-bundle-type-area] Excluding '245857.yaml' from bundle (type/area filter). NOTE: docs/changelog/245857.yamldocstype is omitted:Warning: [-bundle-type-area] Excluding '2647-docs-docs-replace-placeholder-urls.yaml' from bundle (type/area filter). NOTE: docs/changelog/2647-docs-docs-replace-placeholder-urls.yaml