semantic-release / release-notes-generator

:clipboard: semantic-release plugin to generate changelog content with conventional-changelog
MIT License
313 stars 47 forks source link

[Question]hide commit's link ? #186

Open GuillaumeLhomme opened 4 years ago

GuillaumeLhomme commented 4 years ago

Is it possible to generate changelog without commit's link ?

I tried to set linkReferences to false but it doesn't work ?

any solution ?

thx.

nyan-left commented 2 years ago

also wondering this, @Madrity did you find a solution?

GuillaumeLhomme commented 2 years ago

Hi, I made a custom text generation, see below

"@semantic-release/commit-analyzer",
      [
         "@semantic-release/release-notes-generator",
         {
            "linkCompare": false,
            "linkReferences": false,
            "writerOpts": {
               "commitPartial": "* {{this.subject}}"
            }
         }
      ]

Hope it will be helpful ;)

softshape commented 2 years ago

This is useful, but your commitPartial kills multiline commit messages, joining them to one line.

alexey-sh commented 4 months ago

So it there any way to hide commit link and keep multi-line commit message?

seam-ctooley commented 2 months ago

A tad unrelated, but in case anyone else is trying to get rid of the asterisk and instead use dashes, this works for me:

"commitPartial": "\\- {{this.subject}}\n"
sinamiandashti-fior commented 2 weeks ago

its not working I still see links to issue in the output :(

alexey-sh commented 2 weeks ago

I ended with

// release.config.mjs
"plugins": [
    "@semantic-release/changelog",
    "@semantic-release/commit-analyzer",
    "@semantic-release/git",
    ["@semantic-release/release-notes-generator", {
      "preset": "conventionalcommits",
      "writerOpts": {
        "commitsSort": ["scope", "message"],
        "commitPartial": "* {{this.message}}\n"
      },
      "presetConfig": {
        "types": [
          // https://github.com/conventional-changelog/conventional-changelog/blob/d3b8aaa16337993bbad4d91db1ffac5a7568756b/packages/conventional-changelog-conventionalcommits/src/constants.js
          { type: 'feat', section: 'Features' },
          { type: 'feature', section: 'Features' },
          { type: 'fix', section: 'Bug Fixes' },
          { type: 'perf', section: 'Performance Improvements' },
          { type: 'revert', section: 'Reverts' },
          { type: 'docs', section: 'Documentation', hidden: true },
          { type: 'style', section: 'Styles', hidden: false },
          { type: 'chore', section: 'Miscellaneous Chores', hidden: true },
          { type: 'refactor', section: 'Code Refactoring', hidden: false },
          { type: 'test', section: 'Tests', hidden: true },
          { type: 'build', section: 'Build System', hidden: true },
          { type: 'ci', section: 'Continuous Integration', hidden: true }
        ]
      },
      "linkCompare": false,
      "linkReferences": false
    }],
    "@semantic-release/gitlab",
    "@semantic-release/exec",
  ],
// commitlint.config.mjs
const Configuration = {
  /*
   * Resolve and load @commitlint/config-conventional from node_modules.
   * Referenced packages must be installed
   */
  extends: ['@commitlint/config-conventional'],
  /*
   * Resolve and load @commitlint/format from node_modules.
   * Referenced package must be installed
   */
  formatter: '@commitlint/format',

  /*
   * Whether commitlint uses the default ignore rules, see the description above.
   */
  defaultIgnores: true,
};

export default Configuration;
Telegram example