Просмотр исходного кода

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
tags/v1.18.0-rc0^0
techknowlogick 1 год назад
Родитель
Сommit
3f7cab42dc
Аккаунт пользователя с таким Email не найден
1 измененных файлов: 7 добавлений и 8 удалений
  1. 7
    8
      services/release/release.go

+ 7
- 8
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
}

Загрузка…
Отмена
Сохранить