Avoid sending update/delete release notice when it is draft (#29008)

Fix #27157
pull/29021/head^2
yp05327 10 months ago committed by GitHub
parent e6265cf59d
commit b9f8d75e27
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 7
      services/release/release.go

@ -291,15 +291,13 @@ func UpdateRelease(ctx context.Context, doer *user_model.User, gitRepo *git.Repo
}
}
if !rel.IsDraft {
if !isCreated {
notify_service.UpdateRelease(gitRepo.Ctx, doer, rel)
return nil
}
if !rel.IsDraft {
notify_service.NewRelease(gitRepo.Ctx, rel)
}
return nil
}
@ -368,8 +366,9 @@ func DeleteReleaseByID(ctx context.Context, repo *repo_model.Repository, rel *re
}
}
if !rel.IsDraft {
notify_service.DeleteRelease(ctx, doer, rel)
}
return nil
}

Loading…
Cancel
Save