def verify_signature(payload_body)
      unless settings.respond_to?(:github_webhook_secret)
        logger.warn "No :github_webhook_secret setting found, skipping signature verification"
        return
      end
      signature = Rack::GithubWebhooks::Signature.new(
        settings.github_webhook_secret,
        request.env['HTTP_X_HUB_SIGNATURE'],
        payload_body
      )
      return halt 500, "Signatures didn't match!" unless signature.valid?
    end
def verify_signature(payload_body)
      unless settings.respond_to?(:github_webhook_secret)
        logger.warn "No :github_webhook_secret setting found, skipping signature verification"
        return
      end
      signature = Rack::GithubWebhooks::Signature.new(
        settings.github_webhook_secret,
        request.env['HTTP_X_HUB_SIGNATURE'],
        payload_body
      )
      return halt 500, "Signatures didn't match!" unless signature.valid?
    end
Taken from https://developer.github.com/webhooks/securing/