Module: GithubWebhook::Processor
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/github_webhook/processor.rb
Constant Summary collapse
- GITHUB_EVENTS =
To fetch list from developer.github.com/v3/activity/events/types run this little JS code in the console:
document.querySelectorAll('.list-style-none li.lh-condensed a').forEach(e => console.log(e.text)) %w( branch_protection_rule check_run check_suite code_scanning_alert commit_comment create delete dependabot_alert deploy_key deployment deployment_status discussion discussion_comment fork github_app_authorization gollum installation installation_repositories installation_target issue_comment issues label marketplace_purchase member membership merge_group meta milestone org_block organization package page_build ping project_card project project_column projects_v2 projects_v2_item public pull_request pull_request_review_comment pull_request_review pull_request_review_thread push registry_package release repository repository_dispatch repository_import repository_vulnerability_alert secret_scanning_alert secret_scanning_alert_location security_advisory security_and_analysis sponsorship star status team_add team watch workflow_dispatch workflow_job workflow_run )
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
79 80 81 82 83 84 85 86 |
# File 'lib/github_webhook/processor.rb', line 79 def create if self.respond_to?(event_method, true) self.send event_method, json_body head(:ok) else raise AbstractController::ActionNotFound.new("GithubWebhooksController##{event_method} not implemented") end end |
#github_ping(payload) ⇒ Object
88 89 90 91 |
# File 'lib/github_webhook/processor.rb', line 88 def github_ping(payload) GithubWebhook.logger && GithubWebhook.logger.info("[GithubWebhook::Processor] Hook ping "\ "received, hook_id: #{payload[:hook_id]}, #{payload[:zen]}") end |