Skip to content

Commit

Permalink
Send webhook when tag is removed via Web UI (#14015)
Browse files Browse the repository at this point in the history
* Send webhook when tag is removed via Web UI

* Stray code
  • Loading branch information
CirnoT committed Dec 16, 2020
1 parent 66379ba commit 53308de
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions services/release/release.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 53308de

Please sign in to comment.