
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
Simple bot that knows how to handle events when told too. Use base bot to build more complex bots with plugins.
Simple bot that knows how to handle events when told too. Use base bot to build more complex bots with plugins.
Install with npm
$ npm i base-bot --save
var bot = require('base-bot');
Create a new instance of a BaseBot with provided options.
Params
options {Object}: Options to configure the github bot.Example
var bot = new BaseBot();
Handle a payload object. The payload will be passed to all registered handlers. Handlers may modify the payload and return it in their callback. The aggregated results will be returned in the handle callback.
Params
event {String}: Event type to handle. Only listeners registered for this type will be notified.payload {Object}: Payload object to handle.cb {Function}: Callback to notify call when finished handling payload.Example
bot.handle('issue', payload, function(err, results) {
if (err) return console.error(err);
console.log(results);
});
Add a specific on and handle methods for an event.
Params
method {String}: Name of the methods to add.returns {Object} this: for chaining.Example
bot.handler('issue');
bot.onIssue(function(payload, cb) { cb(null, payload); });
bot.handleIssue(payload, function(err, results) {
if (err) return console.error(err);
console.log(results);
});
Add a specific on and handle methods for an array of events.
Params
methods {String|Array}: Array of method names to add.returns {Object} this: for chaining.Example
bot.handlers(['issue', 'commit']);
bot.onIssue(function(payload, cb) { cb(null, payload); });
bot.onCommit(function(payload, cb) { cb(null, payload); });
bot.handleIssue(payload, function(err, results) {
if (err) return console.error(err);
console.log(results);
});
bot.handleCommit(payload, function(err, results) {
if (err) return console.error(err);
console.log(results);
});
Install dev dependencies:
$ npm i -d && npm test
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Brian Woodward
Copyright © 2015 Brian Woodward Released under the MIT license.
This file was generated by verb on December 21, 2015.
FAQs
Simple bot that knows how to handle events when told too. Use base bot to build more complex bots with plugins.
We found that base-bot demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.