diff options
Diffstat (limited to 'routers')
-rw-r--r-- | routers/repo/issue.go | 1 | ||||
-rw-r--r-- | routers/repo/pull.go | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/routers/repo/issue.go b/routers/repo/issue.go index c818ac4840..7a681033af 100644 --- a/routers/repo/issue.go +++ b/routers/repo/issue.go @@ -674,6 +674,7 @@ func ViewIssue(ctx *context.Context) { PrepareMergedViewPullInfo(ctx, issue) } else { PrepareViewPullInfo(ctx, issue) + ctx.Data["DisableStatusChange"] = ctx.Data["IsPullRequestBroken"] == true && issue.IsClosed } if ctx.Written() { return diff --git a/routers/repo/pull.go b/routers/repo/pull.go index 14ab2207b5..0616ee2c77 100644 --- a/routers/repo/pull.go +++ b/routers/repo/pull.go @@ -999,8 +999,8 @@ func CleanUpPullRequest(ctx *context.Context) { pr := issue.PullRequest - // Allow cleanup only for merged PR - if !pr.HasMerged { + // Don't cleanup unmerged and unclosed PRs + if !pr.HasMerged && !issue.IsClosed { ctx.NotFound("CleanUpPullRequest", nil) return } |