You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Issue URLs on a self-hosted Forgejo hostname are not recognised #40270
I searched existing issues and did not find a duplicate.
I included enough detail to reproduce or investigate the problem.
Area
apps/server
Steps to reproduce
Self-host Forgejo on a hostname that contains neither a forgejo nor a gitea label, such as git.example.com.
Add a project from a repository on that server. Its issue binding resolves to Forgejo (link_issue with projectId + key works).
In a thread in that project, have the agent call link_issue or read_issue with the issue's full URL, https://git.example.com/acme/web/issues/4.
Expected behavior
The URL resolves through the project on that host, the same way #38251 made it work for GitHub Enterprise hostnames.
Actual behavior
Issue operation resolveUrl failed: This is not a recognised issue URL.
IssueService.resolveUrl falls back to parseOnProjectHost, which calls the provider's parseIssueUrl(url, known = true). GitHub's parser honours known; Forgejo's ignores it and still requires isForgejoHost(url.hostname):
0.1.12-nightly.20261120.4994; the code is unchanged on main at 714997c.
Environment
Self-hosted Forgejo on a custom domain, T3 server on Windows and Linux.
Logs or stack traces
From one day of agent sessions on one machine: 6 of 9 link_issue/read_issue calls by URL failed this way. Agents recovered by retrying with projectId + key, which costs a turn each time; one guessed key: "owner/repo#38" and failed again.
Activity