mirror of
https://gitcode.com/gitea/gitea.git
synced 2025-05-31 23:33:08 +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:
@ -514,7 +514,7 @@ func CloseBranchPulls(doer *user_model.User, repoID int64, branch string) error
|
||||
|
||||
var errs errlist
|
||||
for _, pr := range prs {
|
||||
if err = issue_service.ChangeStatus(pr.Issue, doer, true); err != nil && !models.IsErrPullWasClosed(err) {
|
||||
if err = issue_service.ChangeStatus(pr.Issue, doer, true); err != nil && !models.IsErrPullWasClosed(err) && !models.IsErrDependenciesLeft(err) {
|
||||
errs = append(errs, err)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user