You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi everyone,
I want to disable successComments when the release is a prerelease and otherwise I want a custom message.
I have tried to do so via
"@semantic-release/github",
{
"successComment": "${prerelease ? false : `:tada: This issue has been resolved in version ${nextRelease.version} :tada:</br></br>The release is available on [GitHub release](<github_release_url>) and contains these changes: </br></br>${nextRelease.notes}`}"
}
but the plugin seems to replace some of the brackets with parenthesis yet not all of them, thus creating this error:
SyntaxError: Missing } in template expression
at Function (<anonymous>)
at /opt/semantic-release/node_modules/�[4mlodash�[24m/lodash.js:14942:16
at apply (/opt/semantic-release/node_modules/�[4mlodash�[24m/lodash.js:487:27)
at /opt/semantic-release/node_modules/�[4mlodash�[24m/lodash.js:15326:16
at apply (/opt/semantic-release/node_modules/�[4mlodash�[24m/lodash.js:489:27)
at /opt/semantic-release/node_modules/�[4mlodash�[24m/lodash.js:6627:16
at template (/opt/semantic-release/node_modules/�[4mlodash�[24m/lodash.js:14941:20)
at /opt/semantic-release/node_modules/�[4m@semantic-release�[24m/github/lib/success.js:83:13
at Array.map (<anonymous>)
at module.exports (/opt/semantic-release/node_modules/�[4m@semantic-release�[24m/github/lib/success.js:81:45) {
source: �[32m'function(obj) {\n'�[39m +
�[32m'obj || (obj = {});\n'�[39m +
�[32m"var __t, __p = '';\n"�[39m +
�[32m'with (obj) {\n'�[39m +
�[32m'__p +=\n'�[39m +
�[32m"((__t = (prerelease ? false : `:tada: This issue has been resolved in version ${nextRelease.version)) == null ? '' : __t) +\n"�[39m +
�[32m"' :tada:</br></br>The release is available on [GitHub release](<github_release_url>) and contains these changes: </br></br>' +\n"�[39m +
�[32m"((__t = (nextRelease.notes)) == null ? '' : __t) +\n"�[39m +
�[32m"'`}';\n"�[39m +
�[32m'\n'�[39m +
�[32m'}\n'�[39m +
�[32m'return __p\n'�[39m +
�[32m'}'�[39m,
pluginName: �[32m'@semantic-release/github'�[39m
}
Does anyone notice what I am doing wrong or if I am doing something wrong?
I am using semantic-release version 21.0.2
The text was updated successfully, but these errors were encountered:
So I there would be the need to have 2 parameters:
successComment (parse wether or not to run this step )
successCommentMessage (the string that gets processed through the lodash template)
Leo383
changed the title
SuccessComment templating in ternary expression
Split "successComment" into two parameters to enable conditional activation of this step
Jul 6, 2023
Hi everyone,
I want to disable successComments when the release is a prerelease and otherwise I want a custom message.
I have tried to do so via
but the plugin seems to replace some of the brackets with parenthesis yet not all of them, thus creating this error:
Does anyone notice what I am doing wrong or if I am doing something wrong?
I am using semantic-release version 21.0.2
The text was updated successfully, but these errors were encountered: