Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/finders/context_commits_finder.rb')
-rw-r--r--app/finders/context_commits_finder.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/finders/context_commits_finder.rb b/app/finders/context_commits_finder.rb
index f1b3eb43e84..de89a556ee0 100644
--- a/app/finders/context_commits_finder.rb
+++ b/app/finders/context_commits_finder.rb
@@ -25,7 +25,7 @@ class ContextCommitsFinder
if search.present?
search_commits
else
- project.repository.commits(merge_request.source_branch, { limit: limit, offset: offset })
+ project.repository.commits(merge_request.target_branch, { limit: limit, offset: offset })
end
commits
@@ -47,7 +47,7 @@ class ContextCommitsFinder
commits = [commit_by_sha] if commit_by_sha
end
else
- commits = project.repository.find_commits_by_message(search, nil, nil, 20)
+ commits = project.repository.find_commits_by_message(search, merge_request.target_branch, nil, 20)
end
commits