-
-
Couldn't load subscription status.
- Fork 6.2k
Description
Description
Normally, if #17 is a Pull Request and you enter .../issues/17 as the url, you will be redirected to .../pulls/17. This, however, does not happen if the issues tab is disabled in the repo settings and produces a "404 Not Found" when visiting .../issues/17. The effect of this is not only that mistyped urls won't be fixed for you, but (and this is much more of a problem) gitea relies on this mechanism internally. When referencing an issue/PR number in a commit message (eg. foo bar baz (fix #17)), gitea will add an anchor to this number on the website, which will always be of the form /{user}/{repo}/issues/{number}, even if the number referenced by the commit message is in fact a PR.
Steps to reproduce:
- Visit this repo: https://git.tjdev.de/tjdev/dns-watch-2022
- See the commit message
🩹 get reference list working (#17) - Click on the green
#17 - Note how you get a 404 page
- Now click on the Pull Requests tab
- See how there actually is a PR with number
#17 - Now if I would enable the issues tab for this repo, step 3 would actually take you to the correct PR page
Gitea Version
1.24.5