Introduce env vars for prefix and suffix body content surrounding Changelog#145
Open
tajobe wants to merge 1 commit intoanton-yurchenko:mainfrom
Open
Introduce env vars for prefix and suffix body content surrounding Changelog#145tajobe wants to merge 1 commit intoanton-yurchenko:mainfrom
tajobe wants to merge 1 commit intoanton-yurchenko:mainfrom
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #145 +/- ##
=======================================
Coverage 95.14% 95.14%
=======================================
Files 2 2
Lines 309 309
=======================================
Hits 294 294
Misses 10 10
Partials 5 5 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull Request Overview
This PR introduces two new environment variables, BODY_PREFIX and BODY_SUFFIX, to allow custom content to be added before and after the changelog in the release body. Key changes include:
- Replacing the Changelog field with a Body field across the release, modal, and test files.
- Adding new configuration fields and a GetBody method in config.go.
- Updating documentation and CHANGELOG.md to reflect the new environment variables.
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| release/release_test.go | Updated test cases to use Body instead of Changelog. |
| release/release.go | Changed release payload to reference Body rather than Changelog. |
| release/modal.go | Renamed the Changelog field to Body in the Release struct. |
| main.go | Updated main function to assemble the release body using GetBody. |
| config.go | Added new configuration fields (BodyPrefix, BodySuffix) and GetBody. |
| README.md | Documented the new BODY_PREFIX and BODY_SUFFIX environment variables. |
| CHANGELOG.md | Noted the addition of BODY_PREFIX and BODY_SUFFIX for release bodies. |
Owner
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.
Adds
BODY_PREFIXandBODY_SUFFIXoptional environment variable configurations to enable augmenting release body contents around the Changlog entries.For example, I want a suffix after my Changlog in each release explaining the various artifacts produced in the release (fat jar vs online download)
An alternative implementation might be a single variable for eg
BODY_FORMAT, which could used something likefmt.Sprintf(rel.BodyFormat, rel.Changelog)