Skip to content

Commit

Permalink
Revert "Do not send notifications for draft releases (go-gitea#21451)"
Browse files Browse the repository at this point in the history
This reverts commit a37e8b2.
  • Loading branch information
KN4CK3R authored and techknowlogick committed Oct 25, 2022
1 parent 5c2089a commit 61b9772
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions services/release/release.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
}

0 comments on commit 61b9772

Please sign in to comment.