Skip to content

Commit 381175a

Browse files
committed
sometimes the source repo info is empty
seen when a pull request is `"action"=>"closed"`
1 parent 39fad7a commit 381175a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/travis/listener/schemas.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def self.event_details(event_type, payload)
9898
repository: payload["repository"]["full_name"],
9999
number: payload['number'],
100100
action: payload['action'],
101-
source: payload['pull_request']['head']['repo']['full_name'],
101+
source: payload['pull_request']['head']['repo'] && payload['pull_request']['head']['repo']['full_name'],
102102
head: payload['pull_request']['head']['sha'][0..6],
103103
ref: payload['pull_request']['head']['ref'],
104104
user: payload['pull_request']['head']['user']['login'],

0 commit comments

Comments
 (0)