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
b4a3e045
Commit
b4a3e045
authored
Oct 22, 2020
by
Dmitry Gruzd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add basic_search parameter to search API
parent
c48b8498
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
0 deletions
+9
-0
lib/api/search.rb
lib/api/search.rb
+1
-0
spec/requests/api/search_spec.rb
spec/requests/api/search_spec.rb
+8
-0
No files found.
lib/api/search.rb
View file @
b4a3e045
...
...
@@ -35,6 +35,7 @@ module API
state:
params
[
:state
],
confidential:
params
[
:confidential
],
snippets:
snippets?
,
basic_search:
params
[
:basic_search
],
page:
params
[
:page
],
per_page:
params
[
:per_page
]
}.
merge
(
additional_params
)
...
...
spec/requests/api/search_spec.rb
View file @
b4a3e045
...
...
@@ -516,6 +516,14 @@ RSpec.describe API::Search do
end
end
context
'when requesting basic search'
do
it
'passes the parameter to search service'
do
expect
(
SearchService
).
to
receive
(
:new
).
with
(
user
,
hash_including
(
basic_search:
'true'
))
get
api
(
endpoint
,
user
),
params:
{
scope:
'issues'
,
search:
'awesome'
,
basic_search:
'true'
}
end
end
context
'for merge_requests scope'
do
let
(
:endpoint
)
{
"/projects/
#{
repo_project
.
id
}
/search"
}
...
...
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