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}"
|
||||
end
|
||||
|
||||
response = HTTParty.get(url,
|
||||
:headers => {'Authorization' => "token #{@options[:token]}",
|
||||
'User-Agent' => 'Changelog-Generator'})
|
||||
if @options[:token]
|
||||
response = HTTParty.get(url,
|
||||
: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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user