1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-12-01 09:51:39 -05:00

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

* Send webhook when tag is removed via Web UI

* Stray code
This commit is contained in:
Cirno the Strongest 2020-12-16 17:00:46 +01:00 committed by GitHub
parent 66379ba7ae
commit 53308de0bf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -152,6 +152,15 @@ 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,
&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 { if err := models.DeleteReleaseByID(id); err != nil {
return fmt.Errorf("DeleteReleaseByID: %v", err) return fmt.Errorf("DeleteReleaseByID: %v", err)
} }