fix(prepare): variable substitution for ${nextRelease.notes}#17
Conversation
|
Hi @matherm-aboehm, Thanks for checking out this repository and making a PR. This variable was intentionally omitted — embedding the full release notes in a commit message isn't necessarily the right approach, as they can be arbitrarily large. The release notes will be directly accessible in the GitHub Release. Is there any specific reason you would want it in the commit message ? |
|
Hi @Jno21, First of all I thought this plugin is meant to be an expansion or alternative to the default Second, I don't think it should be the concern of the plugin, what will be included in the commit message and what not, as there is also the possibility to override the default template by the user of the plugin. To answer your question: There can also be a benefit to have the release notes in both the GitHub Release and the commit message, as you would be able to always read them, even when GitHub sites are down or you just work offline for some reason (Internet connection can sometimes be unstable here in Germany). As all of this may be my personal preference and yours may be different, I still think this shouldn't be subject to the feature set of the plugin. |
|
Thanks for the clear answer. It has been a while since I last touched the repo, so your clarification makes perfect sense and helped me understand the use case better. I will merge it and release a fix today :) Thanks a lot for the contribution. |
676f783 to
141bde0
Compare
…18) * fix(prepare): variable substitution for `${nextRelease.notes}` (#17) * fix(prepare): variable substitution for `${nextRelease.notes}` * test(prepare): fix test with template variables in commit message * chore(release): update package.json version to 1.0.1-beta.1 [skip ci] --------- Co-authored-by: Andreas Böhm <60391995+matherm-aboehm@users.noreply.github.com> Co-authored-by: semantic-release-github-commit[bot] <238512118+semantic-release-github-commit[bot]@users.noreply.github.com>
…18) --------- Co-authored-by: Andreas Böhm <60391995+matherm-aboehm@users.noreply.github.com> Co-authored-by: semantic-release-github-commit[bot] <238512118+semantic-release-github-commit[bot]@users.noreply.github.com>
Description
This PR resolves a bug in template variable substitution for the commit message created in the
preparestep ofsemantic-release-github-commit. It was missing the substitution for${nextRelease.notes}.Code changes
replaceoncommitMessage, so that${nextRelease.notes}is replaced with the actual value of that property fromnextReleasecontextReady to merge?