Skip to content

Commit

Permalink
fix(success-comment): add missing dot and line break to improve reada…
Browse files Browse the repository at this point in the history
…bility (#353)

Fixes #351
  • Loading branch information
JonasSchubert committed Mar 31, 2022
1 parent e6fa727 commit 87c0246
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions lib/get-success-comment.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ module.exports = (issueOrMergeRequest, releaseInfos, nextRelease) =>
releaseInfos.length > 0
? `\n\nThe release is available on${
releaseInfos.length === 1
? ` ${linkify(releaseInfos[0])}`
? ` ${linkify(releaseInfos[0])}.`
: `:\n${releaseInfos.map(releaseInfo => `- ${linkify(releaseInfo)}`).join('\n')}`
}`
: ''
}
Your **[semantic-release](${HOME_URL})** bot :package: :rocket:`;
\nYour **[semantic-release](${HOME_URL})** bot :package: :rocket:`;
6 changes: 3 additions & 3 deletions test/success.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@ test.serial('Post comments to related issues and MRs', async t => {
.reply(200, [])
.post(`/projects/100/merge_requests/1/notes`, {
body:
':tada: This MR is included in version 1.0.0 :tada:\n\nThe release is available on [GitLab release](https://gitlab.com/test_user/test_repo/-/releases/v1.0.0)\nYour **[semantic-release](https://github.com/semantic-release/semantic-release)** bot :package: :rocket:',
':tada: This MR is included in version 1.0.0 :tada:\n\nThe release is available on [GitLab release](https://gitlab.com/test_user/test_repo/-/releases/v1.0.0).\n\nYour **[semantic-release](https://github.com/semantic-release/semantic-release)** bot :package: :rocket:',
})
.reply(200)
.post(`/projects/300/merge_requests/3/notes`)
.reply(200)
.post(`/projects/100/issues/11/notes`, {
body:
':tada: This issue has been resolved in version 1.0.0 :tada:\n\nThe release is available on [GitLab release](https://gitlab.com/test_user/test_repo/-/releases/v1.0.0)\nYour **[semantic-release](https://github.com/semantic-release/semantic-release)** bot :package: :rocket:',
':tada: This issue has been resolved in version 1.0.0 :tada:\n\nThe release is available on [GitLab release](https://gitlab.com/test_user/test_repo/-/releases/v1.0.0).\n\nYour **[semantic-release](https://github.com/semantic-release/semantic-release)** bot :package: :rocket:',
})
.reply(200)
.post(`/projects/100/issues/13/notes`)
Expand Down Expand Up @@ -117,7 +117,7 @@ test.serial('Post comments for multiple releases', async t => {
.reply(200, [])
.post(`/projects/100/merge_requests/1/notes`, {
body:
':tada: This MR is included in version 1.0.0 :tada:\n\nThe release is available on:\n- [GitLab release](https://gitlab.com/test_user/test_repo/-/releases/v1.0.0)\n- `Other release`\nYour **[semantic-release](https://github.com/semantic-release/semantic-release)** bot :package: :rocket:',
':tada: This MR is included in version 1.0.0 :tada:\n\nThe release is available on:\n- [GitLab release](https://gitlab.com/test_user/test_repo/-/releases/v1.0.0)\n- `Other release`\n\nYour **[semantic-release](https://github.com/semantic-release/semantic-release)** bot :package: :rocket:',
})
.reply(200);

Expand Down

0 comments on commit 87c0246

Please sign in to comment.