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
cccbcf3d
Commit
cccbcf3d
authored
Feb 18, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
816c1ef6
e52f97a9
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
4 deletions
+16
-4
danger/roulette/Dangerfile
danger/roulette/Dangerfile
+3
-0
doc/ci/yaml/README.md
doc/ci/yaml/README.md
+3
-3
lib/gitlab/danger/helper.rb
lib/gitlab/danger/helper.rb
+4
-0
spec/lib/gitlab/danger/helper_spec.rb
spec/lib/gitlab/danger/helper_spec.rb
+6
-1
No files found.
danger/roulette/Dangerfile
View file @
cccbcf3d
...
@@ -53,6 +53,9 @@ def build_list(items)
...
@@ -53,6 +53,9 @@ def build_list(items)
end
end
changes
=
helper
.
changes_by_category
changes
=
helper
.
changes_by_category
# Ignore any files that are known but uncategoried. Prompt for any unknown files
changes
.
delete
(
:none
)
categories
=
changes
.
keys
-
[
:unknown
]
categories
=
changes
.
keys
-
[
:unknown
]
unless
changes
.
empty?
unless
changes
.
empty?
...
...
doc/ci/yaml/README.md
View file @
cccbcf3d
...
@@ -97,9 +97,9 @@ This can be an array or a multi-line string.
...
@@ -97,9 +97,9 @@ This can be an array or a multi-line string.
jobs, including failed ones. This has to be an array or a multi-line string.
jobs, including failed ones. This has to be an array or a multi-line string.
The
`before_script`
and the main
`script`
are concatenated and run in a single context/container.
The
`before_script`
and the main
`script`
are concatenated and run in a single context/container.
The
`after_script`
is run separately
, so depending on the executor, changes done
The
`after_script`
is run separately
. The current working directory is set back to
outside of the working tree might not be visible, e.g. software installed in the
default. Depending on the executor, changes done outside of the working tree might
`before_script`
.
not be visible, e.g. software installed in the
`before_script`
.
It's possible to overwrite the globally defined
`before_script`
and
`after_script`
It's possible to overwrite the globally defined
`before_script`
and
`after_script`
if you set it per-job:
if you set it per-job:
...
...
lib/gitlab/danger/helper.rb
View file @
cccbcf3d
...
@@ -95,6 +95,7 @@ module Gitlab
...
@@ -95,6 +95,7 @@ module Gitlab
CATEGORY_LABELS
=
{
CATEGORY_LABELS
=
{
docs:
"~Documentation"
,
docs:
"~Documentation"
,
none:
""
,
qa:
"~QA"
qa:
"~QA"
}.
freeze
}.
freeze
...
@@ -120,6 +121,9 @@ module Gitlab
...
@@ -120,6 +121,9 @@ module Gitlab
%r{
\A
(ee/)?db/}
=>
:database
,
%r{
\A
(ee/)?db/}
=>
:database
,
%r{
\A
(ee/)?qa/}
=>
:qa
,
%r{
\A
(ee/)?qa/}
=>
:qa
,
# Files that don't fit into any category are marked with :none
%r{
\A
(ee/)?changelogs/}
=>
:none
,
# 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
}
=>
:docs
,
...
...
spec/lib/gitlab/danger/helper_spec.rb
View file @
cccbcf3d
...
@@ -184,7 +184,7 @@ describe Gitlab::Danger::Helper do
...
@@ -184,7 +184,7 @@ describe Gitlab::Danger::Helper do
describe
'#changes_by_category'
do
describe
'#changes_by_category'
do
it
'categorizes changed files'
do
it
'categorizes changed files'
do
expect
(
fake_git
).
to
receive
(
:added_files
)
{
%w[foo foo.md foo.rb foo.js db/foo qa/foo]
}
expect
(
fake_git
).
to
receive
(
:added_files
)
{
%w[foo foo.md foo.rb foo.js db/foo qa/foo
ee/changelogs/foo.yml
]
}
allow
(
fake_git
).
to
receive
(
:modified_files
)
{
[]
}
allow
(
fake_git
).
to
receive
(
:modified_files
)
{
[]
}
allow
(
fake_git
).
to
receive
(
:renamed_files
)
{
[]
}
allow
(
fake_git
).
to
receive
(
:renamed_files
)
{
[]
}
...
@@ -193,6 +193,7 @@ describe Gitlab::Danger::Helper do
...
@@ -193,6 +193,7 @@ describe Gitlab::Danger::Helper do
database:
%w[db/foo]
,
database:
%w[db/foo]
,
docs:
%w[foo.md]
,
docs:
%w[foo.md]
,
frontend:
%w[foo.js]
,
frontend:
%w[foo.js]
,
none:
%w[ee/changelogs/foo.yml]
,
qa:
%w[qa/foo]
,
qa:
%w[qa/foo]
,
unknown:
%w[foo]
unknown:
%w[foo]
)
)
...
@@ -260,6 +261,9 @@ describe Gitlab::Danger::Helper do
...
@@ -260,6 +261,9 @@ describe Gitlab::Danger::Helper do
'ee/db/foo'
|
:database
'ee/db/foo'
|
:database
'ee/qa/foo'
|
:qa
'ee/qa/foo'
|
:qa
'changelogs/foo'
|
:none
'ee/changelogs/foo'
|
:none
'FOO'
|
:unknown
'FOO'
|
:unknown
'foo'
|
:unknown
'foo'
|
:unknown
...
@@ -283,6 +287,7 @@ describe Gitlab::Danger::Helper do
...
@@ -283,6 +287,7 @@ describe Gitlab::Danger::Helper do
:docs
|
'~Documentation'
:docs
|
'~Documentation'
:foo
|
'~foo'
:foo
|
'~foo'
:frontend
|
'~frontend'
:frontend
|
'~frontend'
:none
|
''
:qa
|
'~QA'
:qa
|
'~QA'
end
end
...
...
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