3
3
[ ![ Hommando]] [ Akemi Homura ]
4
4
5
5
Homu is a bot that integrates with GitHub and your favorite continuous
6
- integration service, such as [ Buildbot ] or [ Travis CI ] .
6
+ integration service such as [ Travis CI ] , [ Appveyor ] or [ Buildbot ] .
7
7
8
8
[ Hommando ] : https://i.imgur.com/j0jNvHF.png
9
9
[ Akemi Homura ] : https://wiki.puella-magi.net/Homura_Akemi
10
10
[ Buildbot ] : http://buildbot.net/
11
11
[ Travis CI ] : https://travis-ci.org/
12
+ [ Appveyor ] : https://www.appveyor.com/
12
13
13
14
## Why is it needed?
14
15
@@ -31,8 +32,9 @@ approval comment from one of the configured reviewers. When the pull request is
31
32
approved, Homu tests it using your favorite continuous integration service, and
32
33
only when it passes all the tests, it is merged into ` master ` .
33
34
34
- Note that Homu is ** not** a replacement of Travis CI or Buildbot. It works on
35
- top of them. Homu itself doesn't have the ability to test pull requests.
35
+ Note that Homu is ** not** a replacement of Travis CI, Buildbot or Appveyor. It
36
+ works on top of them. Homu itself doesn't have the ability to test pull
37
+ requests.
36
38
37
39
## Influences of bors
38
40
@@ -50,8 +52,8 @@ before the merge" came from bors. However, there are also some differences:
50
52
feature. This approach improves the overall performance and the response
51
53
time, because the bot is informed about the status changes immediately.
52
54
53
- And also, Homu has more features, such as ` rollup ` , ` try ` , and the Travis CI
54
- support.
55
+ And also, Homu has more features, such as ` rollup ` , ` try ` , and the Travis CI &
56
+ Appveyor support.
55
57
56
58
[ bors ] : https://github.com/graydon/bors
57
59
[ Webhooks ] : https://developer.github.com/webhooks/
@@ -62,74 +64,71 @@ support.
62
64
### How to install
63
65
64
66
``` sh
65
- sudo apt-get install python3-venv
66
-
67
- pyvenv .venv
68
- . .venv/bin/activate
69
-
70
- # Stable version
71
-
72
- pip install homu
73
-
74
- # Development version
75
-
76
- git clone https://github.com/barosl/homu.git
77
- pip install -e homu
67
+ $ sudo apt-get install python3-venv
68
+ $ pyvenv .venv
69
+ $ . .venv/bin/activate
70
+ $ git clone https://github.com/servo/homu.git
71
+ $ pip install -e homu
78
72
```
79
73
80
74
### How to configure
81
75
82
- 1 . Copy ` cfg.sample.toml ` to ` cfg.toml ` , and edit it accordingly.
83
-
84
- 2 . Create a GitHub account that will be used by Homu. You can also use an
85
- existing account. In the [ account settings] [ settings ] , register a new
86
- application and generate a new access token (with the ` repo ` permission).
87
- The OAuth Callback URL should be ` http://HOST:PORT/callback ` , the homepage URL
88
- isn't needed and can be anything, for example ` http://HOST:PORT/ ` .
89
-
90
- 3 . Add a Webhook to your repository:
91
-
92
- - Payload URL: ` http://HOST:PORT/github `
93
- - Content type: ` application/json `
94
- - Secret: The same as ` repo.NAME.github.secret ` in cfg.toml
95
- - Events: ` Issue Comment ` , ` Pull Request ` , ` Push ` , ` Status `
76
+ In the following instructions, ` HOST ` refers to the hostname (or IP address)
77
+ where you are running your custom homu instance. ` PORT ` is the port the service
78
+ is listening to and is configured in ` web.port ` in ` cfg.toml ` . ` NAME ` refers to
79
+ the name of the repository you are configuring homu for.
96
80
97
- 4 . Add a Webhook to your continuous integration service:
81
+ 1 . Copy ` cfg.sample.toml ` to ` cfg.toml ` . You'll need to edit this file to set up
82
+ your configuration. The following steps explain where you can find important
83
+ config values.
98
84
99
- - Buildbot
100
-
101
- Insert the following code to the ` master.cfg ` file:
102
-
103
- ``` python
104
- from buildbot.status.status_push import HttpStatusPush
105
-
106
- c[' status' ].append(HttpStatusPush(
85
+ 2 . Create a GitHub account that will be used by Homu. You can also use an
86
+ existing account. In the [ account settings] [ settings ] , go to "OAuth
87
+ applications" and create a new application:
88
+ - Make note of the "Client ID" and "Client Secret"; you will need to put them in
89
+ your ` cgf.toml ` .
90
+ - The OAuth Callback URL should be ` http://HOST:PORT/callback ` .
91
+ - The homepage URL isn't necessary; you could set ` http://HOST:PORT/ ` .
92
+
93
+ 3 . Go to the user settings of the GitHub account you created/used in the
94
+ previous step. Go to "Personal access tokens". Click "Generate new token" and
95
+ choose the "repo" and "user" scopes. Put the token value in your ` cfg.toml ` .
96
+
97
+ 4 . Add your new GitHub account as a Collaborator to the GitHub repo you are
98
+ setting up homu for. This can be done in repo (NOT user) "Settings", then
99
+ "Collaborators".
100
+
101
+ 5 . Add a Webhook to your repository. This is done under repo (NOT user)
102
+ "Settings", then "Webhooks". Click "Add webhook", the set:
103
+ - Payload URL: ` http://HOST:PORT/github `
104
+ - Content type: ` application/json `
105
+ - Secret: The same as ` repo.NAME.github.secret ` in ` cfg.toml `
106
+ - Events: ` Issue Comment ` , ` Pull Request ` , ` Push ` , ` Status `
107
+
108
+ 6 . Add a Webhook to your continuous integration service, if necessary. You don't
109
+ need this if using Travis/Appveyor.
110
+ - Buildbot
111
+
112
+ Insert the following code to the ` master.cfg ` file:
113
+
114
+ ``` python
115
+ from buildbot.status.status_push import HttpStatusPush
116
+
117
+ c[' status' ].append(HttpStatusPush(
107
118
serverUrl = ' http://HOST:PORT/buildbot' ,
108
119
extra_post_params = {' secret' : ' repo.NAME.buildbot.secret in cfg.toml' },
109
- ))
110
- ```
120
+ ))
121
+ ```
111
122
112
- - Travis CI
113
-
114
- Add [your Travis token][travis] as `repo.NAME .travis.token` in cfg.toml.
115
- Insert the following code to the `.travis.yml` file :
116
-
117
- ```yaml
118
- notifications:
119
- webhooks: http:// HOST :PORT / travis
120
-
121
- branches:
122
- only:
123
- - auto
124
- ```
123
+ 7 . Go through the rest of your `cfg.toml` and uncomment (and change, if needed)
124
+ parts of the config you' ll need.
125
125
126
126
[settings]: https:// github.com/ settings/ applications
127
127
[travis]: https:// travis- ci.org/ profile/ info
128
128
129
129
# ## How to run
130
130
131
131
```sh
132
- . .venv/ bin / activate
133
-
134
- homu
132
+ $ . .venv/ bin / activate
133
+ $ homu
135
134
```
0 commit comments