Class: PlanMyStuff::Webhooks::GithubController

Inherits:
ActionController::API
  • Object
show all
Defined in:
app/controllers/plan_my_stuff/webhooks/github_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject

POST /webhooks/github



11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'app/controllers/plan_my_stuff/webhooks/github_controller.rb', line 11

def create
  event = request.headers['X-GitHub-Event']

  case event
  when 'pull_request'
    handle_pull_request
  when 'issues'
    handle_issues
  when 'projects_v2_item'
    handle_projects_v2_item
  end

  head(:ok)
end