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
687eb79b
Commit
687eb79b
authored
Mar 18, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
cefacbcd
142c39ae
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
71 additions
and
10 deletions
+71
-10
app/assets/javascripts/filtered_search/visual_token_value.js
app/assets/javascripts/filtered_search/visual_token_value.js
+2
-2
app/assets/stylesheets/pages/merge_requests.scss
app/assets/stylesheets/pages/merge_requests.scss
+1
-1
app/models/repository.rb
app/models/repository.rb
+9
-2
changelogs/unreleased/58999-z-index-issue-on-pipeline-dropdown.yml
...s/unreleased/58999-z-index-issue-on-pipeline-dropdown.yml
+6
-0
lib/gitlab/file_detector.rb
lib/gitlab/file_detector.rb
+1
-0
spec/javascripts/filtered_search/visual_token_value_spec.js
spec/javascripts/filtered_search/visual_token_value_spec.js
+26
-4
spec/lib/gitlab/file_detector_spec.rb
spec/lib/gitlab/file_detector_spec.rb
+4
-0
spec/models/repository_spec.rb
spec/models/repository_spec.rb
+22
-1
No files found.
app/assets/javascripts/filtered_search/visual_token_value.js
View file @
687eb79b
...
...
@@ -13,9 +13,9 @@ export default class VisualTokenValue {
}
render
(
tokenValueContainer
,
tokenValueElement
)
{
const
{
tokenType
}
=
this
;
const
{
tokenType
,
tokenValue
}
=
this
;
if
([
'
none
'
,
'
any
'
].
includes
(
token
Type
))
{
if
([
'
none
'
,
'
any
'
].
includes
(
token
Value
.
toLowerCase
()
))
{
return
;
}
...
...
app/assets/stylesheets/pages/merge_requests.scss
View file @
687eb79b
...
...
@@ -806,7 +806,7 @@
.merge-request-tabs-holder
{
top
:
$header-height
;
z-index
:
30
0
;
z-index
:
25
0
;
background-color
:
$white-light
;
border-bottom
:
1px
solid
$border-color
;
...
...
app/models/repository.rb
View file @
687eb79b
...
...
@@ -39,7 +39,8 @@ class Repository
changelog license_blob license_key gitignore
gitlab_ci_yml branch_names tag_names branch_count
tag_count avatar exists? root_ref has_visible_content?
issue_template_names merge_request_template_names xcode_project?)
.
freeze
issue_template_names merge_request_template_names xcode_project?
insights_config)
.
freeze
# Methods that use cache_method but only memoize the value
MEMOIZED_CACHED_METHODS
=
%i(license)
.
freeze
...
...
@@ -57,7 +58,8 @@ class Repository
avatar: :avatar
,
issue_template: :issue_template_names
,
merge_request_template: :merge_request_template_names
,
xcode_config: :xcode_project?
xcode_config: :xcode_project?
,
insights_config: :insights_config
}.
freeze
def
initialize
(
full_path
,
project
,
disk_path:
nil
,
is_wiki:
false
)
...
...
@@ -663,6 +665,11 @@ class Repository
end
cache_method
:xcode_project?
def
insights_config
file_on_head
(
:insights_config
)
end
cache_method
:insights_config
def
head_commit
@head_commit
||=
commit
(
self
.
root_ref
)
end
...
...
changelogs/unreleased/58999-z-index-issue-on-pipeline-dropdown.yml
0 → 100644
View file @
687eb79b
---
title
:
Fix issue that caused the "Show all activity" button to appear on top of the
mini pipeline status dropdown on the merge request page
merge_request
:
26274
author
:
type
:
fixed
lib/gitlab/file_detector.rb
View file @
687eb79b
...
...
@@ -22,6 +22,7 @@ module Gitlab
gitignore:
'.gitignore'
,
gitlab_ci:
'.gitlab-ci.yml'
,
route_map:
'.gitlab/route-map.yml'
,
insights_config:
'.gitlab/insights.yml'
,
# Dependency files
cartfile:
%r{
\A
Cartfile[^/]*
\z
}
,
...
...
spec/javascripts/filtered_search/visual_token_value_spec.js
View file @
687eb79b
...
...
@@ -317,7 +317,18 @@ describe('Filtered Search Visual Tokens', () => {
it
(
'
does not update user token appearance for `none` filter
'
,
()
=>
{
const
{
subject
,
tokenValueContainer
,
tokenValueElement
}
=
findElements
(
authorToken
);
subject
.
tokenType
=
'
none
'
;
subject
.
tokenValue
=
'
none
'
;
const
{
updateUserTokenAppearanceSpy
}
=
setupSpies
(
subject
);
subject
.
render
(
tokenValueContainer
,
tokenValueElement
);
expect
(
updateUserTokenAppearanceSpy
.
calls
.
count
()).
toBe
(
0
);
});
it
(
'
does not update user token appearance for `None` filter
'
,
()
=>
{
const
{
subject
,
tokenValueContainer
,
tokenValueElement
}
=
findElements
(
authorToken
);
subject
.
tokenValue
=
'
None
'
;
const
{
updateUserTokenAppearanceSpy
}
=
setupSpies
(
subject
);
subject
.
render
(
tokenValueContainer
,
tokenValueElement
);
...
...
@@ -328,7 +339,7 @@ describe('Filtered Search Visual Tokens', () => {
it
(
'
does not update user token appearance for `any` filter
'
,
()
=>
{
const
{
subject
,
tokenValueContainer
,
tokenValueElement
}
=
findElements
(
authorToken
);
subject
.
token
Typ
e
=
'
any
'
;
subject
.
token
Valu
e
=
'
any
'
;
const
{
updateUserTokenAppearanceSpy
}
=
setupSpies
(
subject
);
subject
.
render
(
tokenValueContainer
,
tokenValueElement
);
...
...
@@ -336,10 +347,21 @@ describe('Filtered Search Visual Tokens', () => {
expect
(
updateUserTokenAppearanceSpy
.
calls
.
count
()).
toBe
(
0
);
});
it
(
'
does not update label token color for `None` filter
'
,
()
=>
{
const
{
subject
,
tokenValueContainer
,
tokenValueElement
}
=
findElements
(
bugLabelToken
);
subject
.
tokenValue
=
'
None
'
;
const
{
updateLabelTokenColorSpy
}
=
setupSpies
(
subject
);
subject
.
render
(
tokenValueContainer
,
tokenValueElement
);
expect
(
updateLabelTokenColorSpy
.
calls
.
count
()).
toBe
(
0
);
});
it
(
'
does not update label token color for `none` filter
'
,
()
=>
{
const
{
subject
,
tokenValueContainer
,
tokenValueElement
}
=
findElements
(
bugLabelToken
);
subject
.
token
Typ
e
=
'
none
'
;
subject
.
token
Valu
e
=
'
none
'
;
const
{
updateLabelTokenColorSpy
}
=
setupSpies
(
subject
);
subject
.
render
(
tokenValueContainer
,
tokenValueElement
);
...
...
@@ -350,7 +372,7 @@ describe('Filtered Search Visual Tokens', () => {
it
(
'
does not update label token color for `any` filter
'
,
()
=>
{
const
{
subject
,
tokenValueContainer
,
tokenValueElement
}
=
findElements
(
bugLabelToken
);
subject
.
token
Typ
e
=
'
any
'
;
subject
.
token
Valu
e
=
'
any
'
;
const
{
updateLabelTokenColorSpy
}
=
setupSpies
(
subject
);
subject
.
render
(
tokenValueContainer
,
tokenValueElement
);
...
...
spec/lib/gitlab/file_detector_spec.rb
View file @
687eb79b
...
...
@@ -77,6 +77,10 @@ describe Gitlab::FileDetector do
expect
(
described_class
.
type_of
(
'.gitlab/merge_request_templates/foo.md'
)).
to
eq
(
:merge_request_template
)
end
it
'returns the type of an Insights config file'
do
expect
(
described_class
.
type_of
(
'.gitlab/insights.yml'
)).
to
eq
(
:insights_config
)
end
it
'returns nil for an unknown file'
do
expect
(
described_class
.
type_of
(
'foo.txt'
)).
to
be_nil
end
...
...
spec/models/repository_spec.rb
View file @
687eb79b
...
...
@@ -1616,7 +1616,8 @@ describe Repository do
:has_visible_content?
,
:issue_template_names
,
:merge_request_template_names
,
:xcode_project?
:xcode_project?
,
:insights_config
])
repository
.
after_change_head
...
...
@@ -1882,6 +1883,26 @@ describe Repository do
end
end
describe
"#insights_config"
,
:use_clean_rails_memory_store_caching
do
it
'returns a valid Insights config file'
do
files
=
[
TestBlob
.
new
(
'file'
),
TestBlob
.
new
(
'.gitlab/insights.yml'
)]
expect
(
repository
.
tree
).
to
receive
(
:blobs
).
and_return
(
files
)
expect
(
repository
.
insights_config
.
path
).
to
eq
(
'.gitlab/insights.yml'
)
end
it
'returns nil if does not exist'
do
expect
(
repository
.
tree
).
to
receive
(
:blobs
).
and_return
([])
expect
(
repository
.
insights_config
).
to
be_nil
end
it
'returns nil for an empty repository'
do
allow
(
repository
).
to
receive
(
:root_ref
).
and_raise
(
Gitlab
::
Git
::
Repository
::
NoRepository
)
expect
(
repository
.
insights_config
).
to
be_nil
end
end
describe
"#keep_around"
do
it
"does not fail if we attempt to reference bad commit"
do
expect
(
repository
.
kept_around?
(
'abc1234'
)).
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