forked from forgejo/forgejo
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:
parent
81a52442a1
commit
f46176a418
3 changed files with 16 additions and 16 deletions
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue