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
Léo-Paul Géneau
gitlab-ce
Commits
c5305a02
Commit
c5305a02
authored
Apr 30, 2019
by
Evan Read
Committed by
Nick Thomas
Apr 30, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Docs aren't reviewed using roulette
parent
3ffb9775
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
15 deletions
+14
-15
lib/gitlab/danger/helper.rb
lib/gitlab/danger/helper.rb
+4
-4
spec/lib/gitlab/danger/helper_spec.rb
spec/lib/gitlab/danger/helper_spec.rb
+10
-11
No files found.
lib/gitlab/danger/helper.rb
View file @
c5305a02
...
@@ -99,15 +99,15 @@ module Gitlab
...
@@ -99,15 +99,15 @@ module Gitlab
end
end
CATEGORY_LABELS
=
{
CATEGORY_LABELS
=
{
docs:
"~Documentation"
,
docs:
"~Documentation"
,
# Docs are reviewed along DevOps stages, so don't need roulette for now.
none:
""
,
none:
""
,
qa:
"~QA"
qa:
"~QA"
}.
freeze
}.
freeze
# rubocop:disable Style/RegexpLiteral
# rubocop:disable Style/RegexpLiteral
CATEGORIES
=
{
CATEGORIES
=
{
%r{
\A
doc/}
=>
:
docs
,
%r{
\A
doc/}
=>
:
none
,
# To reinstate roulette for documentation, set to `:docs`.
%r{
\A
(CONTRIBUTING|LICENSE|MAINTENANCE|PHILOSOPHY|PROCESS|README)(
\.
md)?
\z
}
=>
:
docs
,
%r{
\A
(CONTRIBUTING|LICENSE|MAINTENANCE|PHILOSOPHY|PROCESS|README)(
\.
md)?
\z
}
=>
:
none
,
# To reinstate roulette for documentation, set to `:docs`.
%r{
\A
(ee/)?app/(assets|views)/}
=>
:frontend
,
%r{
\A
(ee/)?app/(assets|views)/}
=>
:frontend
,
%r{
\A
(ee/)?public/}
=>
:frontend
,
%r{
\A
(ee/)?public/}
=>
:frontend
,
...
@@ -148,7 +148,7 @@ module Gitlab
...
@@ -148,7 +148,7 @@ module Gitlab
# Fallbacks in case the above patterns miss anything
# Fallbacks in case the above patterns miss anything
%r{
\.
rb
\z
}
=>
:backend
,
%r{
\.
rb
\z
}
=>
:backend
,
%r{
\.
(md|txt)
\z
}
=>
:
docs
,
%r{
\.
(md|txt)
\z
}
=>
:
none
,
# To reinstate roulette for documentation, set to `:docs`.
%r{
\.
js
\z
}
=>
:frontend
%r{
\.
js
\z
}
=>
:frontend
}.
freeze
}.
freeze
# rubocop:enable Style/RegexpLiteral
# rubocop:enable Style/RegexpLiteral
...
...
spec/lib/gitlab/danger/helper_spec.rb
View file @
c5305a02
...
@@ -191,9 +191,8 @@ describe Gitlab::Danger::Helper do
...
@@ -191,9 +191,8 @@ describe Gitlab::Danger::Helper do
expect
(
helper
.
changes_by_category
).
to
eq
(
expect
(
helper
.
changes_by_category
).
to
eq
(
backend:
%w[foo.rb]
,
backend:
%w[foo.rb]
,
database:
%w[db/foo]
,
database:
%w[db/foo]
,
docs:
%w[foo.md]
,
frontend:
%w[foo.js]
,
frontend:
%w[foo.js]
,
none:
%w[ee/changelogs/foo.yml]
,
none:
%w[ee/changelogs/foo.yml
foo.md
]
,
qa:
%w[qa/foo]
,
qa:
%w[qa/foo]
,
unknown:
%w[foo]
unknown:
%w[foo]
)
)
...
@@ -202,13 +201,13 @@ describe Gitlab::Danger::Helper do
...
@@ -202,13 +201,13 @@ describe Gitlab::Danger::Helper do
describe
'#category_for_file'
do
describe
'#category_for_file'
do
where
(
:path
,
:expected_category
)
do
where
(
:path
,
:expected_category
)
do
'doc/foo'
|
:
docs
'doc/foo'
|
:
none
'CONTRIBUTING.md'
|
:
docs
'CONTRIBUTING.md'
|
:
none
'LICENSE'
|
:
docs
'LICENSE'
|
:
none
'MAINTENANCE.md'
|
:
docs
'MAINTENANCE.md'
|
:
none
'PHILOSOPHY.md'
|
:
docs
'PHILOSOPHY.md'
|
:
none
'PROCESS.md'
|
:
docs
'PROCESS.md'
|
:
none
'README.md'
|
:
docs
'README.md'
|
:
none
'ee/doc/foo'
|
:unknown
'ee/doc/foo'
|
:unknown
'ee/README'
|
:unknown
'ee/README'
|
:unknown
...
@@ -272,8 +271,8 @@ describe Gitlab::Danger::Helper do
...
@@ -272,8 +271,8 @@ describe Gitlab::Danger::Helper do
'foo/bar.rb'
|
:backend
'foo/bar.rb'
|
:backend
'foo/bar.js'
|
:frontend
'foo/bar.js'
|
:frontend
'foo/bar.txt'
|
:
docs
'foo/bar.txt'
|
:
none
'foo/bar.md'
|
:
docs
'foo/bar.md'
|
:
none
end
end
with_them
do
with_them
do
...
...
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