aboutsummaryrefslogtreecommitdiffstats
path: root/services/release
diff options
context:
space:
mode:
authorCirno the Strongest <1447794+CirnoT@users.noreply.github.com>2020-12-16 17:00:46 +0100
committerGitHub <noreply@github.com>2020-12-16 10:00:46 -0600
commit53308de0bf6880798666a98cbc2df6c7be527f50 (patch)
tree0f461bacf3ccdb4d1b94a626c3f9711ddc94e7ad /services/release
parent66379ba7aed3d00633608b265617aab31de16979 (diff)
downloadgitea-53308de0bf6880798666a98cbc2df6c7be527f50.tar.gz
gitea-53308de0bf6880798666a98cbc2df6c7be527f50.zip
Send webhook when tag is removed via Web UI (#14015)
* Send webhook when tag is removed via Web UI * Stray code
Diffstat (limited to 'services/release')
-rw-r--r--services/release/release.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/services/release/release.go b/services/release/release.go
index 9e0654e860..8b4119d252 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)
}