fix delete pull head ref for DeleteIssue (#20032)
* fix delete pull head ref for DeleteIssue fix #19655 Signed-off-by: a1012112796 <1012112796@qq.com> * add different help message for delete pull request Signed-off-by: a1012112796 <1012112796@qq.com> Co-authored-by: 6543 <6543@obermui.de>
This commit is contained in:
parent
e86f18a05a
commit
cc42c6488a
4 changed files with 19 additions and 3 deletions
|
@ -878,6 +878,11 @@ func DeleteIssue(ctx *context.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
if issue.IsPull {
|
||||
ctx.Redirect(fmt.Sprintf("%s/pulls", ctx.Repo.Repository.HTMLURL()), http.StatusSeeOther)
|
||||
return
|
||||
}
|
||||
|
||||
ctx.Redirect(fmt.Sprintf("%s/issues", ctx.Repo.Repository.HTMLURL()), http.StatusSeeOther)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue