Skip to content

A Probot extension that adds slash commands to GitHub

Notifications You must be signed in to change notification settings

koalaty-code/commands

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A Probot extension that adds slash commands to GitHub

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%