require latest source sha as param for the merge API (#767)

This commit is contained in:
Marko Gacesa 2023-11-06 12:16:18 +00:00 committed by Harness
parent 3ad550ce69
commit e731c0fdff

View File

@ -94,13 +94,10 @@ func (c *Controller) Merge(
return nil, nil, usererror.BadRequest("Pull request must be open")
}
// TODO: Uncomment when the front-end side starts sending SourceSHA.
/*
if pr.SourceSHA != in.SourceSHA {
return nil, nil,
usererror.BadRequest("A newer commit is available. Only the latest commit can be merged.")
}
*/
if pr.IsDraft {
return nil, nil, usererror.BadRequest(