Commit 04fdf4b9 authored by Sean McGivern's avatar Sean McGivern

fixup! Add `sha` parameter to MR accept API

parent f680eca9
...@@ -235,7 +235,7 @@ module API ...@@ -235,7 +235,7 @@ module API
render_api_error!('Branch cannot be merged', 406) unless merge_request.can_be_merged? render_api_error!('Branch cannot be merged', 406) unless merge_request.can_be_merged?
if params[:sha] && merge_request.source_sha != params[:sha] if params[:sha] && merge_request.source_sha != params[:sha]
render_api_error!("SHA does not match HEAD of source branch: #{merge_request.target_sha}", 409) render_api_error!("SHA does not match HEAD of source branch: #{merge_request.source_sha}", 409)
end end
merge_params = { merge_params = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment