Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
431d7972
Commit
431d7972
authored
Jun 07, 2017
by
Shinya Maeda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix unmatches_path
parent
1736a2da
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
lib/ci/gitlab_ci_yaml_processor.rb
lib/ci/gitlab_ci_yaml_processor.rb
+9
-6
No files found.
lib/ci/gitlab_ci_yaml_processor.rb
View file @
431d7972
...
...
@@ -208,15 +208,15 @@ module Ci
def
matching?
(
patterns
,
ref
,
tag
,
source
)
patterns
.
any?
do
|
pattern
|
pattern
,
path
=
pattern
.
split
(
'@'
,
2
)
match_path?
(
path
)
&&
match
_pattern?
(
pattern
,
ref
,
tag
,
source
)
unmatches_path?
(
path
)
&&
matches
_pattern?
(
pattern
,
ref
,
tag
,
source
)
end
end
def
match
_path?
(
path
)
return
!
(
path
&&
path
!=
self
.
path
)
def
unmatches
_path?
(
path
)
path
&&
path
!=
self
.
path
end
def
match_pattern?
(
pattern
,
ref
,
tag
,
source
)
def
match
es
_pattern?
(
pattern
,
ref
,
tag
,
source
)
return
true
if
tag
&&
pattern
==
'tags'
return
true
if
!
tag
&&
pattern
==
'branches'
return
true
if
source_to_pattern
(
source
)
==
pattern
...
...
@@ -229,8 +229,11 @@ module Ci
end
def
source_to_pattern
(
source
)
return
source
if
%w(api external web)
.
include?
(
source
)
||
source
.
nil?
return
source
.
pluralize
if
%w(api external web)
.
include?
(
source
)
||
source
.
nil?
source
else
source
.
pluralize
end
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment