@@ -25,7 +25,7 @@ Dependencies
25
25
Setup
26
26
=====
27
27
28
- You can configure what the application does by copying the sample config file
28
+ You can configure what the application does by copying the sample config file
29
29
``config.json.sample `` to ``config.json `` and adapting it to your needs:
30
30
31
31
::
@@ -101,6 +101,11 @@ Not all events have an associated branch, so a branch-specific hook cannot
101
101
fire for such events. For events that contain a pull_request object, the
102
102
base branch (target for the pull request) is used, not the head branch.
103
103
104
+ The payload structure depends on the event type. Please review:
105
+
106
+ https://developer.github.com/v3/activity/events/types/
107
+
108
+
104
109
Deploy
105
110
======
106
111
@@ -144,7 +149,7 @@ To deploy in a Docker container you have to expose the port 5000, for example
144
149
with the following command:
145
150
146
151
::
147
-
152
+
148
153
git clone http://github.com/carlos-jenkins/python-github-webhooks.git
149
154
docker build -t carlos-jenkins/python-github-webhooks python-github-webhooks
150
155
docker run -d --name webhooks -p 5000:5000 carlos-jenkins/python-github-webhooks
@@ -159,6 +164,27 @@ You can also mount volume to setup the ``hooks/`` directory, and the file
159
164
-v /path/to/my/config.json:/src/config.json \
160
165
-p 5000:5000 python-github-webhooks
161
166
167
+
168
+ Test your deployment
169
+ ====================
170
+
171
+ To test your hook you may use the GitHub REST API with ``curl ``:
172
+
173
+ https://developer.github.com/v3/
174
+
175
+ ::
176
+
177
+ curl --user "<youruser>" https://api.github.com/repos/<youruser>/<myrepo>/hooks
178
+
179
+ Take note of the test_url.
180
+
181
+ ::
182
+
183
+ curl --user "<youruser>" -i -X POST <test_url>
184
+
185
+ You should be able to see any log error in your webapp.
186
+
187
+
162
188
Debug
163
189
=====
164
190
0 commit comments