Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvements in email notifications on issues and pull requests #5083

Closed
rasmk opened this issue Oct 14, 2018 · 12 comments
Closed

Improvements in email notifications on issues and pull requests #5083

rasmk opened this issue Oct 14, 2018 · 12 comments
Labels
type/enhancement An improvement of existing functionality type/proposal The new feature has not been accepted yet but needs to be discussed first.

Comments

@rasmk
Copy link

rasmk commented Oct 14, 2018

I would like to see some improvements in email notifications Gitea sends on issues and pull requests.

Content extensions:

  • distinguish issues and PRs in email subject and body
  • distinguish whether the issue is new, updated or closed in email subject and body
  • have different notifications on different comment types (e.g. different email, when I get assigned to an issue)

For that, I was thinking about having templates for subjects and adding some more data (e.g. issue and comment) to the data of the body template, so that custom templates can make use of that. Having separate templates per comment type may be an option too.

Besides, I would like to receive some more emails than today:

  • when user assignment changes, especially, when I get assigned to the issue/PR
  • on coder review, possibly both line-review comments and global review comment

Nice to have: defer the email sending and bundle some related updates into a single mail. This should be particularly useful for the review notifications. This may be somehow related to #145 by @andreynering.

I would like to hear some feedback. Perhaps I could contribute a PR.

@lunny lunny added type/enhancement An improvement of existing functionality type/proposal The new feature has not been accepted yet but needs to be discussed first. labels Oct 15, 2018
@kolaente
Copy link
Member

I looked into this and after about an hour I gave up. The whole thing is not built very good. We have notifications, these are ok and get updated far more often than emails are sent. One would expect we have some kind of goroutine which sends mails based on notifications, but the whole notification implementation doesn't send any mails. Mails are being send directly by the function which creates an issue/pr comment. But not for all kinds of comments.... (this is the reason for #4279)

IMHO we should refactor these things in three steps:

  1. Refactor the way emails are sent so they're sent based on notifications instead of issue comments
  2. Built email content messages based on the notification type, then later add translatable strings (work for this has been done in Added user language setting #3875)
  3. Make sure notifications are built for every issue action (assigned, unassigned, updated, etc.). Later possibility to make this configurable on a per-user basis, letting the user decide which kind of notifications he wants to recieve.

@lunny
Copy link
Member

lunny commented Oct 18, 2018

@kolaente see #5085 , I will send another PR about mail notification after that merged.

@kolaente
Copy link
Member

@lunny Great, I haven't seen that!

@rasmk
Copy link
Author

rasmk commented Oct 20, 2018

@kolaente, if email is generated on every action, option to configure, which emails the user is interested in is, in my opinion, a must. Currently there are too few emails sent. But I would not exchange it for too many.
I would say, this should be configurable not only per user, but on per user/repo combination basis. There are some repos I like to know about virtually everything, some I want to be informed about some major events (e.g. PR approval or merge) and some, I do not want to get anything, even though I am a member there. Best if there were global settings for the user, that could be overwritten per repo.
There is currently no UI for maintaining user settings per repo, so I perhaps request for too much. If not doable, email rules for help. But then it would be quite important to have key informations in email subject. Good case for subject templates I proposed in OP.

Another way to reduce email overload is deferring email sending and bundling some actions together. E.g. if I set a milestone, labels and assignee on an issue, they are separate actions as I can tell from the UI. But logically, I would not like to receive several mails for them. Or another case, line comments and review comment. If somebody is working on PR review, it does not make much sense to push every action as an email. Instead, they could be combined together in a single message. I worked for a while with BitBucket. It was behaving that way (I mean PR review), as far as I remember.

I am too new to Gitea to contribute any code on that level of rework. Looking forward for the PR promised by @lunny.

@lunny
Copy link
Member

lunny commented Oct 21, 2018

@rasmk I agree with you we need a notification configuration UI after the mail refactoring finished.

@saitho
Copy link
Contributor

saitho commented May 10, 2019

The notification refactoring mentioned was #5085, right? Can we tackle this issue now? :)

@lunny
Copy link
Member

lunny commented May 11, 2019

@oscarlofwenhamn
Copy link
Contributor

I agree with @rasmk that we would need configuration options with an increase of emails. Is configuration available at all at the moment? I was contacted by a user with the request of opting-out of certain notification emails, though I haven't come across this functionality so far in Gitea. The ability to customize notifications for different repos would be brilliant, as certain repos may require greater attention than others.

@MarkusAmshove
Copy link
Contributor

MarkusAmshove commented Sep 16, 2019

I would like to see a way to disable comments from specific users resulting in a mail/notification.

We have technical users (bots) that write comments into every PR and when I create a PR, I already get multiple mails :-)

@guillep2k
Copy link
Member

#8329 partially addresses this.
Related to #145

@lunny
Copy link
Member

lunny commented Sep 3, 2020

Since the email templates could be overrided, I think we can close this one.

@mrsdizzie
Copy link
Member

Agree most of this is resolved/possible now

@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type/enhancement An improvement of existing functionality type/proposal The new feature has not been accepted yet but needs to be discussed first.
Projects
None yet
Development

No branches or pull requests

8 participants