Skip to content

Commit 107a694

Browse files
authored
Fix IsErrPullClosed (#10093)
1 parent 8d43563 commit 107a694

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

services/pull/pull.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ func CloseBranchPulls(doer *models.User, repoID int64, branch string) error {
407407

408408
var errs errlist
409409
for _, pr := range prs {
410-
if err = issue_service.ChangeStatus(pr.Issue, doer, true); err != nil && !models.IsErrIssueWasClosed(err) {
410+
if err = issue_service.ChangeStatus(pr.Issue, doer, true); err != nil && !models.IsErrPullWasClosed(err) {
411411
errs = append(errs, err)
412412
}
413413
}
@@ -436,7 +436,7 @@ func CloseRepoBranchesPulls(doer *models.User, repo *models.Repository) error {
436436
}
437437

438438
for _, pr := range prs {
439-
if err = issue_service.ChangeStatus(pr.Issue, doer, true); err != nil && !models.IsErrIssueWasClosed(err) {
439+
if err = issue_service.ChangeStatus(pr.Issue, doer, true); err != nil && !models.IsErrPullWasClosed(err) {
440440
errs = append(errs, err)
441441
}
442442
}

0 commit comments

Comments
 (0)