Browse Source

Fix IsErrPullClosed (#10093)

for-closed-social
Lunny Xiao 4 years ago
committed by GitHub
parent
commit
107a694fd6
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      services/pull/pull.go

+ 2
- 2
services/pull/pull.go View File

@ -407,7 +407,7 @@ func CloseBranchPulls(doer *models.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.IsErrIssueWasClosed(err) {
if err = issue_service.ChangeStatus(pr.Issue, doer, true); err != nil && !models.IsErrPullWasClosed(err) {
errs = append(errs, err)
}
}
@ -436,7 +436,7 @@ func CloseRepoBranchesPulls(doer *models.User, repo *models.Repository) error {
}
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)
}
}

Loading…
Cancel
Save