summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2016-06-20 18:48:04 +0200
committerDouwe Maan <douwe@selenight.nl>2016-07-06 18:50:58 -0400
commit6ce25e7b4caa9e94de74378729178c7060d640b2 (patch)
tree8f7b7ba4d83d20bffe7bb50fba1942fd6c9c5b80 /lib
parent18a5bb05204ee437902d82e5973a427b9aac6d53 (diff)
downloadgitlab-ce-6ce25e7b4caa9e94de74378729178c7060d640b2.tar.gz
Rename MergeRequest methods that return commits or shas to be more clear and consistent
Diffstat (limited to 'lib')
-rw-r--r--lib/api/merge_requests.rb4
-rw-r--r--lib/gitlab/github_import/pull_request_formatter.rb4
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/api/merge_requests.rb b/lib/api/merge_requests.rb
index 0e94efd4acd..4fcdf8968c9 100644
--- a/lib/api/merge_requests.rb
+++ b/lib/api/merge_requests.rb
@@ -233,8 +233,8 @@ module API
render_api_error!('Branch cannot be merged', 406) unless merge_request.mergeable?
- if params[:sha] && merge_request.source_sha != params[:sha]
- render_api_error!("SHA does not match HEAD of source branch: #{merge_request.source_sha}", 409)
+ if params[:sha] && merge_request.diff_head_sha != params[:sha]
+ render_api_error!("SHA does not match HEAD of source branch: #{merge_request.diff_head_sha}", 409)
end
merge_params = {
diff --git a/lib/gitlab/github_import/pull_request_formatter.rb b/lib/gitlab/github_import/pull_request_formatter.rb
index 498b00cb658..a4ea2210abd 100644
--- a/lib/gitlab/github_import/pull_request_formatter.rb
+++ b/lib/gitlab/github_import/pull_request_formatter.rb
@@ -11,10 +11,10 @@ module Gitlab
description: description,
source_project: source_branch_project,
source_branch: source_branch_name,
- head_source_sha: source_branch_sha,
+ source_branch_sha: source_branch_sha,
target_project: target_branch_project,
target_branch: target_branch_name,
- base_target_sha: target_branch_sha,
+ target_branch_sha: target_branch_sha,
state: state,
milestone: milestone,
author_id: author_id,