filter tags correctly when since_tag is set to most recent tag (#566)
* filter tags correctly when `since_tag` is set to most recent tag Before this fix [`filtered_tags`](https://github.com/skywinder/github-changelog-generator/blob/master/lib/github_changelog_generator/generator/generator_generation.rb#L132) was empty which caused a fallback to the last tag in the sorted_tags array (which is the oldest tag). There for no issues and PRs were filtered in that case. fixes #555 fixes #304
This commit is contained in:
committed by
Olle Jonsson
parent
7cbe41555a
commit
64f4cd07c9
@@ -182,6 +182,11 @@ describe GitHubChangelogGenerator::Generator do
|
||||
let(:generator) { GitHubChangelogGenerator::Generator.new(since_tag: "2") }
|
||||
it { is_expected.to be_a Array }
|
||||
it { is_expected.to match_array(tags_from_strings(%w[1 2])) }
|
||||
|
||||
context "with since tag set to the most recent tag" do
|
||||
let(:generator) { GitHubChangelogGenerator::Generator.new(since_tag: "1") }
|
||||
it { is_expected.to match_array(tags_from_strings(%w[1])) }
|
||||
end
|
||||
end
|
||||
|
||||
context "with invalid since tag" do
|
||||
|
||||
Reference in New Issue
Block a user