Changelog profile parity - GitHub release workflow#2848
Draft
Conversation
…dd output_products, repo, owner profile fields Phase 1: - Bundle command: reject all filter/output options (--all, --input-products, --output-products, --prs, --issues, --output, --repo, --owner, --resolve, --no-resolve, --hide-features, --config, --directory) when a profile argument is given. - Remove command: reject all options except --dry-run and --force when a profile argument is given. - Profile-based commands now discover changelog.yml automatically (./changelog.yml then ./docs/changelog.yml) and return a helpful error if neither is found, rather than silently falling back to defaults. An explicit config path is still accepted when passed directly to the service layer (used by tests). - ChangelogRemoveArguments.Directory changed from required to nullable; ApplyConfigDefaults follows the same null-coalescing pattern as the bundle service. - Fixes a silent bug where --output was ignored in profile mode. Phase 2: - Add output_products, repo, and owner fields to BundleProfileYaml, BundleProfile, and the config loader mapping. - ProcessProfile applies these fields when building the bundled output: output_products overrides the products array with version/lifecycle substitution; repo and owner are stored on each product entry for correct PR/issue link generation. - MergeHideFeatures removed; profile mode now uses only the profile's hide_features (CLI --hide-features is rejected at the command layer). - Update changelog.example.yml and docs to document all new profile fields and the mutual exclusivity requirement. Made-with: Cursor
- Add 7 new unit tests for bundle/remove profile features:
- output_products overrides products array in bundle
- repo from profile is written to bundle product entries
- no repo/owner in profile preserves existing fallback behaviour
- missing config in profile mode returns error with advice (bundle + remove)
- changelog.yml discovered from CWD (./changelog.yml)
- changelog.yml discovered from docs/ subdir (./docs/changelog.yml)
- Update docs/contribute/changelog.md:
- Document mutual exclusivity of profile-based vs option-based bundle usage
- Add new "Profile-based bundling" section with full field reference table
- Document config auto-discovery behaviour for profile mode
- Update "Removal with profiles" to document mutual exclusivity,
allowed --dry-run/--force exceptions, and which profile fields are ignored
Made-with: Cursor
Adds repo and owner as top-level fields under bundle: in changelog.yml, providing a default that applies to all profiles. Profile-level values override the bundle-level default when set; otherwise the bundle-level value is used. This avoids repeating the same repo/owner in every profile when all profiles share the same repository. Also adds two tests verifying the fallback and override behaviour. Made-with: Cursor
Extends ApplyConfigDefaults in both ChangelogBundlingService and ChangelogRemoveService to fall back to bundle.repo and bundle.owner from config when --repo/--owner are not supplied on the CLI. This mirrors the existing behaviour for profile-based commands and means repo and owner rarely need to be specified on the command line when a changelog.yml with bundle-level defaults is present. Precedence: explicit CLI flag > bundle.repo/owner config > nothing (renderer falls back to product ID at render time). Adds four tests covering the config fallback and CLI-override paths for the bundle command. Made-with: Cursor
Updates all three places that describe --repo/--owner behaviour: - CLI param XML docs (bundle and remove): clarify both are optional and fall back to bundle.repo/bundle.owner in changelog.yml - changelog-bundle.md: expand --repo/--owner option descriptions; rewrite "Repository name in bundles" section to show the three-level precedence (CLI > profile > bundle config) with YAML examples; update profile fields table and the examples section to demonstrate bundle-level defaults with per-profile overrides - changelog.md: add a note that --repo/--owner fall back to config in option-based bundling; expand profile fields table to include bundle-level repo/owner defaults; update the --prs and --issues callout text to mention the config fallback Made-with: Cursor
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
…ation
Phase 3 (profile-based enhancements):
- Accept a newline-delimited URL list file as a profile argument, resolving
to PR or issue filters based on the URLs found in the file
- Support combined <version> <report|url-list> profile arguments so the
version can be used for {version} substitution while the report/file
drives filtering
- Wire Issues filter through ProfileFilterResult into bundling and remove services
Phase 4 (option-based enhancements):
- Add --report option to both `changelog bundle` and `changelog remove`,
accepting a promotion report URL or local HTML file path
- Enforce stricter validation for file-based --prs and --issues inputs:
every line must be a fully-qualified GitHub URL
Phase 5 (tests and documentation):
- Add 264-test coverage for all new behaviours in BundleChangelogsTests
and ChangelogRemoveTests
- Update changelog-bundle.md, changelog-remove.md, and contribute/changelog.md
to document new arguments, options, validation rules, and examples
Made-with: Cursor
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
Correct the claim that repo/owner are always ignored during profile-based removal. For source: github_release profiles they are actively used to fetch the GitHub release and build the PR URL list. - contribute/changelog.md: replace the blanket "ignored" statement with a per-profile-type breakdown; add a source: github_release removal example and GITHUB_TOKEN note. - changelog-remove.md: same correction to the note in the profile-based removal section; add a dedicated "Remove using a GitHub release profile" subsection with examples and a cross-reference to the profile config fields in changelog-bundle.md. Made-with: Cursor
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 is dependent on #2791, #2808, and #2844.
It should be merged only after all those PRs.
The goal is to add profile-based bundling and removal work with GitHub releases.
For example, the following profile-based command will be equivalent to
changelog bundle --release-version 9.2.0:...where
elasticsearch-releaseis a profile withsource: github_release.Changes
Code (8 files modified, 1 created):
BundleConfiguration.cs— AddedSourceproperty toBundleProfileChangelogConfigurationYaml.cs— AddedSourceproperty toBundleProfileYamlChangelogConfigurationLoader.cs— MapsSourcewhen buildingBundleProfileobjectsProfileFilterResolver.cs— Handlessource: github_releasein a newResolveFromGitHubReleaseAsyncmethod: fetches the release, parses PR references from the release body, and returns them as the filterChangelogBundlingService.cs— Added optionalIGitHubReleaseService?constructor parameter (defaults to a realGitHubReleaseService) and passes it toProfileFilterResolver.ResolveAsyncDocs:
changelog-bundle.md— Addedsourcefield to the profile configuration reference, added agithub_releaseprofile to the examples, and added invocation exampleschangelog-remove.md-- Dittocontribute/changelog.md— Addedsourceto the profile fields table and a new "Bundle changelogs from a GitHub release" subsection with YAML config and invocation exampleschangelog.example.yml— Added a commentedelasticsearch-gh-releaseprofile example showingsource: github_releaseTests (
BundleProfileGitHubReleaseTests.cs) — 9 tests covering:v-prefixed tag nameFetchReleaseAsyncreturningnull→ errorlatestversion tag forwarded correctlyrepoconfig → errorsource: github_release+products→ mutual exclusivity errorsource: github_release+profileReport→ mutual exclusivity errorrepoused as fallback when profile omits it