Changelog profile parity - final phases#2808
Draft
lcawl wants to merge 2 commits intoprofile-parityfrom
Draft
Conversation
…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
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 pull request is a continuation of #2791
It implements the final phases of an effort to get the profile-based
docs-builder changelog bundleanddocs-builder changelog removeinvocations to parity with the command-line-option method.Design Principles
changelog bundle <profile> <arg>orchangelog remove <profile> <arg>), any filter- or output-related command options must be rejected with an error. Profile config provides all such values.--dry-runand--forcemay be used with profiles. No other CLI options are allowed when using a profile.docs/changelog.yml):bundle.directory): The directory containing changelog YAML files for both bundle and remove.bundle.output_directory): For remove, the directory scanned for bundle dependencies. No--configor--directoryoverride — profile invocations rely on the config file.Implementation details
Phase 3 (profile-based enhancements):
to PR or issue filters based on the URLs found in the file
<version> <report|url-list>profile arguments so theversion can be used for
{version}substitution while the report/filedrives filtering
ProfileFilterResultinto bundling and remove servicesPhase 4 (option-based enhancements):
--reportoption to bothchangelog bundleandchangelog remove,accepting a promotion report URL or local HTML file path
--prsand--issuesinputs:every line must be a fully-qualified GitHub URL
Phase 5 (tests and documentation):
BundleChangelogsTestsand
ChangelogRemoveTestschangelog-bundle.md,changelog-remove.md, andcontribute/changelog.mdto document new arguments, options, validation rules, and examples
Bug fixes
Two real code bugs discovered and fixed:
Bug 1 —
changelog bundleprofile mode:bundle.directorywas skipped as output fallbackProcessProfilecomputed the output directory as:So when neither
bundle.output_directorywas set, it jumped straight to CWD, silently ignoringbundle.directory. The docs said it should usebundle.directoryas the fallback, but the code didn't. Fixed to:Bug 2 —
changelog removeoption mode:bundle.directorywas never consultedChangelogCommand.Removeeagerly resolveddirectory ?? CWDbefore passing it to the service. This meantApplyConfigDefaults'sbundle.directorybranch was unreachable — if you hadbundle.directoryset in your config but didn't pass--directory,removewould always default to CWD. Fixed to passnullwhen--directoryis absent, letting the service's fallback chain work correctly.The consistent fallback order (now matches across both commands):
Input directory (where changelogs are read from):
bundle.directory--directorybundle.directoryOutput directory (
bundleonly —removehas no output file):bundle.output_directory--outputbundle.directorybundle.output_directory--directory→bundle.directory→ CWDOutstanding work
changelog.mdis necessary (for example to add profile-based examples since most of the bundle section of the doc relates to the command-options).Generative AI disclosure
Tool(s) and model(s) used: composer-1.5, claude-4.6-sonnet-medium