Skip to content

Commit 53308de

Browse files
authored
Send webhook when tag is removed via Web UI (#14015)
* Send webhook when tag is removed via Web UI * Stray code
1 parent 66379ba commit 53308de

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

services/release/release.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,15 @@ func DeleteReleaseByID(id int64, doer *models.User, delTag bool) error {
152152
return fmt.Errorf("git tag -d: %v", err)
153153
}
154154

155+
notification.NotifyPushCommits(
156+
doer, repo,
157+
&repository.PushUpdateOptions{
158+
RefFullName: git.TagPrefix + rel.TagName,
159+
OldCommitID: rel.Sha1,
160+
NewCommitID: git.EmptySHA,
161+
}, repository.NewPushCommits())
162+
notification.NotifyDeleteRef(doer, repo, "tag", git.TagPrefix+rel.TagName)
163+
155164
if err := models.DeleteReleaseByID(id); err != nil {
156165
return fmt.Errorf("DeleteReleaseByID: %v", err)
157166
}

0 commit comments

Comments
 (0)