Skip to content

Commit 74754bd

Browse files
committed
ignore special error when close pull request
1 parent be8b1c6 commit 74754bd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

services/pull/pull.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ func (errs errlist) Error() string {
363363
var buf strings.Builder
364364
for i, err := range errs {
365365
if i > 0 {
366-
buf.WriteString(",")
366+
buf.WriteString(", ")
367367
}
368368
buf.WriteString(err.Error())
369369
}
@@ -391,7 +391,7 @@ func CloseBranchPulls(doer *models.User, repoID int64, branch string) error {
391391

392392
var errs errlist
393393
for _, pr := range prs {
394-
if err = issue_service.ChangeStatus(pr.Issue, doer, true); err != nil {
394+
if err = issue_service.ChangeStatus(pr.Issue, doer, true); err != nil && !models.IsErrIssueWasClosed(err) {
395395
errs = append(errs, err)
396396
}
397397
}
@@ -420,7 +420,7 @@ func CloseRepoBranchesPulls(doer *models.User, repo *models.Repository) error {
420420
}
421421

422422
for _, pr := range prs {
423-
if err = issue_service.ChangeStatus(pr.Issue, doer, true); err != nil {
423+
if err = issue_service.ChangeStatus(pr.Issue, doer, true); err != nil && !models.IsErrIssueWasClosed(err) {
424424
errs = append(errs, err)
425425
}
426426
}

0 commit comments

Comments
 (0)