1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

Add delete branch track on pull request comments (#888)

* add delete branch track on pull request comments

* don't change vendor
This commit is contained in:
Lunny Xiao
2017-02-11 12:00:29 +08:00
committed by GitHub
parent 3576e1ee73
commit cf0f451c37
7 changed files with 55 additions and 2 deletions

View File

@@ -635,7 +635,8 @@ func ViewIssue(ctx *context.Context) {
} else if ctx.User.IsWriterOfRepo(pull.HeadRepo) {
canDelete = true
deleteBranchURL := pull.HeadRepo.Link() + "/branches/" + pull.HeadBranch + "/delete"
ctx.Data["DeleteBranchLink"] = fmt.Sprintf("%s?commit=%s&redirect_to=%s", deleteBranchURL, pull.MergedCommitID, ctx.Data["Link"])
ctx.Data["DeleteBranchLink"] = fmt.Sprintf("%s?commit=%s&redirect_to=%s&issue_id=%d",
deleteBranchURL, pull.MergedCommitID, ctx.Data["Link"], issue.ID)
}
}