probot-commands-pro

1.0.1 • Public • Published

Probot: Commands

A Probot extension that adds slash commands to GitHub.

For example, from a comment box someone could type:

Slash commands in a comment box

A Probot app could then use this extension to listen for the remind slash command.

Installation

$ npm install --save probot-commands-pro

Usage

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}));
  });
}

Thanks

Powered by commands

/probot-commands-pro/

    Package Sidebar

    Install

    npm i probot-commands-pro

    Weekly Downloads

    0

    Version

    1.0.1

    License

    ISC

    Unpacked Size

    7.01 kB

    Total Files

    10

    Last publish

    Collaborators

    • rustin-liu