A Probot extension that adds slash commands to GitHub
Branch: master
Clone or download
Latest commit a62fe1c Sep 19, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github Create stale.yml Apr 5, 2018
test Update standard to v12 Sep 18, 2018
.gitignore chore: ignore package-lock.json Oct 15, 2017
.travis.yml
README.md MVP Sep 12, 2017
index.js Update standard to v12 Sep 18, 2018
package.json

README.md

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

Usage

const commands = require('probot-commands')

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