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

Fix PR/issue redirects when having external tracker (#9339)

* Make sure only issues are redirected to external tracker

* Ensure correct redirects for pulls after dependency or watch.

* NewIssuePost is always issues so no need to redirect with type.
This commit is contained in:
David Svantesson
2019-12-14 01:53:32 +01:00
committed by Antoine GIRARD
parent 81a52442a1
commit f46176a418
3 changed files with 16 additions and 16 deletions

View File

@@ -5,7 +5,6 @@
package repo
import (
"fmt"
"net/http"
"strconv"
@@ -54,6 +53,5 @@ func IssueWatch(ctx *context.Context) {
return
}
url := fmt.Sprintf("%s/issues/%d", ctx.Repo.RepoLink, issue.Index)
ctx.Redirect(url, http.StatusSeeOther)
ctx.Redirect(issue.HTMLURL(), http.StatusSeeOther)
}