juliuscc / semantic-release-slack-bot Goto Github PK
View Code? Open in Web Editor NEW📦 🚀 A slack bot for semantic-release notifying release statuses
License: MIT License
📦 🚀 A slack bot for semantic-release notifying release statuses
License: MIT License
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.
It would be great to have ability to configure Slack channel via plugin option and environment variable
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!!!
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!
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
Maybe this is by design, but the truncating of long release notes only happens in the default case, if you use onSuccessTemplate
the release notes will be sent to Slack in full.
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.
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",
....
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?).
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"
]
},
}
I believe the maxLength
limit here: https://github.com/juliuscc/semantic-release-slack-bot/blob/master/lib/success.js#L9 is outdated the docs seem to indicate that messages will be truncated on Slack's end at 40,000 characters.
Perhaps maxLength
should be a config option and defaulted to 3000 as to not break things going forward, but allows a user to increase it as they please. Or maybe set it to 40,000 and bump the major version?
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:
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.
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.
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
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
Hello, is there a possibility to add $tag
to the template variables?
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.
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)
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?
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.
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?
Hello, please update the node-fetch package up to 2.6.7 to fix this vulnerability issue https://security.snyk.io/vuln/SNYK-JS-NODEFETCH-2342118
Thank you in advance!
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
semantic-release-slack-bot/lib/success.js
Line 104 in 1cb7fab
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!
Hi, I was wondering if we can use this plugin without creating the incoming hook directly from your App.
Can I use my own created incoming hook?
I use selfhosted GitLab and the generated tag link is incorrect
When trying to add slack app in this link it fails after entering channel name. I get this response {"ok":false,"message":"Could not connect to slack."}
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.
semantic-release-slack-bot/lib/success.js
Line 109 in f377879
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
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
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?)
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
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
| 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
I am working on a project that requires Node 12 and when upgrading dependencies with patch and minor releases I got this warning:
error [email protected]: The engine "node" is incompatible with this module. Expected version ">=14.7". Got "12.21.0"
Shouldn't such a change be released as a major release?
We're using v1.1.1 and the latest release is v3.1.0. @juliuscc
This library's peerDependencies
needs to be updated to support the latest semantic release version: 20.1.0
. It currently fails to install on Node 18.
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"
}
]
}
}
}
]
]
}
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?
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 🙏
The plugin should verify the conditions in the verifyConditions step. It should check that there is a SLACK_WEBHOOK
It would be nice to send the release notes to slack message rather than just a link, if you agree with me with this i could open a PR for this
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:
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
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?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.