Fix bug with wrong credentials in 1.0.1 (fixed #12)
This commit is contained in:
parent
a33b52d6d0
commit
936b191566
|
@ -117,9 +117,14 @@ class ChangelogGenerator
|
||||||
puts "Receive tags for repo #{url}"
|
puts "Receive tags for repo #{url}"
|
||||||
end
|
end
|
||||||
|
|
||||||
response = HTTParty.get(url,
|
if @options[:token]
|
||||||
:headers => {'Authorization' => "token #{@options[:token]}",
|
response = HTTParty.get(url,
|
||||||
'User-Agent' => 'Changelog-Generator'})
|
:headers => {'Authorization' => "token #{@options[:token]}",
|
||||||
|
'User-Agent' => 'Changelog-Generator'})
|
||||||
|
else
|
||||||
|
response = HTTParty.get(url,
|
||||||
|
:headers => {'User-Agent' => 'Changelog-Generator'})
|
||||||
|
end
|
||||||
|
|
||||||
json_parse = JSON.parse(response.body)
|
json_parse = JSON.parse(response.body)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user