Fixes #21448
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: 6543 <6543@obermui.de>
}
}
- if !isCreated {
- notification.NotifyUpdateRelease(doer, rel)
- return
- }
-
if !rel.IsDraft {
- notification.NotifyNewRelease(rel)
+ if isCreated {
+ notification.NotifyNewRelease(rel)
+ } else {
+ notification.NotifyUpdateRelease(doer, rel)
+ }
}
return err
}
}
- notification.NotifyDeleteRelease(doer, rel)
+ if !rel.IsDraft {
+ notification.NotifyDeleteRelease(doer, rel)
+ }
return nil
}