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
724b645a
Commit
724b645a
authored
Aug 19, 2021
by
Terri Chu
Committed by
Mayra Cabrera
Aug 19, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove source_project_id from basic search for merge requests
parent
e9b0b551
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
lib/gitlab/search_results.rb
lib/gitlab/search_results.rb
+1
-1
spec/lib/gitlab/search_results_spec.rb
spec/lib/gitlab/search_results_spec.rb
+2
-2
No files found.
lib/gitlab/search_results.rb
View file @
724b645a
...
...
@@ -188,7 +188,7 @@ module Gitlab
merge_requests
=
MergeRequestsFinder
.
new
(
current_user
,
issuable_params
).
execute
unless
default_project_filter
merge_requests
=
merge_requests
.
in
_projects
(
project_ids_relation
)
merge_requests
=
merge_requests
.
of
_projects
(
project_ids_relation
)
end
apply_sort
(
merge_requests
,
scope:
'merge_requests'
)
...
...
spec/lib/gitlab/search_results_spec.rb
View file @
724b645a
...
...
@@ -144,13 +144,13 @@ RSpec.describe Gitlab::SearchResults do
end
end
it
'
includes merge requests from source and target
projects'
do
it
'
does not include merge requests from source
projects'
do
forked_project
=
fork_project
(
project
,
user
)
merge_request_2
=
create
(
:merge_request
,
target_project:
project
,
source_project:
forked_project
,
title:
'foo'
)
results
=
described_class
.
new
(
user
,
'foo'
,
Project
.
where
(
id:
forked_project
.
id
))
expect
(
results
.
objects
(
'merge_requests'
)).
to
include
merge_request_2
expect
(
results
.
objects
(
'merge_requests'
)).
not_
to
include
merge_request_2
end
describe
'#merge_requests'
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