Automatic importing on Git push

You can make automatic bot deploying on git push.

This possible with Webhooks. Make install for this lib.

Setup

command /setupGit

url = Libs.Webhooks.getUrlFor(
{ command: "onGitPush", user_id: user.id }
)
Bot.sendMessage(url);

execute /setupGit copy url and go to Github.com > your repository -> Settings -> Webhooks. Press button "Add webhook"

Past copied url as Payload URL

Make like this:

Go to App - create command onGitPush

Bot.sendMessage("Start code importing...");
// Bot.exportGit also possible
Bot.importGit({
branch: "master", // it is master branch
success: "onGitImportCompleted"
})

command onGitImportCompleted

just put to answer: "Git import completed"

Commands onGitPush and onGitImportCompletedmust be in repository also. Because all commands will be deleted on git importing

Protect onGitPush command if you need this. Anybody can run it.