Skip to content
Snippets Groups Projects
Commit 9f21d281 authored by Laura Montemayor's avatar Laura Montemayor :two:
Browse files

Fixes bug caused by changes array

parent 715795cf
No related branches found
No related tags found
1 merge request!91799Fixes bug caused by `changes:` array
......@@ -33,7 +33,11 @@ def expand_globs(context)
def paths
strong_memoize(:paths) do
Array(@globs[:paths])
if @globs.is_a?(Array)
@globs
else
Array(@globs[:paths])
end
end
end
end
......
......@@ -18,9 +18,11 @@
# rubocop:disable Layout/LineLength
where(:case_name, :globs, :files, :satisfied) do
'exact top-level match' | ['Dockerfile'] | { 'Dockerfile' => '', 'Gemfile' => '' } | true
'exact top-level match' | { paths: ['Dockerfile'] } | { 'Dockerfile' => '', 'Gemfile' => '' } | true
'exact top-level no match' | { paths: ['Dockerfile'] } | { 'Gemfile' => '' } | false
'pattern top-level match' | { paths: ['Docker*'] } | { 'Dockerfile' => '', 'Gemfile' => '' } | true
'pattern top-level no match' | ['Docker*'] | { 'Gemfile' => '' } | false
'pattern top-level no match' | { paths: ['Docker*'] } | { 'Gemfile' => '' } | false
'exact nested match' | { paths: ['project/build.properties'] } | { 'project/build.properties' => '' } | true
'exact nested no match' | { paths: ['project/build.properties'] } | { 'project/README.md' => '' } | false
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment