Class: Overlay::GithubController

Inherits:
ApplicationController show all
Defined in:
app/controllers/overlay/github_controller.rb

Instance Method Summary collapse

Instance Method Details

#updateObject



3
4
5
6
7
8
9
10
11
12
13
14
15
16
# File 'app/controllers/overlay/github_controller.rb', line 3

def update
  render nothing: true

  Overlay.configuration.repositories.each do |repo_config|
    next unless repo_config.class == GithubRepo
    branch = repo_config.branch

    if (params[:repository] && params[:ref])
      if (params[:repository][:name] == repo_config.repo) && (params[:ref] == "refs/heads/#{branch}")
        Overlay::Github.instance.process_hook(params, repo_config)
      end
    end
  end
end