forgejo/routers
forgejo-backport-action 706a7ad41e [v7.0/forgejo] Fix "view file" button in diff compare view (#3077)
**Backport:** https://codeberg.org/forgejo/forgejo/pulls/3046

This PR fixes an issue in the diff compare view, where when working on a fork that has not the same name as the upstream repo, the "View file" button links to a wrong, often missing, location.

Demonstration of this issue:
- Visit https://next.forgejo.org/mai-lapyst-test-org/upstream/compare/main...Mai-Lapyst/downstream:mai-lapyst-patch-1.
- Click the "View file" button of the patch.
- Get taken to `4fe947d522/README.md` (which does not exist and returns a 404) instead of `4fe947d522/README.md`. Note the different repository name (`upstream` vs `downstream`).

Co-authored-by: Mai-Lapyst <mai-lapyst@noreply.codeberg.org>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3077
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>
2024-04-06 13:24:55 +00:00
..
api [v7.0/forgejo] Add optional pronoun field in user settings (#3076) 2024-04-06 13:23:43 +00:00
common Use relative links for commits, mentions, and issues in markdown (#29427) 2024-03-20 08:46:28 +01:00
install Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00
private [FEAT] Configure if protected branch rule should apply to admins 2024-04-01 19:31:43 +00:00
utils Improve user search display name (#29002) 2024-02-01 17:10:16 +00:00
web [v7.0/forgejo] Fix "view file" button in diff compare view (#3077) 2024-04-06 13:24:55 +00:00
init.go Actions Artifacts v4 backend (#28965) 2024-03-06 12:10:45 +08:00