semantic-release / release-notes-generator

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

can't get the issueUrlFormat to work #238

Open zilahir opened 3 years ago

zilahir commented 3 years ago

Hey, I am struggling this for a while now, and it seems like I am unable to solve it on my own, so came here for help :)

This is my .releaserc config:

{
    "branches": [
        "master",
        { name: 'dev', prerelease: true },
        { name: 'next', prerelease: true },
        "next-major",
        ],
  "plugins": [
    ["@semantic-release/commit-analyzer", {
      "preset": "conventionalcommits",
            "config": "conventional-changelog-conventionalcommits",
      "parserOpts": {
        "noteKeywords": ["BREAKING CHANGE", "BREAKING CHANGES", "BREAKING"],
                "issuePrefixes": "XES-",
                "issueUrlFormat": "https://XXX.atlassian.net/browse/${prefix}${id}"
      }
    }],
        ["@semantic-release/npm"],
    ["@semantic-release/release-notes-generator", {
      "preset": "conventionalcommits",
            "commit": "commits",
            "config": "conventional-changelog-conventionalcommits",
      "parserOpts": {
        "noteKeywords": ["BREAKING CHANGE", "BREAKING CHANGES", "BREAKING"],
                "issuePrefixes": "XES-",
                "issueUrlFormat": "https://XXX.atlassian.net/browse/${prefix}${id}"
      },
      "writerOpts": {
        "commitsSort": ["subject", "scope"],
      }
    }],
        ["@semantic-release/changelog", {
            "changelogFile": "./docs/CHANGELOG.md"
        }],
        ["@semantic-release/git", {
                "assets": ["package.json", "./src/**/*.{js, scss, css, ts, tsx, json}", "./docs/CHANGELOG.md"]
            }
        ]
  ]
}

but the url in the changelog still refers to the bitbucket default, which is 404 in my case. For example:

so the bitbucket.org url should be the one i changed in the issueUrlFormat.

Any idea how can I achieve that?

Thank you!

ghost commented 2 years ago

Looks like you have the option in the wrong place - move it from parserOpts to writerOpts and see if that resolves it.

Edit: Just realized you posted this almost a year ago. Whoops. Hope you figured it out!