Description
Description
Currently, when users mention nonexistent issues in commit messages or comments, the system generates a hyperlink for them. However, when hovered over, these links lead to a "Network error" tooltip due to a 404 error because the referenced issue doesn't exist. This behavior can be confusing and misleading for users.
Potential Solutions:
- Sub-Optimal Solution: Indicate that the issue does not exist when being hovered over in lieu of a Network error.
- Optimal Solution: Issues should only be highlighted if they exist within the repository like in GitHub.
What makes the second solution more difficult is because we can't be invoking SQL queries on every page render to check the existence of a referenced issue.
GitHub internally links the issue at the time of commit or comment, not at the page render and this can be confirmed by making a new initialized repository, referencing #1
in a commit message before and after the first issue is created, and you'll only see the second commit (which is post-issue) get highlighted and linked.
Gitea Version
v1.21.10
Can you reproduce the bug on the Gitea demo site?
Yes
Log Gist
No response
Screenshots
Git Version
No response
Operating System
No response
How are you running Gitea?
Running a fresh instance via CLI from gh-codespaces.
Database
SQLite