mirror of
https://gitcode.com/gitea/gitea.git
synced 2025-06-04 19:50:14 +08:00
Restore propagation of ErrDependenciesLeft (#18325)
Unfortunately #17643 prevented all propagation of ErrDependenciesLeft meaning that dependency errors that prevent closing of issues get swallowed. This PR restores propagation of the error but instead swallows the error in the places where it needs to be swallowed. Fix #18223 Signed-off-by: Andrew Thornton <art27@cantab.net>
This commit is contained in:
@ -105,7 +105,10 @@ func Merge(pr *models.PullRequest, doer *user_model.User, baseGitRepo *git.Repos
|
||||
close := ref.RefAction == references.XRefActionCloses
|
||||
if close != ref.Issue.IsClosed {
|
||||
if err = issue_service.ChangeStatus(ref.Issue, doer, close); err != nil {
|
||||
return err
|
||||
// Allow ErrDependenciesLeft
|
||||
if !models.IsErrDependenciesLeft(err) {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user