Skip to content

Changelog profile parity - GitHub release workflow#2848

Draft
lcawl wants to merge 4 commits intoprofile-parity-p3from
feat/changelog-profile-github-release
Draft

Changelog profile parity - GitHub release workflow#2848
lcawl wants to merge 4 commits intoprofile-parity-p3from
feat/changelog-profile-github-release

Conversation

@lcawl
Copy link
Contributor

@lcawl lcawl commented Mar 3, 2026

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:

docs-builder changelog bundle elasticsearch-release 9.2.0

...where elasticsearch-release is a profile with source: github_release.

Changes

Code (8 files modified, 1 created):

  • BundleConfiguration.cs — Added Source property to BundleProfile
  • ChangelogConfigurationYaml.cs — Added Source property to BundleProfileYaml
  • ChangelogConfigurationLoader.cs — Maps Source when building BundleProfile objects
  • ProfileFilterResolver.cs — Handles source: github_release in a new ResolveFromGitHubReleaseAsync method: fetches the release, parses PR references from the release body, and returns them as the filter
  • ChangelogBundlingService.cs — Added optional IGitHubReleaseService? constructor parameter (defaults to a real GitHubReleaseService) and passes it to ProfileFilterResolver.ResolveAsync

Docs:

  • changelog-bundle.md — Added source field to the profile configuration reference, added a github_release profile to the examples, and added invocation examples
  • changelog-remove.md -- Ditto
  • contribute/changelog.md — Added source to the profile fields table and a new "Bundle changelogs from a GitHub release" subsection with YAML config and invocation examples
  • changelog.example.yml — Added a commented elasticsearch-gh-release profile example showing source: github_release

Tests (BundleProfileGitHubReleaseTests.cs) — 9 tests covering:

  • Happy path: bundles changelogs whose PR URLs match those from a GitHub release
  • Version/lifecycle auto-inference from the v-prefixed tag name
  • No PR references in release notes → warning + failure
  • FetchReleaseAsync returning null → error
  • latest version tag forwarded correctly
  • Missing repo config → error
  • source: github_release + products → mutual exclusivity error
  • source: github_release + profileReport → mutual exclusivity error
  • Bundle-level repo used as fallback when profile omits it

lcawl added 3 commits March 3, 2026 10:43
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant