-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Various fixes for issue mail notifications #7165
Conversation
- Send individual mails for actions and comments - Send mail for new issues/prs without a comment - Use correct sender for reopen/close actions - Hopefully fixed all bugs related to missing mails Fixes: go-gitea#7124 Fixes: go-gitea#5977
3dc4296
to
59d4674
Compare
Codecov Report
@@ Coverage Diff @@
## master #7165 +/- ##
==========================================
- Coverage 41.72% 41.71% -0.02%
==========================================
Files 449 449
Lines 61112 61130 +18
==========================================
Hits 25500 25500
- Misses 32300 32316 +16
- Partials 3312 3314 +2
Continue to review full report at Codecov.
|
if len(issue.Content) > 0 { | ||
if err = mailIssueCommentToParticipants(e, issue, doer, issue.Content, nil, mentions); err != nil { | ||
log.Error("mailIssueCommentToParticipants: %v", err) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here, it's intended.
if len(c.Content) > 0 { | ||
if err = mailIssueCommentToParticipants(e, issue, c.Poster, c.Content, c, mentions); err != nil { | ||
log.Error("mailIssueCommentToParticipants: %v", err) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, sending two mails is intended. One for each action (comment and close/reopen).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it's just a comment, the switch
below will not hit a case and only 1 mail is sent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One action sending two mails is annoying.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think so. It's not one action after all if a user clicks "comment and close". Also it does match GitHub's behaviour, they also send two mails on "comment and close".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Send individual mails for actions and comments - Send mail for new issues/prs without a comment - Use correct sender for reopen/close actions - Hopefully fixed all bugs related to missing mails Fixes: go-gitea#7124 Fixes: go-gitea#5977
Various fixes for issue mail notifications
Fixes: #7124
Fixes: #5977