|
@@ -68,8 +68,10 @@ function getGitHubCommitsUrl(branchName) {
|
|
|
return url.resolve(GITHUB_REPOS_URI, `commits/${branchName}`);
|
|
return url.resolve(GITHUB_REPOS_URI, `commits/${branchName}`);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-function getGitHubComparingUrl(branchName) {
|
|
|
|
|
- return url.resolve(GITHUB_REPOS_URI, `compare/${branchName}`);
|
|
|
|
|
|
|
+function getGitHubComparingLink(branchName) {
|
|
|
|
|
+ const label = `master <- ${branchName}`;
|
|
|
|
|
+ const link = url.resolve(GITHUB_REPOS_URI, `compare/${branchName}`);
|
|
|
|
|
+ return `<${link}|${label}>`;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -92,24 +94,24 @@ function printSlackAttachments(mode, summaries) {
|
|
|
title: branchName,
|
|
title: branchName,
|
|
|
title_link: getGitHubCommitsUrl(branchName),
|
|
title_link: getGitHubCommitsUrl(branchName),
|
|
|
fields: [
|
|
fields: [
|
|
|
- {
|
|
|
|
|
- title: 'Author',
|
|
|
|
|
- value: authorName,
|
|
|
|
|
- short: true,
|
|
|
|
|
- },
|
|
|
|
|
{
|
|
{
|
|
|
title: 'Author Date',
|
|
title: 'Author Date',
|
|
|
value: authorDate,
|
|
value: authorDate,
|
|
|
short: true,
|
|
short: true,
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- title: 'Comparing URL',
|
|
|
|
|
- value: getGitHubComparingUrl(branchName),
|
|
|
|
|
|
|
+ title: 'Author',
|
|
|
|
|
+ value: authorName,
|
|
|
|
|
+ short: true,
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
title: 'Last Commit Subject',
|
|
title: 'Last Commit Subject',
|
|
|
value: subject,
|
|
value: subject,
|
|
|
},
|
|
},
|
|
|
|
|
+ {
|
|
|
|
|
+ title: 'Comparing Link',
|
|
|
|
|
+ value: getGitHubComparingLink(branchName),
|
|
|
|
|
+ },
|
|
|
],
|
|
],
|
|
|
};
|
|
};
|
|
|
});
|
|
});
|