Commit f096bd61 authored by Jeroen van Baarsen's avatar Jeroen van Baarsen

Post-receive hook can also fire TagPushService

parent 13d2bcc3
...@@ -29,10 +29,20 @@ class PostReceive ...@@ -29,10 +29,20 @@ class PostReceive
return false return false
end end
if tag?(ref)
GitTagPushService.new.execute(project, user, ref)
else
GitPushService.new.execute(project, user, oldrev, newrev, ref) GitPushService.new.execute(project, user, oldrev, newrev, ref)
end end
end
def log(message) def log(message)
Gitlab::GitLogger.error("POST-RECEIVE: #{message}") Gitlab::GitLogger.error("POST-RECEIVE: #{message}")
end end
private
def tag?(ref)
!!(/refs\/tags\/(.*)/.match(ref))
end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment