This commit is contained in:
Petr Korolev
2015-07-16 14:47:01 +03:00
parent 4de98a7d16
commit e274f9992a
4 changed files with 9 additions and 5 deletions

View File

@@ -56,7 +56,7 @@ module GitHubChangelogGenerator
# @param [String] newer_tag Name of the newer tag. Could be nil for `Unreleased` section
# @param [String] older_tag_name Older tag, used for the links. Could be nil for last tag.
# @return [String] Ready and parsed section
def create_log(pull_requests, issues, newer_tag, older_tag_name = nil)
def create_log_for_tag(pull_requests, issues, newer_tag, older_tag_name = nil)
newer_tag_link, newer_tag_name, newer_tag_time = detect_link_tag_time(newer_tag)
github_site = options[:github_site] || "https://github.com"

View File

@@ -8,7 +8,7 @@ module GitHubChangelogGenerator
sort_tags_by_date(@filtered_tags)
fetch_issues_and_pr
log = "# Change Log\n\n"
log = "#{@options[:header]}\n\n"
if @options[:unreleased_only]
log += generate_log_between_tags(filtered_tags[0], nil)
@@ -103,7 +103,7 @@ module GitHubChangelogGenerator
return ""
end
create_log(filtered_pull_requests, filtered_issues, newer_tag, older_tag_name)
create_log_for_tag(filtered_pull_requests, filtered_issues, newer_tag, older_tag_name)
end
# Apply all filters to issues and pull requests