Skip to content

Commit 01615fb

Browse files
committed
Add Schemas::MEMBER for MemberEvents
1 parent 2c4dbfe commit 01615fb

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

lib/travis/listener/app.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,8 @@ def decoded_payload
195195
Schemas::INSTALLATION
196196
when 'create', 'delete', 'repository', 'check_run', 'check_suite'
197197
Schemas::REPOSITORY
198+
when 'member'
199+
Schemas::MEMBER
198200
else
199201
Schemas::FALLBACK
200202
end

lib/travis/listener/schemas.rb

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,27 @@ module Schemas
8484
}
8585
}
8686

87+
# For MemberEvents
88+
# (https://developer.github.com/v3/activity/events/types/#memberevent)
89+
#
90+
MEMBER = {
91+
"action" => nil,
92+
"member" => {
93+
"login" => nil,
94+
"id" => nil,
95+
},
96+
"changes" => {
97+
"permission" => {
98+
"from" => nil,
99+
}
100+
},
101+
"repository" => {
102+
"id" => nil,
103+
"name" => nil,
104+
"full_name" => nil,
105+
},
106+
}
107+
87108
FALLBACK = {
88109
"sender" => {
89110
"id" => nil,

0 commit comments

Comments
 (0)