Skip to content

feat(changelog): configurable sections, scope grouping, commit + compare links#586

Merged
BryanFRD merged 1 commit into
mainfrom
feat/changelog-sections
Jun 16, 2026
Merged

feat(changelog): configurable sections, scope grouping, commit + compare links#586
BryanFRD merged 1 commit into
mainfrom
feat/changelog-sections

Conversation

@BryanFRD

Copy link
Copy Markdown
Contributor

Closes #497

Summary

Adds an opt-in [workspace.changelog] config that enriches changelog/release rendering. Default behaviour is byte-identical to today — with no config, output is the classic three sections (Breaking Changes / Features / Bug Fixes) with flat bullets of full commit subjects, no links, no scope grouping. Everything new is gated behind config.

Config shape

[workspace.changelog]
sections = { feat = "Features", fix = "Bug Fixes", perf = "Performance", security = "Security", docs = false }
group_by_scope = true
include_commit_links = true
include_compare_link = true
  • sections: BTreeMap<String, SectionSetting> where a value is a label string OR false (hidden), via an untagged serde enum. Keys are commit-type prefixes (feat/fix/perf/docs/refactor/security). Omitted -> defaults to feat -> Features, fix -> Bug Fixes (Breaking Changes always shown).
  • group_by_scope (alias groupByScope), include_commit_links (includeCommitLinks), include_compare_link (includeCompareLink) — all bool, default false. ChangelogConfig derives Default.

Conventions followed (differ from the issue intentionally)

  • Section mapping is render-time by commit-type prefix; the bump engine (classify_commit/determine_bump) is untouched. Order: Breaking, Features, Bug Fixes, Performance, Security, then other configured. security takes precedence over fix for fix(security):.
  • Scope grouping is inline bold (- **api:** add events endpoint), sorted by scope with scopeless entries first — NOT ### api subheadings.
  • No Deprecated/Removed sections — no conventional-commits signal to derive them.
  • Commit links ([<hash>](<forge>/commit/<hash>)) and compare footer [<ver>]: <forge>/compare/<last>...<new> only when the forge is resolvable; forge-unknown silently omits them (no error).
  • Breaking entries render the BREAKING CHANGE: footer body when richer mode is active (subject-only under default).

Tests

default_render_is_byte_identical_to_classic proves the no-config path equals the classic renderer. Added coverage for perf/security/docs/feat! sections, security precedence, inline scope grouping, commit links (present + forge-unknown omitted), compare link (present + no-last-tag omitted), custom labels, breaking-footer body, plus config parsing (TOML + camelCase, untagged false). All pre-existing src/changelog.rs tests pass unchanged.

Schema

Updated schema/ferrflow.json with workspace.changelog. The FerrFlow-Cloud mirror (public/schema/ferrflow.json) is not touched here — handled separately.

@BryanFRD BryanFRD enabled auto-merge (squash) June 16, 2026 21:08
@BryanFRD BryanFRD merged commit dd8938c into main Jun 16, 2026
39 checks passed
@BryanFRD BryanFRD deleted the feat/changelog-sections branch June 16, 2026 21:11

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark

Details
Benchmark suite Current: be4ef01 Previous: 0b5fe57 Ratio
commit_parsing/100 16895 ns/iter (± 1132) 17091 ns/iter (± 38) 0.99
commit_parsing/1000 171630 ns/iter (± 792) 174058 ns/iter (± 2250) 0.99
commit_parsing/10000 1718674 ns/iter (± 6380) 1809492 ns/iter (± 18830) 0.95

This comment was automatically generated by workflow using github-action-benchmark.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(changelog): richer section grouping, scopes, commit links, compare links

1 participant