mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-31 11:52:10 +00:00
Provide button to delete merged pull request (#441)
* provide button to delete merged pull request * golint fix
This commit is contained in:
parent
d4924d45d6
commit
4b7594d9fa
5 changed files with 40 additions and 1 deletions
|
@ -661,6 +661,15 @@ func ViewIssue(ctx *context.Context) {
|
|||
}
|
||||
}
|
||||
|
||||
if issue.IsPull {
|
||||
pull := issue.PullRequest
|
||||
ctx.Data["IsPullBranchDeletable"] = ctx.Repo.IsWriter() && ctx.Repo.GitRepo.IsBranchExist(pull.HeadBranch)
|
||||
|
||||
deleteBranchURL := ctx.Repo.RepoLink + "/branches/" + pull.HeadBranch + "/delete"
|
||||
queryParams := "?redirect_to=" + ctx.Data["Link"].(string)
|
||||
ctx.Data["DeleteBranchLink"] = deleteBranchURL + queryParams
|
||||
}
|
||||
|
||||
ctx.Data["Participants"] = participants
|
||||
ctx.Data["NumParticipants"] = len(participants)
|
||||
ctx.Data["Issue"] = issue
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue