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
return false
end
GitPushService.new.execute(project, user, oldrev, newrev, ref)
if tag?(ref)
GitTagPushService.new.execute(project, user, ref)
else
GitPushService.new.execute(project, user, oldrev, newrev, ref)
end
end
def log(message)
Gitlab::GitLogger.error("POST-RECEIVE: #{message}")
end
private
def tag?(ref)
!!(/refs\/tags\/(.*)/.match(ref))
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