Email notification for pushes to head branch of closed pull request #10423

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

Originally created by @brechtvl on GitHub (Mar 13, 2023).

Description

  • Enable Settings > Account > And Your Own Notifications (for easier testing with 1 account)
  • Fork a repository
  • Commit a change to the default branch in the base repository
  • Make a pull request on the fork to merge the latest default branch into the fork
  • Close pull request without merging
  • Commit a change to the default branch in the base repository
  • Get an email notification for the closed pull request
  • Pull request itself shows no new commit

I'm guessing this started happening after #23189, since I only saw it after updating to a recent version of Gitea.

I think there are two problems:

  • Email notifications should not be sent out for closed pull requests in this case. This can lead to potentially a lot emails depending if someone is using this workflow to update their fork.
  • Closed pull requests get commit comments but they are hidden. The amount of additional comments can grow effectively quadratically, as more closed pull requests accumulate and more commits are made to the default branch.

Gitea Version

43c1362 (main)

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?

Both own build and try.gitea.io.

Database

None

Originally created by @brechtvl on GitHub (Mar 13, 2023). ### Description * Enable Settings > Account > And Your Own Notifications (for easier testing with 1 account) * Fork a repository * Commit a change to the default branch in the base repository * Make a pull request on the fork to merge the latest default branch into the fork * Close pull request without merging * Commit a change to the default branch in the base repository * Get an email notification for the closed pull request * Pull request itself shows no new commit I'm guessing this started happening after #23189, since I only saw it after updating to a recent version of Gitea. I think there are two problems: * Email notifications should not be sent out for closed pull requests in this case. This can lead to potentially a lot emails depending if someone is using this workflow to update their fork. * Closed pull requests get commit comments but they are hidden. The amount of additional comments can grow effectively quadratically, as more closed pull requests accumulate and more commits are made to the default branch. ### Gitea Version 43c1362 (main) ### 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? Both own build and try.gitea.io. ### Database None
GiteaMirror added the type/bug label 2025-11-02 09:07:02 -06:00
Author
Owner

@brechtvl commented on GitHub (Mar 13, 2023):

CC @sillyguodong

@brechtvl commented on GitHub (Mar 13, 2023): CC @sillyguodong
Author
Owner

@sillyguodong commented on GitHub (Mar 13, 2023):

CC @sillyguodong

copy that, I will check it.

@sillyguodong commented on GitHub (Mar 13, 2023): > CC @sillyguodong copy that, I will check it.
Author
Owner

@sillyguodong commented on GitHub (Mar 14, 2023):

  • Email notifications should not be sent out for closed pull requests in this case. This can lead to potentially a lot emails depending if someone is using this workflow to update their fork.

oh, I made a mistake and fix in #23462

@sillyguodong commented on GitHub (Mar 14, 2023): > * Email notifications should not be sent out for closed pull requests in this case. This can lead to potentially a lot emails depending if someone is using this workflow to update their fork. oh, I made a mistake and fix in #23462
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#10423