add doc + fix raise
This commit is contained in:
parent
4e9ed5df28
commit
2b656c83b6
|
@ -205,10 +205,10 @@ module GitHubChangelogGenerator
|
||||||
index2 = hash[tag2]
|
index2 = hash[tag2]
|
||||||
log += generate_log_between_tags(all_tags[index1], all_tags[index2])
|
log += generate_log_between_tags(all_tags[index1], all_tags[index2])
|
||||||
else
|
else
|
||||||
raise ChangelogGeneratorError.new("Can't find tag #{tag2} -> exit")
|
raise ChangelogGeneratorError, "Can't find tag #{tag2} -> exit".red
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
raise ChangelogGeneratorError.new("Can't find tag #{tag1} -> exit")
|
raise ChangelogGeneratorError, "Can't find tag #{tag1} -> exit".red
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
log += generate_log_for_all_tags
|
log += generate_log_for_all_tags
|
||||||
|
@ -384,8 +384,13 @@ module GitHubChangelogGenerator
|
||||||
filtered_issues
|
filtered_issues
|
||||||
end
|
end
|
||||||
|
|
||||||
def delete_by_time(array, hash_key, older_tag = nil, newer_tag = nil)
|
# @param [Array] array of issues to filter
|
||||||
fail "At least one of the tags should be not nil!" if older_tag.nil? && newer_tag.nil?
|
# @param [Symbol] hash_key key of date value default is :actual_date
|
||||||
|
# @param [String] older_tag all issues before this tag date will be excluded. May be nil, if it's first tag
|
||||||
|
# @param [String] newer_tag all issue after this tag will be excluded. May be nil for unreleased section
|
||||||
|
def delete_by_time(array, hash_key = :actual_date, older_tag = nil, newer_tag = nil)
|
||||||
|
|
||||||
|
raise ChangelogGeneratorError, "At least one of the tags should be not nil!" if older_tag.nil? && newer_tag.nil?
|
||||||
|
|
||||||
newer_tag_time = get_time_of_tag(newer_tag)
|
newer_tag_time = get_time_of_tag(newer_tag)
|
||||||
older_tag_time = get_time_of_tag(older_tag)
|
older_tag_time = get_time_of_tag(older_tag)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user