github icon indicating copy to clipboard operation
github copied to clipboard

can specify `successComment` and `failComment` with functions returning comment message

Open bubkoo opened this issue 3 years ago • 1 comments

loadsh's template function is difficult to write and debug.

bubkoo avatar Jun 23 '22 03:06 bubkoo

_.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 YAML or JSON, 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.cjs file:
/**
 * @type {import('semantic-release').GlobalConfig}
 */
module.exports = {
  branches: ["master", "next"],
};

Learn more at https://semantic-release.gitbook.io/semantic-release/usage/configuration#configuration-file

babblebey avatar Aug 14 '24 16:08 babblebey