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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
1736a2da
Commit
1736a2da
authored
Jun 05, 2017
by
Filip Krakowski
Committed by
Shinya Maeda
Jun 08, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix change in behavior
parent
7d16f698
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
lib/ci/gitlab_ci_yaml_processor.rb
lib/ci/gitlab_ci_yaml_processor.rb
+8
-8
No files found.
lib/ci/gitlab_ci_yaml_processor.rb
View file @
1736a2da
...
...
@@ -207,15 +207,19 @@ module Ci
def
matching?
(
patterns
,
ref
,
tag
,
source
)
patterns
.
any?
do
|
pattern
|
match_ref?
(
pattern
,
ref
,
tag
)
||
match_source?
(
pattern
,
source
)
pattern
,
path
=
pattern
.
split
(
'@'
,
2
)
match_path?
(
path
)
&&
match_pattern?
(
pattern
,
ref
,
tag
,
source
)
end
end
def
match_ref?
(
pattern
,
ref
,
tag
)
pattern
,
path
=
pattern
.
split
(
'@'
,
2
)
return
false
if
path
&&
path
!=
self
.
path
def
match_path?
(
path
)
return
!
(
path
&&
path
!=
self
.
path
)
end
def
match_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
if
pattern
.
first
==
"/"
&&
pattern
.
last
==
"/"
Regexp
.
new
(
pattern
[
1
...-
1
])
=~
ref
...
...
@@ -224,10 +228,6 @@ module Ci
end
end
def
match_source?
(
pattern
,
source
)
return
source_to_pattern
(
source
)
==
pattern
end
def
source_to_pattern
(
source
)
return
source
if
%w(api external web)
.
include?
(
source
)
||
source
.
nil?
return
source
.
pluralize
...
...
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