diff options
author | a1012112796 <1012112796@qq.com> | 2022-06-19 18:05:15 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-19 18:05:15 +0800 |
commit | cc42c6488a818499e363935c214d5c4d0aaff554 (patch) | |
tree | 303ebfabb2c9ffaa5fcbfd333172190324c249d4 /routers/web/repo/issue.go | |
parent | e86f18a05a19611c518f6ccb87cc7a1261392666 (diff) | |
download | gitea-cc42c6488a818499e363935c214d5c4d0aaff554.tar.gz gitea-cc42c6488a818499e363935c214d5c4d0aaff554.zip |
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>
Diffstat (limited to 'routers/web/repo/issue.go')
-rw-r--r-- | routers/web/repo/issue.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/routers/web/repo/issue.go b/routers/web/repo/issue.go index 11d2daeeff..5b72ff79af 100644 --- a/routers/web/repo/issue.go +++ b/routers/web/repo/issue.go @@ -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) } |