* Show button to delete a pull request branch after a pull request has been closed (#6570) Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Update routers/repo/pull.go Co-Authored-By: saitho <mario.lubenka@googlemail.com>
This commit is contained in:
parent
b1bb700665
commit
bc86134759
4 changed files with 15 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue