summaryrefslogtreecommitdiff
path: root/src/server/api/service/github.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/api/service/github.ts')
-rw-r--r--src/server/api/service/github.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/server/api/service/github.ts b/src/server/api/service/github.ts
index da33648a16..9024740a96 100644
--- a/src/server/api/service/github.ts
+++ b/src/server/api/service/github.ts
@@ -11,7 +11,7 @@ const handler = new EventEmitter();
let bot: IUser;
-const post = async text => {
+const post = async (text: string) => {
if (bot == null) {
const account = await User.findOne({
usernameLower: config.github_bot.username.toLowerCase()
@@ -90,7 +90,7 @@ handler.on('push', event => {
case 'refs/heads/master':
const pusher = event.pusher;
const compare = event.compare;
- const commits = event.commits;
+ const commits: any[] = event.commits;
post([
`Pushed by **${pusher.name}** with ?[${commits.length} commit${commits.length > 1 ? 's' : ''}](${compare}):`,
commits.reverse().map(commit => `・[?[${commit.id.substr(0, 7)}](${commit.url})] ${commit.message.split('\n')[0]}`).join('\n'),