Commit 1dd054e1 authored by Filip Krakowski's avatar Filip Krakowski Committed by Shinya Maeda

Fix static-analysis offenses

parent ecb54cdd
......@@ -229,7 +229,7 @@ module Ci
end
def source_to_pattern(source)
return source if ['api', 'external', 'web'].include? source
return source if %w(api external web).include? source
return source.pluralize
end
end
......
......@@ -394,12 +394,12 @@ module Ci
end
it "does not return builds if except has special keywords specified and source matches" do
possibilities = [{keyword: 'pushes', source: 'push'},
{keyword: 'web', source: 'web'},
{keyword: 'triggers', source: 'trigger'},
{keyword: 'schedules', source: 'schedule'},
{keyword: 'api', source: 'api'},
{keyword: 'external', source: 'external'}]
possibilities = [{ keyword: 'pushes', source: 'push' },
{ keyword: 'web', source: 'web' },
{ keyword: 'triggers', source: 'trigger' },
{ keyword: 'schedules', source: 'schedule' },
{ keyword: 'api', source: 'api' },
{ keyword: 'external', source: 'external' }]
possibilities.each do |possibility|
config = YAML.dump({
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment