summaryrefslogtreecommitdiff
path: root/app/finders/context_commits_finder.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-08-20 18:42:06 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-08-20 18:42:06 +0000
commit6e4e1050d9dba2b7b2523fdd1768823ab85feef4 (patch)
tree78be5963ec075d80116a932011d695dd33910b4e /app/finders/context_commits_finder.rb
parent1ce776de4ae122aba3f349c02c17cebeaa8ecf07 (diff)
downloadgitlab-ce-6e4e1050d9dba2b7b2523fdd1768823ab85feef4.tar.gz
Add latest changes from gitlab-org/gitlab@13-3-stable-ee
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