gitlab-org--gitlab-foss/app/workers/post_receive.rb
Ariejan de Vroom edab46e9fa Added web hooks functionality
This commit includes:

 * Projects can have zero or more WebHooks.
 * The PostReceive job will ask a project to execute any web hooks defined for that project.
 * WebHook has a URL, we post Github-compatible JSON to that URL.
 * Failure to execute a WebHook will be silently ignored.
2011-12-14 17:38:52 +01:00

8 lines
208 B
Ruby

class PostReceive
def self.perform(reponame, oldrev, newrev, ref)
project = Project.find_by_path(reponame)
return false if project.nil?
project.execute_web_hooks(oldrev, newrev, ref)
end
end