Send webhook when tag is removed via Web UI (#14015) (#14019)

* Send webhook when tag is removed via Web UI

* Stray code (cherry picked from commit 53308de0bf6880798666a98cbc2df6c7be527f50)

* Fix for 1.13
This commit is contained in:
Cirno the Strongest 2020-12-16 18:24:02 +01:00 committed by GitHub
parent a728d1e046
commit 90dfe445c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -142,6 +142,10 @@ func DeleteReleaseByID(id int64, doer *models.User, delTag bool) error {
return fmt.Errorf("git tag -d: %v", err) return fmt.Errorf("git tag -d: %v", err)
} }
notification.NotifyPushCommits(
doer, repo, git.TagPrefix+rel.TagName, rel.Sha1, git.EmptySHA, repository.NewPushCommits())
notification.NotifyDeleteRef(doer, repo, "tag", git.TagPrefix+rel.TagName)
if err := models.DeleteReleaseByID(id); err != nil { if err := models.DeleteReleaseByID(id); err != nil {
return fmt.Errorf("DeleteReleaseByID: %v", err) return fmt.Errorf("DeleteReleaseByID: %v", err)
} }