https://github.com/ti-community-infra/probot-commands-pro
A Probot extension that adds slash commands to GitHub.
https://github.com/ti-community-infra/probot-commands-pro
probot slash-commands
Last synced: 24 days ago
JSON representation
A Probot extension that adds slash commands to GitHub.
- Host: GitHub
- URL: https://github.com/ti-community-infra/probot-commands-pro
- Owner: ti-community-infra
- Created: 2020-08-25T08:00:49.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-07-05T07:34:25.000Z (about 4 years ago)
- Last Synced: 2024-04-23T17:33:37.868Z (about 1 year ago)
- Topics: probot, slash-commands
- Language: JavaScript
- Size: 14.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Probot: Commands
[](https://github.com/features/actions)
[](https://codecov.io/gh/tidb-community-bots/probot-commands-pro)
[](https://probot.github.io/)
[](https://github.com/facebook/jest)
[](https://tidb-community-bots.isc-license.org)> 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-pro
```## Usage
```js
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](https://github.com/probot/commands)