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
20aab0e5
Commit
20aab0e5
authored
Nov 22, 2019
by
Kyle Wiebers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change TAE to SEiT for Danger
parent
71e2ba4d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
lib/gitlab/danger/teammate.rb
lib/gitlab/danger/teammate.rb
+1
-1
spec/lib/gitlab/danger/teammate_spec.rb
spec/lib/gitlab/danger/teammate_spec.rb
+7
-7
No files found.
lib/gitlab/danger/teammate.rb
View file @
20aab0e5
...
...
@@ -63,7 +63,7 @@ module Gitlab
def
has_capability?
(
project
,
category
,
kind
,
labels
)
case
category
when
:test
area
=
role
[
/
Test Automation Engineer
(?:.*?, (\w+))/
,
1
]
area
=
role
[
/
Software Engineer in Test
(?:.*?, (\w+))/
,
1
]
area
&&
labels
.
any?
(
"devops::
#{
area
.
downcase
}
"
)
if
kind
==
:reviewer
when
:engineering_productivity
...
...
spec/lib/gitlab/danger/teammate_spec.rb
View file @
20aab0e5
...
...
@@ -33,8 +33,8 @@ describe Gitlab::Danger::Teammate do
context
'when labels contain devops::create and the category is test'
do
let
(
:labels
)
{
[
'devops::create'
]
}
context
'when role is
Test Automation Engineer
, Create'
do
let
(
:role
)
{
'
Test Automation Engineer
, Create'
}
context
'when role is
Software Engineer in Test
, Create'
do
let
(
:role
)
{
'
Software Engineer in Test
, Create'
}
it
'#reviewer? returns true'
do
expect
(
subject
.
reviewer?
(
project
,
:test
,
labels
)).
to
be_truthy
...
...
@@ -45,7 +45,7 @@ describe Gitlab::Danger::Teammate do
end
context
'when hyperlink is mangled in the role'
do
let
(
:role
)
{
'<a href="#">
Test Automation Engineer
</a>, Create'
}
let
(
:role
)
{
'<a href="#">
Software Engineer in Test
</a>, Create'
}
it
'#reviewer? returns true'
do
expect
(
subject
.
reviewer?
(
project
,
:test
,
labels
)).
to
be_truthy
...
...
@@ -53,16 +53,16 @@ describe Gitlab::Danger::Teammate do
end
end
context
'when role is
Test Automation Engineer
'
do
let
(
:role
)
{
'
Test Automation Engineer
'
}
context
'when role is
Software Engineer in Test
'
do
let
(
:role
)
{
'
Software Engineer in Test
'
}
it
'#reviewer? returns false'
do
expect
(
subject
.
reviewer?
(
project
,
:test
,
labels
)).
to
be_falsey
end
end
context
'when role is
Test Automation Engineer
, Manage'
do
let
(
:role
)
{
'
Test Automation Engineer
, Manage'
}
context
'when role is
Software Engineer in Test
, Manage'
do
let
(
:role
)
{
'
Software Engineer in Test
, Manage'
}
it
'#reviewer? returns false'
do
expect
(
subject
.
reviewer?
(
project
,
:test
,
labels
)).
to
be_falsey
...
...
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