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