lib/octofacts_updater/service/github.rb
# Private: Build an octokit object from the provided options.
#
# Returns an octokit object.
Build an octokit object from the provided options.
Returns an octokit object.
Build an octokit object from the provided options . Returns an octokit object .
def octokit
        @octokit ||= begin
          token = options.fetch("github", {})["token"] || ENV["OCTOKIT_TOKEN"]
          if token
            Octokit::Client.new(access_token: token)
          else
            raise ArgumentError, "Access token must be provided in config file or OCTOKIT_TOKEN environment variable."
          end
        end
      end
def octokit @octokit ||= begin token = options . fetch ( "github" , { } ) [ "token" ] || ENV [ "OCTOKIT_TOKEN" ] if token Octokit :: Client . new ( access_token : token ) else raise ArgumentError , "Access token must be provided in config file or OCTOKIT_TOKEN environment variable." end end end
Private: Build an octokit object from the provided options.
Private : Build an octokit object from the provided options .