Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
heptapod
heptapod
Commits
672f2dd56cff
Commit
2380e80a
authored
Jul 17, 2018
by
Jacob Vosmaer
Browse files
Add cross-link to N+1 issue
[ci-skip]
parent
d5c37a9ae438
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/models/project.rb
View file @
672f2dd5
...
@@ -2171,6 +2171,7 @@ def fetch_branch_allows_collaboration?(user, branch_name)
...
@@ -2171,6 +2171,7 @@ def fetch_branch_allows_collaboration?(user, branch_name)
merge_requests
=
source_of_merge_requests
.
opened
merge_requests
=
source_of_merge_requests
.
opened
.
where
(
allow_collaboration:
true
)
.
where
(
allow_collaboration:
true
)
# Issue for N+1: https://gitlab.com/gitlab-org/gitlab-ce/issues/49322
Gitlab
::
GitalyClient
.
allow_n_plus_1_calls
do
Gitlab
::
GitalyClient
.
allow_n_plus_1_calls
do
if
branch_name
if
branch_name
merge_requests
.
find_by
(
source_branch:
branch_name
)
&
.
can_be_merged_by?
(
user
)
merge_requests
.
find_by
(
source_branch:
branch_name
)
&
.
can_be_merged_by?
(
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