summaryrefslogtreecommitdiffstats
path: root/models/notification.go
diff options
context:
space:
mode:
authorJimmy Praet <jimmy.praet@telenet.be>2021-06-23 06:14:22 +0200
committerGitHub <noreply@github.com>2021-06-23 00:14:22 -0400
commit17030ced75059ec21f6fb1945a751c3ebef29a32 (patch)
tree6d7d79c766335728961e02eb80da4ae08fbf7d9b /models/notification.go
parent66f8da538a8b1bd63ea1a0f97202ee0d46c15c4f (diff)
downloadgitea-17030ced75059ec21f6fb1945a751c3ebef29a32.tar.gz
gitea-17030ced75059ec21f6fb1945a751c3ebef29a32.zip
Improve notifications for WIP draft PR's (#14663)
* #14559 Reduce amount of email notifications for WIP draft PR's don't notify repo watchers of WIP draft PR's * #13190 Notification when WIP Pull Request is ready for review * Send email notification to repo watchers when WIP PR is created * Send ui notification to repo watchers when WIP PR is created * send specific email notification when PR is marked ready for review instead of reusing the CreatePullRequest action * Fix lint error Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to 'models/notification.go')
-rw-r--r--models/notification.go15
1 files changed, 8 insertions, 7 deletions
diff --git a/models/notification.go b/models/notification.go
index 56abd0ed83..c4c7728ad9 100644
--- a/models/notification.go
+++ b/models/notification.go
@@ -207,13 +207,14 @@ func createOrUpdateIssueNotifications(e Engine, issueID, commentID, notification
for _, id := range issueWatches {
toNotify[id] = struct{}{}
}
-
- repoWatches, err := getRepoWatchersIDs(e, issue.RepoID)
- if err != nil {
- return err
- }
- for _, id := range repoWatches {
- toNotify[id] = struct{}{}
+ if !(issue.IsPull && HasWorkInProgressPrefix(issue.Title)) {
+ repoWatches, err := getRepoWatchersIDs(e, issue.RepoID)
+ if err != nil {
+ return err
+ }
+ for _, id := range repoWatches {
+ toNotify[id] = struct{}{}
+ }
}
issueParticipants, err := issue.getParticipantIDsByIssue(e)
if err != nil {