aboutsummaryrefslogtreecommitdiffstats
path: root/services/repository
diff options
context:
space:
mode:
Diffstat (limited to 'services/repository')
-rw-r--r--services/repository/push.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/services/repository/push.go b/services/repository/push.go
index 2e7f1a1521..4ac37c9703 100644
--- a/services/repository/push.go
+++ b/services/repository/push.go
@@ -97,6 +97,12 @@ func pushUpdates(optsList []*repo_module.PushUpdateOptions) error {
}
var commits = &repo_module.PushCommits{}
if opts.IsTag() { // If is tag reference {
+ if pusher == nil || pusher.ID != opts.PusherID {
+ var err error
+ if pusher, err = models.GetUserByID(opts.PusherID); err != nil {
+ return err
+ }
+ }
tagName := opts.TagName()
if opts.IsDelRef() {
delTags = append(delTags, tagName)