1 | # hubot-reviewer-lotto
|
2 | Hubot assigns a random reviewer for pull request on behalf of you.
|
3 |
|
4 | # preparation
|
5 |
|
6 | ## create a team in your github organization
|
7 |
|
8 | ![image](https://cloud.githubusercontent.com/assets/81522/3102957/76422e2c-e64e-11e3-91ee-7e4075d0f685.png)
|
9 |
|
10 | members of this organization are candidate reviewers.
|
11 |
|
12 |
|
13 | ## grab a github access token
|
14 | * open https://github.com/settings/tokens/new
|
15 | * select scopes: `repo` & `public_repo` & `read:org`
|
16 |
|
17 | # installation
|
18 | * install this npm package to your hubot repo
|
19 | * `npm i --save hubot-reviewer-lotto`
|
20 | * add `"hubot-reviewer-lotto"` to your `external-scripts.json`
|
21 | * set the following env vars on heroku
|
22 | <table>
|
23 | <tr>
|
24 | <th>`HUBOT_GITHUB_TOKEN`</th>
|
25 | <td>required. the access token you created above.</td>
|
26 | </tr>
|
27 | <tr>
|
28 | <th>`HUBOT_GITHUB_ORG`</th>
|
29 | <td>required. name of your github organization.</td>
|
30 | </tr>
|
31 | <tr>
|
32 | <th>`HUBOT_GITHUB_REVIEWER_TEAM`</th>
|
33 | <td>
|
34 | required. the reviewer **team id** you created above.<br>
|
35 | just in case, here is [a nice tutorial on how to get it](http://fabian-kostadinov.github.io/2015/01/16/how-to-find-a-github-team-id/).
|
36 | </td>
|
37 | </tr>
|
38 | <tr>
|
39 | <th>`HUBOT_GITHUB_WITH_AVATAR`</th>
|
40 | <td>optional. assignee's avatar image will be posted if this var is set to "1".</td>
|
41 | </tr>
|
42 | </table>
|
43 |
|
44 | # usage
|
45 | * `hubot reviewer for <repo> <pull>`
|
46 | * e.g. `hubot reviewer for our-webapp 345`
|
47 |
|
48 | ## example
|
49 |
|
50 | on hipchat
|
51 |
|
52 | ![image](https://cloud.githubusercontent.com/assets/81522/3103001/1085dc68-e64f-11e3-8b17-c8a0741c1b51.png)
|
53 |
|
54 | on github
|
55 |
|
56 | ![image](https://cloud.githubusercontent.com/assets/81522/3102996/f5d1364c-e64e-11e3-8af7-297c10d92208.png)
|
57 |
|
58 |
|
59 | # get involved
|
60 |
|
61 | 1. fork it ( https://github.com/sakatam/hubot-reviewer-lotto/fork )
|
62 | 2. create your feature branch (`git checkout -b my-new-feature`)
|
63 | 3. commit your changes (`git commit -am 'Add some feature'`)
|
64 | 4. push to the branch (`git push origin my-new-feature`)
|
65 | 5. create new pull request
|