mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-09 18:13:10 +02: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:
1 parent
84f8ef3df6
commit
4a20eadfd7
3 files changed
+9
-6
No files matched your search
@@ -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