Lint: avoid multi-line ternary operator
This commit is contained in:
parent
04215618a2
commit
7f8131d5cd
|
@ -131,11 +131,14 @@ module GitHubChangelogGenerator
|
||||||
end
|
end
|
||||||
|
|
||||||
def filter_by_include_labels(issues)
|
def filter_by_include_labels(issues)
|
||||||
filtered_issues = @options[:include_labels].nil? ? issues : issues.select do |issue|
|
if @options[:include_labels].nil?
|
||||||
labels = issue.labels.map(&:name) & @options[:include_labels]
|
issues
|
||||||
labels.any?
|
else
|
||||||
|
issues.select do |issue|
|
||||||
|
labels = issue.labels.map(&:name) & @options[:include_labels]
|
||||||
|
labels.any?
|
||||||
|
end
|
||||||
end
|
end
|
||||||
filtered_issues
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# General filtered function
|
# General filtered function
|
||||||
|
|
Loading…
Reference in New Issue
Block a user