Files
gitea/modules
Mitrahsoftandsilverwind a006a8ae9c fix(markup): render same-repo PR URLs as !N with external issue tracker (#40344)
When a repository uses an external issue tracker, `#N` links to the
external tracker and local pull requests are referenced as `!N`, as
merge messages already do for the title and `Merge pull request !N`. But
full pull request URLs, like the one in `Reviewed-on:`, were always
shortened to `#N`, which looks like a reference to external issue N.

Same-repo pull request URLs are now rendered as `!N` when an external
tracker is configured. Issue URLs, cross-repo links and repositories
without an external tracker are unchanged. Owner and repo are now read
from the parsed URL path, so a `/` in the query or fragment no longer
misattributes the link.

Before:
<img width="1100" height="560" alt="beforeResolving"
src="https://github.com/user-attachments/assets/c48e4219-73b4-42ba-9d10-3f5ce83d5832"
/>

After:
<img width="1100" height="560" alt="afterResolving"
src="https://github.com/user-attachments/assets/26348939-6d55-419b-bf4b-0cfcd5a2f17a"
/>

Fixes: https://github.com/go-gitea/gitea/issues/35050
Assisted-by: Claude Code:claude-opus-5-5

---------

Co-authored-by: silverwind <me@silverwind.io>
2026-11-16 14:15:52 +00:00
..
2026-10-24 13:48:19 +00:00
2026-10-24 13:48:19 +00:00
2026-10-08 00:33:55 +08:00
2026-08-26 19:32:44 +00:00
2026-07-12 17:14:09 +00:00
2026-11-10 16:29:36 +00:00
2026-10-24 13:48:19 +00:00