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
fc6228b4
Commit
fc6228b4
authored
Oct 21, 2016
by
Valery Sizov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix a search for non-default branches when ES is enabled
parent
78b25cfa
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
1 deletion
+15
-1
CHANGELOG-EE.md
CHANGELOG-EE.md
+1
-0
lib/gitlab/elastic/project_search_results.rb
lib/gitlab/elastic/project_search_results.rb
+5
-1
spec/lib/gitlab/elastic/project_search_results_spec.rb
spec/lib/gitlab/elastic/project_search_results_spec.rb
+9
-0
No files found.
CHANGELOG-EE.md
View file @
fc6228b4
...
@@ -11,6 +11,7 @@ Please view this file on the master branch, on stable branches it's out of date.
...
@@ -11,6 +11,7 @@ Please view this file on the master branch, on stable branches it's out of date.
-
Fix Git access panel for Wikis when Kerberos authentication is enabled (Borja Aparicio)
-
Fix Git access panel for Wikis when Kerberos authentication is enabled (Borja Aparicio)
-
Decrease maximum time that GitLab waits for a mirror to finish !791 (Borja Aparicio)
-
Decrease maximum time that GitLab waits for a mirror to finish !791 (Borja Aparicio)
-
User groups (that can be assigned as approvers)
-
User groups (that can be assigned as approvers)
-
Fix a search for non-default branches when ES is enabled
## 8.12.7
## 8.12.7
...
...
lib/gitlab/elastic/project_search_results.rb
View file @
fc6228b4
...
@@ -105,7 +105,11 @@ module Gitlab
...
@@ -105,7 +105,11 @@ module Gitlab
per_page:
per_page
per_page:
per_page
)
)
else
else
project
.
repository
.
find_commits_by_message
(
query
).
compact
Kaminari
.
paginate_array
(
project
.
repository
.
find_commits_by_message
(
query
).
compact
,
page:
(
page
||
1
).
to_i
,
per_page:
per_page
)
end
end
end
end
end
end
...
...
spec/lib/gitlab/elastic/project_search_results_spec.rb
View file @
fc6228b4
...
@@ -63,6 +63,15 @@ describe Gitlab::Elastic::ProjectSearchResults, lib: true do
...
@@ -63,6 +63,15 @@ describe Gitlab::Elastic::ProjectSearchResults, lib: true do
end
end
end
end
describe
"search for commits in non-default branch"
do
it
"finds needed commit"
do
project
=
create
:project
result
=
Gitlab
::
Elastic
::
ProjectSearchResults
.
new
(
user
,
"initial"
,
project
.
id
,
'test'
)
expect
(
result
.
commits_count
).
to
eq
(
1
)
end
end
describe
'confidential issues'
do
describe
'confidential issues'
do
let
(
:query
)
{
'issue'
}
let
(
:query
)
{
'issue'
}
let
(
:author
)
{
create
(
:user
)
}
let
(
:author
)
{
create
(
:user
)
}
...
...
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