Skip to content

Introduce env vars for prefix and suffix body content surrounding Changelog #145

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tajobe
Copy link
Contributor

@tajobe tajobe commented May 11, 2025

Adds BODY_PREFIX and BODY_SUFFIX optional 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 like fmt.Sprintf(rel.BodyFormat, rel.Changelog)

@tajobe tajobe requested a review from anton-yurchenko as a code owner May 11, 2025 02:35
Copy link

codecov bot commented May 11, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.14%. Comparing base (ec9c5b5) to head (18abcd2).
Report is 16 commits behind head on main.

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:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@anton-yurchenko anton-yurchenko requested a review from Copilot June 5, 2025 19:19
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

@anton-yurchenko anton-yurchenko added the enhancement New feature or request label Jun 5, 2025
@anton-yurchenko
Copy link
Owner

Thanks @tajobe, that is a good idea.
I will evaluate the full template approach aside (#146)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants