From fe65f132e27e34034063ac5437156f0e613befd5 Mon Sep 17 00:00:00 2001 From: Xiaofan Wu Date: Fri, 5 Apr 2019 14:17:40 +1100 Subject: [PATCH] chore: update release script formatting commit message --- scripts/release | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/release b/scripts/release index d7e3a7a38..205385ea4 100755 --- a/scripts/release +++ b/scripts/release @@ -1,6 +1,7 @@ #!/usr/bin/env node const axios = require('axios'); + const currentTag = process.env.CURRENT_TAG; const latestTag = process.env.LATEST_TAG; const releaseBranch = process.env.RELEASE_BRANCH; @@ -27,7 +28,10 @@ const getIncludedCommits = () => buildBot.get(`/compare/${currentTag}...${latest const formatCommitMsg = commits => commits .filter(({ commit }) => !commit.message.startsWith('Merge pull request #')) - .map(({ commit, sha }) => `- [${sha}] - ${commit.message}`) + .map(({ commit, sha }) => { + const [first, ...rest] = commit.message.split('\n'); + return `- [${sha}] ${first}\n ${rest.map(line => `\n\t${line}\n`).join('\n')}`; + }) .join('\n'); const createPullRequest = body =>