v3: fix gh call

This commit is contained in:
Konstantin Haase 2015-03-06 17:04:46 +01:00
parent 819b057497
commit e01e71e6db

View File

@ -28,7 +28,7 @@ module Travis::API::V3
def set_hook(repository, flag)
hooks_url = "repos/#{repository.slug}/hooks"
if hook = gh.get(hooks_url).detect { |hook| hook['name'.freeze] == 'travis'.freeze }
if hook = gh[hooks_url].detect { |hook| hook['name'.freeze] == 'travis'.freeze }
gh.delete(hook['_links'.freeze]['self'.freeze]['href'.freeze])
end