mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-27 21:03:56 +01:00
Fix IsErrPullClosed (#10093)
This commit is contained in:
parent
8d43563a32
commit
107a694fd6
1 changed files with 2 additions and 2 deletions
|
@ -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…
Reference in a new issue