1
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-11-04 08:17:24 -05:00

Fix IsErrPullClosed (#10093)

This commit is contained in:
Lunny Xiao 2020-02-01 19:24:26 +08:00 committed by GitHub
parent 8d43563a32
commit 107a694fd6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -407,7 +407,7 @@ func CloseBranchPulls(doer *models.User, repoID int64, branch string) error {
var errs errlist var errs errlist
for _, pr := range prs { for _, pr := range prs {
if err = issue_service.ChangeStatus(pr.Issue, doer, true); err != nil && !models.IsErrIssueWasClosed(err) { if err = issue_service.ChangeStatus(pr.Issue, doer, true); err != nil && !models.IsErrPullWasClosed(err) {
errs = append(errs, err) errs = append(errs, err)
} }
} }
@ -436,7 +436,7 @@ func CloseRepoBranchesPulls(doer *models.User, repo *models.Repository) error {
} }
for _, pr := range prs { for _, pr := range prs {
if err = issue_service.ChangeStatus(pr.Issue, doer, true); err != nil && !models.IsErrIssueWasClosed(err) { if err = issue_service.ChangeStatus(pr.Issue, doer, true); err != nil && !models.IsErrPullWasClosed(err) {
errs = append(errs, err) errs = append(errs, err)
} }
} }