0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-12-18 09:54:22 +01:00

Revert "Do not send notifications for draft releases (#21451)" (#21594)

This reverts commit a37e8b275d / #21451

Temporarily revert this PR to be able to continue discussion, and
potentially get it into 1.19.0
This commit is contained in:
techknowlogick 2022-10-25 18:00:00 -04:00 committed by GitHub
parent 5c2089a01d
commit 3f7cab42dc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 !rel.IsDraft {
if isCreated { notification.NotifyNewRelease(rel)
notification.NotifyNewRelease(rel)
} else {
notification.NotifyUpdateRelease(doer, rel)
}
} }
return err 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 return nil
} }