github-changelog-generator/changelog_generator.rb
2014-11-05 13:27:28 +02:00

25 lines
500 B
Ruby
Executable File

#!/usr/bin/env ruby
# encoding: UTF-8
require_relative 'log_generator'
require_relative 'parser'
def run_generator options
generator = LogGenerator.new(options)
tag_time = generator.find_prev_tag_date
pull_requests = generator.get_all_closed_pull_requests
pull_requests.delete_if { |req|
t = Time.parse(req[:closed_at]).utc
t < tag_time
}
generator.compund_changelog(tag_time, pull_requests)
end
if __FILE__ == $0
options = Parser.new.options
run_generator(options)
end