From 6c925fedefecc48a5297df6870522a967517d69b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Saunier?= Date: Wed, 22 Aug 2018 13:18:07 +0200 Subject: [PATCH] Banning whitelist from dev vocabulary. cf https://github.com/rails/rails/issues/33677 --- lib/github_webhook/processor.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/github_webhook/processor.rb b/lib/github_webhook/processor.rb index 5f7afbc..7079aca 100644 --- a/lib/github_webhook/processor.rb +++ b/lib/github_webhook/processor.rb @@ -20,7 +20,7 @@ class UnsupportedContentTypeError < StandardError; end # } # }); # console.log(events); - GITHUB_EVENTS_WHITELIST = %w( + GITHUB_EVENTS = %w( commit_comment create delete @@ -94,7 +94,7 @@ def authenticate_github_request! end def check_github_event! - unless GITHUB_EVENTS_WHITELIST.include?(request.headers['X-GitHub-Event']) + unless GITHUB_EVENTS.include?(request.headers['X-GitHub-Event']) raise UnsupportedGithubEventError.new("#{request.headers['X-GitHub-Event']} is not a whiltelisted GitHub event. See https://developer.github.com/v3/activity/events/types/") end end