diff --git a/template_server.rb b/template_server.rb index 4f41105..65f720c 100644 --- a/template_server.rb +++ b/template_server.rb @@ -58,10 +58,14 @@ class GHAapp < Sinatra::Application post '/event_handler' do - # # # # # # # # # # # # - # ADD YOUR CODE HERE # - # # # # # # # # # # # # - + # Get the event type from the HTTP_X_GITHUB_EVENT header +case request.env['HTTP_X_GITHUB_EVENT'] +when 'check_suite' + # A new check_suite has been created. Create a new check run with status queued + if @payload['action'] == 'requested' || @payload['action'] == 'rerequested' + create_check_run + end +end 200 # success status end