0.1.0 • Published 3 years ago

@gh-bot/core v0.1.0

Weekly downloads
-
License
GPL-3.0-or-later
Repository
github
Last release
3 years ago

@gh-bot/core: GitHub bot creation framework


Looking for a simpler way to create bots? Try @gh-bot/cli, which allows writing simple scripts that trigger on commands.


@gh-bot/core is a simple framework to allow bot creation on GitHub. You can let the bot respond to multiple events like this:

const bot = new GhBot(token, repo, github_secret);
bot.on('command', (command, ghBot) => {
        bot.comment("## Hello world!");
});
bot.on('push', (branch, ghBot) => {
        bot.comment("## Hello world!");
});
bot.listen(port);
  • port is port the bot listens on.
  • token is the GitHub access token of the bot
  • repo is an arry of repo owner and repo name, like "gh-bot", "core"
  • github_secret is the secret to use for the webhooks.

Migrating from botio

If you already having existing botio code and don't want to rewrite it for @gh-bot/cli, you can use @gh-bot/botio which provides the Bot.io API with a modern base.

0.1.0

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago