A Probot extension that adds slash commands to GitHub.
For example, from a comment box someone could type:
A Probot app could then use this extension to listen for the remind
slash command.
$ npm install --save probot-commands-pro
const commands = require('probot-commands-pro')
module.exports = robot => {
// Type `/label foo, bar` in a comment box for an Issue or Pull Request
commands(robot, 'label', (context, command) => {
const labels = command.arguments.split(/, */);
return context.github.issues.addLabels(context.issue({labels}));
});
}
Powered by commands