put in actual date right closed date
This commit is contained in:
parent
c3884b9a55
commit
0eacd9acda
|
@ -59,13 +59,24 @@ module GitHubChangelogGenerator
|
||||||
end
|
end
|
||||||
|
|
||||||
def find_closed_date_by_commit(issue)
|
def find_closed_date_by_commit(issue)
|
||||||
|
closed_date = nil
|
||||||
puts issue[:number]
|
puts issue[:number]
|
||||||
unless issue['events'].nil?
|
unless issue['events'].nil?
|
||||||
issue['events'].each{|event|
|
# reverse! - to find latest closed event. (event goes in date order)
|
||||||
puts event[:event]
|
issue['events'].reverse!.each{|event|
|
||||||
|
if event[:event].eql? 'closed'
|
||||||
|
if event[:commit_id].nil?
|
||||||
|
issue[:actual_date] = issue[:closed_at]
|
||||||
|
else
|
||||||
|
commit = @github.git_data.commits.get @options[:user], @options[:project], event[:commit_id]
|
||||||
|
issue[:actual_date] = commit[:author][:date]
|
||||||
|
end
|
||||||
|
|
||||||
|
break
|
||||||
|
end
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
0
|
closed_date
|
||||||
end
|
end
|
||||||
|
|
||||||
def print_json(json)
|
def print_json(json)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user