Alert templates on pull request comparison page don't work #13887

Closed
opened 2025-11-02 10:56:13 -06:00 by GiteaMirror · 0 comments
Owner

Originally created by @TheFox0x7 on GitHub (Dec 27, 2024).

Description

Reproduction steps:

  1. Create user1 and user2
  2. user1 creates a repository "example"
  3. user2 forks it and makes some change
  4. user1 blocks user2
  5. user2 tries to submit PR

Expected outcome:
User2 gets a message that they are blocked from repository.

Actual:
Template fails and displays server error.


Analysis:

Parameters passed to the template lack Details key which causes the error.

079a1ffe8f/routers/web/repo/pull.go (L1355-L1369)

Adding it with even an empty string resolves the issue.
I haven't tried to do this on demo instance.

Gitea Version

079a1ffe8f

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

Expected:
image

Actual:
image

Git Version

2.47.1

Operating System

Linux

How are you running Gitea?

self-built

Database

SQLite

Originally created by @TheFox0x7 on GitHub (Dec 27, 2024). ### Description Reproduction steps: 1. Create user1 and user2 2. user1 creates a repository "example" 3. user2 forks it and makes some change 4. user1 blocks user2 5. user2 tries to submit PR Expected outcome: User2 gets a message that they are blocked from repository. Actual: Template fails and displays server error. --- Analysis: Parameters passed to the template lack `Details` key which causes the error. https://github.com/go-gitea/gitea/blob/079a1ffe8f38e0c7570079b21a4d8cec4d90e923/routers/web/repo/pull.go#L1355-L1369 Adding it with even an empty string resolves the issue. I haven't tried to do this on demo instance. ### Gitea Version 079a1ffe8f ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist _No response_ ### Screenshots Expected: ![image](https://github.com/user-attachments/assets/7705004c-b7dc-44df-9912-254ade4a6d80) Actual: ![image](https://github.com/user-attachments/assets/c6092e34-2196-4056-8bbc-309ba9a87a13) ### Git Version 2.47.1 ### Operating System Linux ### How are you running Gitea? self-built ### Database SQLite
GiteaMirror added the type/bug label 2025-11-02 10:56:13 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#13887