Giter Club home page Giter Club logo

semantic-release-slack-bot's Issues

TypeError: Cannot read properties of undefined (reading 'name')

Getting the following error using this library:

[4:36:20 PM] [semantic-release] › ✘  An error occurred while running semantic-release: TypeError: Cannot read properties of undefined (reading 'name')
    at module.exports (/builds/<snip>/<snip>/<snip>/node_modules/semantic-release-slack-bot/lib/getConfigToUse.js:5:15)
    at module.exports (/builds/<snip>/<snip>/<snip>/node_modules/semantic-release-slack-bot/lib/fail.js:15:23)
    at validator (file:///builds/<snip>/<snip>/<snip>/node_modules/semantic-release/lib/plugins/normalize.js:36:30)
    at file:///builds/<snip>/<snip>/<snip>/node_modules/semantic-release/lib/plugins/pipeline.js:37:40
    at next (file:///builds/<snip>/<snip>/<snip>/node_modules/semantic-release/node_modules/p-reduce/index.js:16:10)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  pluginName: 'semantic-release-slack-bot'
}

My current config:

        ["semantic-release-slack-bot", {
            markdownReleaseNotes: true,
            notifyOnSuccess: false,
            notifyOnFail: false,
            packageName: PROJECT_NAME,
            slackName: SLACK_APP_NAME,
            slackIcon: SLACK_APP_ICON,
            slackWebhook: "https://hooks.slack.com/services/<snip>/<snip>/<snip>",
            branchesConfig: [{
                pattern: "feat/test",
                notifyOnSuccess: true,
                notifyOnFail: true
            }]
        }]

I'm initiating semantic release using npx semantic-release.

Any ideas? I've tried with slackName/slackIcon and without, same outcome.

Slack Message Showing version as a channel (private channel)

Hello!

I loved this plugin for semantic-release, I was able to quickly get started.

Not sure if the issue below is related to this plugin or a problem with slack itself, but slack tries to generate a channel link in the version number since it contains a hashtag.

Would you have any ideas how I can prevent that from happening?

Thanks in advance!!!

image

Support for [email protected]

At the moment the peerDependencies rule for the semantic-release package in package.json requires a version <18.0.0 is used. Does this library actually not work with [email protected] or is that rule just outdated? If it's the latter would you mind if I opened a PR to update the peerDependencies rule?

Thank you!

slack bot should extend the accepted semantic release version to 21.0

when I build my project with the latest semantic-release, I get:

npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/semantic-release
npm ERR!   dev semantic-release@"21.0.0" from the root project
npm ERR!   peer semantic-release@">=18.0.0" from @semantic-release/[email protected]
npm ERR!   node_modules/@semantic-release/changelog
npm ERR!     dev @semantic-release/changelog@"6.0.3" from the root project
npm ERR!   6 more (@semantic-release/commit-analyzer, ...)

see https://github.com/semantic-release/semantic-release/releases/tag/v21.0.0

In the slack generated GitLab tag link is wrong!

In the slack GitLab tag link generation code below:
file: lib/success.js
code: /releases/tag/${gitTag}|${gitTag}> - line 105

link must be: ${repo.URL}/-/releases#${gitTag}|${gitTag} or ${repo.URL}/-/tags/${gitTag}|${gitTag}.
Link return 404 Not Found.
Screen Shot 2021-12-24 at 16 08 04
Thanks.

Slack Webhook doesn't respect proxy environment variables

We are running semantic-release on a private gitlab instance on our network, and all connections outside the network go through a corporate proxy. When we run with the webhook, we get the following error:

10:20:37 PM] [semantic-release] › ✘  SLACK CONNECTION FAILED request to [MASKED] failed, reason: read ECONNRESET
AggregateError: 
    SemanticReleaseError: request to [MASKED] failed, reason: read ECONNRESET
        at module.exports (/opt/app/node_modules/semantic-release-slack-bot/lib/postMessage.js:49:11)
        at async module.exports (/opt/app/node_modules/semantic-release-slack-bot/lib/success.js:119:3)
        at async validator (file:///opt/app/node_modules/semantic-release/lib/plugins/normalize.js:36:24)
        at async file:///opt/app/node_modules/semantic-release/lib/plugins/pipeline.js:37:34
        at async Promise.all (index 0)
        at async next (file:///opt/app/node_modules/p-reduce/index.js:15:44)
    at file:///opt/app/node_modules/semantic-release/lib/plugins/pipeline.js:54:11
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async pluginsConfigAccumulator.<computed> [as success] (file:///opt/app/node_modules/semantic-release/lib/plugins/index.js:87:11)
    at async run (file:///opt/app/node_modules/semantic-release/index.js:215:3)
    at async Module.default (file:///opt/app/node_modules/semantic-release/index.js:275:22)
    at async default (file:///opt/app/node_modules/semantic-release/cli.js:55:5) {
  errors: [
    SemanticReleaseError: request to [MASKED] failed, reason: read ECONNRESET
        at module.exports (/opt/app/node_modules/semantic-release-slack-bot/lib/postMessage.js:49:11)
        at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
        at async module.exports (/opt/app/node_modules/semantic-release-slack-bot/lib/success.js:119:3)
        at async validator (file:///opt/app/node_modules/semantic-release/lib/plugins/normalize.js:36:24)
        at async file:///opt/app/node_modules/semantic-release/lib/plugins/pipeline.js:37:34
        at async Promise.all (index 0)
        at async next (file:///opt/app/node_modules/p-reduce/index.js:15:44) {
      code: 'SLACK CONNECTION FAILED',
      details: undefined,
      semanticRelease: true,
      pluginName: 'semantic-release-slack-bot'
    }
  ]

Most applications in our pipelines respect the https_proxy and no_proxy environment variables, but looking through the code and the use of node-fetch, there doesn't seem to be any checks to see if a proxy is configured. The result is that we cannot make the webhook call out to Slack.

I'm not a nodejs developer (or a developer at all in any real sense), but it seems as though Node is working to get proxies working with native fetch, but until then, people have implemented workarounds.

Ideally, the application should look for a https_proxy environment variable, and if it is set, to use that proxy to make the webhook call to Slack. We also use a no_proxy variable to identify internal hosts that should not use that proxy, but I do not that functionality is necessary since the webhook will always be a proxied call.

JSON message format invalid

When I want to use this plugin I get the following error during the execution of the plugin with debug flag:


[17:28:51] [semantic-release] › ✔  Completed step "publish" of plugin "@semantic-release/gitlab"
[17:28:51] [semantic-release] › ℹ  Start step "success" of plugin "semantic-release-slack-bot"
[17:28:51] [semantic-release] [semantic-release-slack-bot] › ℹ  Sending slack notification on success
[17:28:52] [semantic-release] [semantic-release-slack-bot] › ℹ  JSON message format invalid
[17:28:52] [semantic-release] › ✖  Failed step "success" of plugin "semantic-release-slack-bot"
[17:28:52] [semantic-release] › ℹ  Start step "fail" of plugin "semantic-release-slack-bot"
[17:28:52] [semantic-release] [semantic-release-slack-bot] › ℹ  Sending slack notification on fail
[17:28:52] [semantic-release] › ✔  Completed step "fail" of plugin "semantic-release-slack-bot"
[17:28:52] [semantic-release] › ✖  SLACK CONNECTION FAILED:  
{ AggregateError: 
    SemanticReleaseError
        at fetch.then.then.catch.e (/home/thopaw/git/freeyou/api-paymentmethod/node_modules/semantic-release-slack-bot/lib/postMessage.js:25:10)
        at <anonymous>
    at /home/thopaw/git/freeyou/api-paymentmethod/node_modules/semantic-release/lib/plugins/pipeline.js:54:11
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7) name: 'AggregateError' }

Also the emssage of the failure in slack does not contain the name of the project:

An error occurred while trying to publish the new version of undefined!

On a different project with exactly the same config it is working.
Can it be a problem of the length of the slack message?
This is the first run of semantic release and the release-notes are longer then the release-notes on the other project.

The project contains a releaserc.yml.

branch: master
plugins:
  - '@semantic-release/commit-analyzer'
  - '@semantic-release/release-notes-generator'
  - '@semantic-release/gitlab'
  - - semantic-release-slack-bot
    - notifyOnSuccess: true
      notifyOnFail: true

and these versions are defined within the package.json:

"devDependencies": {
    "@semantic-release/changelog": "^3.0.4",
    "@semantic-release/gitlab": "^3.1.5",
    "semantic-release": "^15.13.16",
    "semantic-release-slack-bot": "^1.0.4",
....

JSON message format invalid

Was hit by this today:

[12:30:22 PM] [semantic-release] [semantic-release-slack-bot] › ℹ  JSON message format invalid
[12:30:22 PM] [semantic-release] › ✖  Failed step "success" of plugin "semantic-release-slack-bot"
[12:30:22 PM] [semantic-release] › ℹ  Start step "fail" of plugin "@semantic-release/github"
[12:30:24 PM] [semantic-release] [@semantic-release/github] › ℹ  Created issue #118: https://github.com/proxyco/aux-api/issues/118.
[12:30:24 PM] [semantic-release] › ✔  Completed step "fail" of plugin "@semantic-release/github"
[12:30:24 PM] [semantic-release] › ℹ  Start step "fail" of plugin "semantic-release-slack-bot"
[12:30:24 PM] [semantic-release] [semantic-release-slack-bot] › ℹ  Notifying on fail skipped
[12:30:24 PM] [semantic-release] › ✔  Completed step "fail" of plugin "semantic-release-slack-bot"
[12:30:24 PM] [semantic-release] › ✖  SLACK CONNECTION FAILED:  
{ AggregateError: 
    SemanticReleaseError
        at fetch.then.then.catch.e (/usr/local/lib/node_modules/semantic-release-slack-bot/lib/postMessage.js:23:10)
    at /usr/local/lib/node_modules/semantic-release/lib/plugins/pipeline.js:54:11
    at process._tickCallback (internal/process/next_tick.js:68:7) name: 'AggregateError' }Exited with code 1

Config:

{
    "branch": "master",
    "preset": "eslint",
    "plugins": [
        "@semantic-release/commit-analyzer",
        "@semantic-release/release-notes-generator",
        "@semantic-release/changelog",
        "@semantic-release/git",
        "@semantic-release/github",
        [
            "semantic-release-slack-bot",
            {
                "notifyOnSuccess": true,
                "markdownReleaseNotes": true
            }
        ]
    ]
}

Only thing I can think of is that something in the release notes needed to be escaped. Problem is, the release notes was huge.

Also, looking here I'm expecting to see what was the cause of the malformed JSON, but it seems that maybe the catch-clause swallowed that? 🤔

I saw the other issue (#4) on the same topic, and afaict I'm running the latest version (v1.3.0). I installed it using npm install -g semantic-release-slack-bot (it's installed in a docker image that we use in our build pipeline, hence the global install).

Yep, truncate code is definitely there:

/usr/local/lib/node_modules/semantic-release-slack-bot/lib # cat success.js | grep truncate
			// truncate long messages
/usr/local/lib/node_modules/semantic-release-slack-bot/lib #

Where did you find the 3000 limit? All I could find was this.

There's also the "How to escape characters" here (maybe slackify-markdown deals with that?).

$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"
    ]
  },
}

Release notes markdown format does not look compatible with Slack messages.

First of all, thanks for this nice little plugin 🙌🏼

Using the default configuration of the success template, I observe the that the changes displayed in the slack message is not well formatted. See the screenshot below:

Screenshot 2020-05-07 at 11 06 48

My guess is that Slack does not support standard markdown (according to this
documentation: https://www.markdownguide.org/tools/slack/).

If I am not wrong a about the issue, as I imagine that Slack won't change its markdown support, it would be great to have an automated translation from standard markdown to Slack markdown.
I would display a nice changelog content in Slack.

As a workaround, I'll use a custom success template to hide those changes in the message.

Examples Request

Please provide usage examples for the options provided. Trying to integrate this into my build and adjust the slackWebhook env variable to what I have declared in my CI, but am uncertain as to the format it requires.

Don't send notification if pre-release ?

Is it currently possible to disable notifications if it's a pre-release, or specify another channel/webhook for pre-release ?

Couldn't find anything in the documentation

ssh repository field with no protocol causes ERR_INVALID_URL

If the repository field is in the following format:

// package.json
{
  // ...
  "repository": "[email protected]:hello/world.git"
  // ...
}

it causes an ERR_INVALID_URL error, since new URL('[email protected]/hello/world.git') is expecting a protocol. So new URL('ssh://[email protected]/hello/world.git') would work.

Think there just needs to be a check for this case in getRepoInfo. Since, this format is one of the possible variants in https://git-scm.com/book/en/v2/Git-Basics-Working-with-Remotes

Cleanup release template

We're using this package with much joy and adds real value for our team. Thanks!

We'd like to simplify the posted Slack message to keep noise as low as possible. I tried to use the onSuccessTemplate but that one seems to be missing all required variables.

We currently have this:
Schermafbeelding 2020-04-22 om 12 17 03

Can we adjust it to:

Version 5.8.4 for ho-nl/project-reachdigital.nl has been released!

Fixes
• ​metarobots:​ metaRobots is now required in GraphCMS (fb64921)

  • Date is redundant as it will send it to Slack immediately after the release has been made.
  • The diff link can be found very easily via the release link, so can that can be omitted
  • Attachment shows duplicate information already available above.

  • It would be nice if we could render the homepage url that is entered in the package.json

ENOPACKAGENAME No name for the package defined.

NPM v6.14.4
Node v14.4.x

   "@semantic-release/changelog": "^5.0.1",
    "@semantic-release/commit-analyzer": "^8.0.1",
    "@semantic-release/git": "^9.0.0",
    "@semantic-release/npm": "^7.0.9",
    "@semantic-release/release-notes-generator": "^9.0.1",
    "semantic-release-slack-bot": "^1.7.0",

I get this error and there is a package name in my repo (@react/common-components):

A name for the package must be created. Run through npm (npm run <semantic-release-script> to use npm package name or define packageName in the plugin config or SEMANTIC_RELEASE_PACKAGE in the environment

AggregateError:
  SemanticReleaseError: No name for the package defined.
  at module.exports (/Users/dasboot/projects/react-common/node_modules/semantic-release-slack-bot/lib/verifyConditions.js:27:11)
at validator (/Users/dasboot/projects/react-common/node_modules/semantic-release/lib/plugins/normalize.js:34:30)
at /Users/dasboot/projects/react-common/node_modules/semantic-release/lib/plugins/pipeline.js:37:40
at next (/Users/dasboot/projects/react-common/node_modules/p-reduce/index.js:17:9)
at /Users/dasboot/projects/react-common/node_modules/semantic-release/lib/plugins/pipeline.js:54:11
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async Object.pluginsConf.<computed> [as verifyConditions] (/Users/dasboot/projects/react-common/node_modules/semantic-release/lib/plugins/index.js:80:11)
  at async run (/Users/dasboot/projects/react-common/node_modules/semantic-release/index.js:95:3)
  at async module.exports (/Users/dasboot/projects/react-common/node_modules/semantic-release/index.js:260:22)
  at async module.exports (/Users/dasboot/projects/react-common/node_modules/semantic-release/cli.js:55:5)% 

Here is the release.config.js file:

/* eslint-disable */
module.exports = {
  branches: ['master', 'next'],
  plugins: [
    '@semantic-release/commit-analyzer',
    '@semantic-release/release-notes-generator',
    '@semantic-release/changelog',
    '@semantic-release/npm',
    [
      '@semantic-release/git',
      {
        assets: ['dist/**/*.{js,css}', 'docs', 'package.json'],
        message: 'chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}',
      },
    ],
    [
      'semantic-release-slack-bot',
      {
        notifyOnSuccess: true,
        notifyOnFail: true,
      },
    ],
  ],
}

It will begin working when adding packageName: require('./package.json').name to the plugin config args/opts.

Any thoughts?

Provide slack webhook through config, rather than environment

We already have a slack webhook in our environment variables, but it is not the one we want this bot to use. Currently that means I have to do SLACK_WEBHOOK=... yarn semantic-release, which is a bit "meh".

Being able to pass the webhook through the configuration object would be nice in this case.

SEMANTIC_RELEASE_PACKAGE is always needed

It seems you always need to provide env variable of SEMANTIC_RELEASE_PACKAGE or npm_package_name needed. I assumed it will pick it up automatically form package.json.
Am I missing anything here?

wrong tag URL at the bottom of the message

Hello 👋
First off, I love your slack bot! ❤️

I found that the default message (no custom templating) sends this "/releases/tag/" url at the bottom of the success message

}/releases/tag/${gitTag}|${gitTag}>`

the url with gitlab.com looks something like this https://gitlab.com/myorg/myrepo/releases/tag/v1.5.0 which gives me http 404.

the correct URLs I can visit are https://gitlab.com/myorg/myrepo/-/releases/v1.5.0 and https://gitlab.com/myorg/myrepo/-/tags/v1.5.0.

I'm not sure if this is some kind of change in Gitlab URL paths or not.

Thanks!

semantic-release v17 support

I tried upgrading to semantic release v17 today and got this:

npm WARN [email protected] requires a peer of semantic-release@>=11.0.0 <16.0.0 but none is installed. You must install peer dependencies yourself.

Is there anything stopping us from supporting v17?

If yes, what? Maybe I can fix it.

If no, I can create a PR to bump the peerDependencies key.

Is this log line intentional?

logger.log(slackMessage)

Seems a bit out of place in the console...

[1:11:05 PM] [semantic-release] › ✔  Completed step "success" of plugin "@semantic-release/github"
[1:11:05 PM] [semantic-release] › ℹ  Start step "success" of plugin "semantic-release-slack-bot"
[1:11:05 PM] [semantic-release] [semantic-release-slack-bot] › ℹ  Sending slack notification on success
[1:11:05 PM] [semantic-release] [semantic-release-slack-bot] › ℹ  {
  blocks: [
    { type: 'section', text: [Object] },
    { type: 'section', text: [Object] }
  ],
  text: 'A new version of foo has been released!',
  attachments: [ { color: '#2cbe4e', blocks: [Array] } ]
}
[1:11:05 PM] [semantic-release] › ✔  Completed step "success" of plugin "semantic-release-slack-bot"
[1:11:05 PM] [semantic-release] › ✔  Published release 1.0.0 on default channel

Why `$package_name` is not define automatically?

Hello 👋

I'm a little bit confused with the indication in the documentation and the reality.

Here's the description of packageName.

Option Description Default
packageName Override or add package name instead of npm package name SEMANTIC_RELEASE_PACKAGE or npm package name

In my case, I want the default behavior. For some reason, I get an error yelling at me:
A name for the package must be created. Run through npm (npm run <semantic-release-script> to use npm package name or define packageName in the plugin config or SEMANTIC_RELEASE_PACKAGE in the environment

https://github.com/juliuscc/semantic-release-slack-bot/blob/214aef05f05a6f79e6c437245bb592b83d3f8844/lib/verifyConditions.js#L34C3-L47C4

So I am confused, I just want the default package name without any override.

(We use the plugin within a mono repo setup with multi-semantic-release, could this lead to a different behavior?)

Is SLACK_ICON and SLACK_NAME working?

Hi,

I can't figure it out how the slack bot handle this vars? It's not showing on the posted message.
I use the slack app provided in the readme.

Thanks

SLACK CONNECTION FAILED Only absolute URLs are supported

Using Node 18 we get an error message from fetch "Only absolute URLs are supported"

Drop the version back to Node 16 to resolve the problem.

Output

[4:59:55 AM] [semantic-release] › ✖ SLACK CONNECTION FAILED Only absolute URLs are supported

  | AggregateError:
  | SemanticReleaseError: Only absolute URLs are supported
  | at module.exports (/workdir/node_modules/semantic-release-slack-bot/lib/postMessage.js:49:11)
  | at async module.exports (/workdir/node_modules/semantic-release-slack-bot/lib/success.js:123:3)
  | at /workdir/node_modules/semantic-release/lib/plugins/pipeline.js:54:11
  | at async pluginsConf. [as success] (/workdir/node_modules/semantic-release/lib/plugins/index.js:80:11)
  | at async run (/workdir/node_modules/semantic-release/index.js:209:3)
  | at async module.exports (/workdir/node_modules/semantic-release/index.js:269:22)
  | error Command failed with exit code 1.
  | info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
  | error Command failed.
  | Exit code: 1
  | Command: /usr/local/bin/node
  | Arguments: /opt/yarn-v1.22.19/lib/cli.js run semantic-release --debug
  | Directory: /workdir/apps/cron-coin-gecko
  | Output:
  |  
  | info Visit https://yarnpkg.com/en/docs/cli/workspaces for documentation about this command.
  | 🚨 Error: The command exited with status 1

[Feature] Customise slack message

It would be nice if the message sent to slack was configurable.

For example:

{
  "plugins": [
    "@semantic-release/commit-analyzer",
    "@semantic-release/release-notes-generator",
    [
      "semantic-release-slack-bot",
      {
        "notifyOnSuccess": true,
        "notifyOnFail": false,
        "onSuccess": {
          "text": "**$npm_package_name $npm_package_version** was published to npm successfully",
          "attachments": {
            "text": "Check it out",
            "color": "good",
            "emoji": ":rocket:",
            "attachment_type": "default",
            "actions": [
              {
                "text": "View on npm",
                "url": "https://www.npmjs.com/package/$npm_package_name",
                "type": "button",
                "style": "primary"
              },
              {
                "text": "View on github",
                "url": "https://github.com/$npm_user_name/$npm_package_name",
                "type": "button",
                "style": "primary"
              }
            ]
          }
        }
      }
    ]
  ]
}

Slack channel from configs doesn't work when using token

Hi, thanks for putting together this plugin!

I am trying to use a Slack token for this passed through env vars while specifying the Slack channel through the configs. However this doesn't seem to work, I am seeing this error message:

A Slack Channel must be created and set in the SLACK_CHANNEL environment variable on your CI environment.
Please make sure to set a Slack Channel in the SLACK_CHANNEL environment variable on your CI environment. Alternatively, provide slackChannel as a configuration option.

This is the configuration of my plugin:

[
    "semantic-release-slack-bot",
    {
        "notifyOnSuccess": false,
        "notifyOnFail": false,
        "markdownReleaseNotes": true,
        "slackChannel": "#alerts",
        "branchesConfig": [
            {
                "pattern": "dev",
                "notifyOnSuccess": true,
                "onSuccessTemplate": {
                    "blocks": [
                        {
                            "type": "section",
                            "text": {
                                "type": "mrkdwn",
                                "text": "A new version has been released to *development*! :rocket:"
                            }
                        },
                        {
                            "type": "divider"
                        },
                        {
                            "type": "section",
                            "text": {
                                "type": "mrkdwn",
                                "text": "$release_notes"
                            }
                        }
                    ]
                }
            }
        ]
    }
]

I would expect the configuration to work when passing the Slack token as env var, is that not the case?

Bump dependencies versions

Hi,
There are 3 PRs created for updating the dependencies.
We are now seeing a High severity issue when installing.

Screenshot_20210511_101556

can we please bump the version of slackify-markdown to latest 4.1.0 ? That should fix the issue.

Error after installation with micromark package

On a project running nuxt 3 and @nuxt/content 2 (which use micromark too) everything is fine until I install this package. Then I got an error

 ERROR  [worker reload] [worker init] The requested module 'file:///path-to-project/node_modules/micromark/index.js' does not provide an export named 'postprocess'

  import { postprocess, preprocess } from 'node_modules/micromark/index.js';
  ^^^^^^^^^^^
  SyntaxError: The requested module 'node_modules/micromark/index.js' does not provide an export named 'postprocess'
  at ModuleJob._instantiate (node:internal/modules/esm/module_job:124:21)
  at async ModuleJob.run (node:internal/modules/esm/module_job:190:5)

Is it possible to update the package to the latest version?

Thanks 🙏

Verify env-conditions

The plugin should verify the conditions in the verifyConditions step. It should check that there is a SLACK_WEBHOOK

Only the first occurence of a variable is properly set in a string of a custom template

Here is our global semantic release configuration:

module.exports = {
  plugins: [
    '@semantic-release/commit-analyzer',
    '@semantic-release/release-notes-generator',
    '@semantic-release/changelog',
    '@semantic-release/npm',
    '@semantic-release/git',
    '@semantic-release/github',
    [
      'semantic-release-slack-bot',
      {
        markdownReleaseNotes: true,
        notifyOnSuccess: true,
        notifyOnFail: false,
        onSuccessTemplate: {
          text: "📦 $package_name@$npm_package_version has been released!",
          blocks: [{
            type: 'section',
            text: {
              type: 'mrkdwn',
              text: '*New `$package_name` package released!*'
            }
          }, {
            type: 'context',
            elements: [{
              type: 'mrkdwn',
              text: "📦  *Version:* <$repo_url/releases/tag/v$npm_package_version|$npm_package_version>"
            }]
          }, {
            type: 'divider',
          }, {
            type: 'section',
            text: {
              type: 'mrkdwn',
              text: '$release_notes'
            }
          }],
        },
        packageName: 'forest-express',
      }
    ],
  ],
}

As you can see we have a string
"📦 *Version:* <$repo_url/releases/tag/v$npm_package_version|$npm_package_version>"
that uses $npm_package_version twice.

The link generated is good, but not the displayed text for the link:
Screenshot 2020-05-07 at 12 06 33

I think the replace function below, replaces only the first occurence:
https://github.com/juliuscc/semantic-release-slack-bot/blob/master/lib/template.js#L7

Question: support for Github releases?

Thanks for a cool sounding plugin for semantic-release! From the README I think the answer is sadly no, but does this repo support Github releases? We have a private Github repo, publishing release notes there, but no NPM package associated. We'd like to be able to post release notes in a slack channel. Can we accomplish that with this tool?

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.