remove --between_tags option (#501)

This commit is contained in:
Lucas Huang
2017-05-24 15:29:31 -07:00
committed by Olle Jonsson
parent 6707927c1e
commit e9ee9556ce
6 changed files with 2 additions and 95 deletions
@@ -96,13 +96,12 @@ module GitHubChangelogGenerator
sections.first["version"] if sections && sections.any?
end
# Return tags after filtering tags in lists provided by option: --between-tags & --exclude-tags
# Return tags after filtering tags in lists provided by option: --exclude-tags
#
# @return [Array]
def get_filtered_tags(all_tags)
filtered_tags = filter_since_tag(all_tags)
filtered_tags = filter_due_tag(filtered_tags)
filter_between_tags(filtered_tags)
filter_due_tag(filtered_tags)
end
# @param [Array] all_tags all tags
@@ -145,23 +144,6 @@ module GitHubChangelogGenerator
filtered_tags
end
# @param [Array] all_tags all tags
# @return [Array] filtered tags according :between_tags option
def filter_between_tags(all_tags)
filtered_tags = all_tags
tag_names = filtered_tags.map { |ft| ft["name"] }
if options[:between_tags]
options[:between_tags].each do |tag|
unless tag_names.include?(tag)
Helper.log.warn "Warning: can't find tag #{tag}, specified with --between-tags option."
end
end
filtered_tags = all_tags.select { |tag| options[:between_tags].include?(tag["name"]) }
end
filtered_tags
end
# @param [Array] all_tags all tags
# @return [Array] filtered tags according :exclude_tags or :exclude_tags_regex option
def filter_excluded_tags(all_tags)