probot/README.md

37 lines
1.9 KiB
Markdown
Raw Normal View History

2016-10-08 06:52:36 +08:00
# PRobot
2016-09-17 00:06:46 +08:00
2016-09-17 06:00:20 +08:00
_NOTE: this REAME is aspirational, and the project name is guaranteed to change._
2016-10-08 06:56:24 +08:00
PRobot is a trainable robot that responds to activity on GitHub. It's like [Hubot](https://hubot.github.com/), but for GitHub events instead of chat messages.
Automatically welcome first-time contributors, @mention previous authors, or close stale pull requests with pre-built behaviors. Write your own behaviors to implement whatever workflow your project needs.
2016-09-17 00:06:46 +08:00
2016-09-18 02:31:24 +08:00
## Why?
2016-10-08 06:56:24 +08:00
Almost any workflow or process you can imagine can be added to GitHub with [webhooks](https://developer.github.com/webhooks/), the [API](https://developer.github.com/v3/), and now [Integrations](https://developer.github.com/early-access/integrations/). But adding that workflow usually involves writing a lot of code to integrate with GitHub, and a tiny bit of code to implement the behavior you want. This project aims to be a generic bot for building integrations with GitHub.
2016-09-18 02:31:24 +08:00
The functionality of all of these awesome bots could be ported to [behaviors](#creating-a-behavior):
- [highfive](https://github.com/servo/highfive) - GitHub hooks to provide an encouraging atmosphere for new contributors
- [Homu](https://github.com/barosl/homu) - A bot that integrates with GitHub and your favorite continuous integration service
- [mention-bot](https://github.com/facebook/mention-bot) - Automatically mention potential reviewers on pull requests.
2016-09-24 22:41:25 +08:00
- [PullAprove](http://pullapprove.com/)
- [LGTM](https://lgtm.co)
2016-09-18 02:31:24 +08:00
- Know of other examples? [Add them here…](../../edit/master/README.md)
Here are some behaviors that we plan to implement:
2016-09-17 00:06:46 +08:00
- Auto-responder for new issues and pull requests
- Welcome new contributors
- Auto close stale PRs
- @mention `OWNERS` based on modified files
- "Based on recent activity, expect a response in X days"
## Creating a behavior
```javascript
robot.on('pull', function(event) {
robot.comment("Thanks for the pull request! We'll review it within 72 hours!");
});
```