Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slack link bug #1887

Merged
merged 2 commits into from Mar 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion plugins/slack/package.json
Expand Up @@ -37,7 +37,7 @@
"test": "jest --maxWorkers=2 --config ../../package.json"
},
"dependencies": {
"@atomist/slack-messages": "~1.2.0",
"@atomist/slack-messages": "^1.2.2",
"@auto-it/core": "link:../../packages/core",
"@octokit/rest": "^18.0.0",
"fp-ts": "^2.5.3",
Expand Down
9 changes: 5 additions & 4 deletions plugins/slack/src/index.ts
@@ -1,5 +1,5 @@
import { RestEndpointMethodTypes } from "@octokit/rest";
import { githubToSlack } from "@atomist/slack-messages";
import { githubToSlack, url } from "@atomist/slack-messages";
import createHttpsProxyAgent, { HttpsProxyAgent } from "https-proxy-agent";

import {
Expand Down Expand Up @@ -331,14 +331,15 @@ export default class SlackPlugin implements IPlugin {
);
const urls = releases.map(
(release) =>
`*<${release.data.html_url}|${
`*${url(
release.data.html_url,
release.data.name || release.data.tag_name
}>*`
)}*`
);
const releaseUrl =
urls.length > 1
? urls.join(", ")
: `<${releases[0].data.html_url}|View Release>`;
: `${url(releases[0].data.html_url, 'View Release')}`;

// First add context to share link to release
messages[0].unshift(
Expand Down
15 changes: 10 additions & 5 deletions yarn.lock
Expand Up @@ -58,16 +58,21 @@
resolved "https://registry.yarnpkg.com/@atomictech/rehype-toc/-/rehype-toc-3.1.2.tgz#62ec993528be26dbf304e1ec0db75ae074d459df"
integrity sha512-ZLqzgBo9WUgXmLpCF8e2rYeHZjJbvWk/3R+mmpKBMDmjYRTb6/Fk6SSGFv0x1aorPwg0OLfg6ZvjAaRbndRPcA==

"@atomist/slack-messages@^1.2.2":
version "1.2.2"
resolved "https://registry.yarnpkg.com/@atomist/slack-messages/-/slack-messages-1.2.2.tgz#782d31936a0363e4458272bcc8fbe4f7651292ee"
integrity sha512-K1kQv1BZVtMXQqdpNZt9Pgh85KwamsWX9gYyq1xG4cpyb+EacfMiNfumrju16piFXanCUrCR0P1DowPjV2qV/A==

"@atomist/slack-messages@~1.2.0":
version "1.2.1"
resolved "https://registry.yarnpkg.com/@atomist/slack-messages/-/slack-messages-1.2.1.tgz#74e9499ae2b017cbb0e4f047033b9434cb42c1d7"
integrity sha512-TYiuOxy5Pf9ORn94X/ujl7PY9opIh+l6NzRAV8EBLpIv3IC9gmEoev4wmmyP7Q33J0/nGjqxAaZcq/n2SZrYaQ==

"@auto-it/bot-list@link:packages/bot-list":
version "10.19.0"
version "10.20.2"

"@auto-it/core@link:packages/core":
version "10.19.0"
version "10.20.2"
dependencies:
"@auto-it/bot-list" "link:packages/bot-list"
"@endemolshinegroup/cosmiconfig-typescript-loader" "^3.0.2"
Expand Down Expand Up @@ -109,7 +114,7 @@
url-join "^4.0.0"

"@auto-it/npm@link:plugins/npm":
version "10.19.0"
version "10.20.2"
dependencies:
"@auto-it/core" "link:packages/core"
"@auto-it/package-json-utils" "link:packages/package-json-utils"
Expand All @@ -126,13 +131,13 @@
user-home "^2.0.0"

"@auto-it/package-json-utils@link:packages/package-json-utils":
version "10.19.0"
version "10.20.2"
dependencies:
parse-author "^2.0.0"
parse-github-url "1.0.2"

"@auto-it/released@link:plugins/released":
version "10.19.0"
version "10.20.2"
dependencies:
"@auto-it/bot-list" "link:packages/bot-list"
"@auto-it/core" "link:packages/core"
Expand Down