diff options
author | techknowlogick | 2022-10-25 18:00:00 -0400 |
---|---|---|
committer | GitHub | 2022-10-26 00:00:00 +0200 |
commit | 3f7cab42dce20ce4f37105a34892336c6f01474a (patch) | |
tree | fe9e93ad9396584b02b7c3d424597eee5631f199 | |
parent | 5c2089a01d6235033ca254fc46a411d2e740e346 (diff) |
Revert "Do not send notifications for draft releases (#21451)" (#21594)v1.18.0-rc0
This reverts commit a37e8b275d19c0daf160cc540d981ec4f3025a5a / #21451
Temporarily revert this PR to be able to continue discussion, and
potentially get it into 1.19.0
-rw-r--r-- | services/release/release.go | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/services/release/release.go b/services/release/release.go index 346c2abd4..8ccc222fb 100644 --- a/services/release/release.go +++ b/services/release/release.go @@ -271,12 +271,13 @@ func UpdateRelease(doer *user_model.User, gitRepo *git.Repository, rel *repo_mod } } + if !isCreated { + notification.NotifyUpdateRelease(doer, rel) + return + } + if !rel.IsDraft { - if isCreated { - notification.NotifyNewRelease(rel) - } else { - notification.NotifyUpdateRelease(doer, rel) - } + notification.NotifyNewRelease(rel) } return err @@ -352,9 +353,7 @@ func DeleteReleaseByID(ctx context.Context, id int64, doer *user_model.User, del } } - if !rel.IsDraft { - notification.NotifyDeleteRelease(doer, rel) - } + notification.NotifyDeleteRelease(doer, rel) return nil } |