code cleanup
This commit is contained in:
parent
e6acf85a63
commit
cded75784d
|
@ -27,8 +27,7 @@ class LogGenerator
|
||||||
end
|
end
|
||||||
|
|
||||||
def find_prev_tag
|
def find_prev_tag
|
||||||
var = self.all_tags[1]
|
self.all_tags[1]
|
||||||
p var
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
@ -38,10 +37,10 @@ class LogGenerator
|
||||||
json = issues.body
|
json = issues.body
|
||||||
|
|
||||||
if @options[:verbose]
|
if @options[:verbose]
|
||||||
puts 'All pull requests:'
|
# puts 'All pull requests:'
|
||||||
json.each { |dict|
|
# json.each { |dict|
|
||||||
p "##{dict[:number]} - #{dict[:title]} (#{dict[:closed_at]})"
|
# p "##{dict[:number]} - #{dict[:title]} (#{dict[:closed_at]})"
|
||||||
}
|
# }
|
||||||
end
|
end
|
||||||
|
|
||||||
json
|
json
|
||||||
|
@ -79,11 +78,10 @@ class LogGenerator
|
||||||
end
|
end
|
||||||
|
|
||||||
def get_all_tags
|
def get_all_tags
|
||||||
url = "https://api.github.com/repos/skywinder/ActionSheetPicker-3.0/tags"
|
url = "https://api.github.com/repos/#{$github_user}/#{$github_repo_name}/tags"
|
||||||
so_url = 'https://api.stackexchange.com/2.2/questions?site=stackoverflow'
|
|
||||||
response = HTTParty.get(url,
|
response = HTTParty.get(url,
|
||||||
:headers => { "Authorization" => "token 8587bb22f6bf125454768a4a19dbcc774ea68d48",
|
:headers => {'Authorization' => 'token 8587bb22f6bf125454768a4a19dbcc774ea68d48',
|
||||||
"User-Agent" => "APPLICATION_NAME"})
|
'User-Agent' => 'Changelog-Generator'})
|
||||||
|
|
||||||
json_parse = JSON.parse(response.body)
|
json_parse = JSON.parse(response.body)
|
||||||
end
|
end
|
||||||
|
@ -115,7 +113,6 @@ class LogGenerator
|
||||||
|
|
||||||
def get_time_of_tag(prev_tag)
|
def get_time_of_tag(prev_tag)
|
||||||
github_git_data_commits_get = @github.git_data.commits.get $github_user, $github_repo_name, prev_tag['commit']['sha']
|
github_git_data_commits_get = @github.git_data.commits.get $github_user, $github_repo_name, prev_tag['commit']['sha']
|
||||||
self.print_json github_git_data_commits_get.body
|
|
||||||
time_string = github_git_data_commits_get['committer']['date']
|
time_string = github_git_data_commits_get['committer']['date']
|
||||||
Time.parse(time_string)
|
Time.parse(time_string)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user