semantic-release-slack-bot: $repo_url not working

The plugin sends the message to slack literally as $repo_url instead of the actual repository url

package.json

{
    ...
  "repository": {
    "type": "git",
    "url": "<repoUrl>"
  },
  "config": {
    "commitizen": {
      "path": "./node_modules/cz-conventional-changelog"
    }
  },
  "release": {
    "plugins": [
      "@semantic-release/commit-analyzer",
      "@semantic-release/release-notes-generator",
      [
        "semantic-release-slack-bot",
        {
          "notifyOnSuccess": true,
          "notifyOnFail": false,
          "onSuccessTemplate": {
            "text": "A new version of $package_name with version $npm_package_version has been released at $repo_url ! \n $release_notes"
          },
          "markdownReleaseNotes": true
        }
      ],
      [
        "@semantic-release/npm",
        {
          "npmPublish": false
        }
      ],
      "@semantic-release/changelog",
      "@semantic-release/git"
    ]
  },
}

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 21 (19 by maintainers)

Most upvoted comments

🎉 This issue has been resolved in version 1.3.6 🎉

The release is available on:

Your semantic-release bot 📦🚀

Yeah there is no harm in keeping it, and beeing backwards compatible. Thanks for the great work!

I’m too new to the semantic-release domain to tell what potential use cases there may be (or are!).

I can do some local testing to see what the impact could be. Afaict from the code, the only place it’s really used is as an attachment to the slack message.

The worst that can happen is that we make a change that we later have to revert. I don’t think we’ll ruin anyone’s life. 😊

Ok, here’s what I’ve found:

GitHub: https://github.com/<user>/<project>

GitLab: https://gitlab.com/<user>/<project>

Bitbucket: https://bitbucket.org/<user>/<project> which then redirects to https://bitbucket.org/<user>/<project>/src/default/

Couldn’t figure Azure out 🤷‍♂

So the pattern does seem to be: https://<vendor domain>/<user>/<project>

I’ll create a PR supporting that, and if there’s vendors out there that we need to support we can extend the functionality. Regardless, it will be an improvement. 😊

Yes, for the repo_url but the URL for viewing a repo online is not standardized. A vendor doesn’t even have to have a web page for the remote server.