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
a8e1958d
Commit
a8e1958d
authored
Nov 23, 2020
by
Doug Stull
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add deterministic ordering to roulette assignment table
- otherwise we get mixture on mr's of ordering.
parent
aeef33f8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
lib/gitlab/danger/roulette.rb
lib/gitlab/danger/roulette.rb
+1
-1
spec/lib/gitlab/danger/roulette_spec.rb
spec/lib/gitlab/danger/roulette_spec.rb
+8
-0
No files found.
lib/gitlab/danger/roulette.rb
View file @
a8e1958d
...
...
@@ -24,7 +24,7 @@ module Gitlab
#
# @return [Array<Spin>]
def
spin
(
project
,
categories
,
timezone_experiment:
false
)
spins
=
categories
.
map
do
|
category
|
spins
=
categories
.
sort
.
map
do
|
category
|
including_timezone
=
INCLUDE_TIMEZONE_FOR_CATEGORY
.
fetch
(
category
,
timezone_experiment
)
spin_for_category
(
project
,
category
,
timezone_experiment:
including_timezone
)
...
...
spec/lib/gitlab/danger/roulette_spec.rb
View file @
a8e1958d
...
...
@@ -165,6 +165,14 @@ RSpec.describe Gitlab::Danger::Roulette do
end
end
context
'when change contains many categories'
do
let
(
:categories
)
{
[
:frontend
,
:test
,
:qa
,
:engineering_productivity
,
:ci_template
,
:backend
]
}
it
'has a deterministic sorting order'
do
expect
(
spins
.
map
(
&
:category
)).
to
eq
categories
.
sort
end
end
context
'when change contains QA category'
do
let
(
:categories
)
{
[
:qa
]
}
...
...
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