@@ -96,7 +96,7 @@ func pushUpdates(optsList []*repo_module.PushUpdateOptions) error {
96
96
return fmt .Errorf ("Old and new revisions are both %s" , git .EmptySHA )
97
97
}
98
98
var commits = & repo_module.PushCommits {}
99
- if opts .IsTag () { // If is tag reference {
99
+ if opts .IsTag () { // If is tag reference
100
100
if pusher == nil || pusher .ID != opts .PusherID {
101
101
var err error
102
102
if pusher , err = models .GetUserByID (opts .PusherID ); err != nil {
@@ -105,9 +105,25 @@ func pushUpdates(optsList []*repo_module.PushUpdateOptions) error {
105
105
}
106
106
tagName := opts .TagName ()
107
107
if opts .IsDelRef () {
108
+ notification .NotifyPushCommits (
109
+ pusher , repo ,
110
+ & repo_module.PushUpdateOptions {
111
+ RefFullName : git .TagPrefix + tagName ,
112
+ OldCommitID : opts .OldCommitID ,
113
+ NewCommitID : git .EmptySHA ,
114
+ }, repo_module .NewPushCommits ())
115
+
108
116
delTags = append (delTags , tagName )
109
117
notification .NotifyDeleteRef (pusher , repo , "tag" , opts .RefFullName )
110
118
} else { // is new tag
119
+ notification .NotifyPushCommits (
120
+ pusher , repo ,
121
+ & repo_module.PushUpdateOptions {
122
+ RefFullName : git .TagPrefix + tagName ,
123
+ OldCommitID : git .EmptySHA ,
124
+ NewCommitID : opts .NewCommitID ,
125
+ }, repo_module .NewPushCommits ())
126
+
111
127
addTags = append (addTags , tagName )
112
128
notification .NotifyCreateRef (pusher , repo , "tag" , opts .RefFullName )
113
129
}
0 commit comments