github
github copied to clipboard
can specify `successComment` and `failComment` with functions returning comment message
_.template is an option that is viable regardless of a users' semantic-release configuration file form which as said in the doc can be...
written in
YAMLorJSON, with optional extensions:.yaml/.yml/.json/.js/.cjs/.mjs
In most file cases, we only collect string type value for successComment and failComment which can only be the case in JSON config file format... But I do think that if you wish to have specific function return value for the successComment and failComment, you can opt to write your config file in .js/.cjs/.mjs file format using a modules.export for your config like so...
- Via
release.config.cjsfile:/** * @type {import('semantic-release').GlobalConfig} */ module.exports = { branches: ["master", "next"], };
Learn more at https://semantic-release.gitbook.io/semantic-release/usage/configuration#configuration-file