From 21aa07761e11ba9b38f062845efb575170c0074a Mon Sep 17 00:00:00 2001 From: Tim Rogers Date: Sun, 5 Jun 2022 18:18:11 +0100 Subject: [PATCH] Require `octokit/rate_limit` from `lib/octokit/error.rb` `Octokit::Error#build_error_context` uses `RateLimit.from_ response` but does not require the file containing `RateLimit` explicitly. This can lead to cases where the `RateLimit` module is not available when needed, causing an error. This requires the file explicitly where the module is used. Fixes #1422. --- lib/octokit/error.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/octokit/error.rb b/lib/octokit/error.rb index 5ceb50a54..922ff6604 100644 --- a/lib/octokit/error.rb +++ b/lib/octokit/error.rb @@ -1,3 +1,5 @@ +require 'octokit/rate_limit' + module Octokit # Custom error class for rescuing from all GitHub errors class Error < StandardError