Browse Source

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

* Send webhook when tag is removed via Web UI

* Stray code
mj-v1.14.3
Cirno the Strongest 2 years ago
committed by GitHub
parent
commit
53308de0bf
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      services/release/release.go

9
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)
}

Loading…
Cancel
Save