0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-12-29 10:54:02 -05:00
forgejo/routers/web/repo
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
..
actions Fix bugs in rerunning jobs (#29955) 2024-03-26 19:04:26 +01:00
badges
flags
setting [REFACTOR] webhook shared code to prevent import cycles 2024-04-05 19:36:03 +00:00
activity.go
attachment.go
blame.go Migrate margin and padding helpers to tailwind (#30043) 2024-03-30 07:17:29 +01:00
branch.go
cherry_pick.go
code_frequency.go
commit.go Use db.ListOptionsAll instead of db.ListOptions{ListAll: true} (#29995) 2024-03-26 19:04:27 +01:00
compare.go [v7.0/forgejo] Fix "view file" button in diff compare view (#3077) 2024-04-06 13:24:55 +00:00
contributors.go
download.go
editor.go [BUG] Use correct template for commitmail error 2024-04-02 14:59:34 +00:00
editor_test.go
find.go Escape paths for find file correctly (#30026) 2024-03-26 19:04:27 +01:00
githttp.go
githttp_test.go
helper.go
helper_test.go
issue.go Prevent re-review and dismiss review actions on closed and merged PRs (#30065) 2024-03-30 07:17:32 +01:00
issue_content_history.go Migrate margin and padding helpers to tailwind (#30043) 2024-03-30 07:17:29 +01:00
issue_dependency.go
issue_label.go [GITEA] Apply changes to archived labels 2024-04-03 20:14:39 +00:00
issue_label_test.go
issue_lock.go
issue_pin.go
issue_stopwatch.go
issue_test.go
issue_timetrack.go
issue_watch.go
main_test.go
middlewares.go
migrate.go
milestone.go
packages.go
patch.go
projects.go Add default board to new projects, remove uncategorized pseudo-board (#29874) 2024-03-30 07:17:31 +01:00
projects_test.go
pull.go Use db.ListOptionsAll instead of db.ListOptions{ListAll: true} (#29995) 2024-03-26 19:04:27 +01:00
pull_review.go Prevent re-review and dismiss review actions on closed and merged PRs (#30065) 2024-03-30 07:17:32 +01:00
pull_review_test.go [TESTS] pull review deleted from gitea#29888 2024-04-03 08:13:14 +00:00
recent_commits.go
release.go Highlight signed tags like signed commits 2024-04-01 13:42:11 +00:00
release_test.go
render.go Refactor render (#30136) 2024-03-30 07:17:31 +01:00
repo.go Use db.ListOptionsAll instead of db.ListOptions{ListAll: true} (#29995) 2024-03-26 19:04:27 +01:00
search.go Support repo code search without setting up an indexer (#29998) 2024-03-28 05:16:51 +00:00
topic.go
treelist.go
view.go Migrate margin and padding helpers to tailwind (#30043) 2024-03-30 07:17:29 +01:00
view_test.go
wiki.go
wiki_test.go