123456789_123456789_123456789_123456789_123456789_

Module: Octokit

Relationships & Source Files
Namespace Children
Modules:
Classes:
Exceptions:
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
self, Configurable
Defined in: lib/octokit.rb,
lib/octokit/arguments.rb,
lib/octokit/authentication.rb,
lib/octokit/client.rb,
lib/octokit/configurable.rb,
lib/octokit/connection.rb,
lib/octokit/default.rb,
lib/octokit/enterprise_admin_client.rb,
lib/octokit/enterprise_management_console_client.rb,
lib/octokit/error.rb,
lib/octokit/gist.rb,
lib/octokit/manage_ghes_client.rb,
lib/octokit/organization.rb,
lib/octokit/rate_limit.rb,
lib/octokit/repo_arguments.rb,
lib/octokit/repository.rb,
lib/octokit/user.rb,
lib/octokit/version.rb,
lib/octokit/warnable.rb,
lib/octokit/client/actions_artifacts.rb,
lib/octokit/client/actions_secrets.rb,
lib/octokit/client/actions_workflow_jobs.rb,
lib/octokit/client/actions_workflow_runs.rb,
lib/octokit/client/actions_workflows.rb,
lib/octokit/client/apps.rb,
lib/octokit/client/checks.rb,
lib/octokit/client/code_scanning.rb,
lib/octokit/client/codespaces_secrets.rb,
lib/octokit/client/commit_branches.rb,
lib/octokit/client/commit_comments.rb,
lib/octokit/client/commit_pulls.rb,
lib/octokit/client/commits.rb,
lib/octokit/client/community_profile.rb,
lib/octokit/client/contents.rb,
lib/octokit/client/dependabot_secrets.rb,
lib/octokit/client/deployments.rb,
lib/octokit/client/downloads.rb,
lib/octokit/client/emojis.rb,
lib/octokit/client/environments.rb,
lib/octokit/client/events.rb,
lib/octokit/client/feeds.rb,
lib/octokit/client/gists.rb,
lib/octokit/client/gitignore.rb,
lib/octokit/client/hooks.rb,
lib/octokit/client/issues.rb,
lib/octokit/client/labels.rb,
lib/octokit/client/legacy_search.rb,
lib/octokit/client/licenses.rb,
lib/octokit/client/markdown.rb,
lib/octokit/client/marketplace.rb,
lib/octokit/client/meta.rb,
lib/octokit/client/milestones.rb,
lib/octokit/client/notifications.rb,
lib/octokit/client/oauth_applications.rb,
lib/octokit/client/objects.rb,
lib/octokit/client/organizations.rb,
lib/octokit/client/pages.rb,
lib/octokit/client/projects.rb,
lib/octokit/client/pull_requests.rb,
lib/octokit/client/rate_limit.rb,
lib/octokit/client/reactions.rb,
lib/octokit/client/refs.rb,
lib/octokit/client/releases.rb,
lib/octokit/client/repositories.rb,
lib/octokit/client/repository_invitations.rb,
lib/octokit/client/reviews.rb,
lib/octokit/client/say.rb,
lib/octokit/client/search.rb,
lib/octokit/client/service_status.rb,
lib/octokit/client/source_import.rb,
lib/octokit/client/stats.rb,
lib/octokit/client/statuses.rb,
lib/octokit/client/tokens.rb,
lib/octokit/client/traffic.rb,
lib/octokit/client/users.rb,
lib/octokit/enterprise_admin_client/admin_stats.rb,
lib/octokit/enterprise_admin_client/license.rb,
lib/octokit/enterprise_admin_client/orgs.rb,
lib/octokit/enterprise_admin_client/search_indexing.rb,
lib/octokit/enterprise_admin_client/users.rb,
lib/octokit/enterprise_management_console_client/management_console.rb,
lib/octokit/manage_ghes_client/manage_ghes.rb,
lib/octokit/middleware/follow_redirects.rb,
lib/octokit/response/base_middleware.rb,
lib/octokit/response/feed_parser.rb,
lib/octokit/response/raise_error.rb

Overview

Ruby toolkit for the GitHub API

Constant Summary

Class Attribute Summary

Class Method Summary

Class Method Details

.clientOctokit::Client

API client based on configured options ::Octokit::Configurable

Returns:

[ GitHub ]

  
# File 'lib/octokit.rb', line 17

def client
  return @client if defined?(@client) && @client.same_options?(options)

  @client = Octokit::Client.new(options)
end

.enterprise_admin_clientOctokit::EnterpriseAdminClient

::Octokit::EnterpriseAdminClient client based on configured options ::Octokit::Configurable

Returns:

[ GitHub ]

  
# File 'lib/octokit.rb', line 26

def enterprise_admin_client
  if defined?(@enterprise_admin_client) && @enterprise_admin_client.same_options?(options)
    return @enterprise_admin_client
  end

  @enterprise_admin_client = Octokit::EnterpriseAdminClient.new(options)
end

.enterprise_management_console_clientOctokit::EnterpriseManagementConsoleClient

Returns:

[ GitHub ]

  
# File 'lib/octokit.rb', line 37

def enterprise_management_console_client
  if defined?(@enterprise_management_console_client) && @enterprise_management_console_client.same_options?(options)
    return @enterprise_management_console_client
  end

  @enterprise_management_console_client = Octokit::EnterpriseManagementConsoleClient.new(options)
end

.manage_ghes_clientOctokit::ManageGHESClient

::Octokit::ManageGHESClient client based on configured options ::Octokit::Configurable

Returns:

[ GitHub ]

  
# File 'lib/octokit.rb', line 48

def manage_ghes_client
  if defined?(@manage_ghes_client) && @manage_ghes_client.same_options?(options)
    return @manage_ghes_client
  end

  @manage_ghes_client = Octokit::ManageGHESClient.new(options)
end

.method_missing(method_name, *args, &block) (private)

[ GitHub ]

  
# File 'lib/octokit.rb', line 65

def method_missing(method_name, *args, &block)
  if client.respond_to?(method_name)
    return client.send(method_name, *args, &block)
  elsif enterprise_admin_client.respond_to?(method_name)
    return enterprise_admin_client.send(method_name, *args, &block)
  elsif enterprise_management_console_client.respond_to?(method_name)
    return enterprise_management_console_client.send(method_name, *args, &block)
  elsif manage_ghes_client.respond_to?(method_name)
    return manage_ghes_client.send(method_name, *args, &block)
  end

  super
end

.respond_to_missing?(method_name, include_private = false) ⇒ Boolean (private)

[ GitHub ]

  
# File 'lib/octokit.rb', line 58

def respond_to_missing?(method_name, include_private = false)
  client.respond_to?(method_name, include_private) ||
    enterprise_admin_client.respond_to?(method_name, include_private) ||
    enterprise_management_console_client.respond_to?(method_name, include_private) ||
    manage_ghes_client.respond_to?(method_name, include_private)
end