Giter Club home page Giter Club logo

Comments (9)

juliuscc avatar juliuscc commented on June 26, 2024

Thanks for the positive feedback! ❤️

In the image, it looks like the version is 1.3.0-beta.2. Does the version contain a hashtag somehow? Or is it only that this plugin adds a hashtag?

In other words: do you have a special config where you add # to the version? Or do you use pretty default configurations of semantic-release?

from semantic-release-slack-bot.

juliuscc avatar juliuscc commented on June 26, 2024

Update

It looks like we add a hashtag in this place of the code:

let messageBlocks = [
{
type: 'section',
text: {
type: 'mrkdwn',
text: `A new version of \`${package_name}\` has been released!\nCurrent version is *#${
nextRelease.version
}*`
}
}
]

I don't know the reason for that though. It doesn't make sense to me but I would imagine that the symbol is added for a reason. I don't want to just remove it if I break something else.

from semantic-release-slack-bot.

juliuscc avatar juliuscc commented on June 26, 2024

Update 2

The # was there from the beginning. It's included in the first commit that posts to slack.

d541e59

I don't know why no one else hasn't noticed it yet, including me. Could it be that # means something else in slack-markdown? In markdown, a # means heading but only if it's at the beginning of a line.

from semantic-release-slack-bot.

AlissonRS avatar AlissonRS commented on June 26, 2024

@juliuscc in slack # is used to reference channels. I'd guess no one has ever noticed that because they are probably slack admins, so slack can figure there is no channel named 1.2.0 (or whatever is the version number) and just ignores the #, but since I'm not admin and the slack from my company has private channels, slack will mask it as a "private channel" rather than ignoring it.

from semantic-release-slack-bot.

AlissonRS avatar AlissonRS commented on June 26, 2024

@juliuscc I was able to solve it by overriding the template on my local .releaserc.json and removing the hashtag:

{
  "plugins": [
    "@semantic-release/commit-analyzer",
    "@semantic-release/release-notes-generator",
    "@semantic-release/npm",
    "@semantic-release/github",
    [
      "semantic-release-slack-bot",
      {
        "packageName": "My Project",
        "notifyOnSuccess": true,
        "notifyOnFail": true,
        "onSuccessTemplate": {
          "text": "A new version of $package_name has been released!",
          "blocks": [
            {
              "type": "section",
              "text": {
                "type": "mrkdwn",
                "text": "A new version of `$package_name` has been released!\nCurrent version is *$npm_package_version*"
              }
            },
            {
              "type": "section",
              "text": {
                "type": "mrkdwn",
                "text": "$release_notes"
              }
            }
          ],
          "attachments": [
            {
              "color": "#2cbe4e",
              "blocks": [
                {
                  "type": "context",
                  "elements": [
                    {
                      "type": "mrkdwn",
                      "text": ":package: *<$repo_url|$repo_path>:*   <$repo_url/releases/tag/v$npm_package_version|v$npm_package_version>"
                    }
                  ]
                }
              ]
            }
          ]
        },
        "markdownReleaseNotes": true,
        "slackWebhook": "https://hooks.slack.com/services/{WEBHOOK_KEY}",
      }
    ]
  ]
}

from semantic-release-slack-bot.

juliuscc avatar juliuscc commented on June 26, 2024

Perfect! Could you provide a screenshot of how it looks? If it looks good then I think we should create a PR for removing the hashtag.

from semantic-release-slack-bot.

AlissonRS avatar AlissonRS commented on June 26, 2024

@juliuscc here is a screenshot. I raised a PR for removing the hashtag.

semantic (1)

from semantic-release-slack-bot.

juliuscc avatar juliuscc commented on June 26, 2024

Thanks for being so helpful! It's great that you took the time to investigate and share a screenshot of the changes.

from semantic-release-slack-bot.

juliuscc avatar juliuscc commented on June 26, 2024

🎉 This issue has been resolved in version 3.5.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

from semantic-release-slack-bot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.