From c0170677d013757c56ca76cea4ce1b2cee45a80a Mon Sep 17 00:00:00 2001 From: Yasuaki Uechi Date: Wed, 25 Dec 2019 00:38:47 +0900 Subject: [PATCH] feat(release): notify GitHub release url instead of CHANGELOG (#555) Notify GitHub release URL to Slack. Fixes #506 --- packages/shipjs-lib/src/lib/config/defaultConfig.js | 5 +++-- packages/shipjs/src/flow/release.js | 1 + packages/shipjs/src/step/release/notifyReleaseSuccess.js | 2 ++ packages/shipjs/src/util/slack.js | 2 ++ 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/shipjs-lib/src/lib/config/defaultConfig.js b/packages/shipjs-lib/src/lib/config/defaultConfig.js index b77488b2..43d7f0c2 100644 --- a/packages/shipjs-lib/src/lib/config/defaultConfig.js +++ b/packages/shipjs-lib/src/lib/config/defaultConfig.js @@ -167,6 +167,7 @@ export default { releaseSuccess: ({ appName, version, + releaseTag, latestCommitHash, latestCommitUrl, repoURL, @@ -189,8 +190,8 @@ export default { short: true, }, { - title: 'CHANGELOG', - value: `${repoURL}/blob/master/CHANGELOG.md`, + title: 'Release', + value: `${repoURL}/releases/tag/${releaseTag}`, }, ], }), diff --git a/packages/shipjs/src/flow/release.js b/packages/shipjs/src/flow/release.js index 6c684193..80446d3d 100644 --- a/packages/shipjs/src/flow/release.js +++ b/packages/shipjs/src/flow/release.js @@ -57,6 +57,7 @@ async function release({ help = false, dir = '.', dryRun = false }) { config, appName, version, + releaseTag, latestCommitHash, latestCommitUrl, repoURL, diff --git a/packages/shipjs/src/step/release/notifyReleaseSuccess.js b/packages/shipjs/src/step/release/notifyReleaseSuccess.js index dcd7610e..82544bc3 100644 --- a/packages/shipjs/src/step/release/notifyReleaseSuccess.js +++ b/packages/shipjs/src/step/release/notifyReleaseSuccess.js @@ -5,6 +5,7 @@ export default async ({ config, appName, version, + releaseTag, latestCommitHash, latestCommitUrl, repoURL, @@ -22,6 +23,7 @@ export default async ({ config, appName, version, + releaseTag, latestCommitHash, latestCommitUrl, repoURL, diff --git a/packages/shipjs/src/util/slack.js b/packages/shipjs/src/util/slack.js index 10d897ab..22f28dd2 100644 --- a/packages/shipjs/src/util/slack.js +++ b/packages/shipjs/src/util/slack.js @@ -65,6 +65,7 @@ export async function notifyReleaseSuccess({ config, appName, version, + releaseTag, latestCommitHash, latestCommitUrl, repoURL, @@ -80,6 +81,7 @@ export async function notifyReleaseSuccess({ ? releaseSuccess({ appName, version, + releaseTag, latestCommitHash, latestCommitUrl, repoURL,