lib/kraken-build/github-api.rb in kraken-build-0.0.4 vs lib/kraken-build/github-api.rb in kraken-build-0.0.5
- old
+ new
@@ -3,15 +3,15 @@
def initialize(config)
@oauth_token = config[:token]
@owner = config[:owner]
@repository = config[:repository]
-
+ @headers = {:headers => {"User-Agent" => "Kraken-Build"}}
self.class.base_uri "https://api.github.com"
end
def get_branches(options = {})
+ options.merge!(@headers)
response = self.class.get("/repos/#{@owner}/#{@repository}/branches?access_token=#{@oauth_token}", options)
response.map{|branch| branch["name"]}
end
-
end