[v12.0/forgejo] fix: redirect from /{username}/{reponame}/pulls/{index} to issue if index is a issue (#8876)
Some checks failed
testing-integration / test-unit (push) Has been skipped
testing-integration / test-sqlite (push) Has been skipped
testing / backend-checks (push) Has been skipped
testing / frontend-checks (push) Has been skipped
testing / test-unit (push) Has been skipped
testing / test-e2e (push) Has been skipped
testing / test-mysql (push) Has been skipped
testing / test-pgsql (push) Has been skipped
testing / test-sqlite (push) Has been skipped
testing / test-remote-cacher (redis) (push) Has been skipped
testing / test-remote-cacher (valkey) (push) Has been skipped
testing / test-remote-cacher (garnet) (push) Has been skipped
testing / test-remote-cacher (redict) (push) Has been skipped
testing / security-check (push) Has been skipped
/ release (push) Has been cancelled

**Backport:** !8874

conflict resolved by accepting the incomming hunk and removing TestIssueTimelineLabels-func

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/8876
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Reviewed-by: floss4good <floss4good@noreply.codeberg.org>
Co-authored-by: zokki <zokki.softwareschmiede@gmail.com>
Co-committed-by: zokki <zokki.softwareschmiede@gmail.com>
This commit is contained in:
zokki 2025-08-17 12:18:09 +02:00 committed by Earl Warren
commit 100ddf45a7
2 changed files with 33 additions and 1 deletions

View file

@ -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
}