mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-09-19 01:05:55 +00:00
fix: redirect from /{username}/{reponame}/pulls/{index} to issue if index is a issue (#8874)
Redirection from issue to pull is already working, but from pull to issue is not working. This is now fixed. Resolves forgejo/forgejo#7386 Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/8874 Reviewed-by: Gusted <gusted@noreply.codeberg.org> Co-authored-by: zokki <zokki.softwareschmiede@gmail.com> Co-committed-by: zokki <zokki.softwareschmiede@gmail.com>
This commit is contained in:
parent
e3bfa5133f
commit
fb1095d141
2 changed files with 33 additions and 1 deletions
|
@ -360,7 +360,7 @@ func getPullInfo(ctx *context.Context) (issue *issues_model.Issue, ok bool) {
|
|||
ctx.Data["Issue"] = issue
|
||||
|
||||
if !issue.IsPull {
|
||||
ctx.NotFound("ViewPullCommits", nil)
|
||||
ctx.Redirect(issue.Link())
|
||||
return nil, false
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue