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
cfef583e
Commit
cfef583e
authored
Aug 27, 2019
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Detect the new stage labels in Gitlab::Danger::Teammate
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
0839fb0c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
lib/gitlab/danger/teammate.rb
lib/gitlab/danger/teammate.rb
+2
-2
spec/lib/gitlab/danger/teammate_spec.rb
spec/lib/gitlab/danger/teammate_spec.rb
+1
-1
No files found.
lib/gitlab/danger/teammate.rb
View file @
cfef583e
...
...
@@ -39,9 +39,9 @@ module Gitlab
def
has_capability?
(
project
,
category
,
kind
,
labels
)
case
category
when
:test
area
=
role
[
/Test Automation Engineer(?:.*?, (\w+))/
,
1
]
area
=
role
[
/Test Automation Engineer(?:.*?, (\w+))/
,
1
]
.
downcase
area
&&
labels
.
any?
(
area
)
if
kind
==
:reviewer
area
&&
labels
.
any?
(
"devops::
#{
area
}
"
)
if
kind
==
:reviewer
else
capabilities
(
project
).
include?
(
"
#{
kind
}
#{
category
}
"
)
end
...
...
spec/lib/gitlab/danger/teammate_spec.rb
View file @
cfef583e
...
...
@@ -28,7 +28,7 @@ describe Gitlab::Danger::Teammate do
end
context
'when labels contain Create and the category is test'
do
let
(
:labels
)
{
[
'
C
reate'
]
}
let
(
:labels
)
{
[
'
devops::c
reate'
]
}
context
'when role is Test Automation Engineer, Create'
do
let
(
:role
)
{
'Test Automation Engineer, Create'
}
...
...
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