edab46e9fa
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.
9 lines
208 B
Ruby
9 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
|