aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--routers/web/repo/issue.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/routers/web/repo/issue.go b/routers/web/repo/issue.go
index d436abba2f..4cf319e958 100644
--- a/routers/web/repo/issue.go
+++ b/routers/web/repo/issue.go
@@ -2726,7 +2726,15 @@ func UpdateIssueStatus(ctx *context.Context) {
ctx.ServerError("LoadRepositories", err)
return
}
+ if err := issues.LoadPullRequests(ctx); err != nil {
+ ctx.ServerError("LoadPullRequests", err)
+ return
+ }
+
for _, issue := range issues {
+ 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) {