Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
mia-pi-git committed Jun 29, 2020
1 parent 7ca7ded commit de9bb8b
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions server/chat-plugins/github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ export const github = githubhook({
secret: (Config.github?.secret || ''),
});

github.stop();

github.on(
'push',
(repo: string, ref: string, result: AnyObject) => {
Expand All @@ -30,9 +28,6 @@ github.on(
return GithubParser.pull(repo, ref, result)
}
);

github.listen();

export const GithubParser = new class {
gitbans: Map<string, number | string>;
pushes: AnyObject;
Expand Down Expand Up @@ -72,7 +67,6 @@ export const GithubParser = new class {
if (!this.pushes[repo]) this.pushes[repo] = {};
this.pushes[repo][result.pusher.name] = Date.now();
this.report(buf);
return buf;
}
pull(repo: string, ref: string, result: AnyObject) {
let committer = toID(result.sender.login);
Expand Down Expand Up @@ -182,3 +176,5 @@ export const commands: ChatCommands = {
},
},
};

github.listen();

0 comments on commit de9bb8b

Please sign in to comment.