https://github.com/probot/commands
A Probot extension that adds slash commands to GitHub
https://github.com/probot/commands
probot probot-extension
Last synced: 3 days ago
JSON representation
A Probot extension that adds slash commands to GitHub
- Host: GitHub
- URL: https://github.com/probot/commands
- Owner: probot
- Created: 2017-09-12T02:38:45.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-01-30T02:49:48.000Z (over 1 year ago)
- Last Synced: 2025-04-25T04:19:07.956Z (15 days ago)
- Topics: probot, probot-extension
- Language: JavaScript
- Size: 43 KB
- Stars: 65
- Watchers: 4
- Forks: 23
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Probot: Commands
> A [Probot](https://github.com/probot/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.
## Installation
```
$ npm install --save probot-commands
```## Usage
```js
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}));
});
}
```