Yuki Takei 5 лет назад
Родитель
Сommit
c3d99e4841
1 измененных файлов с 11 добавлено и 9 удалено
  1. 11 9
      bin/github-actions/list-branches.js

+ 11 - 9
bin/github-actions/list-branches.js

@@ -68,8 +68,10 @@ function getGitHubCommitsUrl(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_link: getGitHubCommitsUrl(branchName),
       fields: [
-        {
-          title: 'Author',
-          value: authorName,
-          short: true,
-        },
         {
           title: 'Author Date',
           value: authorDate,
           short: true,
         },
         {
-          title: 'Comparing URL',
-          value: getGitHubComparingUrl(branchName),
+          title: 'Author',
+          value: authorName,
+          short: true,
         },
         {
           title: 'Last Commit Subject',
           value: subject,
         },
+        {
+          title: 'Comparing Link',
+          value: getGitHubComparingLink(branchName),
+        },
       ],
     };
   });