Latest main breaks PRs with comments #10291

Closed
opened 2025-11-02 09:03:21 -06:00 by GiteaMirror · 3 comments
Owner

Originally created by @gempir on GitHub (Feb 17, 2023).

Description

Adding a comment to a PR will cause the PR page to only answer with a 500.
I tried it on the 2 commits below and also the gitea demo instance.

Not sure at what point this bug came.

https://try.gitea.io/gempir/gempbot/pulls/1/files

Server error message:

2023/02/17 21:01:44 ...s/context/context.go:231:HTML() [E] [63efdd28-32] Render failed: template: shared/user/avatarlink:1:81: executing "shared/user/avatarlink" at <$.Context>: wrong type for value; expected context.Context; got interface {}
2023/02/17 21:01:44 [63efdd28-32] router: completed GET /gempir/gempbot/pulls/2/files for [::1]:33960, 500 Internal Server Error in 101.7ms @ repo/pull.go:672(repo.ViewPullFiles)

Test commits which were all broken (so has to be before):
Powered by Gitea Version: 1.19.0+dev-504-ge7ef94e00 Page: 187ms Template: 1ms
e7ef94e00f
bd820aa9c5

Gitea Version

e7ef94e00f

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

locally on linux with the make command in the readme. But also happens on the try.gitea.io page.

Database

SQLite

Originally created by @gempir on GitHub (Feb 17, 2023). ### Description Adding a comment to a PR will cause the PR page to only answer with a 500. I tried it on the 2 commits below and also the gitea demo instance. Not sure at what point this bug came. https://try.gitea.io/gempir/gempbot/pulls/1/files Server error message: ``` 2023/02/17 21:01:44 ...s/context/context.go:231:HTML() [E] [63efdd28-32] Render failed: template: shared/user/avatarlink:1:81: executing "shared/user/avatarlink" at <$.Context>: wrong type for value; expected context.Context; got interface {} 2023/02/17 21:01:44 [63efdd28-32] router: completed GET /gempir/gempbot/pulls/2/files for [::1]:33960, 500 Internal Server Error in 101.7ms @ repo/pull.go:672(repo.ViewPullFiles) ``` Test commits which were all broken (so has to be before): [Powered by Gitea](https://gitea.io/) Version: 1.19.0+dev-504-ge7ef94e00 Page: 187ms Template: 1ms e7ef94e00f1319e5fb876f47fee28728bd671f07 bd820aa9c52da4568b460a0b8604287f8ed8df26 ### Gitea Version e7ef94e00f1319e5fb876f47fee28728bd671f07 ### Can you reproduce the bug on the Gitea demo site? Yes ### Log Gist _No response_ ### Screenshots _No response_ ### Git Version _No response_ ### Operating System _No response_ ### How are you running Gitea? locally on linux with the make command in the readme. But also happens on the try.gitea.io page. ### Database SQLite
GiteaMirror added the issue/confirmedtype/bug labels 2025-11-02 09:03:21 -06:00
Author
Owner

@yardenshoham commented on GitHub (Feb 17, 2023):

How to reproduce?

@yardenshoham commented on GitHub (Feb 17, 2023): How to reproduce?
Author
Owner

@gempir commented on GitHub (Feb 17, 2023):

Just add a comment on a code line

@gempir commented on GitHub (Feb 17, 2023): Just add a comment on a code line
Author
Owner

@yardenshoham commented on GitHub (Feb 17, 2023):

Feels like a regression from #22294, reminds me of #22924

@yardenshoham commented on GitHub (Feb 17, 2023): Feels like a regression from #22294, reminds me of #22924
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#10291