open-telemetry / opentelemetry-go-build-tools

Build tools for use by the Go API/SDK, the collector, and their associated contrib repositories
https://opentelemetry.io
Apache License 2.0
32 stars 35 forks source link

Support custom summary.tmpl file #501

Closed andreasgerstmayr closed 7 months ago

andreasgerstmayr commented 7 months ago

Support providing a custom summary.tmpl file.

@djaglowski is this what you had in mind for https://github.com/open-telemetry/opentelemetry-go-build-tools/pull/489#pullrequestreview-1866260923?

I didn't update any test input or output, so if everything is covered by unit tests, this PR shouldn't change the formatting of any existing changelog.

I noticed the lines here: https://github.com/open-telemetry/opentelemetry-go-build-tools/blob/ad9317af74bb648efb5b3f0c19b4697f0b468e65/chloggen/internal/chlog/summary.go#L57-L61 don't sort the changelog entries (sort.Strings should be used to sort them). I can update this PR to sort the entries by Component and Note if we want them sorted.

Resolves #488 Resolves #487

djaglowski commented 7 months ago

I can update this PR to sort the entries by Component and Note if we want them sorted.

Sorting would be great but let's keep it as a separate PR

andreasgerstmayr commented 7 months ago

I've dropped the external dependency now, and reverted some of the summary.tmpl changes, to keep it as simple as it was before.

codecov[bot] commented 7 months ago

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (ad9317a) 63.89% compared to head (1f9e485) 63.76%.

Files Patch % Lines
chloggen/internal/chlog/summary.go 90.32% 2 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #501 +/- ## ========================================== - Coverage 63.89% 63.76% -0.14% ========================================== Files 39 39 Lines 2274 2274 ========================================== - Hits 1453 1450 -3 - Misses 677 679 +2 - Partials 144 145 +1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

djaglowski commented 7 months ago

This looks good to me. We will need a changelog entry though :)

andreasgerstmayr commented 7 months ago

This looks good to me. We will need a changelog entry though :)

:smiley: Done. Thanks for the review!