diff --git a/app/api/controller/pullreq/merge.go b/app/api/controller/pullreq/merge.go index 2d43cabb5..b95406d09 100644 --- a/app/api/controller/pullreq/merge.go +++ b/app/api/controller/pullreq/merge.go @@ -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.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(