Description
Description
When I merge branch through a PR the branch receiving the merge commit seems to be unable to render. The originating branch renders fine. The logs that show up are the following:
2022/06/23 10:26:40 ...s/context/context.go:231:HTML() [E] [62b47820] Render failed: template: repo/view_list:29:105: executing "repo/view_list" at <RenderCommitMessageLinkSubject $.Context .LatestCommit.Message $.RepoLink $commitLink $.Repository.ComposeMetas>: error calling RenderCommitMessageLinkSubject: runtime error: invalid memory address or nil pointer dereference
2022/06/23 10:26:40 [62b47820] router: completed GET /{user}/Gitea-Demo/src/branch/main for REDACTED:42376, 500 Internal Server Error in 502.1ms @ repo/view.go:732(repo.Home)
When I force push on main with a commit before the PR, the rendering of main continues fine. It also doesn't seem to effect traversal into the repository's folders, just the top level view. Edit: This 500 error only occurs when an external issue tracker is used with Alphanumeric selected when the PR is created. I think it might have to do with the (!9)
added to the commit name.
500 error can be seen here: https://try.gitea.io/jared-nussbaum-frbb/Gitea-Demo
Steps to reproduce:
- Create a new repository in Gitea 1.17 or later
- Go into the repository settings and select Use External Issue Tracker
- Fill in any URLs for the External Issue Tracker URLs.
- Select Alphanumeric
- Create a PR with a merge commit that includes the
(!<number>)
in the commit name. - Navigate to the "Code" section of the repo and go to the branch that you created the merge commit in
- You should see the 500 Error on the screen.
- Navigate back to the settings URL directly
- Change the Alphanumeric setting to Numeric
- Navigate to the "Code" section of the repo and go to the branch that you created the merge commit in
- You should see your repo page again without a 500 error
Gitea Version
1.17.0+rc1
1.18.0+dev-47-g91b21473a (on demo site)
Can you reproduce the bug on the Gitea demo site?
No YES https://try.gitea.io/jared-nussbaum-frbb/Gitea-Demo
Log Gist
No response
Screenshots
No response
Git Version
git version 2.36.1
Operating System
No response
How are you running Gitea?
I am running Gitea through docker.
Database
SQLite