Email header X-Gitea-Reason shows unexpected reason #11479

Closed
opened 2025-11-02 09:39:01 -06:00 by GiteaMirror · 0 comments
Owner

Originally created by @corytodd on GitHub (Aug 18, 2023).

Description

When a notification is generated, there there are two similar but slightly different values that affect how the email is formed. Currently we use the action type to select the an email template to execute. This same value is then used as the reason string in both the -Reason and -NotificationReason headers.

e.g. all email notifications send on pull request activities show this header even for comments.

X-Gitea-Reason: pull

I searched through the Gitea issues and PRs to see if this was by design and I don't think it is. I also checked on some Github messages and they do set the reason to the corresponding action, e.g. push, comment, etc.

Gitea Version

v1.20.2

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

2.41.0

Operating System

Ubuntu 22.04

How are you running Gitea?

Self-built from v1.20.2 running from systemd on Ubuntu 22.04

Database

PostgreSQL

Originally created by @corytodd on GitHub (Aug 18, 2023). ### Description When a notification is generated, there there are two similar but slightly different values that affect how the email is formed. Currently we use the action type to select the an email template to execute. This same value is then used as the reason string in both the -Reason and -NotificationReason headers. e.g. all email notifications send on pull request activities show this header even for comments. ``` X-Gitea-Reason: pull ``` I searched through the Gitea issues and PRs to see if this was by design and I don't think it is. I also checked on some Github messages and they do set the reason to the corresponding action, e.g. push, comment, etc. ### Gitea Version v1.20.2 ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist _No response_ ### Screenshots _No response_ ### Git Version 2.41.0 ### Operating System Ubuntu 22.04 ### How are you running Gitea? Self-built from v1.20.2 running from systemd on Ubuntu 22.04 ### Database PostgreSQL
GiteaMirror added the type/bug label 2025-11-02 09:39:01 -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#11479