Enhance changelog remove command with github release workflow#2844
Open
lcawl wants to merge 6 commits intofeat/changelog-bundle-release-versionfrom
Open
Enhance changelog remove command with github release workflow#2844lcawl wants to merge 6 commits intofeat/changelog-bundle-release-versionfrom
lcawl wants to merge 6 commits intofeat/changelog-bundle-release-versionfrom
Conversation
The `changelog remove --release-version` option mirrors the equivalent bundle flag: it fetches the GitHub release, parses PR references from the release notes, and removes only the changelogs whose PRs appear in that release. - Adds --release-version / --repo to the Remove command, with the same mutual-exclusivity guards used by the bundle command (cannot be combined with --all, --products, --prs, or --issues). - Profile mode blocks --release-version with a clear error message. - Adds RemoveReleaseVersionTests (6 tests covering: core removal, dry-run safety, no PR refs, fetch failure, "latest" tag, and partial match). - Documents the new option in contribute/changelog.md under a dedicated "Remove by GitHub release" section. Made-with: Cursor
Made-with: Cursor
…-version Aligns with PR #2791 (bundle.repo/owner config fields) and PR #2808 (owner stored in bundle YAML and used for link generation). Config model changes: - BundleConfiguration gains Repo and Owner properties - BundleConfigurationYaml and ChangelogConfigurationLoader updated to serialize/deserialize the new fields Service changes: - ChangelogBundlingService.ApplyConfigDefaults falls back to config.Bundle.Repo / config.Bundle.Owner when CLI flags are absent - ChangelogRemoveService.ApplyConfigDefaults does the same Command changes: - Both Bundle and Remove --release-version blocks now load the changelog config before fetching the GitHub release, so the owner used to construct PR URLs follows the full precedence: --owner CLI > bundle.owner in changelog.yml > "elastic" - Same fix applied to the Bundle command for consistency Docs: - changelog-remove.md and contribute/changelog.md document the owner precedence, restore the "Remove by GitHub release" section, and add a matching note to the bundle release-version section Tests: - Two new tests in ChangelogRemoveTests verify config owner fallback and that explicit --owner overrides the config value Made-with: Cursor
`--release-version` on both `changelog bundle` and `changelog remove` now falls back to `bundle.repo` from `changelog.yml` when `--repo` is not supplied on the command line, matching the existing `--owner` precedence behaviour. A repo is still required from one of the two sources; if neither is present the command fails with an updated error message. Docs and tests updated accordingly. Made-with: Cursor
reakaleek
approved these changes
Mar 4, 2026
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 builds on #2843 and #2841.
It enhances the
docs-builder changelog removecommand to also be able to derive a list of PRs from a GitHub release and use that as the filter for which changelogs to remove.Thus it will be able to do the optional changelog cleanup for users of either the
changelog gh-releaseorchangelog addandchangelog bundlecommands (where they used a GitHub release as input).Files changed
Commands/ChangelogCommand.cs— Added--release-versionand--owneroptions to theRemovecommand with the same behavior asbundle --release-version:IGitHubReleaseServiceReleaseNoteParser--prsfilter, then falls through to the existing removal logic--all,--products,--prs, and--issues--ownertoelasticwhen not specifieddocs/contribute/changelog.md— Added a "Remove by GitHub release" subsection ([changelog-remove-release-version]) with an example command, and updated the filter-options list and authorization note to cover the new option. Also updateddocs/cli/release/changelog-remove.mdtests/Elastic.Changelog.Tests/Changelogs/RemoveReleaseVersionTests.cs— 6 new tests covering:latesttag forwarded to fetch serviceGenerative AI disclosure
Tool(s) and model(s) used: claude-4.6-sonnet-medium