summaryrefslogtreecommitdiff
path: root/src/api
diff options
context:
space:
mode:
authorAya Morisawa <AyaMorisawa4869@gmail.com>2017-03-17 00:21:32 +0900
committerAya Morisawa <AyaMorisawa4869@gmail.com>2017-03-17 00:29:58 +0900
commite2da48cceea5049bb1695b23f5e8fa89c2a06d09 (patch)
treea56b337ee9da9bdacc969ed7d2e56b032dfc6cd1 /src/api
parentUpdate dependencies :rocket: (diff)
downloadsharkey-e2da48cceea5049bb1695b23f5e8fa89c2a06d09.tar.gz
sharkey-e2da48cceea5049bb1695b23f5e8fa89c2a06d09.tar.bz2
sharkey-e2da48cceea5049bb1695b23f5e8fa89c2a06d09.zip
Update the message
Diffstat (limited to 'src/api')
-rw-r--r--src/api/service/github.ts10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/api/service/github.ts b/src/api/service/github.ts
index c60cb25cb8..a6eba3d5e5 100644
--- a/src/api/service/github.ts
+++ b/src/api/service/github.ts
@@ -35,12 +35,16 @@ module.exports = async (app: express.Application) => {
case 'refs/heads/master':
const pusher = event.pusher;
const compare = event.compare;
- const commits = event.commits.map(commit => `・${commit.message}`).join('\n');
- post(`Pushed by **${pusher.name}**\n${commits}\nCompare changes: ${compare}`);
+ const commits = event.commits;
+ post([
+ `Pushed by **${pusher.name}** with ${commits.length} commit${commits.length > 1 ? 's' : ''}: ${compare}`,
+ '',
+ commits.map(commit => `・${commit.message.split('\n')[0]}`).join('\n'),
+ ].join('\n'));
break;
case 'refs/heads/release':
const commit = event.commits[0];
- post(`RELEASED🎉: ${commit.message}`);
+ post(`RELEASED: ${commit.message}`);
break;
}
});