From 53308de0bf6880798666a98cbc2df6c7be527f50 Mon Sep 17 00:00:00 2001 From: Cirno the Strongest <1447794+CirnoT@users.noreply.github.com> Date: Wed, 16 Dec 2020 17:00:46 +0100 Subject: [PATCH] Send webhook when tag is removed via Web UI (#14015) * Send webhook when tag is removed via Web UI * Stray code --- services/release/release.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/services/release/release.go b/services/release/release.go index 9e0654e86..8b4119d25 100644 --- a/services/release/release.go +++ b/services/release/release.go @@ -152,6 +152,15 @@ func DeleteReleaseByID(id int64, doer *models.User, delTag bool) error { return fmt.Errorf("git tag -d: %v", err) } + notification.NotifyPushCommits( + doer, repo, + &repository.PushUpdateOptions{ + RefFullName: git.TagPrefix + rel.TagName, + OldCommitID: rel.Sha1, + NewCommitID: git.EmptySHA, + }, repository.NewPushCommits()) + notification.NotifyDeleteRef(doer, repo, "tag", git.TagPrefix+rel.TagName) + if err := models.DeleteReleaseByID(id); err != nil { return fmt.Errorf("DeleteReleaseByID: %v", err) }