Class: GithubOverlays::WebhooksController

Inherits:
ApplicationController show all
Defined in:
app/controllers/github_overlays/webhooks_controller.rb

Instance Method Summary collapse

Methods inherited from ApplicationController

#ping

Instance Method Details

#updateObject



5
6
7
8
9
10
11
12
13
# File 'app/controllers/github_overlays/webhooks_controller.rb', line 5

def update
  GithubOverlays.configuration.repositories.each do |repo_config|
    branch = repo_config[:branch] || 'master'
    if (params[:repository][:name] == repo_config[:repo]) && (params[:webhook][:ref] == "refs/heads/#{branch}")
      GithubOverlays.overlay
    end
  end
  render :nothing => true
end