@@ -84,11 +84,23 @@ for. Default: `["push"]`.
8484:_ Optional_ ** boolean** - Determines whether the hook is actually
8585triggered on pushes.
8686
87+ Example: The[ "web" service hook] ( https://github.com/github/github-services/blob/master/services/web.rb#L4-11 )
88+ takes these fields:
89+
90+ * ` url `
91+ * ` content_type `
92+ * ` secret `
93+
94+ Here's how you can setup a hook that posts raw JSON (instead of the default
95+ legacy format):
96+
8797<%= json\
8898: name => "web",
8999: active => true,
100+ : events =>[ 'push', 'pull_request'] ,
90101: config => {
91- : url => 'http://something.com/webhook'}
102+ : url => 'http://something.com/webhook ',
103+ : content_type => 'json'}
92104%>
93105
94106###Response
@@ -97,7 +109,7 @@ triggered on pushes.
97109: Location => 'https://api.github.com/repos/user/repo/hooks/1 ' %>
98110<%= json: hook %>
99111
100- ### Edit a hook
112+ ##Edit a hook
101113
102114PATCH /repos/:owner/:repo/hooks/:id
103115
@@ -117,6 +129,9 @@ Booleans are stored internally as "1" for true, and "0" for false. Any
117129JSON true/false values will be converted automatically.
118130
119131
132+
133+ You can change a hook to send straight JSON by
134+
120135` events `
121136:_ Optional_ ** array** - Determines what events the hook is triggered
122137for. This replaces the entire array of events. Default:` ["push"] ` .
@@ -133,13 +148,23 @@ list of events that the Hook triggers for.
133148:_ Optional_ ** boolean** - Determines whether the hook is actually
134149triggered on pushes.
135150
151+ Example: The[ "web" service hook] ( https://github.com/github/github-services/blob/master/services/web.rb#L4-11 )
152+ takes these fields:
153+
154+ * ` url `
155+ * ` content_type `
156+ * ` secret `
157+
158+ Here's how you can setup a hook that posts raw JSON (instead of the default
159+ legacy format):
160+
136161<%= json\
137- : name => "campfire ",
162+ : name => "web ",
138163: active => true,
164+ : add_events =>[ 'pull_request'] ,
139165: config => {
140- : subdomain => 'github',
141- : room => 'Commits',
142- : token => 'abc123'}
166+ : url => "http://requestb.in ",
167+ : content_type => "json"}
143168%>
144169
145170###Response