1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2025-07-27 17:28:34 +00:00

[v11.0/forgejo] fix: pull request cross references (#7983)

**Backport:** https://codeberg.org/forgejo/forgejo/pulls/7979

Closes #7974.

Co-authored-by: Robert Wolff <mahlzahn@posteo.de>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7983
Reviewed-by: Robert Wolff <mahlzahn@posteo.de>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: forgejo-backport-action <forgejo-backport-action@noreply.codeberg.org>
Co-committed-by: forgejo-backport-action <forgejo-backport-action@noreply.codeberg.org>
This commit is contained in:
forgejo-backport-action 2025-05-28 18:25:40 +02:00 committed by Gusted
parent 55df95b1be
commit e9f0e96a27
2 changed files with 26 additions and 1 deletions

View file

@ -460,7 +460,8 @@ func findAllIssueReferencesBytes(content []byte, links []string) []*rawReference
}
parts := strings.Split(u.EscapedPath(), "/")
// /user/repo/issues/3
if len(parts) != 5 || parts[0] != "" {
// /user/repo/pulls/7/files/...
if len(parts) < 5 || parts[0] != "" {
continue
}
var sep string