forked from github/developer.github.com
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhook.rb
More file actions
59 lines (57 loc) · 1.91 KB
/
hook.rb
File metadata and controls
59 lines (57 loc) · 1.91 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
module GitHub
module Resources
module Responses
HOOK ||= {
"id" => 1,
"url" => "https://api.github.com/repos/octocat/Hello-World/hooks/1",
"test_url" => "https://api.github.com/repos/octocat/Hello-World/hooks/1/test",
"ping_url" => "https://api.github.com/repos/octocat/Hello-World/hooks/1/pings",
"name" => "web",
"events" => ["push", "pull_request"],
"active" => true,
"config" =>
{'url' => 'http://example.com/webhook', 'content_type' => 'json'},
"updated_at" => "2011-09-06T20:39:23Z",
"created_at" => "2011-09-06T17:26:27Z",
}
ORG_HOOK ||= {
"id" => 1,
"url" => "https://api.github.com/orgs/octocat/hooks/1",
"ping_url" => "https://api.github.com/orgs/octocat/hooks/1/pings",
"name" => "web",
"events" => ["push", "pull_request"],
"active" => true,
"config" =>
{'url' => 'http://example.com', 'content_type' => 'json'},
"updated_at" => "2011-09-06T20:39:23Z",
"created_at" => "2011-09-06T17:26:27Z",
}
EVENT ||= {
:type => "Event",
:public => true,
:payload => {},
:repo => {
:id => 3,
:name => "octocat/Hello-World",
:url => "https://api.github.com/repos/octocat/Hello-World"
},
:actor => {
:id => 1,
:login => "octocat",
:gravatar_id => "",
:avatar_url => "https://github.com/images/error/octocat_happy.gif",
:url => "https://api.github.com/users/octocat"
},
:org => {
:id => 1,
:login => "github",
:gravatar_id => "",
:url => "https://api.github.com/orgs/github",
:avatar_url => "https://github.com/images/error/octocat_happy.gif"
},
:created_at => "2011-09-06T17:26:27Z",
:id => "12345"
}
end
end
end