Avoid opening/closing PRs which are already merged (#25883) (#26108)

pull/26053/head^2
yp05327 1 year ago committed by GitHub
parent 81f5d5b722
commit 53586e9d60
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      routers/web/repo/issue.go

@ -2654,6 +2654,13 @@ func UpdateIssueStatus(ctx *context.Context) {
return
}
for _, issue := range issues {
if err := issue.LoadPullRequest(ctx); err != nil {
ctx.ServerError("LoadPullRequests", err)
return
}
if issue.IsPull && issue.PullRequest.HasMerged {
continue
}
if issue.IsClosed != isClosed {
if err := issue_service.ChangeStatus(issue, ctx.Doer, "", isClosed); err != nil {
if issues_model.IsErrDependenciesLeft(err) {

Loading…
Cancel
Save