Fix HTML report missing detail data in change sections #24
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
Fixes the issue where HTML reports showed correct counts but no detail data in the Breaking Changes, Added Items, and Removed Items sections.
Root Cause
The issue was caused by Scriban's
{{ include }}directive not properly passing template context to included templates. When the main layout template tried to include thechange-grouptemplate with section data, the context wasn't being passed correctly, resulting in empty template variables.Solution
{{ include }}directives with custom Scriban function: CreatedRenderChangeGroupcustom function that manually handles template rendering with proper contextmain-layout.scribanto use the new custom function instead of problematic include directivesChanges Made
HtmlFormatterScriban.cs:
RenderChangeGroupcustom function for reliable template renderingmain-layout.scriban:
{{ include "change-group" section }}with{{ render_change_group section }}Test Coverage:
HtmlFormatterScribanTests.cswith 5 test scenariosTesting
All HTML formatter tests pass (5/5):
Format_WithAddedItems_IncludesAddedSectionFormat_WithRemovedItems_IncludesRemovedSectionFormat_WithModifiedItems_IncludesModifiedSectionFormat_WithBreakingChanges_IncludesBreakingSectionFormat_WithMixedChanges_IncludesAllSectionsImpact
Closes #23