diff --git a/Gemfile b/Gemfile index 99bd76e3..01f2e9b2 100644 --- a/Gemfile +++ b/Gemfile @@ -11,3 +11,5 @@ group :development do gem "rubocop-sorbet", require: false gem "tapioca", require: false end + +gem "octokit", "~> 9.1" diff --git a/Gemfile.lock b/Gemfile.lock index c4284dc3..ac7082ba 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -10,6 +10,8 @@ PATH GEM remote: https://rubygems.org/ specs: + addressable (2.8.7) + public_suffix (>= 2.0.2, < 7.0) ansi (1.5.0) ast (2.4.2) builder (3.3.0) @@ -17,19 +19,30 @@ GEM irb (~> 1.10) reline (>= 0.3.8) erubi (1.13.0) + faraday (2.10.1) + faraday-net_http (>= 2.0, < 3.2) + logger + faraday-net_http (3.1.1) + net-http io-console (0.7.2) irb (1.12.0) rdoc reline (>= 0.4.2) json (2.7.2) language_server-protocol (3.17.0.3) + logger (1.6.0) minitest (5.24.1) minitest-reporters (1.7.1) ansi builder minitest (>= 5.0) ruby-progressbar + net-http (0.4.1) + uri netrc (0.11.0) + octokit (9.1.0) + faraday (>= 1, < 3) + sawyer (~> 0.9) parallel (1.25.1) parser (3.3.4.0) ast (~> 2.4.1) @@ -37,6 +50,7 @@ GEM prism (0.30.0) psych (5.1.2) stringio + public_suffix (6.0.1) racc (1.8.0) rainbow (3.1.1) rake (13.2.1) @@ -68,6 +82,9 @@ GEM rubocop-sorbet (0.8.5) rubocop (>= 1) ruby-progressbar (1.13.0) + sawyer (0.9.2) + addressable (>= 2.3.5) + faraday (>= 0.17.3, < 3) sorbet (0.5.11506) sorbet-static (= 0.5.11506) sorbet-runtime (0.5.11506) @@ -89,6 +106,7 @@ GEM yard-sorbet thor (1.3.1) unicode-display_width (2.5.0) + uri (0.13.0) yard (0.9.36) yard-sorbet (0.9.0) sorbet-runtime @@ -105,6 +123,7 @@ DEPENDENCIES debug minitest (~> 5.0) minitest-reporters + octokit (~> 9.1) rake (~> 13.2.1) rubocop-shopify rubocop-sorbet diff --git a/pr_review b/pr_review new file mode 100755 index 00000000..cf1b5f09 --- /dev/null +++ b/pr_review @@ -0,0 +1,240 @@ +#!/usr/bin/env ruby +# typed: strict +# frozen_string_literal: true + +require "spoom" + +require "open-uri" +require "octokit" + +require "net/http" +require "json" +require "uri" + +require "erb" + +# https://openai-proxy.shopify.io/ +module OpenAI + class << self + extend T::Sig + + sig { returns(Client) } + def client + Client.new + end + end + + class Client + extend T::Sig + + sig { void } + def initialize + @token = T.let(File.read("TOKEN_OPENAI"), String) + end + + sig { params(content: String).returns(String) } + def message(content) + uri = URI("https://proxy.shopify.ai/v3/v1/chat/completions") + http = Net::HTTP.new(uri.host, uri.port) + http.use_ssl = true + + request = Net::HTTP::Post.new(uri) + request["Content-Type"] = "application/json" + request["Authorization"] = @token + + payload = { + model: "anthropic:claude-3-5-sonnet", + messages: [ + { + role: "user", + content: content, + }, + ], + } + + request.body = payload.to_json + response = http.request(request) + + JSON.parse(response.body)["choices"][0]["message"]["content"] + end + end +end + +module Github + class << self + extend T::Sig + + sig { returns(Octokit::Client) } + def client + Octokit::Client.new( + user_agent: "Shopify - CodeDB", + bearer_token: File.read("TOKEN_GITHUB"), + auto_paginate: false, + per_page: 100, + ) + end + end +end + +class Reviewer + extend T::Sig + + sig { params(repo: String, pr_number: String).void } + def initialize(repo, pr_number) + @repo = repo + @pr_number = pr_number + end + + sig { returns(T::Hash[String, T.untyped]) } + def make_review + github = Github.client + pr = github.pull_request(@repo, @pr_number) + commit_sha = pr.head.sha + diff = github.pull_request_files(@repo, @pr_number) + + template = ERB.new(<<~ERB).result(binding) + Can you do code review for this PR? + + Here are some rules to follow: + * Act as a skilled, patient yet amicable senior developer. + * Be as succinct and to the point as possible. + * If the PR is a new feature, explain what would be the best way to implement the feature. + * If the PR is a refactor, explain what would be the best way to refactor the code. + * If the PR is a bug fix, explain what would be the best way to fix the bug. + * When suggesting changes, explain why the change is necessary and what problem it solves. + * When suggesting changes, explain how the change would improve the code. + * When suggesting changes, five a code snippet that shows the change. + * When talking about corner cases, always provide a test case that demonstrates the corner case. + * Format your answer as a valid JSON object and only return the JSON object: + + { + commit_id: commit_sha, + body: review_content, + event: "COMMENT", # and nothing else + comments: [ + { + path: "path/to/file", + position: 1, + body: "This is a comment", + }, + ], + } + + + Title: <%= pr.title %> + + Description: + ```md + <%= pr.body %> + ``` + + Diff at commit #{commit_sha}: + + <% diff.each do |file| %> + ```diff + <%= file.filename %> (<%= file.status %>, +<%= file.additions %> -<%= file.deletions %>) + <%= file.patch %> + ``` + <% end %> + ERB + + openai = OpenAI.client + review_json = openai.message(template) + JSON.parse(review_json) + end + + # sig { params(review_json: String).void } + # def post_review!(review_json) + # object = JSON.parse(review_json) + # review = github.create_pull_request_review(REPO, PR_NUMBER, object) + + # puts "Review created successfully. Review ID: #{review.id}" + # end +end + +unless ARGV.length == 2 + puts "Usage: #{$PROGRAM_NAME} " + exit 1 +end + +repo, pr_number = ARGV + +puts repo +repos_root = "/Users/at/src/github.com/" +repo_path = File.join(repos_root, repo) + +context = Spoom::Context.new(repo_path) + +github = Github.client +pr = github.pull_request(repo, pr_number) +commit_sha = pr.head.sha +diff = github.pull_request_files(repo, pr_number) + +# diff.each do |file| +# puts JSON.generate(context.read(file.filename)) +# end +# exit(1) + +prompt = ERB.new(<<~ERB).result(binding) + Can you do code review for this PR? + + Here are some rules to follow: + * Act as a skilled, patient yet amicable senior developer. + * Be as succinct and to the point as possible. + * If the PR is a new feature, explain what would be the best way to implement the feature. + * If the PR is a refactor, explain what would be the best way to refactor the code. + * If the PR is a bug fix, explain what would be the best way to fix the bug. + * When suggesting changes, explain why the change is necessary and what problem it solves. + * When suggesting changes, explain how the change would improve the code. + * When suggesting changes, five a code snippet that shows the change. + * When talking about corner cases, always provide a test case that demonstrates the corner case. + * Format your answer as a valid JSON object and only return the JSON object: + + { + commit_id: #{commit_sha}, + body: review_content, + event: "COMMENT", # and nothing else + comments: [ + { + path: "path/to/file", + position: 1, + body: "This is a comment", + }, + ], + } + * Do not make comments on code that is not impacted by the PR. + * Do not create comments if they are only positive. + + + Title: <%= pr.title %> + + Description: + ```md + <%= pr.body %> + ``` + + Diff: + + <% diff.each do |file| %> + ```diff + <%= file.filename %> (<%= file.status %>, +<%= file.additions %> -<%= file.deletions %>) + <%= file.patch %> + ``` + <% end %> + + Here are the files impacted by this PR: + <% diff.each do |file| %> + ~~~rb + <%= JSON.generate(context.read(file.filename)) %> + ~~~ + <% end %> +ERB + +openai = OpenAI.client +review_json = openai.message(prompt) +review_obj = JSON.parse(review_json) +puts JSON.pretty_generate(review_obj) + + +# TODO: move to CodeDB +# TODO: better engineer the prompts (files? previous reviews? docs? style guide?) diff --git a/sorbet/rbi/gems/octokit@9.1.0.rbi b/sorbet/rbi/gems/octokit@9.1.0.rbi new file mode 100644 index 00000000..2fa0a50e --- /dev/null +++ b/sorbet/rbi/gems/octokit@9.1.0.rbi @@ -0,0 +1,11555 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `octokit` gem. +# Please instead update this file by running `bin/tapioca gem octokit`. + + +# Ruby toolkit for the GitHub API +# +# source://octokit//lib/octokit/middleware/follow_redirects.rb#11 +module Octokit + extend ::Octokit::Configurable + + class << self + # API client based on configured options {Configurable} + # + # @return [Octokit::Client] API wrapper + # + # source://octokit//lib/octokit.rb#17 + def client; end + + # EnterpriseAdminClient client based on configured options {Configurable} + # + # @return [Octokit::EnterpriseAdminClient] API wrapper + # + # source://octokit//lib/octokit.rb#26 + def enterprise_admin_client; end + + # EnterpriseManagementConsoleClient client based on configured options {Configurable} + # + # @return [Octokit::EnterpriseManagementConsoleClient] API wrapper + # + # source://octokit//lib/octokit.rb#37 + def enterprise_management_console_client; end + + # ManageGHESClient client based on configured options {Configurable} + # + # @return [Octokit::ManageGHESClient] API wrapper + # + # source://octokit//lib/octokit.rb#48 + def manage_ghes_client; end + + private + + # source://octokit//lib/octokit.rb#65 + def method_missing(method_name, *args, &block); end + + # @return [Boolean] + # + # source://octokit//lib/octokit.rb#58 + def respond_to_missing?(method_name, include_private = T.unsafe(nil)); end + end +end + +# Raised when GitHub returns a 403 HTTP status code +# and body matches 'abuse' +# +# source://octokit//lib/octokit/error.rb#281 +class Octokit::AbuseDetected < ::Octokit::Forbidden; end + +# Raised when GitHub returns a 403 HTTP status code +# and body matches 'account was suspended' +# +# source://octokit//lib/octokit/error.rb#293 +class Octokit::AccountSuspended < ::Octokit::Forbidden; end + +# Raised when a method requires an application client_id +# and secret but none is provided +# +# source://octokit//lib/octokit/error.rb#363 +class Octokit::ApplicationCredentialsRequired < ::StandardError; end + +# Extracts options from method arguments +# +# @private +# +# source://octokit//lib/octokit/arguments.rb#6 +class Octokit::Arguments < ::Array + # @return [Arguments] a new instance of Arguments + # + # source://octokit//lib/octokit/arguments.rb#9 + def initialize(args); end + + # Returns the value of attribute options. + # + # source://octokit//lib/octokit/arguments.rb#7 + def options; end +end + +# Authentication methods for {Octokit::Client} +# +# source://octokit//lib/octokit/authentication.rb#5 +module Octokit::Authentication + # Indicates if the client has OAuth Application + # client_id and secret credentials to make anonymous + # requests at a higher rate limit + # + # @return [Boolean] + # @see https://developer.github.com/v3/#unauthenticated-rate-limited-requests + # + # source://octokit//lib/octokit/authentication.rb#55 + def application_authenticated?; end + + # Indicates if the client was supplied Basic Auth + # username and password + # + # @return [Boolean] + # @see https://developer.github.com/v3/#authentication + # + # source://octokit//lib/octokit/authentication.rb#19 + def basic_authenticated?; end + + # Indicates if the client was supplied a bearer token + # + # @return [Boolean] + # @see https://developer.github.com/early-access/integrations/authentication/#as-an-integration + # + # source://octokit//lib/octokit/authentication.rb#36 + def bearer_authenticated?; end + + # Indicates if the client was supplied an OAuth + # access token + # + # @return [Boolean] + # @see https://developer.github.com/v3/#authentication + # + # source://octokit//lib/octokit/authentication.rb#28 + def token_authenticated?; end + + # Indicates if the client was supplied an OAuth + # access token or Basic Auth username and password + # + # @return [Boolean] + # @see https://developer.github.com/v3/#authentication + # + # source://octokit//lib/octokit/authentication.rb#45 + def user_authenticated?; end + + private + + # source://octokit//lib/octokit/authentication.rb#61 + def login_from_netrc; end +end + +# In Faraday 2.x, the authorization middleware uses new interface +# +# source://octokit//lib/octokit/authentication.rb#7 +Octokit::Authentication::FARADAY_BASIC_AUTH_KEYS = T.let(T.unsafe(nil), Array) + +# Raised when GitHub returns a 502 HTTP status code +# +# source://octokit//lib/octokit/error.rb#353 +class Octokit::BadGateway < ::Octokit::ServerError; end + +# Raised when GitHub returns a 400 HTTP status code +# +# source://octokit//lib/octokit/error.rb#232 +class Octokit::BadRequest < ::Octokit::ClientError; end + +# Raised when GitHub returns a 403 HTTP status code +# and body matches 'billing issue' +# +# source://octokit//lib/octokit/error.rb#297 +class Octokit::BillingIssue < ::Octokit::Forbidden; end + +# Raised when GitHub returns a 404 HTTP status code +# and body matches 'Branch not protected' +# +# source://octokit//lib/octokit/error.rb#312 +class Octokit::BranchNotProtected < ::Octokit::ClientError; end + +# Client for the GitHub API +# +# @see https://developer.github.com +# +# source://octokit//lib/octokit/client/actions_artifacts.rb#4 +class Octokit::Client + include ::Octokit::Authentication + include ::Octokit::Configurable + include ::Octokit::Connection + include ::Octokit::Warnable + include ::Octokit::Client::ActionsArtifacts + include ::Octokit::Client::ActionsSecrets + include ::Octokit::Client::Checks + include ::Octokit::Client::CodeScanning + include ::Octokit::Client::CodespacesSecrets + include ::Octokit::Client::Commits + include ::Octokit::Client::CommitComments + include ::Octokit::Client::CommitPulls + include ::Octokit::Client::CommitBranches + include ::Octokit::Client::CommunityProfile + include ::Octokit::Client::Contents + include ::Octokit::Client::DependabotSecrets + include ::Octokit::Client::Deployments + include ::Octokit::Client::Downloads + include ::Octokit::Client::Environments + include ::Octokit::Client::Emojis + include ::Octokit::Client::Events + include ::Octokit::Client::Feeds + include ::Octokit::Client::Gists + include ::Octokit::Client::Gitignore + include ::Octokit::Client::Hooks + include ::Octokit::Client::ActionsWorkflows + include ::Octokit::Client::ActionsWorkflowJobs + include ::Octokit::Client::ActionsWorkflowRuns + include ::Octokit::Client::Apps + include ::Octokit::Client::Issues + include ::Octokit::Client::Labels + include ::Octokit::Client::LegacySearch + include ::Octokit::Client::Licenses + include ::Octokit::Client::Meta + include ::Octokit::Client::Markdown + include ::Octokit::Client::Marketplace + include ::Octokit::Client::Milestones + include ::Octokit::Client::Notifications + include ::Octokit::Client::OauthApplications + include ::Octokit::Client::Objects + include ::Octokit::Client::Organizations + include ::Octokit::Client::Pages + include ::Octokit::Client::Projects + include ::Octokit::Client::PullRequests + include ::Octokit::Client::RateLimit + include ::Octokit::Client::Reactions + include ::Octokit::Client::Refs + include ::Octokit::Client::Releases + include ::Octokit::Client::Repositories + include ::Octokit::Client::RepositoryInvitations + include ::Octokit::Client::Reviews + include ::Octokit::Client::Say + include ::Octokit::Client::Search + include ::Octokit::Client::ServiceStatus + include ::Octokit::Client::SourceImport + include ::Octokit::Client::Stats + include ::Octokit::Client::Statuses + include ::Octokit::Client::Tokens + include ::Octokit::Client::Traffic + include ::Octokit::Client::Users + + # @return [Client] a new instance of Client + # + # source://octokit//lib/octokit/client.rb#141 + def initialize(options = T.unsafe(nil)); end + + # Set OAuth access token for authentication + # + # @param value [String] 40 character GitHub OAuth access token + # + # source://octokit//lib/octokit/client.rb#226 + def access_token=(value); end + + # Duplicate client using client_id and client_secret as + # Basic Authentication credentials. + # + # @example + # Octokit.client_id = "foo" + # Octokit.client_secret = "bar" + # + # # GET https://api.github.com/?client_id=foo&client_secret=bar + # Octokit.get "/" + # + # Octokit.client.as_app do |client| + # # GET https://foo:bar@api.github.com/ + # client.get "/" + # end + # @yield [app_client] + # + # source://octokit//lib/octokit/client.rb#194 + def as_app(key = T.unsafe(nil), secret = T.unsafe(nil)); end + + # Set Bearer Token for authentication + # + # @param value [String] JWT + # + # source://octokit//lib/octokit/client.rb#234 + def bearer_token=(value); end + + # Set OAuth app client_id + # + # @param value [String] 20 character GitHub OAuth app client_id + # + # source://octokit//lib/octokit/client.rb#242 + def client_id=(value); end + + # Set OAuth app client_secret + # + # @param value [String] 40 character GitHub OAuth app client_secret + # + # source://octokit//lib/octokit/client.rb#250 + def client_secret=(value); end + + # source://octokit//lib/octokit/client.rb#255 + def client_without_redirects(options = T.unsafe(nil)); end + + # Text representation of the client, masking tokens and passwords + # + # @return [String] + # + # source://octokit//lib/octokit/client.rb#161 + def inspect; end + + # Set username for authentication + # + # @param value [String] GitHub username + # + # source://octokit//lib/octokit/client.rb#210 + def login=(value); end + + # Set password for authentication + # + # @param value [String] GitHub password + # + # source://octokit//lib/octokit/client.rb#218 + def password=(value); end + + private + + # convenience method for constructing a user specific path, if the user is logged in + # + # source://octokit//lib/octokit/client/users.rb#454 + def user_path(user, path); end +end + +# Methods for the Actions Artifacts API +# +# @see https://developer.github.com/v3/actions/artifacts +# +# source://octokit//lib/octokit/client/actions_artifacts.rb#8 +module Octokit::Client::ActionsArtifacts + # Get an artifact + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param id [Integer] Id of an artifact + # @return [Sawyer::Resource] Artifact information + # @see https://docs.github.com/en/rest/actions/artifacts#get-an-artifact + # + # source://octokit//lib/octokit/client/actions_artifacts.rb#41 + def artifact(repo, id, options = T.unsafe(nil)); end + + # Get a download URL for an artifact + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param id [Integer] Id of an artifact + # @return [String] URL to the .zip archive of the artifact + # @see https://docs.github.com/en/rest/actions/artifacts#download-an-artifact + # + # source://octokit//lib/octokit/client/actions_artifacts.rb#52 + def artifact_download_url(repo, id, options = T.unsafe(nil)); end + + # Delete an artifact + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param id [Integer] Id of an artifact + # @return [Boolean] Return true if the artifact was successfully deleted + # @see https://docs.github.com/en/rest/actions/artifacts#delete-an-artifact + # + # source://octokit//lib/octokit/client/actions_artifacts.rb#66 + def delete_artifact(repo, id, options = T.unsafe(nil)); end + + # List all artifacts for a repository + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @return [Sawyer::Resource] the total count and an array of artifacts + # @see https://developer.github.com/v3/actions/artifacts#list-artifacts-for-a-repository + # + # source://octokit//lib/octokit/client/actions_artifacts.rb#15 + def repository_artifacts(repo, options = T.unsafe(nil)); end + + # List all artifacts for a workflow run + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param workflow_run_id [Integer] Id of a workflow run + # @return [Sawyer::Resource] the total count and an array of artifacts + # @see https://docs.github.com/en/rest/actions/artifacts#list-workflow-run-artifacts + # + # source://octokit//lib/octokit/client/actions_artifacts.rb#28 + def workflow_run_artifacts(repo, workflow_run_id, options = T.unsafe(nil)); end +end + +# Methods for the Actions Secrets API +# +# @see https://developer.github.com/v3/actions/secrets/ +# +# source://octokit//lib/octokit/client/actions_secrets.rb#8 +module Octokit::Client::ActionsSecrets + # Create or update an environment secret + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param environment [String] Name of environment + # @param name [String] Name of secret + # @param options [Hash] encrypted_value and key_id + # @see https://docs.github.com/en/rest/actions/secrets#create-or-update-an-environment-secret + # + # source://octokit//lib/octokit/client/actions_secrets.rb#147 + def create_or_update_actions_environment_secret(repo, environment, name, options); end + + # Create or update secrets + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param name [String] Name of secret + # @param options [Hash] encrypted_value and key_id + # @see https://developer.github.com/v3/actions/secrets/#create-or-update-a-secret-for-a-repository + # + # source://octokit//lib/octokit/client/actions_secrets.rb#75 + def create_or_update_actions_secret(repo, name, options); end + + # Create or update org secrets + # + # @param org [String] A GitHub organization + # @param name [String] Name of secret + # @param options [Hash] encrypted_value and key_id + # @see https://developer.github.com/v3/actions/secrets/#create-or-update-a-secret + # + # source://octokit//lib/octokit/client/actions_secrets.rb#85 + def create_or_update_org_actions_secret(org, name, options); end + + # Delete environment secret + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param environment [String] Name of environment + # @param name [String] Name of secret + # @see https://docs.github.com/en/rest/actions/secrets#delete-an-environment-secret + # + # source://octokit//lib/octokit/client/actions_secrets.rb#156 + def delete_actions_environment_secret(repo, environment, name); end + + # Delete a secret + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param name [String] Name of secret + # @see https://developer.github.com/v3/actions/secrets/#delete-a-secret-from-a-repository + # + # source://octokit//lib/octokit/client/actions_secrets.rb#94 + def delete_actions_secret(repo, name); end + + # Delete an org secret + # + # @param org [String] A GitHub organization + # @param name [String] Name of secret + # @see https://developer.github.com/v3/actions/secrets/#delete-a-secret + # + # source://octokit//lib/octokit/client/actions_secrets.rb#103 + def delete_org_actions_secret(org, name); end + + # Get environment public key for secrets encryption + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param environment [String] Name of environment + # @return [Hash] key_id and key + # @see https://docs.github.com/en/rest/actions/secrets#get-an-environment-public-key + # + # source://octokit//lib/octokit/client/actions_secrets.rb#113 + def get_actions_environment_public_key(repo, environment); end + + # Get an environment secret + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param environment [String] Name of environment + # @param name [String] Name of secret + # @return [Hash] name, created_at and updated_at + # @see https://docs.github.com/en/rest/actions/secrets#get-an-environment-secret + # + # source://octokit//lib/octokit/client/actions_secrets.rb#136 + def get_actions_environment_secret(repo, environment, name); end + + # Get public key for secrets encryption + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @return [Hash] key_id and key + # @see https://developer.github.com/v3/actions/secrets/#get-your-public-key + # + # source://octokit//lib/octokit/client/actions_secrets.rb#14 + def get_actions_public_key(repo); end + + # Get a secret + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param name [String] Name of secret + # @return [Hash] name, created_at and updated_at + # @see https://developer.github.com/v3/actions/secrets/#get-a-secret + # + # source://octokit//lib/octokit/client/actions_secrets.rb#55 + def get_actions_secret(repo, name); end + + # Get public key for secrets encryption + # + # @param org [String] A GitHub organization + # @return [Hash] key_id and key + # @see https://developer.github.com/v3/actions/secrets/#get-your-public-key + # + # source://octokit//lib/octokit/client/actions_secrets.rb#23 + def get_org_actions_public_key(org); end + + # Get an org secret + # + # @param org [String] A GitHub organization + # @param name [String] Name of secret + # @return [Hash] name, created_at and updated_at + # @see https://developer.github.com/v3/actions/secrets/#get-a-secret + # + # source://octokit//lib/octokit/client/actions_secrets.rb#65 + def get_org_actions_secret(org, name); end + + # List environment secrets + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param environment [String] Name of environment + # @return [Hash] total_count and list of secrets (each item is hash with name, created_at and updated_at) + # @see https://developer.github.com/v3/actions/secrets/#list-environment-secrets + # + # source://octokit//lib/octokit/client/actions_secrets.rb#123 + def list_actions_environment_secrets(repo, environment); end + + # List secrets + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @return [Hash] total_count and list of secrets (each item is hash with name, created_at and updated_at) + # @see https://developer.github.com/v3/actions/secrets/#list-secrets-for-a-repository + # + # source://octokit//lib/octokit/client/actions_secrets.rb#32 + def list_actions_secrets(repo); end + + # List org secrets + # + # @param org [String] A GitHub organization + # @return [Hash] total_count and list of secrets (each item is hash with name, created_at and updated_at) + # @see https://developer.github.com/v3/actions/secrets/#list-organization-secrets + # + # source://octokit//lib/octokit/client/actions_secrets.rb#43 + def list_org_actions_secrets(org); end +end + +# Methods for the Actions Workflows jobs API +# +# @see https://docs.github.com/rest/actions/workflow-jobs +# +# source://octokit//lib/octokit/client/actions_workflow_jobs.rb#8 +module Octokit::Client::ActionsWorkflowJobs + # List jobs for a workflow run attempt + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param run_id [Integer, String] Id of the workflow run + # @param attempt_number [Integer, String] Attempt number of the workflow run + # @return [Sawyer::Resource] Jobs information + # @see https://docs.github.com/rest/actions/workflow-jobs#list-jobs-for-a-workflow-run-attempt + # + # source://octokit//lib/octokit/client/actions_workflow_jobs.rb#42 + def list_workflow_run_attempt_jobs(repo, run_id, attempt_number, options = T.unsafe(nil)); end + + # List jobs for a workflow run + # + # @option options + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param run_id [Integer, String] Id of the workflow run + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] Jobs information + # @see https://docs.github.com/rest/actions/workflow-jobs#list-jobs-for-a-workflow-run + # + # source://octokit//lib/octokit/client/actions_workflow_jobs.rb#57 + def list_workflow_run_jobs(repo, run_id, options = T.unsafe(nil)); end + + # List jobs for a workflow run attempt + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param run_id [Integer, String] Id of the workflow run + # @param attempt_number [Integer, String] Attempt number of the workflow run + # @return [Sawyer::Resource] Jobs information + # @see https://docs.github.com/rest/actions/workflow-jobs#list-jobs-for-a-workflow-run-attempt + # + # source://octokit//lib/octokit/client/actions_workflow_jobs.rb#42 + def workflow_run_attempt_jobs(repo, run_id, attempt_number, options = T.unsafe(nil)); end + + # Get a job for a workflow run + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param job_id [Integer, String] Id of the job + # @return [Sawyer::Resource] Job information + # @see https://docs.github.com/rest/actions/workflow-jobs#get-a-job-for-a-workflow-run + # + # source://octokit//lib/octokit/client/actions_workflow_jobs.rb#16 + def workflow_run_job(repo, job_id, options = T.unsafe(nil)); end + + # Download job logs for a workflow run + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param job_id [Integer, String] Id of the job + # @return [String] URL to the archived log files of the job + # @see https://docs.github.com/rest/actions/workflow-jobs#download-job-logs-for-a-workflow-run + # + # source://octokit//lib/octokit/client/actions_workflow_jobs.rb#27 + def workflow_run_job_logs(repo, job_id, options = T.unsafe(nil)); end + + # List jobs for a workflow run + # + # @option options + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param run_id [Integer, String] Id of the workflow run + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] Jobs information + # @see https://docs.github.com/rest/actions/workflow-jobs#list-jobs-for-a-workflow-run + # + # source://octokit//lib/octokit/client/actions_workflow_jobs.rb#57 + def workflow_run_jobs(repo, run_id, options = T.unsafe(nil)); end +end + +# Methods for the Actions Workflows runs API +# +# @see https://docs.github.com/rest/actions/workflow-runs +# +# source://octokit//lib/octokit/client/actions_workflow_runs.rb#8 +module Octokit::Client::ActionsWorkflowRuns + # Cancels a workflow run + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param id [Integer] Id of a workflow run + # @return [Boolean] Returns true if the cancellation was accepted + # @see https://developer.github.com/v3/actions/workflow-runs/#cancel-a-workflow-run + # + # source://octokit//lib/octokit/client/actions_workflow_runs.rb#73 + def cancel_workflow_run(repo, id, options = T.unsafe(nil)); end + + # Deletes a workflow run + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param id [Integer] Id of a workflow run + # @return [Boolean] Returns true if the run is deleted + # @see https://docs.github.com/en/rest/reference/actions#delete-a-workflow-run + # + # source://octokit//lib/octokit/client/actions_workflow_runs.rb#84 + def delete_workflow_run(repo, id, options = T.unsafe(nil)); end + + # Delete all log files of a workflow run + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param id [Integer] Id of a workflow run + # @return [Boolean] Returns true if the logs are deleted + # @see https://developer.github.com/v3/actions/workflow-runs/#delete-workflow-run-logs + # + # source://octokit//lib/octokit/client/actions_workflow_runs.rb#109 + def delete_workflow_run_logs(repo, id, options = T.unsafe(nil)); end + + # List all workflow runs for a repository + # + # @option options + # @option options + # @option options + # @option options + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] the total count and an array of workflows + # @see https://developer.github.com/v3/actions/workflow-runs/#list-repository-workflow-runs + # + # source://octokit//lib/octokit/client/actions_workflow_runs.rb#37 + def list_repository_workflow_runs(repo, options = T.unsafe(nil)); end + + # List all runs for a repository workflow + # + # @option options + # @option options + # @option options + # @option options + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param workflow [Integer, String] Id or file name of the workflow + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] the total count and an array of workflows + # @see https://developer.github.com/v3/actions/workflow-runs/#list-workflow-runs + # + # source://octokit//lib/octokit/client/actions_workflow_runs.rb#20 + def list_workflow_runs(repo, workflow, options = T.unsafe(nil)); end + + # List all workflow runs for a repository + # + # @option options + # @option options + # @option options + # @option options + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] the total count and an array of workflows + # @see https://developer.github.com/v3/actions/workflow-runs/#list-repository-workflow-runs + # + # source://octokit//lib/octokit/client/actions_workflow_runs.rb#37 + def repository_workflow_runs(repo, options = T.unsafe(nil)); end + + # Re-runs a workflow run + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param id [Integer] Id of a workflow run + # @return [Boolean] Returns true if the re-run request was accepted + # @see https://developer.github.com/v3/actions/workflow-runs/#re-run-a-workflow + # + # source://octokit//lib/octokit/client/actions_workflow_runs.rb#62 + def rerun_workflow_run(repo, id, options = T.unsafe(nil)); end + + # Get a workflow run + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param id [Integer] Id of a workflow run + # @return [Sawyer::Resource] Run information + # @see https://developer.github.com/v3/actions/workflow-runs/#get-a-workflow-run + # + # source://octokit//lib/octokit/client/actions_workflow_runs.rb#51 + def workflow_run(repo, id, options = T.unsafe(nil)); end + + # Get a download url for archived log files of a workflow run + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param id [Integer] Id of a workflow run + # @return [String] URL to the archived log files of the run + # @see https://developer.github.com/v3/actions/workflow-runs/#download-workflow-run-logs + # + # source://octokit//lib/octokit/client/actions_workflow_runs.rb#95 + def workflow_run_logs(repo, id, options = T.unsafe(nil)); end + + # Get workflow run usage + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param id [Integer] Id of a workflow run + # @return [Sawyer::Resource] Run usage + # @see https://developer.github.com/v3/actions/workflow-runs/#get-workflow-run-usage + # + # source://octokit//lib/octokit/client/actions_workflow_runs.rb#120 + def workflow_run_usage(repo, id, options = T.unsafe(nil)); end + + # List all runs for a repository workflow + # + # @option options + # @option options + # @option options + # @option options + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param workflow [Integer, String] Id or file name of the workflow + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] the total count and an array of workflows + # @see https://developer.github.com/v3/actions/workflow-runs/#list-workflow-runs + # + # source://octokit//lib/octokit/client/actions_workflow_runs.rb#20 + def workflow_runs(repo, workflow, options = T.unsafe(nil)); end +end + +# Methods for the Actions Workflows API +# +# @see https://developer.github.com/v3/actions/workflows +# +# source://octokit//lib/octokit/client/actions_workflows.rb#8 +module Octokit::Client::ActionsWorkflows + # Get the workflows in a repository + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @return [Sawyer::Resource] the total count and an array of workflows + # @see https://developer.github.com/v3/actions/workflows/#list-repository-workflows + # + # source://octokit//lib/octokit/client/actions_workflows.rb#15 + def list_workflows(repo, options = T.unsafe(nil)); end + + # Get single workflow in a repository + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param id [Integer, String] Id or file name of the workflow + # @return [Sawyer::Resource] A single workflow + # @see https://developer.github.com/v3/actions/workflows/#get-a-workflow + # + # source://octokit//lib/octokit/client/actions_workflows.rb#29 + def workflow(repo, id, options = T.unsafe(nil)); end + + # Disable a workflow + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param id [Integer, String] Id or file name of the workflow + # @return [Boolean] True if workflow was disabled, false otherwise + # @see https://docs.github.com/en/rest/actions/workflows#disable-a-workflow + # + # source://octokit//lib/octokit/client/actions_workflows.rb#63 + def workflow_disable(repo, id, options = T.unsafe(nil)); end + + # Create a workflow dispatch event + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param id [Integer, String] Id or file name of the workflow + # @param ref [String] A SHA, branch name, or tag name + # @return [Boolean] True if event was dispatched, false otherwise + # @see https://docs.github.com/en/rest/reference/actions#create-a-workflow-dispatch-event + # + # source://octokit//lib/octokit/client/actions_workflows.rb#41 + def workflow_dispatch(repo, id, ref, options = T.unsafe(nil)); end + + # Enable a workflow + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param id [Integer, String] Id or file name of the workflow + # @return [Boolean] True if workflow was enabled, false otherwise + # @see https://docs.github.com/en/rest/actions/workflows#enable-a-workflow + # + # source://octokit//lib/octokit/client/actions_workflows.rb#52 + def workflow_enable(repo, id, options = T.unsafe(nil)); end + + # Get the workflows in a repository + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @return [Sawyer::Resource] the total count and an array of workflows + # @see https://developer.github.com/v3/actions/workflows/#list-repository-workflows + # + # source://octokit//lib/octokit/client/actions_workflows.rb#15 + def workflows(repo, options = T.unsafe(nil)); end +end + +# Methods for the Apps API +# +# source://octokit//lib/octokit/client/apps.rb#6 +module Octokit::Client::Apps + # Add a single repository to an installation + # + # @param installation [Integer] The id of a GitHub App Installation + # @param repo [Integer] The id of the GitHub repository + # @param options [Hash] A customizable set of options + # @return [Boolean] Success + # @see https://developer.github.com/v3/apps/installations/#add-repository-to-installation + # + # source://octokit//lib/octokit/client/apps.rb#156 + def add_repo_to_installation(installation, repo, options = T.unsafe(nil)); end + + # Add a single repository to an installation + # + # @param installation [Integer] The id of a GitHub App Installation + # @param repo [Integer] The id of the GitHub repository + # @param options [Hash] A customizable set of options + # @return [Boolean] Success + # @see https://developer.github.com/v3/apps/installations/#add-repository-to-installation + # + # source://octokit//lib/octokit/client/apps.rb#156 + def add_repository_to_app_installation(installation, repo, options = T.unsafe(nil)); end + + # source://octokit//lib/octokit/client/apps.rb#161 + def add_repository_to_integration_installation(installation, repo, options = T.unsafe(nil)); end + + # Get the authenticated App + # + # @param options [Hash] A customizable set of options + # @return [Sawyer::Resource] App information + # @see https://developer.github.com/v3/apps/#get-the-authenticated-app + # + # source://octokit//lib/octokit/client/apps.rb#14 + def app(options = T.unsafe(nil)); end + + # Returns a delivery for the webhook configured for a GitHub App. + # + # @param delivery_id [String] The id of a GitHub App Hook Delivery + # @param options [Hash] A customizable set of options + # @return [] The webhook delivery + # @see https://docs.github.com/en/rest/apps/webhooks#get-a-delivery-for-an-app-webhook + # + # source://octokit//lib/octokit/client/apps.rb#242 + def app_hook_delivery(delivery_id, options = T.unsafe(nil)); end + + # Create a new installation token + # + # @param installation [Integer] The id of a GitHub App Installation + # @param options [Hash] A customizable set of options + # @return [] An installation token + # @see https://developer.github.com/v3/apps/#create-a-new-installation-token + # + # source://octokit//lib/octokit/client/apps.rb#72 + def create_app_installation_access_token(installation, options = T.unsafe(nil)); end + + # Create a new installation token + # + # @param installation [Integer] The id of a GitHub App Installation + # @param options [Hash] A customizable set of options + # @return [] An installation token + # @see https://developer.github.com/v3/apps/#create-a-new-installation-token + # + # source://octokit//lib/octokit/client/apps.rb#72 + def create_installation_access_token(installation, options = T.unsafe(nil)); end + + # source://octokit//lib/octokit/client/apps.rb#77 + def create_integration_installation_access_token(installation, options = T.unsafe(nil)); end + + # Delete an installation and uninstall a GitHub App + # + # @param installation [Integer] The id of a GitHub App Installation + # @param options [Hash] A customizable set of options + # @return [Boolean] Success + # @see https://developer.github.com/v3/apps/#delete-an-installation + # + # source://octokit//lib/octokit/client/apps.rb#217 + def delete_installation(installation, options = T.unsafe(nil)); end + + # Redeliver a delivery for the webhook configured for a GitHub App. + # + # @param delivery_id [Integer] The id of a GitHub App Hook Delivery + # @param options [Hash] A customizable set of options + # @return [Boolean] Success + # @see https://developer.github.com/v3/apps/#redeliver-a-delivery-for-an-app-webhook + # + # source://octokit//lib/octokit/client/apps.rb#254 + def deliver_app_hook(delivery_id, options = T.unsafe(nil)); end + + # Find all installations that belong to an App + # + # @param options [Hash] A customizable set of options + # @return [Array] the total_count and an array of installations + # @see https://developer.github.com/v3/apps/#list-installations + # + # source://octokit//lib/octokit/client/apps.rb#25 + def find_app_installations(options = T.unsafe(nil)); end + + # List repositories accessible to the user for an installation + # + # @param installation [Integer] The id of a GitHub App Installation + # @param options [Hash] A customizable set of options + # @return [Sawyer::Resource] the total_count and an array of repositories + # @see https://developer.github.com/v3/apps/installations/#list-repositories-accessible-to-the-user-for-an-installation + # + # source://octokit//lib/octokit/client/apps.rb#203 + def find_installation_repositories_for_user(installation, options = T.unsafe(nil)); end + + # Find all installations that belong to an App + # + # @param options [Hash] A customizable set of options + # @return [Array] the total_count and an array of installations + # @see https://developer.github.com/v3/apps/#list-installations + # + # source://octokit//lib/octokit/client/apps.rb#25 + def find_installations(options = T.unsafe(nil)); end + + # source://octokit//lib/octokit/client/apps.rb#30 + def find_integration_installations(options = T.unsafe(nil)); end + + # Enables an app to find the organization's installation information. + # + # @param organization [String] Organization GitHub login + # @param options [Hash] A customizable set of options + # @return [Sawyer::Resource] Installation information + # @see https://developer.github.com/v3/apps/#get-an-organization-installation + # + # source://octokit//lib/octokit/client/apps.rb#95 + def find_organization_installation(organization, options = T.unsafe(nil)); end + + # Enables an app to find the repository's installation information. + # + # @param repo [String] A GitHub repository + # @param options [Hash] A customizable set of options + # @return [Sawyer::Resource] Installation information + # @see https://developer.github.com/v3/apps/#get-a-repository-installation + # + # source://octokit//lib/octokit/client/apps.rb#107 + def find_repository_installation(repo, options = T.unsafe(nil)); end + + # Enables an app to find the user's installation information. + # + # @param user [String] GitHub user login + # @param options [Hash] A customizable set of options + # @return [Sawyer::Resource] Installation information + # @see https://developer.github.com/v3/apps/#get-a-user-installation + # + # source://octokit//lib/octokit/client/apps.rb#119 + def find_user_installation(user, options = T.unsafe(nil)); end + + # Find all installations that are accessible to the authenticated user + # + # @param options [Hash] A customizable set of options + # @return [Sawyer::Resource] the total_count and an array of installations + # @see https://developer.github.com/v3/apps/installations/#list-installations-for-a-user + # + # source://octokit//lib/octokit/client/apps.rb#47 + def find_user_installations(options = T.unsafe(nil)); end + + # Get a single installation + # + # @param id [Integer] Installation id + # @return [Sawyer::Resource] Installation information + # @see https://developer.github.com/v3/apps/#get-an-installation + # + # source://octokit//lib/octokit/client/apps.rb#60 + def installation(id, options = T.unsafe(nil)); end + + # Returns a list of webhook deliveries for the webhook configured for a GitHub App. + # + # @param options [Hash] A customizable set of options + # @return [Array] an array of hook deliveries + # @see https://docs.github.com/en/rest/apps/webhooks#list-deliveries-for-an-app-webhook + # + # source://octokit//lib/octokit/client/apps.rb#228 + def list_app_hook_deliveries(options = T.unsafe(nil)); end + + # List repositories that are accessible to the authenticated installation + # + # @param options [Hash] A customizable set of options + # @return [Sawyer::Resource] the total_count and an array of repositories + # @see https://developer.github.com/v3/apps/installations/#list-repositories + # + # source://octokit//lib/octokit/client/apps.rb#130 + def list_app_installation_repositories(options = T.unsafe(nil)); end + + # List repositories that are accessible to the authenticated installation + # + # @param options [Hash] A customizable set of options + # @return [Sawyer::Resource] the total_count and an array of repositories + # @see https://developer.github.com/v3/apps/installations/#list-repositories + # + # source://octokit//lib/octokit/client/apps.rb#130 + def list_installation_repos(options = T.unsafe(nil)); end + + # source://octokit//lib/octokit/client/apps.rb#137 + def list_integration_installation_repositories(options = T.unsafe(nil)); end + + # Remove a single repository to an installation + # + # @param installation [Integer] The id of a GitHub App Installation + # @param repo [Integer] The id of the GitHub repository + # @param options [Hash] A customizable set of options + # @return [Boolean] Success + # @see https://developer.github.com/v3/apps/installations/#remove-repository-from-installation + # + # source://octokit//lib/octokit/client/apps.rb#180 + def remove_repo_from_installation(installation, repo, options = T.unsafe(nil)); end + + # Remove a single repository to an installation + # + # @param installation [Integer] The id of a GitHub App Installation + # @param repo [Integer] The id of the GitHub repository + # @param options [Hash] A customizable set of options + # @return [Boolean] Success + # @see https://developer.github.com/v3/apps/installations/#remove-repository-from-installation + # + # source://octokit//lib/octokit/client/apps.rb#180 + def remove_repository_from_app_installation(installation, repo, options = T.unsafe(nil)); end + + # source://octokit//lib/octokit/client/apps.rb#185 + def remove_repository_from_integration_installation(installation, repo, options = T.unsafe(nil)); end +end + +# Header keys that can be passed in options hash to {#get},{#head} +# +# source://octokit//lib/octokit/client.rb#139 +Octokit::Client::CONVENIENCE_HEADERS = T.let(T.unsafe(nil), Set) + +# Methods for the Checks API +# +# @see https://developer.github.com/v3/checks/ +# +# source://octokit//lib/octokit/client/checks.rb#8 +module Octokit::Client::Checks + # Get a single check run + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param id [Integer] The ID of the check run + # @return [Sawyer::Resource] A hash representing the check run + # @see https://developer.github.com/v3/checks/runs/#get-a-single-check-run + # + # source://octokit//lib/octokit/client/checks.rb#100 + def check_run(repo, id, options = T.unsafe(nil)); end + + # List annotations for a check run + # + # @example List annotations for a check run + # annotations = @client.check_run_annotations("octocat/Hello-World", 51295429) + # annotations.count # => 1 + # annotations[0].path # => "README.md" + # annotations[0].message # => "Looks good!" + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param id [Integer] The ID of the check run + # @return [Array] An array of hashes representing check run annotations + # @see https://developer.github.com/v3/checks/runs/#list-annotations-for-a-check-run + # + # source://octokit//lib/octokit/client/checks.rb#115 + def check_run_annotations(repo, id, options = T.unsafe(nil)); end + + # List check runs in a check suite + # + # @example List check runs in a check suite + # result = @client.check_runs_for_check_suite("octocat/Hello-World", 50440400, status: "in_progress") + # result.total_count # => 1 + # result.check_runs.count # => 1 + # result.check_runs[0].check_suite.id # => 50440400 + # result.check_runs[0].status # => "in_progress" + # @option options + # @option options + # @option options + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param id [Integer] The ID of the check suite + # @param options [Hash] A set of optional filters + # @return [Sawyer::Resource] A hash representing a collection of check runs + # @see https://developer.github.com/v3/checks/runs/#list-check-runs-in-a-check-suite + # + # source://octokit//lib/octokit/client/checks.rb#86 + def check_runs_for_check_suite(repo, id, options = T.unsafe(nil)); end + + # List check runs for a specific ref + # + # @example List check runs for a specific ref + # result = @client.check_runs_for_ref("octocat/Hello-World", "7638417db6d59f3c431d3e1f261cc637155684cd", status: "in_progress") + # result.total_count # => 1 + # result.check_runs.count # => 1 + # result.check_runs[0].id # => 51295429 + # result.check_runs[0].status # => "in_progress" + # @option options + # @option options + # @option options + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param ref [String] A SHA, branch name, or tag name + # @param options [Hash] A set of optional filters + # @return [Sawyer::Resource] A hash representing a collection of check runs + # @see https://developer.github.com/v3/checks/runs/#list-check-runs-for-a-specific-ref + # + # source://octokit//lib/octokit/client/checks.rb#62 + def check_runs_for_ref(repo, ref, options = T.unsafe(nil)); end + + # Get a single check suite + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param id [Integer] The ID of the check suite + # @return [Sawyer::Resource] A hash representing the check suite + # @see https://developer.github.com/v3/checks/suites/#get-a-single-check-suite + # + # source://octokit//lib/octokit/client/checks.rb#129 + def check_suite(repo, id, options = T.unsafe(nil)); end + + # List check suites for a specific ref + # + # @example List check suites for a specific ref + # result = @client.check_suites_for_ref("octocat/Hello-World", "7638417db6d59f3c431d3e1f261cc637155684cd", app_id: 76765) + # result.total_count # => 1 + # result.check_suites.count # => 1 + # result.check_suites[0].id # => 50440400 + # result.check_suites[0].app.id # => 76765 + # @option options + # @option options + # @param ref [String] A SHA, branch name, or tag name + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param options [Hash] A set of optional filters + # @return [Sawyer::Resource] A hash representing a collection of check suites + # @see https://developer.github.com/v3/checks/suites/#list-check-suites-for-a-specific-ref + # + # source://octokit//lib/octokit/client/checks.rb#148 + def check_suites_for_ref(repo, ref, options = T.unsafe(nil)); end + + # Create a check run + # + # @example Create a check run + # check_run = @client.create_check_run("octocat/Hello-World", "my-check", "7638417db6d59f3c431d3e1f261cc637155684cd") + # check_run.name # => "my-check" + # check_run.head_sha # => "7638417db6d59f3c431d3e1f261cc637155684cd" + # check_run.status # => "queued" + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param name [String] The name of the check + # @param head_sha [String] The SHA of the commit to check + # @return [Sawyer::Resource] A hash representing the new check run + # @see https://developer.github.com/v3/checks/runs/#create-a-check-run + # + # source://octokit//lib/octokit/client/checks.rb#25 + def create_check_run(repo, name, head_sha, options = T.unsafe(nil)); end + + # Create a check suite + # + # @example Create a check suite + # check_suite = @client.create_check_suite("octocat/Hello-World", "7638417db6d59f3c431d3e1f261cc637155684cd") + # check_suite.head_sha # => "7638417db6d59f3c431d3e1f261cc637155684cd" + # check_suite.status # => "queued" + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param head_sha [String] The SHA of the commit to check + # @return [Sawyer::Resource] A hash representing the new check suite + # @see https://developer.github.com/v3/checks/suites/#create-a-check-suite + # + # source://octokit//lib/octokit/client/checks.rb#182 + def create_check_suite(repo, head_sha, options = T.unsafe(nil)); end + + # List check runs in a check suite + # + # @example List check runs in a check suite + # result = @client.check_runs_for_check_suite("octocat/Hello-World", 50440400, status: "in_progress") + # result.total_count # => 1 + # result.check_runs.count # => 1 + # result.check_runs[0].check_suite.id # => 50440400 + # result.check_runs[0].status # => "in_progress" + # @option options + # @option options + # @option options + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param id [Integer] The ID of the check suite + # @param options [Hash] A set of optional filters + # @return [Sawyer::Resource] A hash representing a collection of check runs + # @see https://developer.github.com/v3/checks/runs/#list-check-runs-in-a-check-suite + # + # source://octokit//lib/octokit/client/checks.rb#86 + def list_check_runs_for_check_suite(repo, id, options = T.unsafe(nil)); end + + # List check runs for a specific ref + # + # @example List check runs for a specific ref + # result = @client.check_runs_for_ref("octocat/Hello-World", "7638417db6d59f3c431d3e1f261cc637155684cd", status: "in_progress") + # result.total_count # => 1 + # result.check_runs.count # => 1 + # result.check_runs[0].id # => 51295429 + # result.check_runs[0].status # => "in_progress" + # @option options + # @option options + # @option options + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param ref [String] A SHA, branch name, or tag name + # @param options [Hash] A set of optional filters + # @return [Sawyer::Resource] A hash representing a collection of check runs + # @see https://developer.github.com/v3/checks/runs/#list-check-runs-for-a-specific-ref + # + # source://octokit//lib/octokit/client/checks.rb#62 + def list_check_runs_for_ref(repo, ref, options = T.unsafe(nil)); end + + # List check suites for a specific ref + # + # @example List check suites for a specific ref + # result = @client.check_suites_for_ref("octocat/Hello-World", "7638417db6d59f3c431d3e1f261cc637155684cd", app_id: 76765) + # result.total_count # => 1 + # result.check_suites.count # => 1 + # result.check_suites[0].id # => 50440400 + # result.check_suites[0].app.id # => 76765 + # @option options + # @option options + # @param ref [String] A SHA, branch name, or tag name + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param options [Hash] A set of optional filters + # @return [Sawyer::Resource] A hash representing a collection of check suites + # @see https://developer.github.com/v3/checks/suites/#list-check-suites-for-a-specific-ref + # + # source://octokit//lib/octokit/client/checks.rb#148 + def list_check_suites_for_ref(repo, ref, options = T.unsafe(nil)); end + + # Rerequest check suite + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param id [Integer] The ID of the check suite + # @return [Boolean] True if successful, raises an error otherwise + # @see https://developer.github.com/v3/checks/suites/#rerequest-check-suite + # + # source://octokit//lib/octokit/client/checks.rb#194 + def rerequest_check_suite(repo, id, options = T.unsafe(nil)); end + + # Set preferences for check suites on a repository + # + # @example Set preferences for check suites on a repository + # result = @client.set_check_suite_preferences("octocat/Hello-World", auto_trigger_checks: [{ app_id: 76765, setting: false }]) + # result.preferences.auto_trigger_checks.count # => 1 + # result.preferences.auto_trigger_checks[0].app_id # => 76765 + # result.preferences.auto_trigger_checks[0].setting # => false + # result.repository.full_name # => "octocat/Hello-World" + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param options [Hash] Preferences to set + # @return [Sawyer::Resource] A hash representing the repository's check suite preferences + # @see https://developer.github.com/v3/checks/suites/#set-preferences-for-check-suites-on-a-repository + # + # source://octokit//lib/octokit/client/checks.rb#168 + def set_check_suite_preferences(repo, options = T.unsafe(nil)); end + + # Update a check run + # + # @example Update a check run + # check_run = @client.update_check_run("octocat/Hello-World", 51295429, status: "in_progress") + # check_run.id # => 51295429 + # check_run.status # => "in_progress" + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param id [Integer] The ID of the check run + # @return [Sawyer::Resource] A hash representing the updated check run + # @see https://developer.github.com/v3/checks/runs/#update-a-check-run + # + # source://octokit//lib/octokit/client/checks.rb#42 + def update_check_run(repo, id, options = T.unsafe(nil)); end +end + +# Methods for the code scanning alerts API +# +# @see https://docs.github.com/rest/code-scanning +# +# source://octokit//lib/octokit/client/code_scanning.rb#11 +module Octokit::Client::CodeScanning + # Delete a specified code scanning analysis from a repository + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param analysis_id [Integer] ID of the code scanning analysis + # @return [Sawyer::Resource] Next Code Scanning Analysis Information + # @see https://docs.github.com/en/rest/code-scanning/code-scanning#delete-a-code-scanning-analysis-from-a-repository + # + # source://octokit//lib/octokit/client/code_scanning.rb#67 + def delete_code_scanning_analysis(repo, analysis_id, options = T.unsafe(nil)); end + + # Gets a single code scanning alert + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param alert_number [Integer] The number that identifies an alert + # @return [Sawyer::Resource] Code Scanning Alert + # @see https://docs.github.com/en/rest/code-scanning/code-scanning#get-a-code-scanning-alert + # + # source://octokit//lib/octokit/client/code_scanning.rb#126 + def get_code_scanning_alert(repo, alert_number, options = T.unsafe(nil)); end + + # Get a code scanning analysis for a repository + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param analysis_id [Integer] ID of the code scanning analysis + # @return [Sawyer::Resource] Code Scanning Analysis + # @see https://docs.github.com/en/rest/code-scanning/code-scanning#get-a-code-scanning-analysis-for-a-repository + # + # source://octokit//lib/octokit/client/code_scanning.rb#78 + def get_code_scanning_analysis(repo, analysis_id, options = T.unsafe(nil)); end + + # Get Code Scanning Default Configuration + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @return [Sawyer::Resource] CodeQl Default Setup Configuration Information + # @see https://docs.github.com/en/rest/code-scanning/code-scanning#get-a-code-scanning-default-setup-configuration + # + # source://octokit//lib/octokit/client/code_scanning.rb#35 + def get_code_scanning_default_config(repo, options = T.unsafe(nil)); end + + # Gets a CodeQL database for a language in a repository + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param language [String] + # @return [Sawyer::Resource] CodeQl Default Setup Configuration Information + # @see https://docs.github.com/en/rest/code-scanning/code-scanning#get-a-codeql-database-for-a-repository + # + # source://octokit//lib/octokit/client/code_scanning.rb#46 + def get_codeql_database_for_repo(repo, language, options = T.unsafe(nil)); end + + # Gets information about a SARIF upload + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param sarif_id [String] The SARIF ID obtained after uploading + # @return [Sawyer::Resource] SARIF upload information + # @see https://docs.github.com/rest/code-scanning#get-information-about-a-sarif-upload + # + # source://octokit//lib/octokit/client/code_scanning.rb#174 + def get_sarif_upload_information(repo, sarif_id, options = T.unsafe(nil)); end + + # List code scanning alerts for an organization + # + # @param org [String] A GitHub organization + # @return [Array] Code Scanning Alert information + # @see https://docs.github.com/en/rest/code-scanning/code-scanning#list-code-scanning-alerts-for-an-organization + # + # source://octokit//lib/octokit/client/code_scanning.rb#146 + def list_code_scanning_alerts_for_org(org, options = T.unsafe(nil)); end + + # List code scanning alerts for a repository + # + # @param org [String] A GitHub organization + # @return [Array] Code Scanning Alert information + # @see https://docs.github.com/en/rest/code-scanning/code-scanning#list-code-scanning-alerts-for-a-repository + # + # source://octokit//lib/octokit/client/code_scanning.rb#136 + def list_code_scanning_alerts_for_repo(repo, options = T.unsafe(nil)); end + + # List code scanning analyses for a repository + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @return [Array] List of Code Scanning Analyses + # @see https://docs.github.com/en/rest/code-scanning/code-scanning#list-code-scanning-analyses-for-a-repository + # + # source://octokit//lib/octokit/client/code_scanning.rb#88 + def list_code_scanning_analysis(repo, options = T.unsafe(nil)); end + + # Lists the CodeQL databases that are available in a repository + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @return [Array] List of CodeQL Databases + # @see https://docs.github.com/en/rest/code-scanning/code-scanning#list-codeql-databases-for-a-repository + # + # source://octokit//lib/octokit/client/code_scanning.rb#56 + def list_codeql_database_for_repo(repo, options = T.unsafe(nil)); end + + # List instances of a code scanning alert + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param alert_number [Integer] The number that identifies an alert + # @return [Array] List of Code Scanning Alerts + # @see https://docs.github.com/en/rest/code-scanning/code-scanning#list-instances-of-a-code-scanning-alert + # + # source://octokit//lib/octokit/client/code_scanning.rb#99 + def list_instances_of_code_scanning_alert(repo, alert_number, options = T.unsafe(nil)); end + + # Update a code scanning alert + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param alert_number [Integer] The number that identifies an alert + # @param state [String] The reason for dismissing or closing the alert. Required when the state is dismissed + # @return [Sawyer::Resource] Code Scanning Alert information + # @see https://docs.github.com/en/rest/code-scanning/code-scanning#update-a-code-scanning-alert + # + # source://octokit//lib/octokit/client/code_scanning.rb#111 + def update_code_scanning_alert(repo, alert_number, state, reason, comment = T.unsafe(nil), options = T.unsafe(nil)); end + + # Updates a code scanning default setup configuration + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param state [String] The desired state of code scanning default setup + # @param query_suite [String] CodeQL query suite to be used + # @param languages [Array] List of CodeQL languages to be analyzed + # @return [Sawyer::Resource] Action Run information + # @see https://docs.github.com/en/rest/code-scanning/code-scanning#update-a-code-scanning-default-setup-configuration + # + # source://octokit//lib/octokit/client/code_scanning.rb#21 + def update_code_scanning_default_config(repo, state, query_suite = T.unsafe(nil), languages = T.unsafe(nil), options = T.unsafe(nil)); end + + # Uploads SARIF data containing the results of a code scanning analysis + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param file [String] Path to the SARIF file to upload + # @param sha [String] The SHA of the commit to which the analysis you are uploading relates + # @param ref [String] The full Git reference, formatted as `refs/heads/`, `refs/pull//merge`, or `refs/pull//head` + # @return [Sawyer::Resource] SARIF upload information + # @see https://docs.github.com/rest/code-scanning#upload-an-analysis-as-sarif-data + # + # source://octokit//lib/octokit/client/code_scanning.rb#159 + def upload_sarif_data(repo, file, sha, ref, options = T.unsafe(nil)); end + + private + + # source://octokit//lib/octokit/client/code_scanning.rb#180 + def compress_sarif_data(file); end +end + +# Methods for the Codespaces Secrets API +# +# @see https://docs.github.com/en/rest/codespaces/ +# +# source://octokit//lib/octokit/client/codespaces_secrets.rb#8 +module Octokit::Client::CodespacesSecrets + # Create or update secrets + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param name [String] Name of secret + # @param options [Hash] encrypted_value and key_id + # @see https://docs.github.com/en/rest/codespaces/repository-secrets?apiVersion=2022-11-28#create-or-update-a-repository-secret + # + # source://octokit//lib/octokit/client/codespaces_secrets.rb#75 + def create_or_update_codespaces_secret(repo, name, options); end + + # Create or update org secrets + # + # @param org [String] A GitHub organization + # @param name [String] Name of secret + # @param options [Hash] encrypted_value and key_id + # @see https://docs.github.com/en/rest/codespaces/organization-secrets?apiVersion=2022-11-28#create-or-update-an-organization-secret + # + # source://octokit//lib/octokit/client/codespaces_secrets.rb#85 + def create_or_update_org_codespaces_secret(org, name, options); end + + # Delete a secret + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param name [String] Name of secret + # @see https://docs.github.com/en/rest/codespaces/repository-secrets?apiVersion=2022-11-28#delete-a-repository-secret + # + # source://octokit//lib/octokit/client/codespaces_secrets.rb#94 + def delete_codespaces_secret(repo, name); end + + # Delete an org secret + # + # @param org [String] A GitHub organization + # @param name [String] Name of secret + # @see https://docs.github.com/en/rest/codespaces/organization-secrets?apiVersion=2022-11-28#delete-an-organization-secret + # + # source://octokit//lib/octokit/client/codespaces_secrets.rb#103 + def delete_org_codespaces_secret(org, name); end + + # Get public key for secrets encryption + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @return [Hash] key_id and key + # @see https://docs.github.com/en/rest/codespaces/repository-secrets#get-a-repository-public-key + # + # source://octokit//lib/octokit/client/codespaces_secrets.rb#14 + def get_codespaces_public_key(repo); end + + # Get a secret + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param name [String] Name of secret + # @return [Hash] name, created_at, updated_at, and visibility + # @see https://docs.github.com/en/rest/codespaces/repository-secrets?apiVersion=2022-11-28#get-a-repository-secret + # + # source://octokit//lib/octokit/client/codespaces_secrets.rb#55 + def get_codespaces_secret(repo, name); end + + # Get public key for secrets encryption + # + # @param org [String] A GitHub organization + # @return [Hash] key_id and key + # @see https://docs.github.com/en/rest/codespaces/organization-secrets?apiVersion=2022-11-28#get-an-organization-public-key + # + # source://octokit//lib/octokit/client/codespaces_secrets.rb#23 + def get_org_codespaces_public_key(org); end + + # Get an org secret + # + # @param org [String] A GitHub organization + # @param name [String] Name of secret + # @return [Hash] name, created_at, updated_at, and visibility + # @see https://docs.github.com/en/rest/codespaces/organization-secrets?apiVersion=2022-11-28#get-an-organization-secret + # + # source://octokit//lib/octokit/client/codespaces_secrets.rb#65 + def get_org_codespaces_secret(org, name); end + + # List secrets + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @return [Hash] total_count and list of secrets (each item is hash with name, created_at and updated_at) + # @see https://docs.github.com/en/rest/codespaces/repository-secrets?apiVersion=2022-11-28#list-repository-secrets + # + # source://octokit//lib/octokit/client/codespaces_secrets.rb#32 + def list_codespaces_secrets(repo); end + + # List org secrets + # + # @param org [String] A GitHub organization + # @return [Hash] total_count and list of secrets (each item is hash with name, created_at and updated_at) + # @see https://docs.github.com/en/rest/codespaces/organization-secrets?apiVersion=2022-11-28#list-organization-secrets + # + # source://octokit//lib/octokit/client/codespaces_secrets.rb#43 + def list_org_codespaces_secrets(org); end +end + +# Methods for the Branches for HEAD API +# +# @see https://developer.github.com/v3/repos/commits/ +# +# source://octokit//lib/octokit/client/commit_branches.rb#8 +module Octokit::Client::CommitBranches + # List branches for a single HEAD commit + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param sha [String] The SHA of the commit whose branches will be fetched + # @return [Array] List of branches + # @see https://developer.github.com/v3/repos/commits/#list-branches-for-head-commit + # + # source://octokit//lib/octokit/client/commit_branches.rb#15 + def commit_branches(repo, sha, options = T.unsafe(nil)); end +end + +# Methods for the Commit Comments API +# +# @see https://developer.github.com/v3/repos/comments/ +# +# source://octokit//lib/octokit/client/commit_comments.rb#8 +module Octokit::Client::CommitComments + # Get a single commit comment + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param id [String] The ID of the comment to fetch + # @return [Sawyer::Resource] Commit comment + # @see https://developer.github.com/v3/repos/comments/#get-a-single-commit-comment + # + # source://octokit//lib/octokit/client/commit_comments.rb#34 + def commit_comment(repo, id, options = T.unsafe(nil)); end + + # List comments for a single commit + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param sha [String] The SHA of the commit whose comments will be fetched + # @return [Array] List of commit comments + # @see https://developer.github.com/v3/repos/comments/#list-comments-for-a-single-commit + # + # source://octokit//lib/octokit/client/commit_comments.rb#24 + def commit_comments(repo, sha, options = T.unsafe(nil)); end + + # Create a commit comment + # + # @example Create a commit comment + # comment = Octokit.create_commit_comment("octocat/Hello-World", "827efc6d56897b048c772eb4087f854f46256132", "My comment message", "README.md", 10, 1) + # comment.commit_id # => "827efc6d56897b048c772eb4087f854f46256132" + # comment.id # => 54321 + # comment.body # => "My comment message" + # comment.path # => "README.md" + # comment.line # => 10 + # comment.position # => 1 + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param sha [String] Sha of the commit to comment on + # @param body [String] Message + # @param line [Integer] Line number in the file to comment on + # @param position [Integer] Line index in the diff to comment on + # @param path [String] Relative path of file to comment on + # @return [Sawyer::Resource] Commit comment + # @see https://developer.github.com/v3/repos/comments/#create-a-commit-comment + # + # source://octokit//lib/octokit/client/commit_comments.rb#56 + def create_commit_comment(repo, sha, body, path = T.unsafe(nil), line = T.unsafe(nil), position = T.unsafe(nil), options = T.unsafe(nil)); end + + # Delete a commit comment + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param id [String] The ID of the comment to delete + # @return [Boolean] Success + # @see https://developer.github.com/v3/repos/comments/#delete-a-commit-comment + # + # source://octokit//lib/octokit/client/commit_comments.rb#90 + def delete_commit_comment(repo, id, options = T.unsafe(nil)); end + + # List all commit comments + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @return [Array] List of commit comments + # @see https://developer.github.com/v3/repos/comments/#list-commit-comments-for-a-repository + # + # source://octokit//lib/octokit/client/commit_comments.rb#14 + def list_commit_comments(repo, options = T.unsafe(nil)); end + + # Update a commit comment + # + # @example Update a commit comment + # comment = Octokit.update_commit_comment("octocat/Hello-World", "860296", "Updated commit comment") + # comment.id # => 860296 + # comment.body # => "Updated commit comment" + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param id [String] The ID of the comment to update + # @param body [String] Message + # @return [Sawyer::Resource] Updated commit comment + # @see https://developer.github.com/v3/repos/comments/#update-a-commit-comment + # + # source://octokit//lib/octokit/client/commit_comments.rb#77 + def update_commit_comment(repo, id, body, options = T.unsafe(nil)); end +end + +# Methods for the Commit Pulls API +# +# @see https://developer.github.com/v3/repos/comments/ +# +# source://octokit//lib/octokit/client/commit_pulls.rb#8 +module Octokit::Client::CommitPulls + # List pulls for a single commit + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param sha [String] The SHA of the commit whose pulls will be fetched + # @return [Array] List of commit pulls + # @see https://developer.github.com/v3/repos/commits/#list-pull-requests-associated-with-commit + # + # source://octokit//lib/octokit/client/commit_pulls.rb#15 + def commit_pulls(repo, sha, options = T.unsafe(nil)); end +end + +# Methods for the Commits API +# +# @see https://developer.github.com/v3/repos/commits/ +# +# source://octokit//lib/octokit/client/commits.rb#10 +module Octokit::Client::Commits + # Get a single commit + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param sha [String] The SHA of the commit to fetch + # @return [Sawyer::Resource] A hash representing the commit + # @see https://developer.github.com/v3/repos/commits/#get-a-single-commit + # + # source://octokit//lib/octokit/client/commits.rb#143 + def commit(repo, sha, options = T.unsafe(nil)); end + + # List commits + # + # @overload commits + # @overload commits + # @return [Array] An array of hashes representing commits + # @see https://developer.github.com/v3/repos/commits/#list-commits-on-a-repository + # + # source://octokit//lib/octokit/client/commits.rb#23 + def commits(*args); end + + # Get commits before a specified date + # + # @example + # Octokit.commits_before('octokit/octokit.rb', '2012-10-01') + # @overload commits_before + # @overload commits_before + # @return [Array] An array of hashes representing commits + # @see https://developer.github.com/v3/repos/commits/#list-commits-on-a-repository + # + # source://octokit//lib/octokit/client/commits.rb#71 + def commits_before(*args); end + + # Get commits made between two nominated dates + # + # @example + # Octokit.commits_between('octokit/octokit.rb', '2012-10-01', '2012-11-01') + # @overload commits_between + # @overload commits_between + # @return [Array] An array of hashes representing commits + # @see https://developer.github.com/v3/repos/commits/#list-commits-on-a-repository + # + # source://octokit//lib/octokit/client/commits.rb#122 + def commits_between(*args); end + + # Get commits on a specified date + # + # @example + # Octokit.commits_on('octokit/octokit.rb', '2012-10-01') + # @overload commits_on + # @overload commits_on + # @return [Array] An array of hashes representing commits + # @see https://developer.github.com/v3/repos/commits/#list-commits-on-a-repository + # + # source://octokit//lib/octokit/client/commits.rb#95 + def commits_on(*args); end + + # Get commits after a specified date + # + # @example + # Octokit.commits_since('octokit/octokit.rb', '2012-10-01') + # @overload commits_since + # @overload commits_since + # @return [Array] An array of hashes representing commits + # @see https://developer.github.com/v3/repos/commits/#list-commits-on-a-repository + # + # source://octokit//lib/octokit/client/commits.rb#47 + def commits_since(*args); end + + # Compare two commits + # + # When using auto_pagination, commits from all pages will be concatenated + # into the commits attribute of the first page's response. + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param start [String] The sha of the starting commit + # @param endd [String] The sha of the ending commit + # @return [Sawyer::Resource] A hash representing the comparison + # @see https://developer.github.com/v3/repos/commits/#compare-two-commits + # + # source://octokit//lib/octokit/client/commits.rb#192 + def compare(repo, start, endd, options = T.unsafe(nil)); end + + # Create a commit + # + # Optionally pass author and committer hashes in options + # if you'd like manual control over those parameters. If absent, details will be + # inferred from the authenticated user. See GitHub's documentation + # for details about how to format committer identities. + # + # @example Create a commit + # commit = Octokit.create_commit("octocat/Hello-World", "My commit message", "827efc6d56897b048c772eb4087f854f46256132", "7d1b31e74ee336d15cbd21741bc88a537ed063a0") + # commit.sha # => "7638417db6d59f3c431d3e1f261cc637155684cd" + # commit.tree.sha # => "827efc6d56897b048c772eb4087f854f46256132" + # commit.message # => "My commit message" + # commit.committer # => { "name" => "Wynn Netherland", "email" => "wynn@github.com", ... } + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param message [String] The commit message + # @param tree [String] The SHA of the tree object the new commit will point to + # @param parents [String, Array] One SHA (for a normal commit) or an array of SHAs (for a merge) of the new commit's parent commits. If ommitted or empty, a root commit will be created + # @return [Sawyer::Resource] A hash representing the new commit + # @see https://developer.github.com/v3/git/commits/#create-a-commit + # + # source://octokit//lib/octokit/client/commits.rb#176 + def create_commit(repo, message, tree, parents = T.unsafe(nil), options = T.unsafe(nil)); end + + # Get a detailed git commit + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param sha [String] The SHA of the commit to fetch + # @return [Sawyer::Resource] A hash representing the commit + # @see https://developer.github.com/v3/git/commits/#get-a-commit + # + # source://octokit//lib/octokit/client/commits.rb#153 + def git_commit(repo, sha, options = T.unsafe(nil)); end + + # List commits + # + # @overload commits + # @overload commits + # @return [Array] An array of hashes representing commits + # @see https://developer.github.com/v3/repos/commits/#list-commits-on-a-repository + # + # source://octokit//lib/octokit/client/commits.rb#23 + def list_commits(*args); end + + # Merge a branch or sha + # + # @option options + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param base [String] The name of the base branch to merge into + # @param head [String] The branch or SHA1 to merge + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] A hash representing the comparison + # @see https://developer.github.com/v3/repos/merging/#perform-a-merge + # + # source://octokit//lib/octokit/client/commits.rb#206 + def merge(repo, base, head, options = T.unsafe(nil)); end + + protected + + # source://octokit//lib/octokit/client/commits.rb#216 + def iso8601(date); end + + # Parses the given string representation of a date, throwing a meaningful exception + # (containing the date that failed to parse) in case of failure. + # + # @param date [String] String representation of a date + # @return [DateTime] + # + # source://octokit//lib/octokit/client/commits.rb#229 + def parse_date(date); end +end + +# Methods for the Community Profile API +# +# @see https://developer.github.com/v3/repos/community/ +# +# source://octokit//lib/octokit/client/community_profile.rb#8 +module Octokit::Client::CommunityProfile + # Get community profile metrics for a repository + # + # @example Get community profile metrics for octokit/octokit.rb + # @client.community_profile('octokit/octokit.rb') + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @return [Sawyer::Resource] Community profile metrics + # @see https://developer.github.com/v3/repos/community/#retrieve-community-profile-metrics + # + # source://octokit//lib/octokit/client/community_profile.rb#16 + def community_profile(repo, options = T.unsafe(nil)); end +end + +# Methods for the Repo Contents API +# +# @see https://developer.github.com/v3/repos/contents/ +# +# source://octokit//lib/octokit/client/contents.rb#8 +module Octokit::Client::Contents + # Add content to a repository + # + # @example Add content at lib/octokit.rb + # Octokit.create_contents("octokit/octokit.rb", + # "lib/octokit.rb", + # "Adding content", + # "File content", + # :branch => "my-new-feature") + # @overload create_contents + # @raise [ArgumentError] + # @return [Sawyer::Resource] The contents and commit info for the addition + # @see https://developer.github.com/v3/repos/contents/#create-a-file + # + # source://octokit//lib/octokit/client/contents.rb#59 + def add_content(*args); end + + # Add content to a repository + # + # @example Add content at lib/octokit.rb + # Octokit.create_contents("octokit/octokit.rb", + # "lib/octokit.rb", + # "Adding content", + # "File content", + # :branch => "my-new-feature") + # @overload create_contents + # @raise [ArgumentError] + # @return [Sawyer::Resource] The contents and commit info for the addition + # @see https://developer.github.com/v3/repos/contents/#create-a-file + # + # source://octokit//lib/octokit/client/contents.rb#59 + def add_contents(*args); end + + # This method will provide a URL to download a tarball or zipball archive for a repository. + # + # @example Get archive link for octokit/octokit.rb + # Octokit.archive_link("octokit/octokit.rb") + # @option options + # @option options + # @param repo [Integer, String, Repository, Hash] A GitHub repository. + # @param options [Hash] a customizable set of options + # @return [String] Location of the download + # @see https://developer.github.com/v3/repos/contents/#get-archive-link + # + # source://octokit//lib/octokit/client/contents.rb#155 + def archive_link(repo, options = T.unsafe(nil)); end + + # Receive a listing of a repository folder or the contents of a file + # + # @example List the contents of lib/octokit.rb + # Octokit.contents("octokit/octokit.rb", :path => 'lib/octokit.rb') + # @example Lists the contents of lib /octokit.rb on a particular branch + # Octokit.contents("octokit/octokit.rb", :path => 'lib/octokit.rb', :query => {:ref => 'some-other-branch'}) + # @option options + # @option options + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] The contents of a file or list of the files in the folder + # @see https://developer.github.com/v3/repos/contents/#get-contents + # + # source://octokit//lib/octokit/client/contents.rb#34 + def content(repo, options = T.unsafe(nil)); end + + # Receive a listing of a repository folder or the contents of a file + # + # @example List the contents of lib/octokit.rb + # Octokit.contents("octokit/octokit.rb", :path => 'lib/octokit.rb') + # @example Lists the contents of lib /octokit.rb on a particular branch + # Octokit.contents("octokit/octokit.rb", :path => 'lib/octokit.rb', :query => {:ref => 'some-other-branch'}) + # @option options + # @option options + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] The contents of a file or list of the files in the folder + # @see https://developer.github.com/v3/repos/contents/#get-contents + # + # source://octokit//lib/octokit/client/contents.rb#34 + def contents(repo, options = T.unsafe(nil)); end + + # Add content to a repository + # + # @example Add content at lib/octokit.rb + # Octokit.create_contents("octokit/octokit.rb", + # "lib/octokit.rb", + # "Adding content", + # "File content", + # :branch => "my-new-feature") + # @overload create_contents + # @raise [ArgumentError] + # @return [Sawyer::Resource] The contents and commit info for the addition + # @see https://developer.github.com/v3/repos/contents/#create-a-file + # + # source://octokit//lib/octokit/client/contents.rb#59 + def create_content(*args); end + + # Add content to a repository + # + # @example Add content at lib/octokit.rb + # Octokit.create_contents("octokit/octokit.rb", + # "lib/octokit.rb", + # "Adding content", + # "File content", + # :branch => "my-new-feature") + # @overload create_contents + # @raise [ArgumentError] + # @return [Sawyer::Resource] The contents and commit info for the addition + # @see https://developer.github.com/v3/repos/contents/#create-a-file + # + # source://octokit//lib/octokit/client/contents.rb#59 + def create_contents(*args); end + + # Delete content in a repository + # + # @example Delete content at lib/octokit.rb + # Octokit.delete_contents("octokit/octokit.rb", + # "lib/octokit.rb", + # "Deleting content", + # "7eb95f97e1a0636015df3837478d3f15184a5f49", + # :branch => "my-new-feature") + # @option options + # @param path [String] A path for the content to delete + # @param sha [String] The _blob sha_ of the content to delete + # @param options [Hash] a customizable set of options + # @param message [String] A commit message for deleting the content + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @return [Sawyer::Resource] The commit info for the delete + # @see https://developer.github.com/v3/repos/contents/#delete-a-file + # + # source://octokit//lib/octokit/client/contents.rb#136 + def delete_content(repo, path, message, sha, options = T.unsafe(nil)); end + + # Delete content in a repository + # + # @example Delete content at lib/octokit.rb + # Octokit.delete_contents("octokit/octokit.rb", + # "lib/octokit.rb", + # "Deleting content", + # "7eb95f97e1a0636015df3837478d3f15184a5f49", + # :branch => "my-new-feature") + # @option options + # @param path [String] A path for the content to delete + # @param sha [String] The _blob sha_ of the content to delete + # @param options [Hash] a customizable set of options + # @param message [String] A commit message for deleting the content + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @return [Sawyer::Resource] The commit info for the delete + # @see https://developer.github.com/v3/repos/contents/#delete-a-file + # + # source://octokit//lib/octokit/client/contents.rb#136 + def delete_contents(repo, path, message, sha, options = T.unsafe(nil)); end + + # Receive the default Readme for a repository + # + # @example Get the readme file for a repo + # Octokit.readme("octokit/octokit.rb") + # @example Get the readme file for a particular branch of the repo + # Octokit.readme("octokit/octokit.rb", :query => {:ref => 'some-other-branch'}) + # @option options + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] The detail of the readme + # @see https://developer.github.com/v3/repos/contents/#get-the-readme + # + # source://octokit//lib/octokit/client/contents.rb#19 + def readme(repo, options = T.unsafe(nil)); end + + # Delete content in a repository + # + # @example Delete content at lib/octokit.rb + # Octokit.delete_contents("octokit/octokit.rb", + # "lib/octokit.rb", + # "Deleting content", + # "7eb95f97e1a0636015df3837478d3f15184a5f49", + # :branch => "my-new-feature") + # @option options + # @param path [String] A path for the content to delete + # @param sha [String] The _blob sha_ of the content to delete + # @param options [Hash] a customizable set of options + # @param message [String] A commit message for deleting the content + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @return [Sawyer::Resource] The commit info for the delete + # @see https://developer.github.com/v3/repos/contents/#delete-a-file + # + # source://octokit//lib/octokit/client/contents.rb#136 + def remove_content(repo, path, message, sha, options = T.unsafe(nil)); end + + # Delete content in a repository + # + # @example Delete content at lib/octokit.rb + # Octokit.delete_contents("octokit/octokit.rb", + # "lib/octokit.rb", + # "Deleting content", + # "7eb95f97e1a0636015df3837478d3f15184a5f49", + # :branch => "my-new-feature") + # @option options + # @param path [String] A path for the content to delete + # @param sha [String] The _blob sha_ of the content to delete + # @param options [Hash] a customizable set of options + # @param message [String] A commit message for deleting the content + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @return [Sawyer::Resource] The commit info for the delete + # @see https://developer.github.com/v3/repos/contents/#delete-a-file + # + # source://octokit//lib/octokit/client/contents.rb#136 + def remove_contents(repo, path, message, sha, options = T.unsafe(nil)); end + + # Update content in a repository + # + # @example Update content at lib/octokit.rb + # Octokit.update_contents("octokit/octokit.rb", + # "lib/octokit.rb", + # "Updating content", + # "7eb95f97e1a0636015df3837478d3f15184a5f49", + # "File content", + # :branch => "my-new-feature") + # @overload update_contents + # @return [Sawyer::Resource] The contents and commit info for the update + # @see https://developer.github.com/v3/repos/contents/#update-a-file + # + # source://octokit//lib/octokit/client/contents.rb#109 + def update_content(*args); end + + # Update content in a repository + # + # @example Update content at lib/octokit.rb + # Octokit.update_contents("octokit/octokit.rb", + # "lib/octokit.rb", + # "Updating content", + # "7eb95f97e1a0636015df3837478d3f15184a5f49", + # "File content", + # :branch => "my-new-feature") + # @overload update_contents + # @return [Sawyer::Resource] The contents and commit info for the update + # @see https://developer.github.com/v3/repos/contents/#update-a-file + # + # source://octokit//lib/octokit/client/contents.rb#109 + def update_contents(*args); end +end + +# Methods for the dependabot Secrets API +# +# @see https://docs.github.com/en/rest/dependabot/ +# +# source://octokit//lib/octokit/client/dependabot_secrets.rb#8 +module Octokit::Client::DependabotSecrets + # Create or update secrets + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param name [String] Name of secret + # @param options [Hash] encrypted_value and key_id + # @see https://docs.github.com/en/rest/dependabot/repository-secrets?apiVersion=2022-11-28#create-or-update-a-repository-secret + # + # source://octokit//lib/octokit/client/dependabot_secrets.rb#75 + def create_or_update_dependabot_secret(repo, name, options); end + + # Create or update org secrets + # + # @param org [String] A GitHub organization + # @param name [String] Name of secret + # @param options [Hash] encrypted_value and key_id + # @see https://docs.github.com/en/rest/dependabot/organization-secrets?apiVersion=2022-11-28#create-or-update-an-organization-secret + # + # source://octokit//lib/octokit/client/dependabot_secrets.rb#85 + def create_or_update_org_dependabot_secret(org, name, options); end + + # Delete a secret + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param name [String] Name of secret + # @see https://docs.github.com/en/rest/dependabot/repository-secrets?apiVersion=2022-11-28#delete-a-repository-secret + # + # source://octokit//lib/octokit/client/dependabot_secrets.rb#94 + def delete_dependabot_secret(repo, name); end + + # Delete an org secret + # + # @param org [String] A GitHub organization + # @param name [String] Name of secret + # @see https://docs.github.com/en/rest/dependabot/organization-secrets?apiVersion=2022-11-28#delete-an-organization-secret + # + # source://octokit//lib/octokit/client/dependabot_secrets.rb#103 + def delete_org_dependabot_secret(org, name); end + + # Get public key for secrets encryption + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @return [Hash] key_id and key + # @see https://docs.github.com/en/rest/dependabot/repository-secrets#get-a-repository-public-key + # + # source://octokit//lib/octokit/client/dependabot_secrets.rb#14 + def get_dependabot_public_key(repo); end + + # Get a secret + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param name [String] Name of secret + # @return [Hash] name, created_at, updated_at, and visibility + # @see https://docs.github.com/en/rest/dependabot/repository-secrets?apiVersion=2022-11-28#get-a-repository-secret + # + # source://octokit//lib/octokit/client/dependabot_secrets.rb#55 + def get_dependabot_secret(repo, name); end + + # Get public key for secrets encryption + # + # @param org [String] A GitHub organization + # @return [Hash] key_id and key + # @see https://docs.github.com/en/rest/dependabot/organization-secrets?apiVersion=2022-11-28#get-an-organization-public-key + # + # source://octokit//lib/octokit/client/dependabot_secrets.rb#23 + def get_org_dependabot_public_key(org); end + + # Get an org secret + # + # @param org [String] A GitHub organization + # @param name [String] Name of secret + # @return [Hash] name, created_at, updated_at, and visibility + # @see https://docs.github.com/en/rest/dependabot/organization-secrets?apiVersion=2022-11-28#get-an-organization-secret + # + # source://octokit//lib/octokit/client/dependabot_secrets.rb#65 + def get_org_dependabot_secret(org, name); end + + # List secrets + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @return [Hash] total_count and list of secrets (each item is hash with name, created_at and updated_at) + # @see https://docs.github.com/en/rest/dependabot/repository-secrets?apiVersion=2022-11-28#list-repository-secrets + # + # source://octokit//lib/octokit/client/dependabot_secrets.rb#32 + def list_dependabot_secrets(repo); end + + # List org secrets + # + # @param org [String] A GitHub organization + # @return [Hash] total_count and list of secrets (each item is hash with name, created_at and updated_at) + # @see https://docs.github.com/en/rest/dependabot/organization-secrets?apiVersion=2022-11-28#list-organization-secrets + # + # source://octokit//lib/octokit/client/dependabot_secrets.rb#43 + def list_org_dependabot_secrets(org); end +end + +# Methods for the Deployments API +# +# @see https://developer.github.com/v3/repos/commits/deployments/ +# +# source://octokit//lib/octokit/client/deployments.rb#8 +module Octokit::Client::Deployments + # Create a deployment for a ref + # + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param ref [String] The ref to deploy + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] A deployment + # @see https://developer.github.com/v3/repos/deployments/#create-a-deployment + # + # source://octokit//lib/octokit/client/deployments.rb#41 + def create_deployment(repo, ref, options = T.unsafe(nil)); end + + # Create a deployment status for a Deployment + # + # @option options + # @option options + # @param deployment_url [String] A URL for a deployment resource + # @param state [String] The state: pending, success, failure, error + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] A deployment status + # @see https://developer.github.com/v3/repos/deployments/#create-a-deployment-status + # + # source://octokit//lib/octokit/client/deployments.rb#75 + def create_deployment_status(deployment_url, state, options = T.unsafe(nil)); end + + # Delete a Deployment + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param deployment_id [Integer, String, Repository, Hash] A GitHub repository + # @return [No Content] + # @see https://developer.github.com/v3/repos/deployments/#delete-a-deployment + # + # source://octokit//lib/octokit/client/deployments.rb#52 + def delete_deployment(repo, deployment_id, options = T.unsafe(nil)); end + + # Fetch a single deployment for a repository + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param deployment_id [Integer, String, Repository, Hash] A GitHub repository + # @return [Sawyer::Resource] A single deployment + # @see https://developer.github.com/v3/repos/deployments/#get-a-single-deployment + # + # source://octokit//lib/octokit/client/deployments.rb#15 + def deployment(repo, deployment_id, options = T.unsafe(nil)); end + + # List all statuses for a Deployment + # + # @param deployment_url [String] A URL for a deployment resource + # @return [Array] A list of deployment statuses + # @see https://developer.github.com/v3/repos/deployments/#list-deployment-statuses + # + # source://octokit//lib/octokit/client/deployments.rb#61 + def deployment_statuses(deployment_url, options = T.unsafe(nil)); end + + # List all deployments for a repository + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @return [Array] A list of deployments + # @see https://developer.github.com/v3/repos/deployments/#list-deployments + # + # source://octokit//lib/octokit/client/deployments.rb#24 + def deployments(repo, options = T.unsafe(nil)); end + + # List all statuses for a Deployment + # + # @param deployment_url [String] A URL for a deployment resource + # @return [Array] A list of deployment statuses + # @see https://developer.github.com/v3/repos/deployments/#list-deployment-statuses + # + # source://octokit//lib/octokit/client/deployments.rb#61 + def list_deployment_statuses(deployment_url, options = T.unsafe(nil)); end + + # List all deployments for a repository + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @return [Array] A list of deployments + # @see https://developer.github.com/v3/repos/deployments/#list-deployments + # + # source://octokit//lib/octokit/client/deployments.rb#24 + def list_deployments(repo, options = T.unsafe(nil)); end +end + +# Methods for the Repo Downloads API +# +# @see https://developer.github.com/v3/repos/downloads/ +# +# source://octokit//lib/octokit/client/downloads.rb#8 +module Octokit::Client::Downloads + # Delete a single download for a repository + # + # @deprecated As of December 11th, 2012: https://github.com/blog/1302-goodbye-uploads + # @example Get the "Robawt" download from Github/Hubot + # Octokit.delete_download("github/hubot", 1234) + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param id [Integer] ID of the download + # @return [Boolean] Status + # @see https://developer.github.com/v3/repos/downloads/#delete-a-download + # + # source://octokit//lib/octokit/client/downloads.rb#44 + def delete_download(repo, id, options = T.unsafe(nil)); end + + # Get single download for a repository + # + # @deprecated As of December 11th, 2012: https://github.com/blog/1302-goodbye-uploads + # @example Get the "Robawt" download from Github/Hubot + # Octokit.download("github/hubot") + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param id [Integer] ID of the download + # @return [Sawyer::Resource] A single download from the repository + # @see https://developer.github.com/v3/repos/downloads/#get-a-single-download + # + # source://octokit//lib/octokit/client/downloads.rb#31 + def download(repo, id, options = T.unsafe(nil)); end + + # List available downloads for a repository + # + # @deprecated As of December 11th, 2012: https://github.com/blog/1302-goodbye-uploads + # @example List all downloads for Github/Hubot + # Octokit.downloads("github/hubot") + # @param repo [Integer, String, Repository, Hash] A Github Repository + # @return [Array] A list of available downloads + # @see https://developer.github.com/v3/repos/downloads/#list-downloads-for-a-repository + # + # source://octokit//lib/octokit/client/downloads.rb#17 + def downloads(repo, options = T.unsafe(nil)); end + + # List available downloads for a repository + # + # @deprecated As of December 11th, 2012: https://github.com/blog/1302-goodbye-uploads + # @example List all downloads for Github/Hubot + # Octokit.downloads("github/hubot") + # @param repo [Integer, String, Repository, Hash] A Github Repository + # @return [Array] A list of available downloads + # @see https://developer.github.com/v3/repos/downloads/#list-downloads-for-a-repository + # + # source://octokit//lib/octokit/client/downloads.rb#17 + def list_downloads(repo, options = T.unsafe(nil)); end +end + +# Methods for the Emojis API +# +# source://octokit//lib/octokit/client/emojis.rb#6 +module Octokit::Client::Emojis + # List all emojis used on GitHub + # + # @example List all emojis + # Octokit.emojis + # @return [Sawyer::Resource] A list of all emojis on GitHub + # @see https://developer.github.com/v3/emojis/#emojis + # + # source://octokit//lib/octokit/client/emojis.rb#13 + def emojis(options = T.unsafe(nil)); end +end + +# Methods for the Environments API +# +# @see https://docs.github.com/en/rest/deployments/environments +# +# source://octokit//lib/octokit/client/environments.rb#8 +module Octokit::Client::Environments + # Create or update an environment with protection rules, such as required reviewers + # + # @option options + # @option options + # @option options + # @param environment_name [String] The name of the environment + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] An environment + # @see https://docs.github.com/en/rest/deployments/environments#create-or-update-an-environment + # + # source://octokit//lib/octokit/client/environments.rb#43 + def create_or_update_environment(repo, environment_name, options = T.unsafe(nil)); end + + # Delete an Environment + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param environment_name [String] The name of the environment + # @return [No Content] + # @see https://docs.github.com/en/rest/deployments/environments#delete-an-environment + # + # source://octokit//lib/octokit/client/environments.rb#53 + def delete_environment(repo, environment_name, options = T.unsafe(nil)); end + + # Fetch a single environment for a repository + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param environment_name [String] The name of the environment + # @return [Sawyer::Resource] A single environment + # @see https://docs.github.com/en/rest/deployments/environments#get-an-environment + # + # source://octokit//lib/octokit/client/environments.rb#15 + def environment(repo, environment_name, options = T.unsafe(nil)); end + + # Lists the environments for a repository + # + # @option options + # @option options + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] Total count of environments and list of environments + # @see https://docs.github.com/en/rest/deployments/environments#list-environments + # + # source://octokit//lib/octokit/client/environments.rb#26 + def environments(repo, options = T.unsafe(nil)); end + + # Lists the environments for a repository + # + # @option options + # @option options + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] Total count of environments and list of environments + # @see https://docs.github.com/en/rest/deployments/environments#list-environments + # + # source://octokit//lib/octokit/client/environments.rb#26 + def list_environments(repo, options = T.unsafe(nil)); end +end + +# Method for the Events API +# +# @see https://developer.github.com/v3/activity/events/ +# @see https://developer.github.com/v3/issues/events/ +# +# source://octokit//lib/octokit/client/events.rb#9 +module Octokit::Client::Events + # Get information on a single Issue Event + # + # @example Get Event information for ID 3094334 (a pull request was closed) + # Octokit.issue_event("octokit/octokit.rb", 3094334) + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param number [Integer] Event number + # @return [Sawyer::Resource] A single Event for an Issue + # @see https://developer.github.com/v3/issues/events/#get-a-single-event + # + # source://octokit//lib/octokit/client/events.rb#146 + def issue_event(repo, number, options = T.unsafe(nil)); end + + # List events for an Issue + # + # @example List all issues events for issue #38 on octokit/octokit.rb + # Octokit.issue_events("octokit/octokit.rb", 38) + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param number [Integer] Issue number + # @return [Array] Array of events for that issue + # @see https://developer.github.com/v3/issues/events/#list-events-for-an-issue + # + # source://octokit//lib/octokit/client/events.rb#133 + def issue_events(repo, number, options = T.unsafe(nil)); end + + # List all events for an organization + # + # Requires authenticated client. + # + # @example List events for the lostisland organization + # @client.organization_events("lostisland") + # @param org [String] Organization GitHub handle + # @return [Array] List of all events from a GitHub organization + # @see https://developer.github.com/v3/activity/events/#list-events-for-an-organization + # + # source://octokit//lib/octokit/client/events.rb#95 + def organization_events(org, options = T.unsafe(nil)); end + + # List an organization's public events + # + # @example List public events for GitHub + # Octokit.organization_public_events("GitHub") + # @param org [String, Integer] Organization GitHub login or id. + # @return [Array] List of public events from a GitHub organization + # @see https://developer.github.com/v3/activity/events/#list-public-events-for-an-organization + # + # source://octokit//lib/octokit/client/events.rb#106 + def organization_public_events(org, options = T.unsafe(nil)); end + + # List all public events for GitHub + # + # @example List all pubilc events + # Octokit.public_events + # @return [Array] A list of all public events from GitHub + # @see https://developer.github.com/v3/activity/events/#list-public-events + # + # source://octokit//lib/octokit/client/events.rb#16 + def public_events(options = T.unsafe(nil)); end + + # List events that a user has received + # + # @example List all user received events + # Octokit.received_events("sferik") + # @param user [Integer, String] GitHub user login or id + # @return [Array] A list of all user received events + # @see https://developer.github.com/v3/activity/events/#list-events-that-a-user-has-received + # + # source://octokit//lib/octokit/client/events.rb#49 + def received_events(user, options = T.unsafe(nil)); end + + # List public events a user has received + # + # @example List public user received events + # Octokit.received_public_events("sferik") + # @param user [Integer, String] GitHub user login or id + # @return [Array] A list of public user received events + # @see https://developer.github.com/v3/activity/events/#list-public-events-that-a-user-has-received + # + # source://octokit//lib/octokit/client/events.rb#60 + def received_public_events(user, options = T.unsafe(nil)); end + + # Get all Issue Events for a given Repository + # + # @example Get all Issue Events for Octokit + # Octokit.repository_issue_events("octokit/octokit.rb") + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @return [Array] Array of all Issue Events for this Repository + # @see https://developer.github.com/v3/issues/events/#list-events-for-a-repository + # @see https://developer.github.com/v3/activity/events/#list-issue-events-for-a-repository + # + # source://octokit//lib/octokit/client/events.rb#119 + def repo_issue_events(repo, options = T.unsafe(nil)); end + + # List events for a repository + # + # @example List events for a repository + # Octokit.repository_events("sferik/rails_admin") + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @return [Array] A list of events for a repository + # @see https://developer.github.com/v3/activity/events/#list-repository-events + # + # source://octokit//lib/octokit/client/events.rb#71 + def repository_events(repo, options = T.unsafe(nil)); end + + # Get all Issue Events for a given Repository + # + # @example Get all Issue Events for Octokit + # Octokit.repository_issue_events("octokit/octokit.rb") + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @return [Array] Array of all Issue Events for this Repository + # @see https://developer.github.com/v3/issues/events/#list-events-for-a-repository + # @see https://developer.github.com/v3/activity/events/#list-issue-events-for-a-repository + # + # source://octokit//lib/octokit/client/events.rb#119 + def repository_issue_events(repo, options = T.unsafe(nil)); end + + # List public events for a repository's network + # + # @example List events for a repository's network + # Octokit.repository_network_events("sferik/rails_admin") + # @param repo [String, Repository, Hash] A GitHub repository + # @return [Array] A list of events for a repository's network + # @see https://developer.github.com/v3/activity/events/#list-public-events-for-a-network-of-repositories + # + # source://octokit//lib/octokit/client/events.rb#82 + def repository_network_events(repo, options = T.unsafe(nil)); end + + # List all user events + # + # @example List all user events + # Octokit.user_events("sferik") + # @param user [Integer, String] GitHub user login or id. + # @return [Array] A list of all user events + # @see https://developer.github.com/v3/activity/events/#list-events-performed-by-a-user + # + # source://octokit//lib/octokit/client/events.rb#27 + def user_events(user, options = T.unsafe(nil)); end + + # List public user events + # + # @example List public user events + # Octokit.user_events("sferik") + # @param user [Integer, String] GitHub user login or id + # @return [Array] A list of public user events + # @see https://developer.github.com/v3/activity/events/#list-public-events-performed-by-a-user + # + # source://octokit//lib/octokit/client/events.rb#38 + def user_public_events(user, options = T.unsafe(nil)); end +end + +# Methods for the Feeds API +# +# @see https://developer.github.com/v3/activity/feeds/ +# +# source://octokit//lib/octokit/client/feeds.rb#8 +module Octokit::Client::Feeds + # Get a Feed by name + # + # @param name [Symbol, String] Name of feed to retrieve. + # @return [Feed] Parsed feed in the format returned by the configured + # parser. + # + # source://octokit//lib/octokit/client/feeds.rb#25 + def feed(name, options = T.unsafe(nil)); end + + # List Feeds + # + # The feeds returned depend on authentication, see the GitHub API docs + # for more information. + # + # @return [Array] list of feeds + # @see https://developer.github.com/v3/activity/feeds/#list-feeds + # + # source://octokit//lib/octokit/client/feeds.rb#16 + def feeds; end +end + +# Methods for the Gists API +# +# @see https://developer.github.com/v3/gists/ +# +# source://octokit//lib/octokit/client/gists.rb#8 +module Octokit::Client::Gists + # Create a gist + # + # @option options + # @option options + # @option options + # @param options [Hash] Gist information. + # @return [Sawyer::Resource] Newly created gist info + # @see https://developer.github.com/v3/gists/#create-a-gist + # + # source://octokit//lib/octokit/client/gists.rb#71 + def create_gist(options = T.unsafe(nil)); end + + # Create gist comment + # + # Requires authenticated client. + # + # @example + # @client.create_gist_comment('3528645', 'This is very helpful.') + # @param gist_id [String] Id of the gist. + # @param comment [String] Comment contents. + # @return [Sawyer::Resource] Hash representing the new comment. + # @see https://developer.github.com/v3/gists/comments/#create-a-comment + # + # source://octokit//lib/octokit/client/gists.rb#198 + def create_gist_comment(gist_id, comment, options = T.unsafe(nil)); end + + # Delete a gist + # + # @param gist [String] Gist ID + # @return [Boolean] Indicating success of deletion + # @see https://developer.github.com/v3/gists/#delete-a-gist + # + # source://octokit//lib/octokit/client/gists.rb#161 + def delete_gist(gist, options = T.unsafe(nil)); end + + # Delete gist comment + # + # Requires authenticated client. + # + # @example + # @client.delete_gist_comment('208sdaz3', '586399') + # @param gist_id [String] Id of the gist. + # @param gist_comment_id [Integer] Id of the gist comment to delete. + # @return [Boolean] True if comment deleted, false otherwise. + # @see https://developer.github.com/v3/gists/comments/#delete-a-comment + # + # source://octokit//lib/octokit/client/gists.rb#229 + def delete_gist_comment(gist_id, gist_comment_id, options = T.unsafe(nil)); end + + # Edit a gist + # + # @example Update a gist + # @client.edit_gist('some_id', { + # :files => {"boo.md" => {"content" => "updated stuff"}} + # }) + # @option options + # @option options + # @param options [Hash] Gist information. + # @return [Sawyer::Resource] Newly created gist info + # @see https://developer.github.com/v3/gists/#edit-a-gist + # + # source://octokit//lib/octokit/client/gists.rb#93 + def edit_gist(gist, options = T.unsafe(nil)); end + + # Fork a gist + # + # @param gist [String] Gist ID + # @return [Sawyer::Resource] Data for the new gist + # @see https://developer.github.com/v3/gists/#fork-a-gist + # + # source://octokit//lib/octokit/client/gists.rb#141 + def fork_gist(gist, options = T.unsafe(nil)); end + + # Get a single gist + # + # @option options + # @param gist [String] ID of gist to fetch + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] Gist information + # @see https://developer.github.com/v3/gists/#get-a-single-gist + # @see https://developer.github.com/v3/gists/#get-a-specific-revision-of-a-gist + # + # source://octokit//lib/octokit/client/gists.rb#52 + def gist(gist, options = T.unsafe(nil)); end + + # Get gist comment + # + # @example + # Octokit.gist_comment('208sdaz3', 1451398) + # @param gist_id [String] Id of the gist. + # @param gist_comment_id [Integer] Id of the gist comment. + # @return [Sawyer::Resource] Hash representing gist comment. + # @see https://developer.github.com/v3/gists/comments/#get-a-single-comment + # + # source://octokit//lib/octokit/client/gists.rb#184 + def gist_comment(gist_id, gist_comment_id, options = T.unsafe(nil)); end + + # List gist comments + # + # @example + # Octokit.gist_comments('3528ae645') + # @param gist_id [String] Gist Id. + # @return [Array] Array of hashes representing comments. + # @see https://developer.github.com/v3/gists/comments/#list-comments-on-a-gist + # + # source://octokit//lib/octokit/client/gists.rb#172 + def gist_comments(gist_id, options = T.unsafe(nil)); end + + # List gist commits + # + # @example List commits for a gist + # @client.gist_commits('some_id') + # @param gist [String] Gist ID + # @return [Array] List of commits to the gist + # @see https://developer.github.com/v3/gists/#list-gist-commits + # + # source://octokit//lib/octokit/client/gists.rb#104 + def gist_commits(gist, options = T.unsafe(nil)); end + + # List gist forks + # + # @example List gist forks + # @client.gist_forks('some-id') + # @param gist [String] Gist ID + # @return [Array] List of gist forks + # @see https://developer.github.com/v3/gists/#list-gist-forks + # + # source://octokit//lib/octokit/client/gists.rb#152 + def gist_forks(gist, options = T.unsafe(nil)); end + + # Check if a gist is starred + # + # @param gist [String] Gist ID + # @return [Boolean] Indicates if gist is starred + # @see https://developer.github.com/v3/gists/#check-if-a-gist-is-starred + # + # source://octokit//lib/octokit/client/gists.rb#132 + def gist_starred?(gist, options = T.unsafe(nil)); end + + # List gists for a user or all public gists + # + # @example Fetch all gists for defunkt + # Octokit.gists('defunkt') + # @example Fetch all public gists + # Octokit.gists + # @param user [String] An optional user to filter listing + # @return [Array] A list of gists + # @see https://developer.github.com/v3/gists/#list-gists + # + # source://octokit//lib/octokit/client/gists.rb#18 + def gists(user = T.unsafe(nil), options = T.unsafe(nil)); end + + # List gists for a user or all public gists + # + # @example Fetch all gists for defunkt + # Octokit.gists('defunkt') + # @example Fetch all public gists + # Octokit.gists + # @param user [String] An optional user to filter listing + # @return [Array] A list of gists + # @see https://developer.github.com/v3/gists/#list-gists + # + # source://octokit//lib/octokit/client/gists.rb#18 + def list_gists(user = T.unsafe(nil), options = T.unsafe(nil)); end + + # List public gists + # + # @example Fetch all public gists + # Octokit.public_gists + # @return [Array] A list of gists + # @see https://developer.github.com/v3/gists/#list-gists + # + # source://octokit//lib/octokit/client/gists.rb#33 + def public_gists(options = T.unsafe(nil)); end + + # Star a gist + # + # @param gist [String] Gist ID + # @return [Boolean] Indicates if gist is starred successfully + # @see https://developer.github.com/v3/gists/#star-a-gist + # + # source://octokit//lib/octokit/client/gists.rb#114 + def star_gist(gist, options = T.unsafe(nil)); end + + # List the authenticated user’s starred gists + # + # @return [Array] A list of gists + # @see https://developer.github.com/v3/gists/#list-gists + # + # source://octokit//lib/octokit/client/gists.rb#41 + def starred_gists(options = T.unsafe(nil)); end + + # Unstar a gist + # + # @param gist [String] Gist ID + # @return [Boolean] Indicates if gist is unstarred successfully + # @see https://developer.github.com/v3/gists/#unstar-a-gist + # + # source://octokit//lib/octokit/client/gists.rb#123 + def unstar_gist(gist, options = T.unsafe(nil)); end + + # Update gist comment + # + # Requires authenticated client + # + # @example + # @client.update_gist_comment('208sdaz3', '3528645', ':heart:') + # @param gist_id [String] Id of the gist. + # @param gist_comment_id [Integer] Id of the gist comment to update. + # @param comment [String] Updated comment contents. + # @return [Sawyer::Resource] Hash representing the updated comment. + # @see https://developer.github.com/v3/gists/comments/#edit-a-comment + # + # source://octokit//lib/octokit/client/gists.rb#214 + def update_gist_comment(gist_id, gist_comment_id, comment, options = T.unsafe(nil)); end +end + +# Methods for the Gitignore API +# +# @see https://developer.github.com/v3/gitignore/ +# +# source://octokit//lib/octokit/client/gitignore.rb#8 +module Octokit::Client::Gitignore + # Get a gitignore template. + # + # Use the raw {http://developer.github.com/v3/media/ media type} to get + # the raw contents. + # + # @example Get the Ruby gitignore template + # @client.gitignore_template('Ruby') + # @param template_name [String] Name of the template. Template names are + # case sensitive, make sure to use a valid name from the + # .gitignore_templates list. + # @return [Sawyer::Resource] Gitignore template + # @see https://developer.github.com/v3/gitignore/#get-a-single-template + # + # source://octokit//lib/octokit/client/gitignore.rb#38 + def gitignore_template(template_name, options = T.unsafe(nil)); end + + # Listing available gitignore templates. + # + # These templates can be passed option when creating a repository. + # + # @example Git all the gitignore templates + # @client.gitignore_templates + # @return [Array] List of templates. + # @see https://developer.github.com/v3/gitignore/#listing-available-templates + # + # source://octokit//lib/octokit/client/gitignore.rb#19 + def gitignore_templates(options = T.unsafe(nil)); end +end + +# Methods for the Hooks API +# +# source://octokit//lib/octokit/client/hooks.rb#6 +module Octokit::Client::Hooks + # Create a hook + # + # Requires authenticated client. + # + # @example + # @client.create_hook( + # 'octokit/octokit.rb', + # 'web', + # { + # :url => 'http://something.com/webhook', + # :content_type => 'json' + # }, + # { + # :events => ['push', 'pull_request'], + # :active => true + # } + # ) + # @option options + # @option options + # @param options [Hash] a customizable set of options + # @param config [Hash] A Hash containing key/value pairs to provide + # settings for this hook. These settings vary between the services and + # are defined in the {https://github.com/github/github-services github-services} repo. + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @param name [String] The name of the service that is being called. See + # {https://api.github.com/hooks Hooks} for the possible names. + # @return [Sawyer::Resource] Hook info for the new hook + # @see https://api.github.com/hooks + # @see https://github.com/github/github-services + # @see https://developer.github.com/v3/repos/hooks/#create-a-hook + # + # source://octokit//lib/octokit/client/hooks.rb#65 + def create_hook(repo, name, config, options = T.unsafe(nil)); end + + # Create an org hook + # + # Requires client authenticated as admin for the org. + # + # @example + # @client.create_org_hook( + # 'octokit', + # { + # :url => 'http://something.com/webhook', + # :content_type => 'json' + # }, + # { + # :events => ['push', 'pull_request'], + # :active => true + # } + # ) + # @option options + # @option options + # @param config [Hash] A Hash containing key/value pairs to provide + # settings for this hook. + # @param org [String, Integer] Organization GitHub login or id. + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] Hook info for the new hook + # @see https://api.github.com/hooks + # @see https://developer.github.com/v3/orgs/hooks/#create-a-hook + # + # source://octokit//lib/octokit/client/hooks.rb#209 + def create_org_hook(org, config, options = T.unsafe(nil)); end + + # Edit a hook + # + # Requires authenticated client. + # + # @example + # @client.edit_hook( + # 'octokit/octokit.rb', + # 100000, + # 'web', + # { + # :url => 'http://something.com/webhook', + # :content_type => 'json' + # }, + # { + # :add_events => ['status'], + # :remove_events => ['pull_request'], + # :active => true + # } + # ) + # @option options + # @option options + # @option options + # @option options + # @param name [String] The name of the service that is being called. See + # {https://api.github.com/hooks Hooks} for the possible names. + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @param id [Integer] Id of the hook being updated. + # @param config [Hash] A Hash containing key/value pairs to provide + # settings for this hook. These settings vary between the services and + # are defined in the {https://github.com/github/github-services github-services} repo. + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] Hook info for the updated hook + # @see https://api.github.com/hooks + # @see https://github.com/github/github-services + # @see https://developer.github.com/v3/repos/hooks/#edit-a-hook + # + # source://octokit//lib/octokit/client/hooks.rb#108 + def edit_hook(repo, id, name, config, options = T.unsafe(nil)); end + + # Update an org hook + # + # Requires client authenticated as admin for the org. + # + # @example + # @client.edit_org_hook( + # 'octokit', + # 123, + # { + # :url => 'http://something.com/webhook', + # :content_type => 'json' + # }, + # { + # :events => ['push', 'pull_request'], + # :active => true + # } + # ) + # @option options + # @option options + # @param options [Hash] a customizable set of options + # @param config [Hash] A Hash containing key/value pairs to provide + # settings for this hook. + # @param org [String, Integer] Organization GitHub login or id. + # @param id [Integer] Id of the hook to update. + # @return [Sawyer::Resource] Hook info for the new hook + # @see https://api.github.com/hooks + # @see https://developer.github.com/v3/orgs/hooks/#edit-a-hook + # + # source://octokit//lib/octokit/client/hooks.rb#242 + def edit_org_hook(org, id, config, options = T.unsafe(nil)); end + + # Get single hook + # + # Requires authenticated client. + # + # @example + # @client.hook('octokit/octokit.rb', 100000) + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @param id [Integer] Id of the hook to get. + # @return [Sawyer::Resource] Hash representing hook. + # @see https://developer.github.com/v3/repos/hooks/#get-single-hook + # + # source://octokit//lib/octokit/client/hooks.rb#30 + def hook(repo, id, options = T.unsafe(nil)); end + + # List repo hooks + # + # Requires authenticated client. + # + # @example + # @client.hooks('octokit/octokit.rb') + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @return [Array] Array of hashes representing hooks. + # @see https://developer.github.com/v3/repos/hooks/#list-hooks + # + # source://octokit//lib/octokit/client/hooks.rb#16 + def hooks(repo, options = T.unsafe(nil)); end + + # List org hooks + # + # Requires client authenticated as admin for the org. + # + # @example + # @client.org_hooks('octokit') + # @param org [String, Integer] Organization GitHub login or id. + # @return [Array] Array of hashes representing hooks. + # @see https://developer.github.com/v3/orgs/hooks/#list-hooks + # + # source://octokit//lib/octokit/client/hooks.rb#164 + def list_org_hooks(org, options = T.unsafe(nil)); end + + # Get an org hook + # + # Requires client authenticated as admin for the org. + # + # @example + # @client.org_hook('octokit', 123) + # @param org [String, Integer] Organization GitHub login or id. + # @param id [Integer] Id of the hook to get. + # @return [Sawyer::Resource] Hash representing hook. + # @see https://developer.github.com/v3/orgs/hooks/#get-single-hook + # + # source://octokit//lib/octokit/client/hooks.rb#179 + def org_hook(org, id, options = T.unsafe(nil)); end + + # List org hooks + # + # Requires client authenticated as admin for the org. + # + # @example + # @client.org_hooks('octokit') + # @param org [String, Integer] Organization GitHub login or id. + # @return [Array] Array of hashes representing hooks. + # @see https://developer.github.com/v3/orgs/hooks/#list-hooks + # + # source://octokit//lib/octokit/client/hooks.rb#164 + def org_hooks(org, options = T.unsafe(nil)); end + + # Parse payload string + # + # @param payload_string [String] The payload + # @return [Sawyer::Resource] The payload object + # @see https://developer.github.com/v3/activity/events/types/ + # + # source://octokit//lib/octokit/client/hooks.rb#281 + def parse_payload(payload_string); end + + # Ping hook + # + # Requires authenticated client. + # + # @example + # @client.ping_hook('octokit/octokit.rb', 1000000) + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @param id [Integer] Id of the hook to send a ping. + # @return [Boolean] Ping requested? + # @see https://developer.github.com/v3/repos/hooks/#ping-a-hook + # + # source://octokit//lib/octokit/client/hooks.rb#151 + def ping_hook(repo, id, options = T.unsafe(nil)); end + + # Ping org hook + # + # Requires client authenticated as admin for the org. + # + # @example + # @client.ping_org_hook('octokit', 1000000) + # @param org [String, Integer] Organization GitHub login or id. + # @param id [Integer] Id of the hook to update. + # @return [Boolean] Success + # @see https://developer.github.com/v3/orgs/hooks/#ping-a-hook + # + # source://octokit//lib/octokit/client/hooks.rb#258 + def ping_org_hook(org, id, options = T.unsafe(nil)); end + + # Delete hook + # + # Requires authenticated client. + # + # @example + # @client.remove_hook('octokit/octokit.rb', 1000000) + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @param id [Integer] Id of the hook to remove. + # @return [Boolean] True if hook removed, false otherwise. + # @see https://developer.github.com/v3/repos/hooks/#delete-a-hook + # + # source://octokit//lib/octokit/client/hooks.rb#123 + def remove_hook(repo, id, options = T.unsafe(nil)); end + + # Remove org hook + # + # Requires client authenticated as admin for the org. + # + # @example + # @client.remove_org_hook('octokit', 1000000) + # @param org [String, Integer] Organization GitHub login or id. + # @param id [Integer] Id of the hook to update. + # @return [Boolean] True if hook removed, false otherwise. + # @see https://developer.github.com/v3/orgs/hooks/#delete-a-hook + # + # source://octokit//lib/octokit/client/hooks.rb#272 + def remove_org_hook(org, id, options = T.unsafe(nil)); end + + # Test hook + # + # Requires authenticated client. + # + # @example + # @client.test_hook('octokit/octokit.rb', 1000000) + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @param id [Integer] Id of the hook to test. + # @return [Boolean] Success + # @see https://developer.github.com/v3/repos/hooks/#test-a-push-hook + # + # source://octokit//lib/octokit/client/hooks.rb#137 + def test_hook(repo, id, options = T.unsafe(nil)); end + + # Update an org hook + # + # Requires client authenticated as admin for the org. + # + # @example + # @client.edit_org_hook( + # 'octokit', + # 123, + # { + # :url => 'http://something.com/webhook', + # :content_type => 'json' + # }, + # { + # :events => ['push', 'pull_request'], + # :active => true + # } + # ) + # @option options + # @option options + # @param options [Hash] a customizable set of options + # @param config [Hash] A Hash containing key/value pairs to provide + # settings for this hook. + # @param org [String, Integer] Organization GitHub login or id. + # @param id [Integer] Id of the hook to update. + # @return [Sawyer::Resource] Hook info for the new hook + # @see https://api.github.com/hooks + # @see https://developer.github.com/v3/orgs/hooks/#edit-a-hook + # + # source://octokit//lib/octokit/client/hooks.rb#242 + def update_org_hook(org, id, config, options = T.unsafe(nil)); end +end + +# Methods for the Issues API +# +# @see https://developer.github.com/v3/issues/ +# +# source://octokit//lib/octokit/client/issues.rb#8 +module Octokit::Client::Issues + # Add assignees to an issue + # + # @example Add assignees "pengwynn" and "joeyw" to Issue #23 on octokit/octokit.rb + # Octokit.add_assignees("octokit/octokit.rb", 23, ["pengwynn", "joeyw"]) + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param number [Integer] Issue number + # @param assignees [Array] Assignees to be added + # @return [Sawyer::Resource] Issue + # @see https://developer.github.com/v3/issues/assignees/#add-assignees-to-an-issue + # + # source://octokit//lib/octokit/client/issues.rb#344 + def add_assignees(repo, number, assignees, options = T.unsafe(nil)); end + + # Add a comment to an issue + # + # @example Add the comment "Almost to v1" to Issue #23 on octokit/octokit.rb + # Octokit.add_comment("octokit/octokit.rb", 23, "Almost to v1") + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param number [Integer] Issue number + # @param comment [String] Comment to be added + # @return [Sawyer::Resource] Comment + # @see https://developer.github.com/v3/issues/comments/#create-a-comment + # + # source://octokit//lib/octokit/client/issues.rb#283 + def add_comment(repo, number, comment, options = T.unsafe(nil)); end + + # Close an issue + # + # @example Close Issue #25 from octokit/octokit.rb + # Octokit.close_issue("octokit/octokit.rb", "25") + # @option options + # @option options + # @option options + # @option options + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param number [Integer] Number ID of the issue + # @param options [Hash] A customizable set of options. + # @return [Sawyer::Resource] The updated Issue + # @see https://developer.github.com/v3/issues/#edit-an-issue + # + # source://octokit//lib/octokit/client/issues.rb#131 + def close_issue(repo, number, options = T.unsafe(nil)); end + + # Create an issue for a repository + # + # @example Create a new Issues for a repository + # Octokit.create_issue("sferik/rails_admin", 'Updated Docs', 'Added some extra links') + # @option options + # @option options + # @option options + # @option options + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param title [String] A descriptive title + # @param body [String] An optional concise description + # @param options [Hash] A customizable set of options. + # @return [Sawyer::Resource] Your newly created issue + # @see https://developer.github.com/v3/issues/#create-an-issue + # + # source://octokit//lib/octokit/client/issues.rb#91 + def create_issue(repo, title, body = T.unsafe(nil), options = T.unsafe(nil)); end + + # Delete a single comment + # + # @example Delete the comment #1194549 on an issue on octokit/octokit.rb + # Octokit.delete_comment("octokit/octokit.rb", 1194549) + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param number [Integer] Comment number + # @return [Boolean] Success + # @see https://developer.github.com/v3/issues/comments/#delete-a-comment + # + # source://octokit//lib/octokit/client/issues.rb#308 + def delete_comment(repo, number, options = T.unsafe(nil)); end + + # Get a single issue from a repository + # + # @example Get issue #25 from octokit/octokit.rb + # Octokit.issue("octokit/octokit.rb", "25") + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param number [Integer] Number ID of the issue + # @return [Sawyer::Resource] The issue you requested, if it exists + # @see https://developer.github.com/v3/issues/#get-a-single-issue + # + # source://octokit//lib/octokit/client/issues.rb#114 + def issue(repo, number, options = T.unsafe(nil)); end + + # Get a single comment attached to an issue + # + # @example Get comment #1194549 from an issue on octokit/octokit.rb + # Octokit.issue_comment("octokit/octokit.rb", 1194549) + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param number [Integer] Number ID of the comment + # @return [Sawyer::Resource] The specific comment in question + # @see https://developer.github.com/v3/issues/comments/#get-a-single-comment + # + # source://octokit//lib/octokit/client/issues.rb#270 + def issue_comment(repo, number, options = T.unsafe(nil)); end + + # Get all comments attached to an issue + # + # @example Get comments for issue #25 from octokit/octokit.rb + # Octokit.issue_comments("octokit/octokit.rb", "25") + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param number [Integer] Number ID of the issue + # @return [Array] Array of comments that belong to an issue + # @see https://developer.github.com/v3/issues/comments/#list-comments-on-an-issue + # + # source://octokit//lib/octokit/client/issues.rb#258 + def issue_comments(repo, number, options = T.unsafe(nil)); end + + # Get the timeline for an issue + # + # @example Get timeline for issue #1435 on octokit/octokit.rb + # Octokit.issue_timeline("octokit/octokit.rb", 1435) + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param number [Integer] Number ID of the comment + # @return [Sawyer::Resource] The timeline for this issue + # @see https://developer.github.com/v3/issues/timeline/ + # + # source://octokit//lib/octokit/client/issues.rb#320 + def issue_timeline(repo, number, options = T.unsafe(nil)); end + + # List issues for the authenticated user or repository + # + # @example List issues for the authenticated user across repositories + # @client = Octokit::Client.new(:login => 'foo', :password => 'bar') + # @client.list_issues + # @example List issues for a repository + # Octokit.list_issues("sferik/rails_admin") + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @param repository [Integer, String, Repository, Hash] A GitHub repository. + # @param options [Sawyer::Resource] A customizable set of options. + # @return [Array] A list of issues for a repository. + # @see https://developer.github.com/v3/issues/#list-issues-for-a-repository + # @see https://developer.github.com/v3/issues/#list-issues + # + # source://octokit//lib/octokit/client/issues.rb#30 + def issues(repository = T.unsafe(nil), options = T.unsafe(nil)); end + + # Get all comments attached to issues for the repository + # + # By default, Issue Comments are ordered by ascending ID. + # + # @example Get issues comments, sort by updated descending since a time + # @client.issues_comments("octokit/octokit.rb", { + # :sort => 'desc', + # :direction => 'asc', + # :since => '2010-05-04T23:45:02Z' + # }) + # @example Get the comments for issues in the octokit repository + # @client.issues_comments("octokit/octokit.rb") + # @option options + # @option options + # @option options + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param options [Hash] Optional parameters + # @return [Array] List of issues comments. + # @see https://developer.github.com/v3/issues/comments/#list-comments-in-a-repository + # + # source://octokit//lib/octokit/client/issues.rb#246 + def issues_comments(repo, options = T.unsafe(nil)); end + + # Lists the available assignees for issues in a repository. + # + # @example Get available assignees on repository octokit/octokit.rb + # Octokit.list_assignees("octokit/octokit.rb") + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @return [Array] List of GitHub users. + # @see https://developer.github.com/v3/issues/assignees/#list-assignees + # + # source://octokit//lib/octokit/client/issues.rb#331 + def list_assignees(repo, options = T.unsafe(nil)); end + + # List issues for the authenticated user or repository + # + # @example List issues for the authenticated user across repositories + # @client = Octokit::Client.new(:login => 'foo', :password => 'bar') + # @client.list_issues + # @example List issues for a repository + # Octokit.list_issues("sferik/rails_admin") + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @param repository [Integer, String, Repository, Hash] A GitHub repository. + # @param options [Sawyer::Resource] A customizable set of options. + # @return [Array] A list of issues for a repository. + # @see https://developer.github.com/v3/issues/#list-issues-for-a-repository + # @see https://developer.github.com/v3/issues/#list-issues + # + # source://octokit//lib/octokit/client/issues.rb#30 + def list_issues(repository = T.unsafe(nil), options = T.unsafe(nil)); end + + # Lock an issue's conversation, limiting it to collaborators + # + # @example Lock Issue #25 from octokit/octokit.rb + # Octokit.lock_issue("octokit/octokit.rb", "25") + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param number [Integer] Number ID of the issue + # @return [Boolean] Success + # @see https://developer.github.com/v3/issues/#lock-an-issue + # + # source://octokit//lib/octokit/client/issues.rb#160 + def lock_issue(repo, number, options = T.unsafe(nil)); end + + # Create an issue for a repository + # + # @example Create a new Issues for a repository + # Octokit.create_issue("sferik/rails_admin", 'Updated Docs', 'Added some extra links') + # @option options + # @option options + # @option options + # @option options + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param title [String] A descriptive title + # @param body [String] An optional concise description + # @param options [Hash] A customizable set of options. + # @return [Sawyer::Resource] Your newly created issue + # @see https://developer.github.com/v3/issues/#create-an-issue + # + # source://octokit//lib/octokit/client/issues.rb#91 + def open_issue(repo, title, body = T.unsafe(nil), options = T.unsafe(nil)); end + + # List all issues for a given organization for the authenticated user + # + # @example List all issues for a given organization for the authenticated user + # @client = Octokit::Client.new(:login => 'foo', :password => 'bar') + # @client.org_issues("octokit") + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @param org [String, Integer] Organization GitHub login or id. + # @param options [Sawyer::Resource] A customizable set of options. + # @return [Array] A list of issues. + # @see https://developer.github.com/v3/issues/#list-issues + # + # source://octokit//lib/octokit/client/issues.rb#73 + def org_issues(org, options = T.unsafe(nil)); end + + # Remove assignees from an issue + # + # @example Remove assignees "pengwynn" and "joeyw" from Issue #23 on octokit/octokit.rb + # Octokit.remove_assignees("octokit/octokit.rb", 23, ["pengwynn", "joeyw"]) + # @example Remove assignees "pengwynn" from Issue #23 on octokit/octokit.rb + # Octokit.remove_assignees("octokit/octokit.rb", 23, ["pengwynn"], + # :accept => "application/vnd.github.v3+json") + # @param number [Integer] Issue number + # @param options [Hash] Header params for request + # @param assignees [Array] Assignees to be removed + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @return [Sawyer::Resource] Issue + # @see https://developer.github.com/v3/issues/assignees/#remove-assignees-from-an-issue + # + # source://octokit//lib/octokit/client/issues.rb#362 + def remove_assignees(repo, number, assignees, options = T.unsafe(nil)); end + + # Reopen an issue + # + # @example Reopen Issue #25 from octokit/octokit.rb + # Octokit.reopen_issue("octokit/octokit.rb", "25") + # @option options + # @option options + # @option options + # @option options + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param number [Integer] Number ID of the issue + # @param options [Hash] A customizable set of options. + # @return [Sawyer::Resource] The updated Issue + # @see https://developer.github.com/v3/issues/#edit-an-issue + # + # source://octokit//lib/octokit/client/issues.rb#148 + def reopen_issue(repo, number, options = T.unsafe(nil)); end + + # Unlock an issue's conversation, opening it to all viewers + # + # @example Unlock Issue #25 from octokit/octokit.rb + # Octokit.close_issue("octokit/octokit.rb", "25") + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param number [Integer] Number ID of the issue + # @return [Boolean] Success + # @see https://developer.github.com/v3/issues/#unlock-an-issue + # + # source://octokit//lib/octokit/client/issues.rb#172 + def unlock_issue(repo, number, options = T.unsafe(nil)); end + + # Update a single comment on an issue + # + # @example Update the comment #1194549 with body "I've started this on my 25-issue-comments-v3 fork" on an issue on octokit/octokit.rb + # Octokit.update_comment("octokit/octokit.rb", 1194549, "Almost to v1, added this on my fork") + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param number [Integer] Comment number + # @param comment [String] Body of the comment which will replace the existing body. + # @return [Sawyer::Resource] Comment + # @see https://developer.github.com/v3/issues/comments/#edit-a-comment + # + # source://octokit//lib/octokit/client/issues.rb#296 + def update_comment(repo, number, comment, options = T.unsafe(nil)); end + + # Update an issue + # + # @example Change only the assignee of Issue #25 + # Octokit.update_issue("octokit/octokit.rb", "25", :assignee => "pengwynn") + # @example Change the title of Issue #25 + # Octokit.update_issue("octokit/octokit.rb", "25", "A new title", "the same body") + # @option options + # @overload update_issue + # @overload update_issue + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] The updated Issue + # @see https://developer.github.com/v3/issues/#edit-an-issue + # + # source://octokit//lib/octokit/client/issues.rb#209 + def update_issue(repo, number, *args); end + + # List all issues across owned and member repositories for the authenticated user + # + # @example List issues for the authenticated user across owned and member repositories + # @client = Octokit::Client.new(:login => 'foo', :password => 'bar') + # @client.user_issues + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @param options [Sawyer::Resource] A customizable set of options. + # @return [Array] A list of issues for a repository. + # @see https://developer.github.com/v3/issues/#list-issues + # + # source://octokit//lib/octokit/client/issues.rb#52 + def user_issues(options = T.unsafe(nil)); end +end + +# Methods for the Issue Labels API +# +# @see https://developer.github.com/v3/issues/labels/ +# +# source://octokit//lib/octokit/client/labels.rb#10 +module Octokit::Client::Labels + # Add a label to a repository + # + # @example Add a new label "Version 1.0" with color "#cccccc" + # Octokit.add_label("octokit/octokit.rb", "Version 1.0", "cccccc") + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param label [String] A new label + # @param color [String] A color, in hex, without the leading # + # @return [Sawyer::Resource] The new label + # @see https://developer.github.com/v3/issues/labels/#create-a-label + # + # source://octokit//lib/octokit/client/labels.rb#43 + def add_label(repo, label, color = T.unsafe(nil), options = T.unsafe(nil)); end + + # Add label(s) to an Issue + # + # @example Add two labels for octokit/octokit.rb + # Octokit.add_labels_to_an_issue("octokit/octokit.rb", 10, ['V3 Transition', 'Improvement']) + # @param repo [Integer, String, Repository, Hash] A Github repository + # @param number [Integer] Number ID of the issue + # @param labels [Array] An array of labels to apply to this Issue + # @return [Array] A list of the labels currently on the issue + # @see https://developer.github.com/v3/issues/labels/#add-labels-to-an-issue + # + # source://octokit//lib/octokit/client/labels.rb#126 + def add_labels_to_an_issue(repo, number, labels); end + + # Delete a label from a repository. + # + # This deletes the label from the repository, and removes it from all issues. + # + # @example Delete the label "Version 1.0" from the repository. + # Octokit.delete_label!("octokit/octokit.rb", "Version 1.0") + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param label [String] String name of the label + # @return [Boolean] Success + # @see https://developer.github.com/v3/issues/labels/#delete-a-label + # + # source://octokit//lib/octokit/client/labels.rb#72 + def delete_label!(repo, label, options = T.unsafe(nil)); end + + # Get single label for a repository + # + # @example Get the "V3 Addition" label from octokit/octokit.rb + # Octokit.label("octokit/octokit.rb", "V3 Addition") + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param name [String] Name of the label + # @return [Sawyer::Resource] A single label from the repository + # @see https://developer.github.com/v3/issues/labels/#get-a-single-label + # + # source://octokit//lib/octokit/client/labels.rb#30 + def label(repo, name, options = T.unsafe(nil)); end + + # List available labels for a repository + # + # @example List labels for octokit/octokit.rb + # Octokit.labels("octokit/octokit.rb") + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @return [Array] A list of the labels across the repository + # @see https://developer.github.com/v3/issues/labels/#list-all-labels-for-this-repository + # + # source://octokit//lib/octokit/client/labels.rb#18 + def labels(repo, options = T.unsafe(nil)); end + + # List labels for a given issue + # + # @example List labels for octokit/octokit.rb, issue # 1 + # Octokit.labels_for_issue("octokit/octokit.rb", 1) + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param number [Integer] Number ID of the issue + # @return [Array] A list of the labels currently on the issue + # @see https://developer.github.com/v3/issues/labels/#list-labels-on-an-issue + # + # source://octokit//lib/octokit/client/labels.rb#113 + def labels_for_issue(repo, number, options = T.unsafe(nil)); end + + # Get labels for every issue in a milestone + # + # @example List all labels for milestone #2 on octokit/octokit.rb + # Octokit.labels_for_milestone("octokit/octokit.rb", 2) + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param number [Integer] Number ID of the milestone + # @return [Array] A list of the labels across the milestone + # @see http://developer.github.com/v3/issues/labels/#get-labels-for-every-issue-in-a-milestone + # + # source://octokit//lib/octokit/client/labels.rb#151 + def labels_for_milestone(repo, number, options = T.unsafe(nil)); end + + # Remove all label from an Issue + # + # This removes the label from the Issue + # + # @example Remove all labels from Issue #23 + # Octokit.remove_all_labels("octokit/octokit.rb", 23) + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param number [Integer] Number ID of the issue + # @return [Boolean] Success of operation + # @see https://developer.github.com/v3/issues/labels/#remove-all-labels-from-an-issue + # + # source://octokit//lib/octokit/client/labels.rb#101 + def remove_all_labels(repo, number, options = T.unsafe(nil)); end + + # Remove a label from an Issue + # + # This removes the label from the Issue + # + # @example Remove the label "Version 1.0" from the repository. + # Octokit.remove_label("octokit/octokit.rb", 23, "Version 1.0") + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param number [Integer] Number ID of the issue + # @param label [String] String name of the label + # @return [Array] A list of the labels currently on the issue + # @see https://developer.github.com/v3/issues/labels/#remove-a-label-from-an-issue + # + # source://octokit//lib/octokit/client/labels.rb#87 + def remove_label(repo, number, label, options = T.unsafe(nil)); end + + # Replace all labels on an Issue + # + # @example Replace labels for octokit/octokit.rb Issue #10 + # Octokit.replace_all_labels("octokit/octokit.rb", 10, ['V3 Transition', 'Improvement']) + # @param repo [Integer, String, Repository, Hash] A Github repository + # @param number [Integer] Number ID of the issue + # @param labels [Array] An array of labels to use as replacement + # @return [Array] A list of the labels currently on the issue + # @see https://developer.github.com/v3/issues/labels/#replace-all-labels-for-an-issue + # + # source://octokit//lib/octokit/client/labels.rb#139 + def replace_all_labels(repo, number, labels, _options = T.unsafe(nil)); end + + # Update a label + # + # @example Update the label "Version 1.0" with new color "#cceeaa" + # Octokit.update_label("octokit/octokit.rb", "Version 1.0", {:color => "cceeaa"}) + # @option options + # @option options + # @param label [String] The name of the label which will be updated + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param options [Hash] A customizable set of options. + # @return [Sawyer::Resource] The updated label + # @see https://developer.github.com/v3/issues/labels/#update-a-label + # + # source://octokit//lib/octokit/client/labels.rb#58 + def update_label(repo, label, options = T.unsafe(nil)); end +end + +# Methods for the Legacy Search API +# +# @see https://developer.github.com/v3/search/ +# +# source://octokit//lib/octokit/client/legacy_search.rb#8 +module Octokit::Client::LegacySearch + # Legacy search issues within a repository + # + # @example Search for 'test' in the open issues for sferik/rails_admin + # Octokit.search_issues("sferik/rails_admin", 'test', 'open') + # @param repo [String, Repository, Hash] A GitHub repository + # @param search_term [String] The term to search for + # @param state [String] :state (open) open or closed. + # @return [Array] A list of issues matching the search term and state + # + # source://octokit//lib/octokit/client/legacy_search.rb#26 + def legacy_search_issues(repo, search_term, state = T.unsafe(nil), options = T.unsafe(nil)); end + + # Legacy repository search + # + # @param q [String] Search keyword + # @return [Array] List of repositories found + # @see https://developer.github.com/v3/search/#search-repositories + # + # source://octokit//lib/octokit/client/legacy_search.rb#14 + def legacy_search_repositories(q, options = T.unsafe(nil)); end + + # Search for user. + # + # @example + # Octokit.search_users('pengwynn') + # @param search [String] User to search for. + # @return [Array] Array of hashes representing users. + # @see https://developer.github.com/v3/search/#search-users + # + # source://octokit//lib/octokit/client/legacy_search.rb#37 + def legacy_search_users(search, options = T.unsafe(nil)); end +end + +# source://octokit//lib/octokit/client/licenses.rb#7 +module Octokit::Client::Licenses + # source://octokit//lib/octokit/client/licenses.rb#25 + def license(license_name, options = T.unsafe(nil)); end + + # source://octokit//lib/octokit/client/licenses.rb#14 + def licenses(options = T.unsafe(nil)); end + + # source://octokit//lib/octokit/client/licenses.rb#37 + def repository_license_contents(repo, options = T.unsafe(nil)); end +end + +# Methods for the Markdown API +# +# @see https://developer.github.com/v3/markdown/ +# +# source://octokit//lib/octokit/client/markdown.rb#8 +module Octokit::Client::Markdown + # Render an arbitrary Markdown document + # + # @example Render some GFM + # Octokit.markdown('Fixed in #111', :mode => "gfm", :context => "octokit/octokit.rb") + # @option options + # @option options + # @param text [String] Markdown source + # @param options [Hash] a customizable set of options + # @return [String] HTML renderization + # @see https://developer.github.com/v3/markdown/#render-an-arbitrary-markdown-document + # + # source://octokit//lib/octokit/client/markdown.rb#18 + def markdown(text, options = T.unsafe(nil)); end +end + +# Methods for the Marketplace Listing API +# +# @see https://developer.github.com/v3/apps/marketplace/ +# +# source://octokit//lib/octokit/client/marketplace.rb#8 +module Octokit::Client::Marketplace + # List all GitHub accounts on a specific plan + # + # @param plan_id [Integer] The id of the GitHub plan + # @param options [Hash] A customizable set of options + # @return [Array] A list of accounts + # @see https://developer.github.com/v3/apps/marketplace/#list-all-github-accounts-user-or-organization-on-a-specific-plan + # + # source://octokit//lib/octokit/client/marketplace.rb#28 + def list_accounts_for_plan(plan_id, options = T.unsafe(nil)); end + + # List all plans for an app's marketplace listing + # + # @param options [Hash] A customizable set of options + # @return [Array] A list of plans + # @see https://developer.github.com/v3/apps/marketplace/#list-all-plans-for-your-marketplace-listing + # + # source://octokit//lib/octokit/client/marketplace.rb#16 + def list_plans(options = T.unsafe(nil)); end + + # Get user's Marketplace purchases + # + # @param options [Hash] A customizable set of options + # @return [Array] A list of Marketplace purchases + # @see https://developer.github.com/v3/apps/marketplace/#get-a-users-marketplace-purchases + # + # source://octokit//lib/octokit/client/marketplace.rb#51 + def marketplace_purchases(options = T.unsafe(nil)); end + + # Get the plan associated with a given GitHub account + # + # @param account_id [Integer] The id of the GitHub account + # @param options [Hash] A customizable set of options + # @return [Sawyer::Resource] Account with plan details, or nil + # @see https://developer.github.com/v3/apps/marketplace/#check-if-a-github-account-is-associated-with-any-marketplace-listing + # + # source://octokit//lib/octokit/client/marketplace.rb#40 + def plan_for_account(account_id, options = T.unsafe(nil)); end +end + +# Methods for the Meta API +# +# @see https://developer.github.com/v3/meta/ +# +# source://octokit//lib/octokit/client/meta.rb#8 +module Octokit::Client::Meta + # Get meta information about GitHub.com, the service. + # + # @example Get GitHub meta information + # @client.github_meta + # @return [Sawyer::Resource] Hash with meta information. + # @see https://developer.github.com/v3/meta/#meta + # + # source://octokit//lib/octokit/client/meta.rb#14 + def github_meta(options = T.unsafe(nil)); end + + # Get meta information about GitHub.com, the service. + # + # @example Get GitHub meta information + # @client.github_meta + # @return [Sawyer::Resource] Hash with meta information. + # @see https://developer.github.com/v3/meta/#meta + # + # source://octokit//lib/octokit/client/meta.rb#14 + def meta(options = T.unsafe(nil)); end +end + +# Methods for the Issues Milestones API +# +# @see https://developer.github.com/v3/issues/milestones/ +# +# source://octokit//lib/octokit/client/milestones.rb#8 +module Octokit::Client::Milestones + # Create a milestone for a repository + # + # @example Create a milestone for a repository + # Octokit.create_milestone("octokit/octokit.rb", "0.7.0", {:description => 'Add support for v3 of Github API'}) + # @option options + # @option options + # @option options + # @param repository [Integer, String, Repository, Hash] A GitHub repository + # @param title [String] A unique title. + # @param options [Hash] A customizable set of options. + # @return [Sawyer::Resource] A single milestone object + # @see https://developer.github.com/v3/issues/milestones/#create-a-milestone + # + # source://octokit//lib/octokit/client/milestones.rb#51 + def create_milestone(repository, title, options = T.unsafe(nil)); end + + # Delete a single milestone for a repository + # + # @example Delete a single milestone from a repository + # Octokit.delete_milestone("octokit/octokit.rb", 1) + # @option options + # @param repository [Integer, String, Repository, Hash] A GitHub repository + # @param options [Hash] A customizable set of options. + # @return [Boolean] Success + # @see https://developer.github.com/v3/issues/milestones/#delete-a-milestone + # + # source://octokit//lib/octokit/client/milestones.rb#82 + def delete_milestone(repository, number, options = T.unsafe(nil)); end + + # Update a milestone for a repository + # + # @example Update a milestone for a repository + # Octokit.update_milestone("octokit/octokit.rb", 1, {:description => 'Add support for v3 of Github API'}) + # @option options + # @option options + # @option options + # @option options + # @param repository [Integer, String, Repository, Hash] A GitHub repository + # @param number [String, Integer] ID of the milestone + # @param options [Hash] A customizable set of options. + # @return [Sawyer::Resource] A single milestone object + # @see https://developer.github.com/v3/issues/milestones/#update-a-milestone + # + # source://octokit//lib/octokit/client/milestones.rb#68 + def edit_milestone(repository, number, options = T.unsafe(nil)); end + + # List milestones for a repository + # + # @example List milestones for a repository + # Octokit.list_milestones("octokit/octokit.rb") + # @option options + # @option options + # @option options + # @option options + # @param repository [Integer, String, Repository, Hash] A GitHub repository + # @param options [Hash] A customizable set of options. + # @return [Array] A list of milestones for a repository. + # @see https://developer.github.com/v3/issues/milestones/#list-milestones-for-a-repository + # + # source://octokit//lib/octokit/client/milestones.rb#21 + def list_milestones(repository, options = T.unsafe(nil)); end + + # Get a single milestone for a repository + # + # @example Get a single milestone for a repository + # Octokit.milestone("octokit/octokit.rb", 1) + # @option options + # @param repository [Integer, String, Repository, Hash] A GitHub repository + # @param options [Hash] A customizable set of options. + # @return [Sawyer::Resource] A single milestone from a repository. + # @see https://developer.github.com/v3/issues/milestones/#get-a-single-milestone + # + # source://octokit//lib/octokit/client/milestones.rb#35 + def milestone(repository, number, options = T.unsafe(nil)); end + + # List milestones for a repository + # + # @example List milestones for a repository + # Octokit.list_milestones("octokit/octokit.rb") + # @option options + # @option options + # @option options + # @option options + # @param repository [Integer, String, Repository, Hash] A GitHub repository + # @param options [Hash] A customizable set of options. + # @return [Array] A list of milestones for a repository. + # @see https://developer.github.com/v3/issues/milestones/#list-milestones-for-a-repository + # + # source://octokit//lib/octokit/client/milestones.rb#21 + def milestones(repository, options = T.unsafe(nil)); end + + # Update a milestone for a repository + # + # @example Update a milestone for a repository + # Octokit.update_milestone("octokit/octokit.rb", 1, {:description => 'Add support for v3 of Github API'}) + # @option options + # @option options + # @option options + # @option options + # @param repository [Integer, String, Repository, Hash] A GitHub repository + # @param number [String, Integer] ID of the milestone + # @param options [Hash] A customizable set of options. + # @return [Sawyer::Resource] A single milestone object + # @see https://developer.github.com/v3/issues/milestones/#update-a-milestone + # + # source://octokit//lib/octokit/client/milestones.rb#68 + def update_milestone(repository, number, options = T.unsafe(nil)); end +end + +# Methods for the Notifications API +# +# @see https://developer.github.com/v3/activity/notifications/ +# +# source://octokit//lib/octokit/client/notifications.rb#8 +module Octokit::Client::Notifications + # Delete a thread subscription + # + # @example + # @client.delete_thread_subscription(1) + # @param thread_id [Integer] Id of the thread. + # @return [Boolean] True if delete successful, false otherwise. + # @see https://developer.github.com/v3/activity/notifications/#delete-a-thread-subscription + # + # source://octokit//lib/octokit/client/notifications.rb#162 + def delete_thread_subscription(thread_id, options = T.unsafe(nil)); end + + # Mark notifications as read + # + # @example + # @client.mark_notifications_as_read + # @option options + # @option options + # @option options + # @param options [Hash] Optional parameters + # @return [Boolean] True if marked as read, false otherwise + # @see https://developer.github.com/v3/activity/notifications/#mark-as-read + # + # source://octokit//lib/octokit/client/notifications.rb#68 + def mark_notifications_as_read(options = T.unsafe(nil)); end + + # Mark notifications from a specific repository as read + # + # @example + # @client.mark_notifications_as_read("octokit/octokit.rb") + # @option options + # @option options + # @option options + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param options [Hash] Optional parameters + # @return [Boolean] True if marked as read, false otherwise + # @see https://developer.github.com/v3/activity/notifications/#mark-notifications-as-read-in-a-repository + # + # source://octokit//lib/octokit/client/notifications.rb#89 + def mark_repo_notifications_as_read(repo, options = T.unsafe(nil)); end + + # Mark notifications from a specific repository as read + # + # @example + # @client.mark_notifications_as_read("octokit/octokit.rb") + # @option options + # @option options + # @option options + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param options [Hash] Optional parameters + # @return [Boolean] True if marked as read, false otherwise + # @see https://developer.github.com/v3/activity/notifications/#mark-notifications-as-read-in-a-repository + # + # source://octokit//lib/octokit/client/notifications.rb#89 + def mark_repository_notifications_as_read(repo, options = T.unsafe(nil)); end + + # Mark thread as read + # + # @example + # @client.mark_thread_as_read(1, :read => false) + # @param thread_id [Integer] Id of the thread to update. + # @return [Boolean] True if updated, false otherwise. + # @see https://developer.github.com/v3/activity/notifications/#mark-a-thread-as-read + # + # source://octokit//lib/octokit/client/notifications.rb#115 + def mark_thread_as_read(thread_id, options = T.unsafe(nil)); end + + # List your notifications + # + # @example Get all notifications since a certain time. + # @client.notifications({all: true, since: '2012-10-09T23:39:01Z'}) + # @example Get users notifications + # @client.notifications + # @option options + # @option options + # @option options + # @param options [Hash] Optional parameters + # @return [Array] Array of notifications. + # @see https://developer.github.com/v3/activity/notifications/#list-your-notifications + # + # source://octokit//lib/octokit/client/notifications.rb#26 + def notifications(options = T.unsafe(nil)); end + + # List your notifications in a repository + # + # @example Get your notifications for octokit/octokit.rb since a time. + # @client.repository_notifications({since: '2012-10-09T23:39:01Z'}) + # @example Get your notifications for octokit/octokit.rb + # @client.repository_notifications('octokit/octokit.rb') + # @option options + # @option options + # @option options + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param options [Hash] Optional parameters + # @return [Array] Array of notifications. + # @see https://developer.github.com/v3/activity/notifications/#list-your-notifications-in-a-repository + # + # source://octokit//lib/octokit/client/notifications.rb#48 + def repo_notifications(repo, options = T.unsafe(nil)); end + + # List your notifications in a repository + # + # @example Get your notifications for octokit/octokit.rb since a time. + # @client.repository_notifications({since: '2012-10-09T23:39:01Z'}) + # @example Get your notifications for octokit/octokit.rb + # @client.repository_notifications('octokit/octokit.rb') + # @option options + # @option options + # @option options + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param options [Hash] Optional parameters + # @return [Array] Array of notifications. + # @see https://developer.github.com/v3/activity/notifications/#list-your-notifications-in-a-repository + # + # source://octokit//lib/octokit/client/notifications.rb#48 + def repository_notifications(repo, options = T.unsafe(nil)); end + + # List notifications for a specific thread + # + # @example + # @client.notification_thread(1000) + # @param thread_id [Integer] Id of the thread. + # @return [Array] Array of notifications. + # @see https://developer.github.com/v3/activity/notifications/#view-a-single-thread + # + # source://octokit//lib/octokit/client/notifications.rb#104 + def thread_notifications(thread_id, options = T.unsafe(nil)); end + + # Get thread subscription + # + # @example + # @client.thread_subscription(1) + # @param thread_id [Integer] Id of the thread. + # @return [Sawyer::Resource] Subscription. + # @see https://developer.github.com/v3/activity/notifications/#get-a-thread-subscription + # + # source://octokit//lib/octokit/client/notifications.rb#128 + def thread_subscription(thread_id, options = T.unsafe(nil)); end + + # Update thread subscription + # + # This lets you subscribe to a thread, or ignore it. Subscribing to a + # thread is unnecessary if the user is already subscribed to the + # repository. Ignoring a thread will mute all future notifications (until + # you comment or get @mentioned). + # + # @example Subscribe to notifications + # @client.update_thread_subscription(1, :subscribed => true) + # @example Ignore notifications from a repo + # @client.update_thread_subscription(1, :ignored => true) + # @option options + # @option options + # @param thread_id [Integer] Id of the thread. + # @param options + # @return [Sawyer::Resource] Updated subscription. + # @see https://developer.github.com/v3/activity/notifications/#set-a-thread-subscription + # + # source://octokit//lib/octokit/client/notifications.rb#151 + def update_thread_subscription(thread_id, options = T.unsafe(nil)); end +end + +# Methods for the OauthApplications API +# +# @see https://developer.github.com/v3/apps/oauth_applications +# +# source://octokit//lib/octokit/client/oauth_applications.rb#8 +module Octokit::Client::OauthApplications + # Check if a token is valid. + # + # Applications can check if a token is valid without rate limits. + # + # @example + # client = Octokit::Client.new(:client_id => 'abcdefg12345', :client_secret => 'secret') + # client.check_token('deadbeef1234567890deadbeef987654321') + # @param access_token [String] 40 character GitHub OAuth access token + # @return [Sawyer::Resource] A single authorization for the authenticated user + # @see https://developer.github.com/v3/apps/oauth_applications/#check-a-token + # + # source://octokit//lib/octokit/client/oauth_applications.rb#21 + def check_application_authorization(access_token, options = T.unsafe(nil)); end + + # Check if a token is valid. + # + # Applications can check if a token is valid without rate limits. + # + # @example + # client = Octokit::Client.new(:client_id => 'abcdefg12345', :client_secret => 'secret') + # client.check_token('deadbeef1234567890deadbeef987654321') + # @param access_token [String] 40 character GitHub OAuth access token + # @return [Sawyer::Resource] A single authorization for the authenticated user + # @see https://developer.github.com/v3/apps/oauth_applications/#check-a-token + # + # source://octokit//lib/octokit/client/oauth_applications.rb#21 + def check_token(access_token, options = T.unsafe(nil)); end + + # Delete an app authorization + # + # OAuth application owners can revoke a grant for their OAuth application and a specific user. + # + # @example + # client = Octokit::Client.new(:client_id => 'abcdefg12345', :client_secret => 'secret') + # client.delete_app_authorization('deadbeef1234567890deadbeef987654321') + # @param access_token [String] 40 character GitHub OAuth access token + # @return [Boolean] Result + # @see https://developer.github.com/v3/apps/oauth_applications/#delete-an-app-token + # + # source://octokit//lib/octokit/client/oauth_applications.rb#99 + def delete_app_authorization(access_token, options = T.unsafe(nil)); end + + # Delete an app token + # + # Applications can revoke (delete) a token + # + # @example + # client = Octokit::Client.new(:client_id => 'abcdefg12345', :client_secret => 'secret') + # client.delete_app_token('deadbeef1234567890deadbeef987654321') + # @param access_token [String] 40 character GitHub OAuth access token + # @return [Boolean] Result + # @see https://developer.github.com/v3/apps/oauth_applications/#delete-an-app-token + # + # source://octokit//lib/octokit/client/oauth_applications.rb#69 + def delete_app_token(access_token, options = T.unsafe(nil)); end + + # Delete an app token + # + # Applications can revoke (delete) a token + # + # @example + # client = Octokit::Client.new(:client_id => 'abcdefg12345', :client_secret => 'secret') + # client.delete_app_token('deadbeef1234567890deadbeef987654321') + # @param access_token [String] 40 character GitHub OAuth access token + # @return [Boolean] Result + # @see https://developer.github.com/v3/apps/oauth_applications/#delete-an-app-token + # + # source://octokit//lib/octokit/client/oauth_applications.rb#69 + def delete_application_authorization(access_token, options = T.unsafe(nil)); end + + # Reset a token + # + # Applications can reset a token without requiring a user to re-authorize. + # + # @example + # client = Octokit::Client.new(:client_id => 'abcdefg12345', :client_secret => 'secret') + # client.reset_token('deadbeef1234567890deadbeef987654321') + # @param access_token [String] 40 character GitHub OAuth access token + # @return [Sawyer::Resource] A single authorization for the authenticated user + # @see https://developer.github.com/v3/apps/oauth_applications/#reset-a-token + # + # source://octokit//lib/octokit/client/oauth_applications.rb#45 + def reset_application_authorization(access_token, options = T.unsafe(nil)); end + + # Reset a token + # + # Applications can reset a token without requiring a user to re-authorize. + # + # @example + # client = Octokit::Client.new(:client_id => 'abcdefg12345', :client_secret => 'secret') + # client.reset_token('deadbeef1234567890deadbeef987654321') + # @param access_token [String] 40 character GitHub OAuth access token + # @return [Sawyer::Resource] A single authorization for the authenticated user + # @see https://developer.github.com/v3/apps/oauth_applications/#reset-a-token + # + # source://octokit//lib/octokit/client/oauth_applications.rb#45 + def reset_token(access_token, options = T.unsafe(nil)); end + + # Delete an app token + # + # Applications can revoke (delete) a token + # + # @example + # client = Octokit::Client.new(:client_id => 'abcdefg12345', :client_secret => 'secret') + # client.delete_app_token('deadbeef1234567890deadbeef987654321') + # @param access_token [String] 40 character GitHub OAuth access token + # @return [Boolean] Result + # @see https://developer.github.com/v3/apps/oauth_applications/#delete-an-app-token + # + # source://octokit//lib/octokit/client/oauth_applications.rb#69 + def revoke_application_authorization(access_token, options = T.unsafe(nil)); end +end + +# Methods for the Git Data API +# +# @see https://developer.github.com/v3/git/ +# +# source://octokit//lib/octokit/client/objects.rb#8 +module Octokit::Client::Objects + # Get a single blob, fetching its content and encoding + # + # @example Fetch a blob and inspect its contents + # blob = Octokit.blob("octocat/Hello-World", "827efc6d56897b048c772eb4087f854f46256132") + # blob.encoding # => "utf-8" + # blob.content # => "Foo bar baz" + # @example Fetch a base64-encoded blob and inspect its contents + # require "base64" + # blob = Octokit.blob("octocat/Hello-World", "827efc6d56897b048c772eb4087f854f46256132") + # blob.encoding # => "base64" + # blob.content # => "Rm9vIGJhciBiYXo=" + # Base64.decode64(blob.content) # => "Foo bar baz" + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param blob_sha [String] The SHA of the blob to fetch + # @return [Sawyer::Resource] A hash representing the fetched blob + # @see https://developer.github.com/v3/git/blobs/#get-a-blob + # + # source://octokit//lib/octokit/client/objects.rb#61 + def blob(repo, blob_sha, options = T.unsafe(nil)); end + + # Create a blob + # + # @example Create a blob containing foo bar baz + # Octokit.create_blob("octocat/Hello-World", "foo bar baz") + # @example Create a blob containing foo bar baz, encoded using base64 + # require "base64" + # Octokit.create_blob("octocat/Hello-World", Base64.encode64("foo bar baz"), "base64") + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param content [String] Content of the blob + # @param encoding [String] The content's encoding. utf-8 and base64 are accepted. If your data cannot be losslessly sent as a UTF-8 string, you can base64 encode it + # @return [String] The new blob's SHA, e.g. 827efc6d56897b048c772eb4087f854f46256132 + # @see https://developer.github.com/v3/git/blobs/#create-a-blob + # + # source://octokit//lib/octokit/client/objects.rb#77 + def create_blob(repo, content, encoding = T.unsafe(nil), options = T.unsafe(nil)); end + + # Create a tag + # + # Requires authenticated client. + # + # @example + # @client.create_tag( + # "octokit/octokit.rb", + # "v9000.0.0", + # "Version 9000\n", + # "f4cdf6eb734f32343ce3f27670c17b35f54fd82e", + # "commit", + # "Wynn Netherland", + # "wynn.netherland@gmail.com", + # "2012-06-03T17:03:11-07:00" + # ) + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @param tag [String] Tag string. + # @param message [String] Tag message. + # @param object_sha [String] SHA of the git object this is tagging. + # @param tagger_name [String] Name of the author of the tag. + # @param tagger_email [String] Email of the author of the tag. + # @param tagger_date [string] Timestamp of when this object was tagged. + # @param type [String] Type of the object we're tagging. Normally this is + # a `commit` but it can also be a `tree` or a `blob`. + # @return [Sawyer::Resource] Hash representing new tag. + # @see https://developer.github.com/v3/git/tags/#create-a-tag-object + # + # source://octokit//lib/octokit/client/objects.rb#125 + def create_tag(repo, tag, message, object_sha, type, tagger_name, tagger_email, tagger_date, options = T.unsafe(nil)); end + + # Create a tree + # + # Pass :base_tree => "827efc6..." in options to update an existing tree with new data. + # + # @example Create a tree containing one file + # tree = Octokit.create_tree("octocat/Hello-World", [ { :path => "file.rb", :mode => "100644", :type => "blob", :sha => "44b4fc6d56897b048c772eb4087f854f46256132" } ]) + # tree.sha # => "cd8274d15fa3ae2ab983129fb037999f264ba9a7" + # tree.tree.first.path # => "file.rb" + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param tree [Array] An array of hashes representing a tree structure + # @return [Sawyer::Resource] A hash representing the new tree + # @see https://developer.github.com/v3/git/trees/#create-a-tree + # + # source://octokit//lib/octokit/client/objects.rb#40 + def create_tree(repo, tree, options = T.unsafe(nil)); end + + # Get a tag + # + # @example Fetch a tag + # Octokit.tag('octokit/octokit.rb', '23aad20633f4d2981b1c7209a800db3014774e96') + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @param tag_sha [String] The SHA of the tag to fetch. + # @return [Sawyer::Resource] Hash representing the tag. + # @see https://developer.github.com/v3/git/tags/#get-a-tag + # + # source://octokit//lib/octokit/client/objects.rb#95 + def tag(repo, tag_sha, options = T.unsafe(nil)); end + + # Get a single tree, fetching information about its root-level objects + # + # Pass :recursive => true in options to fetch information about all of the tree's objects, including those in subdirectories. + # + # @example Fetch a tree and inspect the path of one of its files + # tree = Octokit.tree("octocat/Hello-World", "9fb037999f264ba9a7fc6274d15fa3ae2ab98312") + # tree.tree.first.path # => "file.rb" + # @example Fetch a tree recursively + # tree = Octokit.tree("octocat/Hello-World", "fc6274d15fa3ae2ab983129fb037999f264ba9a7", :recursive => true) + # tree.tree.first.path # => "subdir/file.txt" + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param tree_sha [String] The SHA of the tree to fetch + # @return [Sawyer::Resource] A hash representing the fetched tree + # @see https://developer.github.com/v3/git/trees/#get-a-tree + # @see https://developer.github.com/v3/git/trees/#get-a-tree-recursively + # + # source://octokit//lib/octokit/client/objects.rb#24 + def tree(repo, tree_sha, options = T.unsafe(nil)); end +end + +# Methods for the Organizations API +# +# @see https://developer.github.com/v3/orgs/ +# +# source://octokit//lib/octokit/client/organizations.rb#8 +module Octokit::Client::Organizations + # Add team member + # + # Requires authenticated organization owner or member with team + # `admin` permission. + # + # @example + # @client.add_team_member(100000, 'pengwynn') + # @example + # # Opt-in to future behavior for this endpoint. Adds the member to the + # # team if they're already an org member. If not, the method will return + # # 422 and indicate the user should call the new Team Membership endpoint. + # @client.add_team_member \ + # 100000, + # 'pengwynn', + # :accept => "application/vnd.github.the-wasp-preview+json" + # @param team_id [Integer] Team id. + # @param user [String] GitHub username of new team member. + # @return [Boolean] True on successful addition, false otherwise. + # @see https://developer.github.com/v3/orgs/teams/#add-team-member + # @see https://developer.github.com/changes/2014-08-05-team-memberships-api/ + # + # source://octokit//lib/octokit/client/organizations.rb#458 + def add_team_member(team_id, user, options = T.unsafe(nil)); end + + # Add or invite a user to a team + # + # @example Check if a user has a membership for a team + # @client.add_team_membership(1234, 'pengwynn') + # @param team_id [Integer] Team id. + # @param user [String] GitHub username of the user to invite. + # @return [Sawyer::Resource] Hash of team membership info + # @see https://developer.github.com/v3/orgs/teams/#add-or-update-team-membership + # + # source://octokit//lib/octokit/client/organizations.rb#679 + def add_team_membership(team_id, user, options = T.unsafe(nil)); end + + # Add team repository + # + # This can also be used to update the permission of an existing team + # + # Requires authenticated user to be an owner of the organization that the + # team is associated with. Also, the repo must be owned by the + # organization, or a direct form of a repo owned by the organization. + # + # @example + # @client.add_team_repo(100000, 'github/developer.github.com') + # @example + # @client.add_team_repository(100000, 'github/developer.github.com') + # @example Add a team with admin permissions + # @client.add_team_repository(100000, 'github/developer.github.com', permission: 'admin') + # @option options + # @param repo [String, Hash, Repository] A GitHub repository. + # @param team_id [Integer] Team id. + # @param options [Hash] a customizable set of options + # @return [Boolean] True if successful, false otherwise. + # @see Octokit::Repository + # @see https://developer.github.com/v3/orgs/teams/#add-or-update-team-repository + # + # source://octokit//lib/octokit/client/organizations.rb#570 + def add_team_repo(team_id, repo, options = T.unsafe(nil)); end + + # Add team repository + # + # This can also be used to update the permission of an existing team + # + # Requires authenticated user to be an owner of the organization that the + # team is associated with. Also, the repo must be owned by the + # organization, or a direct form of a repo owned by the organization. + # + # @example + # @client.add_team_repo(100000, 'github/developer.github.com') + # @example + # @client.add_team_repository(100000, 'github/developer.github.com') + # @example Add a team with admin permissions + # @client.add_team_repository(100000, 'github/developer.github.com', permission: 'admin') + # @option options + # @param repo [String, Hash, Repository] A GitHub repository. + # @param team_id [Integer] Team id. + # @param options [Hash] a customizable set of options + # @return [Boolean] True if successful, false otherwise. + # @see Octokit::Repository + # @see https://developer.github.com/v3/orgs/teams/#add-or-update-team-repository + # + # source://octokit//lib/octokit/client/organizations.rb#570 + def add_team_repository(team_id, repo, options = T.unsafe(nil)); end + + # List all GitHub organizations + # + # This provides a list of every organization, in the order that they + # were created. + # + # Organization that you’ve seen. + # + # @option options + # @param options [Hash] Optional options. + # @return [Array] List of GitHub organizations. + # @see https://developer.github.com/v3/orgs/#list-all-organizations + # + # source://octokit//lib/octokit/client/organizations.rb#116 + def all_organizations(options = T.unsafe(nil)); end + + # List all GitHub organizations + # + # This provides a list of every organization, in the order that they + # were created. + # + # Organization that you’ve seen. + # + # @option options + # @param options [Hash] Optional options. + # @return [Array] List of GitHub organizations. + # @see https://developer.github.com/v3/orgs/#list-all-organizations + # + # source://octokit//lib/octokit/client/organizations.rb#116 + def all_orgs(options = T.unsafe(nil)); end + + # Get GitHub Actions billing for an organization + # + # Requires authenticated organization owner. + # + # @example + # @client.billing_actions('github') + # @param org [String, Integer] Organization GitHub login or id. + # @return [Sawyer::Resource] Hash representing GitHub Actions billing for an organization. + # @see https://docs.github.com/en/rest/reference/billing#get-github-actions-billing-for-an-organization + # + # source://octokit//lib/octokit/client/organizations.rb#839 + def billing_actions(org); end + + # List child teams + # + # Requires authenticated organization member. + # + # @example + # @client.child_teams(100000, :accept => "application/vnd.github.hellcat-preview+json") + # @param team_id [Integer] Team id. + # @return [Sawyer::Resource] Hash representing team. + # @see https://developer.github.com/v3/orgs/teams/#list-child-teams + # + # source://octokit//lib/octokit/client/organizations.rb#384 + def child_teams(team_id, options = T.unsafe(nil)); end + + # Conceal a user's membership of an organization. + # + # Requires authenticated organization owner. + # + # @example + # @client.unpublicize_membership('github', 'pengwynn') + # @example + # @client.conceal_membership('github', 'pengwynn') + # @param org [String, Integer] Organization GitHub login or id. + # @param user [String] GitHub username of user to unpublicize. + # @return [Boolean] True of unpublicization successful, false otherwise. + # @see https://developer.github.com/v3/orgs/members/#conceal-a-users-membership + # + # source://octokit//lib/octokit/client/organizations.rb#640 + def conceal_membership(org, user, options = T.unsafe(nil)); end + + # Converts an organization member to an outside collaborator + # + # Requires authenticated organization members. + # + # @example + # @client.convert_to_outside_collaborator('github', 'lizzhale') + # @param org [String, Integer] Organization GitHub login or id. + # @param user [String] GitHub username to be removed as outside collaborator + # @return [Boolean] Return true if outside collaborator removed from organization, false otherwise. + # @see https://developer.github.com/v3/orgs/outside-collaborators/#convert-member-to-outside-collaborator + # + # source://octokit//lib/octokit/client/organizations.rb#284 + def convert_to_outside_collaborator(org, user, options = T.unsafe(nil)); end + + # Create team + # + # Requires authenticated organization owner. + # + # @example + # @client.create_team('github', { + # :name => 'Designers', + # :repo_names => ['github/dotfiles'] + # }) + # @option options + # @option options + # @option options + # @option options + # @param org [String, Integer] Organization GitHub login or id. + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] Hash representing new team. + # @see https://developer.github.com/v3/orgs/teams/#create-team + # + # source://octokit//lib/octokit/client/organizations.rb#320 + def create_team(org, options = T.unsafe(nil)); end + + # Deletes a previous migration archive. + # + # Requires authenticated organization owner. + # + # @param org [String, Integer] Organization GitHub login or id. + # @param id [Integer] ID number of the migration. + # @see https://docs.github.com/en/rest/reference/migrations#delete-an-organization-migration-archive + # + # source://octokit//lib/octokit/client/organizations.rb#813 + def delete_migration_archive(org, id, options = T.unsafe(nil)); end + + # Delete an organization. + # + # Requires authenticated organization owner. + # + # @example + # @client.delete_organization("my-org") + # @example + # @client.delete_org("my-org") + # @param org [String, Integer] Organization login or ID. + # @return [Boolean] True if deletion successful, otherwise false. + # @see https://docs.github.com/rest/orgs/orgs#delete-an-organization + # + # source://octokit//lib/octokit/client/organizations.rb#64 + def delete_org(org); end + + # Delete an organization. + # + # Requires authenticated organization owner. + # + # @example + # @client.delete_organization("my-org") + # @example + # @client.delete_org("my-org") + # @param org [String, Integer] Organization login or ID. + # @return [Boolean] True if deletion successful, otherwise false. + # @see https://docs.github.com/rest/orgs/orgs#delete-an-organization + # + # source://octokit//lib/octokit/client/organizations.rb#64 + def delete_organization(org); end + + # Delete team + # + # Requires authenticated organization owner. + # + # @example + # @client.delete_team(100000) + # @param team_id [Integer] Team id. + # @return [Boolean] True if deletion successful, false otherwise. + # @see https://developer.github.com/v3/orgs/teams/#delete-team + # + # source://octokit//lib/octokit/client/organizations.rb#420 + def delete_team(team_id, options = T.unsafe(nil)); end + + # Get organizations for a user. + # + # Nonauthenticated calls to this method will return organizations that + # the user is a public member. + # + # Use an authenticated client to get both public and private organizations + # for a user. + # + # Calling this method on a `@client` will return that users organizations. + # Private organizations are included only if the `@client` is authenticated. + # + # @example + # Octokit.organizations('pengwynn') + # @example + # @client.organizations('pengwynn') + # @example + # Octokit.orgs('pengwynn') + # @example + # Octokit.list_organizations('pengwynn') + # @example + # Octokit.list_orgs('pengwynn') + # @example + # @client.organizations + # @param user [Integer, String] GitHub user login or id of the user to get + # list of organizations. + # @return [Array] Array of hashes representing organizations. + # @see https://developer.github.com/v3/orgs/#list-your-organizations + # @see https://developer.github.com/v3/orgs/#list-user-organizations + # + # source://octokit//lib/octokit/client/organizations.rb#97 + def list_organizations(user = T.unsafe(nil), options = T.unsafe(nil)); end + + # Get organizations for a user. + # + # Nonauthenticated calls to this method will return organizations that + # the user is a public member. + # + # Use an authenticated client to get both public and private organizations + # for a user. + # + # Calling this method on a `@client` will return that users organizations. + # Private organizations are included only if the `@client` is authenticated. + # + # @example + # Octokit.organizations('pengwynn') + # @example + # @client.organizations('pengwynn') + # @example + # Octokit.orgs('pengwynn') + # @example + # Octokit.list_organizations('pengwynn') + # @example + # Octokit.list_orgs('pengwynn') + # @example + # @client.organizations + # @param user [Integer, String] GitHub user login or id of the user to get + # list of organizations. + # @return [Array] Array of hashes representing organizations. + # @see https://developer.github.com/v3/orgs/#list-your-organizations + # @see https://developer.github.com/v3/orgs/#list-user-organizations + # + # source://octokit//lib/octokit/client/organizations.rb#97 + def list_orgs(user = T.unsafe(nil), options = T.unsafe(nil)); end + + # Fetches the URL to a migration archive. + # + # Requires authenticated organization owner. + # + # @param org [String, Integer] Organization GitHub login or id. + # @param id [Integer] ID number of the migration. + # @see https://docs.github.com/en/rest/reference/migrations#download-an-organization-migration-archive + # + # source://octokit//lib/octokit/client/organizations.rb#799 + def migration_archive_url(org, id, options = T.unsafe(nil)); end + + # Fetches the status of a migration. + # + # Requires authenticated organization owner. + # + # @param org [String, Integer] Organization GitHub login or id. + # @param id [Integer] ID number of the migration. + # @see https://docs.github.com/en/rest/reference/migrations#get-an-organization-migration-status + # + # source://octokit//lib/octokit/client/organizations.rb#788 + def migration_status(org, id, options = T.unsafe(nil)); end + + # Lists the most recent migrations. + # + # Requires authenticated organization owner. + # + # @param org [String, Integer] Organization GitHub login or id. + # @return [Array] Array of migration resources. + # @see https://docs.github.com/en/rest/reference/migrations#list-organization-migrations + # + # source://octokit//lib/octokit/client/organizations.rb#777 + def migrations(org, options = T.unsafe(nil)); end + + # Get an organization + # + # @example + # Octokit.organization('github') + # @example + # Octokit.org('github') + # @param org [String, Integer] Organization GitHub login or id. + # @return [Sawyer::Resource] Hash representing GitHub organization. + # @see https://developer.github.com/v3/orgs/#get-an-organization + # + # source://octokit//lib/octokit/client/organizations.rb#18 + def org(org, options = T.unsafe(nil)); end + + # List pending organization invitations + # + # Requires authenticated organization member. + # + # @example + # @client.organization_invitations('github') + # @param org [String, Integer] Organization GitHub login or id. + # @return [Array] Array of hashes representing invitations. + # @see https://developer.github.com/v3/orgs/members/#list-pending-organization-invitations + # + # source://octokit//lib/octokit/client/organizations.rb#239 + def org_invitations(org, options = T.unsafe(nil)); end + + # Check if a user is a member of an organization. + # + # Use this to check if another user is a member of an organization that + # you are a member. If you are not in the organization you are checking, + # use .organization_public_member? instead. + # + # @example Check if a user is in your organization + # @client.organization_member?('your_organization', 'pengwynn') + # => false + # @param org [String, Integer] Organization GitHub login or id. + # @param user [String] GitHub username of the user to check. + # @return [Boolean] Is a member? + # @see https://developer.github.com/v3/orgs/members/#check-membership + # + # source://octokit//lib/octokit/client/organizations.rb#199 + def org_member?(org, user, options = T.unsafe(nil)); end + + # Get organization members + # + # Public members of the organization are returned by default. An + # authenticated client that is a member of the GitHub organization + # is required to get private members. + # + # @example + # Octokit.organization_members('github') + # @example + # Octokit.org_members('github') + # @param org [String, Integer] Organization GitHub login or id. + # @return [Array] Array of hashes representing users. + # @see https://developer.github.com/v3/orgs/members/#members-list + # + # source://octokit//lib/octokit/client/organizations.rb#160 + def org_members(org, options = T.unsafe(nil)); end + + # Get an organization membership + # + # @option options + # @param org [Integer, String] The GitHub Organization. + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] Hash representing the organization membership. + # @see https://developer.github.com/v3/orgs/members/#get-your-organization-membership + # @see https://developer.github.com/v3/orgs/members/#get-organization-membership + # + # source://octokit//lib/octokit/client/organizations.rb#711 + def org_membership(org, options = T.unsafe(nil)); end + + # List all organizations memberships for the authenticated user + # + # @return [Array] Array of organizations memberships. + # @see https://developer.github.com/v3/orgs/members/#list-your-organization-memberships + # + # source://octokit//lib/octokit/client/organizations.rb#699 + def org_memberships(options = T.unsafe(nil)); end + + # Check if a user is a public member of an organization. + # + # If you are checking for membership of a user of an organization that + # you are in, use .organization_member? instead. + # + # @example Check if a user is a hubbernaut + # @client.organization_public_member?('github', 'pengwynn') + # => true + # @param org [String, Integer] Organization GitHub login or id. + # @param user [String] GitHub username of the user to check. + # @return [Boolean] Is a public member? + # @see https://developer.github.com/v3/orgs/members/#check-public-membership + # + # source://octokit//lib/octokit/client/organizations.rb#224 + def org_public_member?(org, user, options = T.unsafe(nil)); end + + # Get organization public members + # + # Lists the public members of an organization + # + # @example + # Octokit.organization_public_members('github') + # @example + # Octokit.org_public_members('github') + # @param org [String] Organization GitHub username. + # @return [Array] Array of hashes representing users. + # @see https://developer.github.com/v3/orgs/members/#public-members-list + # + # source://octokit//lib/octokit/client/organizations.rb#178 + def org_public_members(org, options = T.unsafe(nil)); end + + # List organization repositories + # + # Public repositories are available without authentication. Private repos + # require authenticated organization member. + # + # @example + # Octokit.organization_repositories('github') + # @example + # Octokit.org_repositories('github') + # @example + # Octokit.org_repos('github') + # @example + # @client.org_repos('github', {:type => 'private'}) + # @option options + # @param org [String, Integer] Organization GitHub login or id for which + # to list repos. + # @param options [Hash] a customizable set of options + # @return [Array] List of repositories + # @see https://developer.github.com/v3/repos/#list-organization-repositories + # + # source://octokit//lib/octokit/client/organizations.rb#141 + def org_repos(org, options = T.unsafe(nil)); end + + # List organization repositories + # + # Public repositories are available without authentication. Private repos + # require authenticated organization member. + # + # @example + # Octokit.organization_repositories('github') + # @example + # Octokit.org_repositories('github') + # @example + # Octokit.org_repos('github') + # @example + # @client.org_repos('github', {:type => 'private'}) + # @option options + # @param org [String, Integer] Organization GitHub login or id for which + # to list repos. + # @param options [Hash] a customizable set of options + # @return [Array] List of repositories + # @see https://developer.github.com/v3/repos/#list-organization-repositories + # + # source://octokit//lib/octokit/client/organizations.rb#141 + def org_repositories(org, options = T.unsafe(nil)); end + + # List teams + # + # Requires authenticated organization member. + # + # @example + # @client.organization_teams('github') + # @example + # @client.org_teams('github') + # @param org [String, Integer] Organization GitHub login or id. + # @return [Array] Array of hashes representing teams. + # @see https://developer.github.com/v3/orgs/teams/#list-teams + # + # source://octokit//lib/octokit/client/organizations.rb#299 + def org_teams(org, options = T.unsafe(nil)); end + + # Get an organization + # + # @example + # Octokit.organization('github') + # @example + # Octokit.org('github') + # @param org [String, Integer] Organization GitHub login or id. + # @return [Sawyer::Resource] Hash representing GitHub organization. + # @see https://developer.github.com/v3/orgs/#get-an-organization + # + # source://octokit//lib/octokit/client/organizations.rb#18 + def organization(org, options = T.unsafe(nil)); end + + # Get organization audit log. + # + # Gets the audit log for an organization. + # + # To list oldest events first, specify asc. + # + # @example + # Octokit.organization_audit_log('github', {include: 'all', phrase: 'action:org.add_member created:>2022-08-29 user:octocat'}) + # @option options + # @option options + # @option options + # @param org [String, Integer] Organization GitHub login or id for which + # to retrieve the audit log. + # @param options [Hash] a customizable set of options + # @return [Array] List of events + # @see https://docs.github.com/en/enterprise-cloud@latest/rest/orgs/orgs#get-the-audit-log-for-an-organization + # + # source://octokit//lib/octokit/client/organizations.rb#859 + def organization_audit_log(org, options = T.unsafe(nil)); end + + # List pending organization invitations + # + # Requires authenticated organization member. + # + # @example + # @client.organization_invitations('github') + # @param org [String, Integer] Organization GitHub login or id. + # @return [Array] Array of hashes representing invitations. + # @see https://developer.github.com/v3/orgs/members/#list-pending-organization-invitations + # + # source://octokit//lib/octokit/client/organizations.rb#239 + def organization_invitations(org, options = T.unsafe(nil)); end + + # Check if a user is a member of an organization. + # + # Use this to check if another user is a member of an organization that + # you are a member. If you are not in the organization you are checking, + # use .organization_public_member? instead. + # + # @example Check if a user is in your organization + # @client.organization_member?('your_organization', 'pengwynn') + # => false + # @param org [String, Integer] Organization GitHub login or id. + # @param user [String] GitHub username of the user to check. + # @return [Boolean] Is a member? + # @see https://developer.github.com/v3/orgs/members/#check-membership + # + # source://octokit//lib/octokit/client/organizations.rb#199 + def organization_member?(org, user, options = T.unsafe(nil)); end + + # Get organization members + # + # Public members of the organization are returned by default. An + # authenticated client that is a member of the GitHub organization + # is required to get private members. + # + # @example + # Octokit.organization_members('github') + # @example + # Octokit.org_members('github') + # @param org [String, Integer] Organization GitHub login or id. + # @return [Array] Array of hashes representing users. + # @see https://developer.github.com/v3/orgs/members/#members-list + # + # source://octokit//lib/octokit/client/organizations.rb#160 + def organization_members(org, options = T.unsafe(nil)); end + + # Get an organization membership + # + # @option options + # @param org [Integer, String] The GitHub Organization. + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] Hash representing the organization membership. + # @see https://developer.github.com/v3/orgs/members/#get-your-organization-membership + # @see https://developer.github.com/v3/orgs/members/#get-organization-membership + # + # source://octokit//lib/octokit/client/organizations.rb#711 + def organization_membership(org, options = T.unsafe(nil)); end + + # List all organizations memberships for the authenticated user + # + # @return [Array] Array of organizations memberships. + # @see https://developer.github.com/v3/orgs/members/#list-your-organization-memberships + # + # source://octokit//lib/octokit/client/organizations.rb#699 + def organization_memberships(options = T.unsafe(nil)); end + + # Check if a user is a public member of an organization. + # + # If you are checking for membership of a user of an organization that + # you are in, use .organization_member? instead. + # + # @example Check if a user is a hubbernaut + # @client.organization_public_member?('github', 'pengwynn') + # => true + # @param org [String, Integer] Organization GitHub login or id. + # @param user [String] GitHub username of the user to check. + # @return [Boolean] Is a public member? + # @see https://developer.github.com/v3/orgs/members/#check-public-membership + # + # source://octokit//lib/octokit/client/organizations.rb#224 + def organization_public_member?(org, user, options = T.unsafe(nil)); end + + # Get organization public members + # + # Lists the public members of an organization + # + # @example + # Octokit.organization_public_members('github') + # @example + # Octokit.org_public_members('github') + # @param org [String] Organization GitHub username. + # @return [Array] Array of hashes representing users. + # @see https://developer.github.com/v3/orgs/members/#public-members-list + # + # source://octokit//lib/octokit/client/organizations.rb#178 + def organization_public_members(org, options = T.unsafe(nil)); end + + # List organization repositories + # + # Public repositories are available without authentication. Private repos + # require authenticated organization member. + # + # @example + # Octokit.organization_repositories('github') + # @example + # Octokit.org_repositories('github') + # @example + # Octokit.org_repos('github') + # @example + # @client.org_repos('github', {:type => 'private'}) + # @option options + # @param org [String, Integer] Organization GitHub login or id for which + # to list repos. + # @param options [Hash] a customizable set of options + # @return [Array] List of repositories + # @see https://developer.github.com/v3/repos/#list-organization-repositories + # + # source://octokit//lib/octokit/client/organizations.rb#141 + def organization_repositories(org, options = T.unsafe(nil)); end + + # List teams + # + # Requires authenticated organization member. + # + # @example + # @client.organization_teams('github') + # @example + # @client.org_teams('github') + # @param org [String, Integer] Organization GitHub login or id. + # @return [Array] Array of hashes representing teams. + # @see https://developer.github.com/v3/orgs/teams/#list-teams + # + # source://octokit//lib/octokit/client/organizations.rb#299 + def organization_teams(org, options = T.unsafe(nil)); end + + # Get organizations for a user. + # + # Nonauthenticated calls to this method will return organizations that + # the user is a public member. + # + # Use an authenticated client to get both public and private organizations + # for a user. + # + # Calling this method on a `@client` will return that users organizations. + # Private organizations are included only if the `@client` is authenticated. + # + # @example + # Octokit.organizations('pengwynn') + # @example + # @client.organizations('pengwynn') + # @example + # Octokit.orgs('pengwynn') + # @example + # Octokit.list_organizations('pengwynn') + # @example + # Octokit.list_orgs('pengwynn') + # @example + # @client.organizations + # @param user [Integer, String] GitHub user login or id of the user to get + # list of organizations. + # @return [Array] Array of hashes representing organizations. + # @see https://developer.github.com/v3/orgs/#list-your-organizations + # @see https://developer.github.com/v3/orgs/#list-user-organizations + # + # source://octokit//lib/octokit/client/organizations.rb#97 + def organizations(user = T.unsafe(nil), options = T.unsafe(nil)); end + + # Get organizations for a user. + # + # Nonauthenticated calls to this method will return organizations that + # the user is a public member. + # + # Use an authenticated client to get both public and private organizations + # for a user. + # + # Calling this method on a `@client` will return that users organizations. + # Private organizations are included only if the `@client` is authenticated. + # + # @example + # Octokit.organizations('pengwynn') + # @example + # @client.organizations('pengwynn') + # @example + # Octokit.orgs('pengwynn') + # @example + # Octokit.list_organizations('pengwynn') + # @example + # Octokit.list_orgs('pengwynn') + # @example + # @client.organizations + # @param user [Integer, String] GitHub user login or id of the user to get + # list of organizations. + # @return [Array] Array of hashes representing organizations. + # @see https://developer.github.com/v3/orgs/#list-your-organizations + # @see https://developer.github.com/v3/orgs/#list-user-organizations + # + # source://octokit//lib/octokit/client/organizations.rb#97 + def orgs(user = T.unsafe(nil), options = T.unsafe(nil)); end + + # List outside collaborators for an organization + # + # Requires authenticated organization members. + # + # @example + # @client.outside_collaborators('github') + # @param org [String, Integer] Organization GitHub login or id. + # @return [Array] Array of hashes representing users. + # @see https://developer.github.com/v3/orgs/outside_collaborators/#list-outside-collaborators + # + # source://octokit//lib/octokit/client/organizations.rb#254 + def outside_collaborators(org, options = T.unsafe(nil)); end + + # Publicize a user's membership of an organization + # + # Requires authenticated organization owner. + # + # @example + # @client.publicize_membership('github', 'pengwynn') + # @param org [String, Integer] Organization GitHub login or id. + # @param user [String] GitHub username of user to publicize. + # @return [Boolean] True if publicization successful, false otherwise. + # @see https://developer.github.com/v3/orgs/members/#publicize-a-users-membership + # + # source://octokit//lib/octokit/client/organizations.rb#624 + def publicize_membership(org, user, options = T.unsafe(nil)); end + + # Remove organization member + # + # Requires authenticated organization owner or member with team `admin` access. + # + # @example + # @client.remove_organization_member('github', 'pengwynn') + # @example + # @client.remove_org_member('github', 'pengwynn') + # @param org [String, Integer] Organization GitHub login or id. + # @param user [String] GitHub username of user to remove. + # @return [Boolean] True if removal is successful, false otherwise. + # @see https://developer.github.com/v3/orgs/members/#remove-a-member + # + # source://octokit//lib/octokit/client/organizations.rb#607 + def remove_org_member(org, user, options = T.unsafe(nil)); end + + # Remove an organization membership + # + # @param org [String, Integer] Organization GitHub login or id. + # @return [Boolean] Success + # @see https://developer.github.com/v3/orgs/members/#remove-organization-membership + # + # source://octokit//lib/octokit/client/organizations.rb#747 + def remove_org_membership(org, options = T.unsafe(nil)); end + + # Remove organization member + # + # Requires authenticated organization owner or member with team `admin` access. + # + # @example + # @client.remove_organization_member('github', 'pengwynn') + # @example + # @client.remove_org_member('github', 'pengwynn') + # @param org [String, Integer] Organization GitHub login or id. + # @param user [String] GitHub username of user to remove. + # @return [Boolean] True if removal is successful, false otherwise. + # @see https://developer.github.com/v3/orgs/members/#remove-a-member + # + # source://octokit//lib/octokit/client/organizations.rb#607 + def remove_organization_member(org, user, options = T.unsafe(nil)); end + + # Remove an organization membership + # + # @param org [String, Integer] Organization GitHub login or id. + # @return [Boolean] Success + # @see https://developer.github.com/v3/orgs/members/#remove-organization-membership + # + # source://octokit//lib/octokit/client/organizations.rb#747 + def remove_organization_membership(org, options = T.unsafe(nil)); end + + # Remove outside collaborator from an organization + # + # Requires authenticated organization members. + # + # @example + # @client.remove_outside_collaborator('github', 'lizzhale') + # @param org [String, Integer] Organization GitHub login or id. + # @param user [String] GitHub username to be removed as outside collaborator + # @return [Boolean] Return true if outside collaborator removed from organization, false otherwise. + # @see https://developer.github.com/v3/orgs/outside-collaborators/#remove-outside-collaborator + # + # source://octokit//lib/octokit/client/organizations.rb#269 + def remove_outside_collaborator(org, user, options = T.unsafe(nil)); end + + # Remove team member + # + # Requires authenticated organization owner or member with team + # `admin` permission. + # + # @example + # @client.remove_team_member(100000, 'pengwynn') + # @param team_id [Integer] Team id. + # @param user [String] GitHub username of the user to boot. + # @return [Boolean] True if user removed, false otherwise. + # @see https://developer.github.com/v3/orgs/teams/#remove-team-member + # + # source://octokit//lib/octokit/client/organizations.rb#476 + def remove_team_member(team_id, user, options = T.unsafe(nil)); end + + # Remove team membership + # + # @example + # @client.remove_team_membership(100000, 'pengwynn') + # @param team_id [Integer] Team id. + # @param user [String] GitHub username of the user to boot. + # @return [Boolean] True if user removed, false otherwise. + # @see https://developer.github.com/v3/orgs/teams/#remove-team-membership + # + # source://octokit//lib/octokit/client/organizations.rb#691 + def remove_team_membership(team_id, user, options = T.unsafe(nil)); end + + # Remove team repository + # + # Removes repository from team. Does not delete the repository. + # + # Requires authenticated organization owner. + # + # @example + # @client.remove_team_repository(100000, 'github/developer.github.com') + # @example + # @client.remove_team_repo(100000, 'github/developer.github.com') + # @param team_id [Integer] Team id. + # @param repo [String, Hash, Repository] A GitHub repository. + # @return [Boolean] Return true if repo removed from team, false otherwise. + # @see Octokit::Repository + # @see https://developer.github.com/v3/orgs/teams/#remove-team-repository + # + # source://octokit//lib/octokit/client/organizations.rb#590 + def remove_team_repo(team_id, repo, _options = T.unsafe(nil)); end + + # Remove team repository + # + # Removes repository from team. Does not delete the repository. + # + # Requires authenticated organization owner. + # + # @example + # @client.remove_team_repository(100000, 'github/developer.github.com') + # @example + # @client.remove_team_repo(100000, 'github/developer.github.com') + # @param team_id [Integer] Team id. + # @param repo [String, Hash, Repository] A GitHub repository. + # @return [Boolean] Return true if repo removed from team, false otherwise. + # @see Octokit::Repository + # @see https://developer.github.com/v3/orgs/teams/#remove-team-repository + # + # source://octokit//lib/octokit/client/organizations.rb#590 + def remove_team_repository(team_id, repo, _options = T.unsafe(nil)); end + + # Initiates the generation of a migration archive. + # + # Requires authenticated organization owner. + # + # @example + # @client.start_migration('github', ['github/dotfiles']) + # @option options + # @param org [String, Integer] Organization GitHub login or id. + # @param repositories [Array] :repositories Repositories for the organization. + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] Hash representing the new migration. + # @see https://docs.github.com/en/rest/reference/migrations#start-an-organization-migration + # + # source://octokit//lib/octokit/client/organizations.rb#765 + def start_migration(org, repositories, options = T.unsafe(nil)); end + + # Get team + # + # Requires authenticated organization member. + # + # @example + # @client.team(100000) + # @param team_id [Integer] Team id. + # @return [Sawyer::Resource] Hash representing team. + # @see https://developer.github.com/v3/orgs/teams/#get-team + # + # source://octokit//lib/octokit/client/organizations.rb#336 + def team(team_id, options = T.unsafe(nil)); end + + # Get team by name and org + # + # Requires authenticated organization member. + # + # @example + # @client.team_by_name("github", "justice-league") + # @param org [String, Integer] Organization GitHub login or id. + # @param team_slug [String] Team slug. + # @return [Sawyer::Resource] Hash representing team. + # @see https://developer.github.com/v3/teams/#get-team-by-name + # + # source://octokit//lib/octokit/client/organizations.rb#350 + def team_by_name(org, team_slug, options = T.unsafe(nil)); end + + # List pending team invitations + # + # Requires authenticated organization member. + # + # @example + # @client.team_invitations('github') + # @param team_id [Integer] Team id. + # @return [Array] Array of hashes representing invitations. + # @see https://developer.github.com/v3/orgs/teams/#list-pending-team-invitations + # + # source://octokit//lib/octokit/client/organizations.rb#509 + def team_invitations(team_id, options = T.unsafe(nil)); end + + # Check if a user is a member of a team. + # + # Use this to check if another user is a member of a team that + # you are a member. + # + # @example Check if a user is in your team + # @client.team_member?(100000, 'pengwynn') + # => false + # @param team_id [Integer] Team id. + # @param user [String] GitHub username of the user to check. + # @return [Boolean] Is a member? + # @see https://developer.github.com/v3/orgs/teams/#get-team-member + # + # source://octokit//lib/octokit/client/organizations.rb#495 + def team_member?(team_id, user, options = T.unsafe(nil)); end + + # List team members + # + # Requires authenticated organization member. + # + # @example + # @client.team_members(100000) + # @param team_id [Integer] Team id. + # @return [Array] Array of hashes representing users. + # @see https://developer.github.com/v3/orgs/teams/#list-team-members + # + # source://octokit//lib/octokit/client/organizations.rb#433 + def team_members(team_id, options = T.unsafe(nil)); end + + # Check if a user has a team membership. + # + # @example Check if a user has a membership for a team + # @client.team_membership(1234, 'pengwynn') + # @param team_id [Integer] Team id. + # @param user [String] GitHub username of the user to check. + # @return [Sawyer::Resource] Hash of team membership info + # @see https://developer.github.com/v3/orgs/teams/#get-team-membership + # + # source://octokit//lib/octokit/client/organizations.rb#664 + def team_membership(team_id, user, options = T.unsafe(nil)); end + + # Check team permissions for a repository + # + # Requires authenticated organization member. + # + # @example + # # Check whether the team has any permissions with the repository + # @client.team_permissions_for_repo("github", "justice-league", "octocat", "hello-world") + # @example + # # Get the full repository object including the permissions level and role for the team + # @client.team_permissions_for_repo("github", "justice-league", "octocat", "hello-world", :accept => 'application/vnd.github.v3.repository+json') + # @param team_slug_or_id [String, Integer] Team slug or Team ID. + # @param repo [String] Name of the repo to check permissions against. + # @param owner [String] Owner name for the repository. + # @param org [String, Integer] Organization GitHub login or id. + # @return [String, Sawyer::Resource] Depending on options it may be an empty string or a resource. + # @see https://docs.github.com/en/rest/teams/teams#check-team-permissions-for-a-repository + # + # source://octokit//lib/octokit/client/organizations.rb#371 + def team_permissions_for_repo(org, team_slug_or_id, owner, repo, options = T.unsafe(nil)); end + + # Check if a repo is managed by a specific team + # + # @example + # @client.team_repository?(8675309, 'octokit/octokit.rb') + # @example + # @client.team_repo?(8675309, 'octokit/octokit.rb') + # @param team_id [Integer] Team ID. + # @param repo [String, Hash, Repository] A GitHub repository. + # @return [Boolean] True if managed by a team. False if not managed by + # the team OR the requesting user does not have authorization to access + # the team information. + # @see https://developer.github.com/v3/orgs/teams/#check-if-a-team-manages-a-repository + # + # source://octokit//lib/octokit/client/organizations.rb#541 + def team_repo?(team_id, repo, _options = T.unsafe(nil)); end + + # List team repositories + # + # Requires authenticated organization member. + # + # @example + # @client.team_repositories(100000) + # @example + # @client.team_repos(100000) + # @param team_id [Integer] Team id. + # @return [Array] Array of hashes representing repositories. + # @see https://developer.github.com/v3/orgs/teams/#list-team-repos + # + # source://octokit//lib/octokit/client/organizations.rb#524 + def team_repos(team_id, options = T.unsafe(nil)); end + + # List team repositories + # + # Requires authenticated organization member. + # + # @example + # @client.team_repositories(100000) + # @example + # @client.team_repos(100000) + # @param team_id [Integer] Team id. + # @return [Array] Array of hashes representing repositories. + # @see https://developer.github.com/v3/orgs/teams/#list-team-repos + # + # source://octokit//lib/octokit/client/organizations.rb#524 + def team_repositories(team_id, options = T.unsafe(nil)); end + + # Check if a repo is managed by a specific team + # + # @example + # @client.team_repository?(8675309, 'octokit/octokit.rb') + # @example + # @client.team_repo?(8675309, 'octokit/octokit.rb') + # @param team_id [Integer] Team ID. + # @param repo [String, Hash, Repository] A GitHub repository. + # @return [Boolean] True if managed by a team. False if not managed by + # the team OR the requesting user does not have authorization to access + # the team information. + # @see https://developer.github.com/v3/orgs/teams/#check-if-a-team-manages-a-repository + # + # source://octokit//lib/octokit/client/organizations.rb#541 + def team_repository?(team_id, repo, _options = T.unsafe(nil)); end + + # Unlock a previous migration archive. + # + # Requires authenticated organization owner. + # + # @param org [String, Integer] Organization GitHub login or id. + # @param id [Integer] ID number of the migration. + # @param repo [String] Name of the repository. + # @see https://docs.github.com/en/rest/reference/migrations#unlock-an-organization-repository + # + # source://octokit//lib/octokit/client/organizations.rb#825 + def unlock_repository(org, id, repo, options = T.unsafe(nil)); end + + # Conceal a user's membership of an organization. + # + # Requires authenticated organization owner. + # + # @example + # @client.unpublicize_membership('github', 'pengwynn') + # @example + # @client.conceal_membership('github', 'pengwynn') + # @param org [String, Integer] Organization GitHub login or id. + # @param user [String] GitHub username of user to unpublicize. + # @return [Boolean] True of unpublicization successful, false otherwise. + # @see https://developer.github.com/v3/orgs/members/#conceal-a-users-membership + # + # source://octokit//lib/octokit/client/organizations.rb#640 + def unpublicize_membership(org, user, options = T.unsafe(nil)); end + + # Update an organization. + # + # Requires authenticated client with proper organization permissions. + # + # @example + # @client.update_org('github', {:company => 'Unicorns, Inc.'}) + # @example + # @client.update_organization('github', { + # :billing_email => 'support@github.com', + # :company => 'GitHub', + # :email => 'support@github.com', + # :location => 'San Francisco', + # :name => 'github' + # }) + # @option values + # @option values + # @option values + # @option values + # @option values + # @option values + # @option values + # @param org [String, Integer] Organization GitHub login or id. + # @param values [Hash] The updated organization attributes. + # @return [Sawyer::Resource] Hash representing GitHub organization. + # @see https://developer.github.com/v3/orgs/#edit-an-organization + # + # source://octokit//lib/octokit/client/organizations.rb#48 + def update_org(org, values, options = T.unsafe(nil)); end + + # Edit an organization membership + # + # @option options + # @option options + # @option options + # @param options [Hash] a customizable set of options + # @param org [String, Integer] Organization GitHub login or id. + # @return [Sawyer::Resource] Hash representing the updated organization membership. + # @see https://developer.github.com/v3/orgs/members/#edit-your-organization-membership + # @see https://developer.github.com/v3/orgs/members/#add-or-update-organization-membership + # + # source://octokit//lib/octokit/client/organizations.rb#730 + def update_org_membership(org, options = T.unsafe(nil)); end + + # Update an organization. + # + # Requires authenticated client with proper organization permissions. + # + # @example + # @client.update_org('github', {:company => 'Unicorns, Inc.'}) + # @example + # @client.update_organization('github', { + # :billing_email => 'support@github.com', + # :company => 'GitHub', + # :email => 'support@github.com', + # :location => 'San Francisco', + # :name => 'github' + # }) + # @option values + # @option values + # @option values + # @option values + # @option values + # @option values + # @option values + # @param org [String, Integer] Organization GitHub login or id. + # @param values [Hash] The updated organization attributes. + # @return [Sawyer::Resource] Hash representing GitHub organization. + # @see https://developer.github.com/v3/orgs/#edit-an-organization + # + # source://octokit//lib/octokit/client/organizations.rb#48 + def update_organization(org, values, options = T.unsafe(nil)); end + + # Edit an organization membership + # + # @option options + # @option options + # @option options + # @param options [Hash] a customizable set of options + # @param org [String, Integer] Organization GitHub login or id. + # @return [Sawyer::Resource] Hash representing the updated organization membership. + # @see https://developer.github.com/v3/orgs/members/#edit-your-organization-membership + # @see https://developer.github.com/v3/orgs/members/#add-or-update-organization-membership + # + # source://octokit//lib/octokit/client/organizations.rb#730 + def update_organization_membership(org, options = T.unsafe(nil)); end + + # Update team + # + # Requires authenticated organization owner. + # + # @example + # @client.update_team(100000, { + # :name => 'Front-end Designers', + # :permission => 'push' + # }) + # @option options + # @option options + # @option options + # @param team_id [Integer] Team id. + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] Hash representing updated team. + # @see https://developer.github.com/v3/orgs/teams/#edit-team + # + # source://octokit//lib/octokit/client/organizations.rb#407 + def update_team(team_id, options = T.unsafe(nil)); end + + # List all teams for the authenticated user across all their orgs + # + # @return [Array] Array of team resources. + # @see https://developer.github.com/v3/orgs/teams/#list-user-teams + # + # source://octokit//lib/octokit/client/organizations.rb#649 + def user_teams(options = T.unsafe(nil)); end +end + +# Methods for the Pages API +# +# @see https://developer.github.com/v3/repos/pages/ +# +# source://octokit//lib/octokit/client/pages.rb#8 +module Octokit::Client::Pages + # List the latest Pages build information for a repository + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @return Sawyer::Resource A GitHub Pages resource about a build + # @see https://developer.github.com/v3/repos/pages/#list-latest-pages-build + # + # source://octokit//lib/octokit/client/pages.rb#45 + def latest_pages_build(repo, options = T.unsafe(nil)); end + + # List Pages builds for a repository + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @return [Array] A list of build history for a repository. + # @see https://developer.github.com/v3/repos/pages/#list-pages-builds + # + # source://octokit//lib/octokit/client/pages.rb#35 + def list_pages_builds(repo, options = T.unsafe(nil)); end + + # List Pages information for a repository + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @return Sawyer::Resource A GitHub Pages resource + # @see https://developer.github.com/v3/repos/pages/#get-information-about-a-pages-site + # + # source://octokit//lib/octokit/client/pages.rb#14 + def pages(repo, options = T.unsafe(nil)); end + + # Get a specific Pages build by ID + # + # @example + # Octokit.pages_build("github/developer.github.com", 5472601) + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param id [Integer, String] Build ID + # @return [Sawyer::Resource] Pages build information + # @see https://developer.github.com/v3/repos/pages/#list-a-specific-pages-build + # + # source://octokit//lib/octokit/client/pages.rb#26 + def pages_build(repo, id, options = T.unsafe(nil)); end + + # List Pages builds for a repository + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @return [Array] A list of build history for a repository. + # @see https://developer.github.com/v3/repos/pages/#list-pages-builds + # + # source://octokit//lib/octokit/client/pages.rb#35 + def pages_builds(repo, options = T.unsafe(nil)); end + + # Request a page build for the latest revision of the default branch + # + # You can only request builds for your repositories + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @return [Sawyer::Resource] Request result + # @see https://developer.github.com/v3/repos/pages/#request-a-page-build + # + # source://octokit//lib/octokit/client/pages.rb#56 + def request_page_build(repo, options = T.unsafe(nil)); end +end + +# Methods for Projects API +# +# @see https://docs.github.com/en/rest/projects +# +# source://octokit//lib/octokit/client/projects.rb#8 +module Octokit::Client::Projects + # List columns cards + # + # Requires authenticated client + # + # @example + # @client.column_cards(30294) + # @param id [Integer] Project column id + # @return [Array] Cards in the column + # @see https://developer.github.com/v3/projects/cards/#list-project-cards + # + # source://octokit//lib/octokit/client/projects.rb#204 + def column_cards(id, options = T.unsafe(nil)); end + + # Create organization project + # + # Requires authenticated client + # + # @example Create a project with name and body + # @client.create_org_project("octokit", "octocan", body: 'Improve clients') + # @example Create with only a name + # @client.create_org_project("octocat", "make more octocats") + # @option options + # @param name [String] Project name + # @param org [String] A GitHub organization + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] Organization project + # @see https://developer.github.com/v3/projects/#create-an-organization-project + # + # source://octokit//lib/octokit/client/projects.rb#68 + def create_org_project(org, name, options = T.unsafe(nil)); end + + # Create organization project + # + # Requires authenticated client + # + # @example Create a project with name and body + # @client.create_org_project("octokit", "octocan", body: 'Improve clients') + # @example Create with only a name + # @client.create_org_project("octocat", "make more octocats") + # @option options + # @param name [String] Project name + # @param org [String] A GitHub organization + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] Organization project + # @see https://developer.github.com/v3/projects/#create-an-organization-project + # + # source://octokit//lib/octokit/client/projects.rb#68 + def create_organization_project(org, name, options = T.unsafe(nil)); end + + # Create a project + # + # Requires authenticated client + # + # @example Create project with name and body + # @client.create_project('octokit/octokit.rb', 'bugs be gone', body: 'Fix all the bugs @joeyw creates') + # @example Create project with only a name + # @client.create_project('octokit/octokit.rb', 'implement new APIs') + # @option options + # @param name [String] Project name + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] Fresh new project + # @see https://developer.github.com/v3/projects/#create-a-repository-project + # + # source://octokit//lib/octokit/client/projects.rb#36 + def create_project(repo, name, options = T.unsafe(nil)); end + + # Create project card + # + # Requires authenticated client + # + # @example Create a project card for an repository issue + # @client.create_project_card(123495, content_id: 1, content_type: 'Issue') + # @example Create a project card with a note + # @client.create_project_card(123495, note: 'New note card') + # @note If :note is supplied, :content_id and :content_type must be + # excluded. Similarly, if :content_id is supplied, :content_type must + # be set and :note must not be included. + # @option options + # @option options + # @option options + # @param id [Integer] Project column id + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] Newly created card + # @see https://developer.github.com/v3/projects/cards/#create-a-project-card + # + # source://octokit//lib/octokit/client/projects.rb#226 + def create_project_card(id, options = T.unsafe(nil)); end + + # Create a project column + # + # Requires authenticated client + # + # @example + # @client.create_project_column(123942, "To Dones") + # @param id [Integer] Project column id + # @param name [String] New column name + # @return [Sawyer::Resource] Newly created column + # @see https://developer.github.com/v3/projects/columns/#create-a-project-column + # + # source://octokit//lib/octokit/client/projects.rb#134 + def create_project_column(id, name, options = T.unsafe(nil)); end + + # Delete a project + # + # Requires authenticated client + # + # @example + # @client.delete_project(123942) + # @param id [Integer] Project id + # @return [Boolean] Result of deletion + # @see https://developer.github.com/v3/projects/#delete-a-project + # + # source://octokit//lib/octokit/client/projects.rb#109 + def delete_project(id, options = T.unsafe(nil)); end + + # Delete a project card + # + # Requires authenticated client + # + # @example + # @client.delete_project_card(123495) + # @param id [Integer] Project card id + # @return [Boolean] True of deleted, false otherwise + # @see https://developer.github.com/v3/projects/cards/#delete-a-project-card + # + # source://octokit//lib/octokit/client/projects.rb#289 + def delete_project_card(id, options = T.unsafe(nil)); end + + # Delete a project column + # + # Requires authenticated client + # + # @example + # @client.delete_project_column(30294) + # @param id [Integer] Project column id + # @return [Boolean] Result of deletion request, true when deleted + # @see https://developer.github.com/v3/projects/columns/#delete-a-project-column + # + # source://octokit//lib/octokit/client/projects.rb#174 + def delete_project_column(id, options = T.unsafe(nil)); end + + # Move a project card + # + # Requires authenticated client + # + # @example Move a card to the top of another column + # @client.move_project_card(123495, 'top', column_id: 59402) + # @example Move a card to the bottom of the same column + # @client.move_project_card(123495, 'bottom') + # @option options + # @param position [String] Can be one of top, bottom, + # or after:, where is the id value of a + # card in the same column, or in the new column specified by column_id. + # @param id [Integer] Project card id + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] Empty sawyer resource + # @see https://developer.github.com/v3/projects/cards/#move-a-project-card + # + # source://octokit//lib/octokit/client/projects.rb#275 + def move_project_card(id, position, options = T.unsafe(nil)); end + + # Move a project column + # + # Requires authenticated client + # + # @example + # @client.move_project_column(30294, "last") + # @param id [Integer] Project column id + # @param position [String] New position for the column. Can be one of + # first, last, or after:, where + # is the id value of a column in the same project. + # @return [Sawyer::Resource] Result + # @see https://developer.github.com/v3/projects/columns/#move-a-project-column + # + # source://octokit//lib/octokit/client/projects.rb#190 + def move_project_column(id, position, options = T.unsafe(nil)); end + + # List organization projects + # + # Requires authenticated client + # + # @example + # @client.org_projects("octokit") + # @param org [String] A GitHub organization + # @return [Array] Organization projects + # @see https://developer.github.com/v3/projects/#list-organization-projects + # + # source://octokit//lib/octokit/client/projects.rb#50 + def org_projects(org, options = T.unsafe(nil)); end + + # List organization projects + # + # Requires authenticated client + # + # @example + # @client.org_projects("octokit") + # @param org [String] A GitHub organization + # @return [Array] Organization projects + # @see https://developer.github.com/v3/projects/#list-organization-projects + # + # source://octokit//lib/octokit/client/projects.rb#50 + def organization_projects(org, options = T.unsafe(nil)); end + + # Get a project by id + # + # @example + # Octokit.project(123942) + # @param id [Integer] Project id + # @return [Sawyer::Resource] Project + # @see https://developer.github.com/v3/projects/#get-a-project + # + # source://octokit//lib/octokit/client/projects.rb#81 + def project(id, options = T.unsafe(nil)); end + + # Get a project card + # + # Requires authenticated client + # + # @example + # @client.project_card(123495) + # @param id [Integer] Project card id + # @return [Sawyer::Resource] Project card + # @see https://developer.github.com/v3/projects/cards/#get-a-project-card + # + # source://octokit//lib/octokit/client/projects.rb#239 + def project_card(id, options = T.unsafe(nil)); end + + # Get a project column by ID + # + # @example + # Octokit.project_column(30294) + # @param id [Integer] Project column id + # @return [Sawyer::Resource] Project column + # @see https://developer.github.com/v3/projects/columns/#get-a-project-column + # + # source://octokit//lib/octokit/client/projects.rb#146 + def project_column(id, options = T.unsafe(nil)); end + + # List project columns + # + # @example + # @client.project_columns(123942) + # @param id [Integer] Project id + # @return [Array] List of project columns + # @see https://developer.github.com/v3/projects/columns/#list-project-columns + # + # source://octokit//lib/octokit/client/projects.rb#120 + def project_columns(id, options = T.unsafe(nil)); end + + # List projects for a repository + # + # Requires authenticated client + # + # @example + # @client.projects('octokit/octokit.rb') + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @return [Array] Repository projects + # @see https://developer.github.com/v3/projects/#list-repository-projects + # + # source://octokit//lib/octokit/client/projects.rb#18 + def projects(repo, options = T.unsafe(nil)); end + + # Update a project + # + # Requires authenticated client + # + # @example Update project name + # @client.update_project(123942, name: 'New name') + # @option options + # @option options + # @param id [Integer] Project id + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] Project + # @see https://developer.github.com/v3/projects/#update-a-project + # + # source://octokit//lib/octokit/client/projects.rb#96 + def update_project(id, options = T.unsafe(nil)); end + + # Update a project card + # + # Requires authenticated client + # + # @example + # @client.update_project_card(12345, note: 'new note') + # @option options + # @param id [Integer] Project card id + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] Updated project card + # @see https://developer.github.com/v3/projects/cards/#update-a-project-card + # + # source://octokit//lib/octokit/client/projects.rb#255 + def update_project_card(id, options = T.unsafe(nil)); end + + # Update a project column + # + # Requires authenticated client + # + # @example + # @client.update_project_column(30294, "new column name") + # @param id [Integer] Project column id + # @param name [String] New column name + # @return [Sawyer::Resource] Updated column + # @see https://developer.github.com/v3/projects/columns/#update-a-project-column + # + # source://octokit//lib/octokit/client/projects.rb#160 + def update_project_column(id, name, options = T.unsafe(nil)); end +end + +# Methods for the Pull Requests API +# +# @see https://developer.github.com/v3/pulls/ +# +# source://octokit//lib/octokit/client/pull_requests.rb#8 +module Octokit::Client::PullRequests + # Close a pull request + # + # @example + # @client.close_pull_request('octokit/octokit.rb', 67) + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @param number [Integer] Number of pull request to update. + # @return [Sawyer::Resource] Hash representing updated pull request. + # @see https://developer.github.com/v3/pulls/#update-a-pull-request + # + # source://octokit//lib/octokit/client/pull_requests.rb#119 + def close_pull_request(repo, number, options = T.unsafe(nil)); end + + # Create a pull request comment + # + # @deprecated The position will be deprecated in the next major version. Please refer to the details below. + # @example + # @client.create_pull_request_comment("octokit/octokit.rb", 163, ":shipit:", + # "2d3201e4440903d8b04a5487842053ca4883e5f0", "lib/octokit/request.rb", 47) + # @param pull_id [Integer] Pull request id + # @param body [String] Comment content + # @param path [String] Relative path of the file to comment on. + # @param line [Integer] Line index in the diff to comment on. + # For a multi-line comment, the last line of the range + # and specify 'start_line' in the 'options'. + # @param commit_id [String] Sha of the commit to comment on. + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @return [Sawyer::Resource] Hash representing the new comment + # @see https://developer.github.com/v3/pulls/comments/#create-a-comment + # + # source://octokit//lib/octokit/client/pull_requests.rb#209 + def create_pull_comment(repo, pull_id, body, commit_id, path, line, options = T.unsafe(nil)); end + + # Create reply to a pull request comment + # + # @example + # @client.create_pull_request_comment_reply("octokit/octokit.rb", 163, "done.", 1903950) + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param pull_id [Integer] Pull request id + # @param body [String] Comment contents + # @param comment_id [Integer] Comment id to reply to + # @return [Sawyer::Resource] Hash representing new comment + # @see https://developer.github.com/v3/pulls/comments/#create-a-comment + # + # source://octokit//lib/octokit/client/pull_requests.rb#231 + def create_pull_reply(repo, pull_id, body, comment_id, options = T.unsafe(nil)); end + + # Create a pull request + # + # @example + # @client.create_pull_request("octokit/octokit.rb", "master", "feature-branch", + # "Pull Request title", "Pull Request body") + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param base [String] The branch (or git ref) you want your changes + # pulled into. This should be an existing branch on the current + # repository. You cannot submit a pull request to one repo that requests + # a merge to a base of another repo. + # @param head [String] The branch (or git ref) where your changes are implemented. + # @param body [String] The body for the pull request (optional). Supports GFM. + # @param title [String] Title for the pull request + # @return [Sawyer::Resource] The newly created pull request + # @see https://developer.github.com/v3/pulls/#create-a-pull-request + # + # source://octokit//lib/octokit/client/pull_requests.rb#52 + def create_pull_request(repo, base, head, title, body = T.unsafe(nil), options = T.unsafe(nil)); end + + # Create a pull request comment + # + # @deprecated The position will be deprecated in the next major version. Please refer to the details below. + # @example + # @client.create_pull_request_comment("octokit/octokit.rb", 163, ":shipit:", + # "2d3201e4440903d8b04a5487842053ca4883e5f0", "lib/octokit/request.rb", 47) + # @param pull_id [Integer] Pull request id + # @param body [String] Comment content + # @param path [String] Relative path of the file to comment on. + # @param line [Integer] Line index in the diff to comment on. + # For a multi-line comment, the last line of the range + # and specify 'start_line' in the 'options'. + # @param commit_id [String] Sha of the commit to comment on. + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @return [Sawyer::Resource] Hash representing the new comment + # @see https://developer.github.com/v3/pulls/comments/#create-a-comment + # + # source://octokit//lib/octokit/client/pull_requests.rb#209 + def create_pull_request_comment(repo, pull_id, body, commit_id, path, line, options = T.unsafe(nil)); end + + # Create reply to a pull request comment + # + # @example + # @client.create_pull_request_comment_reply("octokit/octokit.rb", 163, "done.", 1903950) + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param pull_id [Integer] Pull request id + # @param body [String] Comment contents + # @param comment_id [Integer] Comment id to reply to + # @return [Sawyer::Resource] Hash representing new comment + # @see https://developer.github.com/v3/pulls/comments/#create-a-comment + # + # source://octokit//lib/octokit/client/pull_requests.rb#231 + def create_pull_request_comment_reply(repo, pull_id, body, comment_id, options = T.unsafe(nil)); end + + # Create a pull request from existing issue + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param base [String] The branch (or git ref) you want your changes + # pulled into. This should be an existing branch on the current + # repository. You cannot submit a pull request to one repo that requests + # a merge to a base of another repo. + # @param head [String] The branch (or git ref) where your changes are implemented. + # @param issue [Integer] Number of Issue on which to base this pull request + # @return [Sawyer::Resource] The newly created pull request + # @see https://developer.github.com/v3/pulls/#alternative-input + # + # source://octokit//lib/octokit/client/pull_requests.rb#73 + def create_pull_request_for_issue(repo, base, head, issue, options = T.unsafe(nil)); end + + # Create reply to a pull request comment + # + # @example + # @client.create_pull_request_comment_reply("octokit/octokit.rb", 163, "done.", 1903950) + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param pull_id [Integer] Pull request id + # @param body [String] Comment contents + # @param comment_id [Integer] Comment id to reply to + # @return [Sawyer::Resource] Hash representing new comment + # @see https://developer.github.com/v3/pulls/comments/#create-a-comment + # + # source://octokit//lib/octokit/client/pull_requests.rb#231 + def create_review_reply(repo, pull_id, body, comment_id, options = T.unsafe(nil)); end + + # Create a pull request comment + # + # @deprecated The position will be deprecated in the next major version. Please refer to the details below. + # @example + # @client.create_pull_request_comment("octokit/octokit.rb", 163, ":shipit:", + # "2d3201e4440903d8b04a5487842053ca4883e5f0", "lib/octokit/request.rb", 47) + # @param pull_id [Integer] Pull request id + # @param body [String] Comment content + # @param path [String] Relative path of the file to comment on. + # @param line [Integer] Line index in the diff to comment on. + # For a multi-line comment, the last line of the range + # and specify 'start_line' in the 'options'. + # @param commit_id [String] Sha of the commit to comment on. + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @return [Sawyer::Resource] Hash representing the new comment + # @see https://developer.github.com/v3/pulls/comments/#create-a-comment + # + # source://octokit//lib/octokit/client/pull_requests.rb#209 + def create_view_comment(repo, pull_id, body, commit_id, path, line, options = T.unsafe(nil)); end + + # Delete pull request comment + # + # @example + # @client.delete_pull_request_comment("octokit/octokit.rb", 1902707) + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param comment_id [Integer] Id of the comment to delete + # @return [Boolean] True if deleted, false otherwise + # @see https://developer.github.com/v3/pulls/comments/#delete-a-comment + # + # source://octokit//lib/octokit/client/pull_requests.rb#265 + def delete_pull_comment(repo, comment_id, options = T.unsafe(nil)); end + + # Delete pull request comment + # + # @example + # @client.delete_pull_request_comment("octokit/octokit.rb", 1902707) + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param comment_id [Integer] Id of the comment to delete + # @return [Boolean] True if deleted, false otherwise + # @see https://developer.github.com/v3/pulls/comments/#delete-a-comment + # + # source://octokit//lib/octokit/client/pull_requests.rb#265 + def delete_pull_request_comment(repo, comment_id, options = T.unsafe(nil)); end + + # Delete pull request comment + # + # @example + # @client.delete_pull_request_comment("octokit/octokit.rb", 1902707) + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param comment_id [Integer] Id of the comment to delete + # @return [Boolean] True if deleted, false otherwise + # @see https://developer.github.com/v3/pulls/comments/#delete-a-comment + # + # source://octokit//lib/octokit/client/pull_requests.rb#265 + def delete_review_comment(repo, comment_id, options = T.unsafe(nil)); end + + # Merge a pull request + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param number [Integer] Number of pull request + # @param commit_message [String] Optional commit message for the merge commit + # @return [Array] Merge commit info if successful + # @see https://developer.github.com/v3/pulls/#merge-a-pull-request-merge-button + # + # source://octokit//lib/octokit/client/pull_requests.rb#300 + def merge_pull_request(repo, number, commit_message = T.unsafe(nil), options = T.unsafe(nil)); end + + # Get a pull request + # + # @example + # Octokit.pull_request('rails/rails', 42, :state => 'closed') + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param number [Integer] Number of the pull request to fetch + # @return [Sawyer::Resource] Pull request info + # @see https://developer.github.com/v3/pulls/#get-a-single-pull-request + # + # source://octokit//lib/octokit/client/pull_requests.rb#32 + def pull(repo, number, options = T.unsafe(nil)); end + + # Get a pull request comment + # + # @example + # @client.pull_request_comment("pengwynn/octkit", 1903950) + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param comment_id [Integer] Id of comment to get + # @return [Sawyer::Resource] Hash representing the comment + # @see https://developer.github.com/v3/pulls/comments/#get-a-single-comment + # + # source://octokit//lib/octokit/client/pull_requests.rb#187 + def pull_comment(repo, comment_id, options = T.unsafe(nil)); end + + # List comments on a pull request + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param number [Integer] Number of pull request + # @return [Array] List of comments + # @see https://developer.github.com/v3/pulls/comments/#list-comments-on-a-pull-request + # + # source://octokit//lib/octokit/client/pull_requests.rb#172 + def pull_comments(repo, number, options = T.unsafe(nil)); end + + # List commits on a pull request + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param number [Integer] Number of pull request + # @return [Array] List of commits + # @see https://developer.github.com/v3/pulls/#list-commits-on-a-pull-request + # + # source://octokit//lib/octokit/client/pull_requests.rb#130 + def pull_commits(repo, number, options = T.unsafe(nil)); end + + # List files on a pull request + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param number [Integer] Number of pull request + # @return [Array] List of files + # @see https://developer.github.com/v3/pulls/#list-pull-requests-files + # + # source://octokit//lib/octokit/client/pull_requests.rb#277 + def pull_files(repo, number, options = T.unsafe(nil)); end + + # Check pull request merge status + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param number [Integer] Number of pull request + # @return [Boolean] True if the pull request has been merged + # @see https://developer.github.com/v3/pulls/#get-if-a-pull-request-has-been-merged + # + # source://octokit//lib/octokit/client/pull_requests.rb#310 + def pull_merged?(repo, number, options = T.unsafe(nil)); end + + # Get a pull request + # + # @example + # Octokit.pull_request('rails/rails', 42, :state => 'closed') + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param number [Integer] Number of the pull request to fetch + # @return [Sawyer::Resource] Pull request info + # @see https://developer.github.com/v3/pulls/#get-a-single-pull-request + # + # source://octokit//lib/octokit/client/pull_requests.rb#32 + def pull_request(repo, number, options = T.unsafe(nil)); end + + # Get a pull request comment + # + # @example + # @client.pull_request_comment("pengwynn/octkit", 1903950) + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param comment_id [Integer] Id of comment to get + # @return [Sawyer::Resource] Hash representing the comment + # @see https://developer.github.com/v3/pulls/comments/#get-a-single-comment + # + # source://octokit//lib/octokit/client/pull_requests.rb#187 + def pull_request_comment(repo, comment_id, options = T.unsafe(nil)); end + + # List comments on a pull request + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param number [Integer] Number of pull request + # @return [Array] List of comments + # @see https://developer.github.com/v3/pulls/comments/#list-comments-on-a-pull-request + # + # source://octokit//lib/octokit/client/pull_requests.rb#172 + def pull_request_comments(repo, number, options = T.unsafe(nil)); end + + # List commits on a pull request + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param number [Integer] Number of pull request + # @return [Array] List of commits + # @see https://developer.github.com/v3/pulls/#list-commits-on-a-pull-request + # + # source://octokit//lib/octokit/client/pull_requests.rb#130 + def pull_request_commits(repo, number, options = T.unsafe(nil)); end + + # List files on a pull request + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param number [Integer] Number of pull request + # @return [Array] List of files + # @see https://developer.github.com/v3/pulls/#list-pull-requests-files + # + # source://octokit//lib/octokit/client/pull_requests.rb#277 + def pull_request_files(repo, number, options = T.unsafe(nil)); end + + # Check pull request merge status + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param number [Integer] Number of pull request + # @return [Boolean] True if the pull request has been merged + # @see https://developer.github.com/v3/pulls/#get-if-a-pull-request-has-been-merged + # + # source://octokit//lib/octokit/client/pull_requests.rb#310 + def pull_request_merged?(repo, number, options = T.unsafe(nil)); end + + # List pull requests for a repository + # + # @example + # Octokit.pull_requests('rails/rails', :state => 'closed') + # @overload pull_requests + # @return [Array] Array of pulls + # @see https://developer.github.com/v3/pulls/#list-pull-requests + # + # source://octokit//lib/octokit/client/pull_requests.rb#19 + def pull_requests(repo, options = T.unsafe(nil)); end + + # List pull request comments for a repository + # + # By default, Review Comments are ordered by ascending ID. + # + # @example Get review comments, sort by updated asc since a time + # @client.pull_requests_comments("octokit/octokit.rb", { + # :sort => 'updated', + # :direction => 'asc', + # :since => '2010-05-04T23:45:02Z' + # }) + # @example Get the pull request review comments in the octokit repository + # @client.issues_comments("octokit/octokit.rb") + # @option options + # @option options + # @option options + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param options [Hash] Optional parameters + # @return [Array] List of pull request review comments. + # @see https://developer.github.com/v3/pulls/comments/#list-comments-in-a-repository + # + # source://octokit//lib/octokit/client/pull_requests.rb#160 + def pull_requests_comments(repo, options = T.unsafe(nil)); end + + # List pull requests for a repository + # + # @example + # Octokit.pull_requests('rails/rails', :state => 'closed') + # @overload pull_requests + # @return [Array] Array of pulls + # @see https://developer.github.com/v3/pulls/#list-pull-requests + # + # source://octokit//lib/octokit/client/pull_requests.rb#19 + def pulls(repo, options = T.unsafe(nil)); end + + # List pull request comments for a repository + # + # By default, Review Comments are ordered by ascending ID. + # + # @example Get review comments, sort by updated asc since a time + # @client.pull_requests_comments("octokit/octokit.rb", { + # :sort => 'updated', + # :direction => 'asc', + # :since => '2010-05-04T23:45:02Z' + # }) + # @example Get the pull request review comments in the octokit repository + # @client.issues_comments("octokit/octokit.rb") + # @option options + # @option options + # @option options + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param options [Hash] Optional parameters + # @return [Array] List of pull request review comments. + # @see https://developer.github.com/v3/pulls/comments/#list-comments-in-a-repository + # + # source://octokit//lib/octokit/client/pull_requests.rb#160 + def pulls_comments(repo, options = T.unsafe(nil)); end + + # Get a pull request comment + # + # @example + # @client.pull_request_comment("pengwynn/octkit", 1903950) + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param comment_id [Integer] Id of comment to get + # @return [Sawyer::Resource] Hash representing the comment + # @see https://developer.github.com/v3/pulls/comments/#get-a-single-comment + # + # source://octokit//lib/octokit/client/pull_requests.rb#187 + def review_comment(repo, comment_id, options = T.unsafe(nil)); end + + # List comments on a pull request + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param number [Integer] Number of pull request + # @return [Array] List of comments + # @see https://developer.github.com/v3/pulls/comments/#list-comments-on-a-pull-request + # + # source://octokit//lib/octokit/client/pull_requests.rb#172 + def review_comments(repo, number, options = T.unsafe(nil)); end + + # List pull request comments for a repository + # + # By default, Review Comments are ordered by ascending ID. + # + # @example Get review comments, sort by updated asc since a time + # @client.pull_requests_comments("octokit/octokit.rb", { + # :sort => 'updated', + # :direction => 'asc', + # :since => '2010-05-04T23:45:02Z' + # }) + # @example Get the pull request review comments in the octokit repository + # @client.issues_comments("octokit/octokit.rb") + # @option options + # @option options + # @option options + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param options [Hash] Optional parameters + # @return [Array] List of pull request review comments. + # @see https://developer.github.com/v3/pulls/comments/#list-comments-in-a-repository + # + # source://octokit//lib/octokit/client/pull_requests.rb#160 + def reviews_comments(repo, options = T.unsafe(nil)); end + + # Update pull request comment + # + # @example + # @client.update_pull_request_comment("octokit/octokit.rb", 1903950, ":shipit:") + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param comment_id [Integer] Id of the comment to update + # @param body [String] Updated comment content + # @return [Sawyer::Resource] Hash representing the updated comment + # @see https://developer.github.com/v3/pulls/comments/#edit-a-comment + # + # source://octokit//lib/octokit/client/pull_requests.rb#250 + def update_pull_comment(repo, comment_id, body, options = T.unsafe(nil)); end + + # Update a pull request + # + # @example + # @client.update_pull_request('octokit/octokit.rb', 67, 'new title', 'updated body', 'closed') + # @example Passing nil for optional attributes to update specific attributes. + # @client.update_pull_request('octokit/octokit.rb', 67, nil, nil, 'open') + # @example Empty body by passing empty string + # @client.update_pull_request('octokit/octokit.rb', 67, nil, '') + # @overload update_pull_request + # @overload update_pull_request + # @return [Sawyer::Resource] Hash representing updated pull request. + # @see https://developer.github.com/v3/pulls/#update-a-pull-request + # + # source://octokit//lib/octokit/client/pull_requests.rb#104 + def update_pull_request(*args); end + + # Update a pull request branch + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param number [Integer] Number of pull request + # @param options [Hash] Optional parameters (e.g. expected_head_sha) + # @return [Boolean] True if the pull request branch has been updated + # @see https://developer.github.com/v3/pulls/#update-a-pull-request-branch + # + # source://octokit//lib/octokit/client/pull_requests.rb#289 + def update_pull_request_branch(repo, number, options = T.unsafe(nil)); end + + # Update pull request comment + # + # @example + # @client.update_pull_request_comment("octokit/octokit.rb", 1903950, ":shipit:") + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param comment_id [Integer] Id of the comment to update + # @param body [String] Updated comment content + # @return [Sawyer::Resource] Hash representing the updated comment + # @see https://developer.github.com/v3/pulls/comments/#edit-a-comment + # + # source://octokit//lib/octokit/client/pull_requests.rb#250 + def update_pull_request_comment(repo, comment_id, body, options = T.unsafe(nil)); end + + # Update pull request comment + # + # @example + # @client.update_pull_request_comment("octokit/octokit.rb", 1903950, ":shipit:") + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param comment_id [Integer] Id of the comment to update + # @param body [String] Updated comment content + # @return [Sawyer::Resource] Hash representing the updated comment + # @see https://developer.github.com/v3/pulls/comments/#edit-a-comment + # + # source://octokit//lib/octokit/client/pull_requests.rb#250 + def update_review_comment(repo, comment_id, body, options = T.unsafe(nil)); end +end + +# Methods for API rate limiting info +# +# @see https://developer.github.com/v3/#rate-limiting +# +# source://octokit//lib/octokit/client/rate_limit.rb#8 +module Octokit::Client::RateLimit + # Get rate limit info from last response if available + # or make a new request to fetch rate limit + # + # @return [Octokit::RateLimit] Rate limit info + # @see https://developer.github.com/v3/rate_limit/#rate-limit + # + # source://octokit//lib/octokit/client/rate_limit.rb#14 + def rate_limit(_options = T.unsafe(nil)); end + + # Refresh rate limit info by making a new request + # + # @return [Octokit::RateLimit] Rate limit info + # @see https://developer.github.com/v3/rate_limit/#rate-limit + # + # source://octokit//lib/octokit/client/rate_limit.rb#35 + def rate_limit!(_options = T.unsafe(nil)); end + + # Get number of rate limted requests remaining + # + # @return [Integer] Number of requests remaining in this period + # @see https://developer.github.com/v3/rate_limit/#rate-limit + # + # source://octokit//lib/octokit/client/rate_limit.rb#25 + def rate_limit_remaining(_options = T.unsafe(nil)); end + + # Refresh rate limit info and get number of rate limted requests remaining + # + # @return [Integer] Number of requests remaining in this period + # @see https://developer.github.com/v3/rate_limit/#rate-limit + # + # source://octokit//lib/octokit/client/rate_limit.rb#45 + def rate_limit_remaining!(_options = T.unsafe(nil)); end + + # Get rate limit info from last response if available + # or make a new request to fetch rate limit + # + # @return [Octokit::RateLimit] Rate limit info + # @see https://developer.github.com/v3/rate_limit/#rate-limit + # + # source://octokit//lib/octokit/client/rate_limit.rb#14 + def ratelimit(_options = T.unsafe(nil)); end + + # Refresh rate limit info by making a new request + # + # @return [Octokit::RateLimit] Rate limit info + # @see https://developer.github.com/v3/rate_limit/#rate-limit + # + # source://octokit//lib/octokit/client/rate_limit.rb#35 + def ratelimit!(_options = T.unsafe(nil)); end + + # Get number of rate limted requests remaining + # + # @return [Integer] Number of requests remaining in this period + # @see https://developer.github.com/v3/rate_limit/#rate-limit + # + # source://octokit//lib/octokit/client/rate_limit.rb#25 + def ratelimit_remaining(_options = T.unsafe(nil)); end + + # Refresh rate limit info and get number of rate limted requests remaining + # + # @return [Integer] Number of requests remaining in this period + # @see https://developer.github.com/v3/rate_limit/#rate-limit + # + # source://octokit//lib/octokit/client/rate_limit.rb#45 + def ratelimit_remaining!(_options = T.unsafe(nil)); end +end + +# Methods for the Reacions API +# +# @see https://developer.github.com/v3/reactions/ +# +# source://octokit//lib/octokit/client/reactions.rb#8 +module Octokit::Client::Reactions + # List reactions for a commit comment + # + # @example + # @client.commit_comment_reactions("octokit/octokit.rb", 1) + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param id [Integer] The id of the commit comment + # @return [Array] Array of Hashes representing the reactions. + # @see https://developer.github.com/v3/reactions/#list-reactions-for-a-commit-comment + # + # source://octokit//lib/octokit/client/reactions.rb#19 + def commit_comment_reactions(repo, id, options = T.unsafe(nil)); end + + # Create a reaction for a commit comment + # + # @example + # @client.create_commit_comment_reactions("octokit/octokit.rb", 1) + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param id [Integer] The id of the commit comment + # @param reaction [String] The Reaction + # @return [] Hash representing the reaction + # @see https://developer.github.com/v3/reactions/#create-reaction-for-a-commit-comment + # @see https://developer.github.com/v3/reactions/#reaction-types + # + # source://octokit//lib/octokit/client/reactions.rb#35 + def create_commit_comment_reaction(repo, id, reaction, options = T.unsafe(nil)); end + + # Create reaction for an issue comment + # + # @example + # @client.create_issue_comment_reaction("octokit/octokit.rb", 1) + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param id [Integer] The Issue comment id + # @param reaction [String] The Reaction + # @return [] Hashes representing the reaction. + # @see https://developer.github.com/v3/reactions/#create-reaction-for-an-issue-comment + # @see https://developer.github.com/v3/reactions/#reaction-types + # + # source://octokit//lib/octokit/client/reactions.rb#100 + def create_issue_comment_reaction(repo, id, reaction, options = T.unsafe(nil)); end + + # Create reaction for an issue + # + # @example + # @client.create_issue_reaction("octokit/octokit.rb", 1) + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param number [Integer] The Issue number + # @param reaction [String] The Reaction + # @return [] Hash representing the reaction. + # @see https://developer.github.com/v3/reactions/#create-reaction-for-an-issue + # @see https://developer.github.com/v3/reactions/#reaction-types + # + # source://octokit//lib/octokit/client/reactions.rb#67 + def create_issue_reaction(repo, number, reaction, options = T.unsafe(nil)); end + + # Create reaction for a pull request review comment + # + # @example + # @client.create_pull_request_reiew_comment_reaction("octokit/octokit.rb", 1) + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param id [Integer] The Issue comment id + # @param reaction [String] The Reaction + # @return [] Hash representing the reaction. + # @see https://developer.github.com/v3/reactions/#create-reaction-for-a-pull-request-review-comment + # @see https://developer.github.com/v3/reactions/#reaction-types + # + # source://octokit//lib/octokit/client/reactions.rb#133 + def create_pull_request_review_comment_reaction(repo, id, reaction, options = T.unsafe(nil)); end + + # Create reaction for a release + # + # @example + # @client.create_release_reaction("octokit/octokit.rb", 1) + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param id [Integer] The Release id + # @param reaction [String] The Reaction + # @return [] Hash representing the reaction. + # @see https://docs.github.com/en/free-pro-team@latest/rest/reactions/reactions?apiVersion=2022-11-28#create-reaction-for-a-release + # @see https://developer.github.com/v3/reactions/#reaction-types + # + # source://octokit//lib/octokit/client/reactions.rb#182 + def create_release_reaction(repo, release_id, reaction, options = T.unsafe(nil)); end + + # Delete a reaction + # + # @example + # @client.delete_issue_reaction("octokit/octokit.rb", 1, 2) + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param issue_id [Integer] The Issue comment id + # @param reaction_id [Integer] The Reaction id + # @return [Boolean] Return true if reaction was deleted, false otherwise. + # @see https://docs.github.com/en/rest/reactions/reactions#delete-an-issue-reaction + # + # source://octokit//lib/octokit/client/reactions.rb#150 + def delete_issue_reaction(repo, issue_id, reaction_id, options = T.unsafe(nil)); end + + # Delete a reaction for a release + # + # @example + # @client.delete_release_reaction("octokit/octokit.rb", 1, 2) + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param issue_id [Integer] The Release id + # @param reaction_id [Integer] The Reaction id + # @return [Boolean] Return true if reaction was deleted, false otherwise. + # @see https://docs.github.com/en/free-pro-team@latest/rest/reactions/reactions?apiVersion=2022-11-28#delete-a-release-reaction + # + # source://octokit//lib/octokit/client/reactions.rb#199 + def delete_release_reaction(repo, release_id, reaction_id, options = T.unsafe(nil)); end + + # List reactions for an issue comment + # + # @example + # @client.issue_comment_reactions("octokit/octokit.rb", 1) + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param id [Integer] The Issue comment id + # @return [Array] Array of Hashes representing the reactions. + # @see https://developer.github.com/v3/reactions/#list-reactions-for-an-issue-comment + # + # source://octokit//lib/octokit/client/reactions.rb#83 + def issue_comment_reactions(repo, id, options = T.unsafe(nil)); end + + # List reactions for an issue + # + # @example + # @client.issue_reactions("octokit/octokit.rb", 1) + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param number [Integer] The Issue number + # @return [Array] Array of Hashes representing the reactions. + # @see https://developer.github.com/v3/reactions/#list-reactions-for-an-issue + # + # source://octokit//lib/octokit/client/reactions.rb#50 + def issue_reactions(repo, number, options = T.unsafe(nil)); end + + # List reactions for a pull request review comment + # + # @example + # @client.pull_request_review_comment_reactions("octokit/octokit.rb", 1) + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param id [Integer] The Issue comment id + # @return [Array] Array of Hashes representing the reactions. + # @see https://developer.github.com/v3/reactions/#list-reactions-for-a-pull-request-review-comment + # + # source://octokit//lib/octokit/client/reactions.rb#116 + def pull_request_review_comment_reactions(repo, id, options = T.unsafe(nil)); end + + # List reactions for a release + # + # @example + # @client.release_reactions("octokit/octokit.rb", 1) + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param id [Integer] The Release id + # @return [Array] Array of Hashes representing the reactions. + # @see https://docs.github.com/en/free-pro-team@latest/rest/reactions/reactions?apiVersion=2022-11-28#list-reactions-for-a-release + # + # source://octokit//lib/octokit/client/reactions.rb#165 + def release_reactions(repo, release_id, options = T.unsafe(nil)); end +end + +# Methods for References for Git Data API +# +# @see https://developer.github.com/v3/git/refs/ +# +# source://octokit//lib/octokit/client/refs.rb#8 +module Octokit::Client::Refs + # Create a reference + # + # @example Create refs/heads/master for octocat/Hello-World with sha 827efc6d56897b048c772eb4087f854f46256132 + # Octokit.create_ref("octocat/Hello-World", "heads/master", "827efc6d56897b048c772eb4087f854f46256132") + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param ref [String] The ref, e.g. tags/v0.0.3 + # @param sha [String] A SHA, e.g. 827efc6d56897b048c772eb4087f854f46256132 + # @return [Array] The list of references, already containing the new one + # @see https://developer.github.com/v3/git/refs/#create-a-reference + # + # source://octokit//lib/octokit/client/refs.rb#60 + def create_ref(repo, ref, sha, options = T.unsafe(nil)); end + + # Create a reference + # + # @example Create refs/heads/master for octocat/Hello-World with sha 827efc6d56897b048c772eb4087f854f46256132 + # Octokit.create_ref("octocat/Hello-World", "heads/master", "827efc6d56897b048c772eb4087f854f46256132") + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param ref [String] The ref, e.g. tags/v0.0.3 + # @param sha [String] A SHA, e.g. 827efc6d56897b048c772eb4087f854f46256132 + # @return [Array] The list of references, already containing the new one + # @see https://developer.github.com/v3/git/refs/#create-a-reference + # + # source://octokit//lib/octokit/client/refs.rb#60 + def create_reference(repo, ref, sha, options = T.unsafe(nil)); end + + # Delete a single branch + # + # @example Delete uritemplate for sigmavirus24/github3.py + # Octokit.delete_branch("sigmavirus24/github3.py", "uritemplate") + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param branch [String] The branch, e.g. fix-refs + # @return [Boolean] Success + # @see https://developer.github.com/v3/git/refs/#delete-a-reference + # + # source://octokit//lib/octokit/client/refs.rb#113 + def delete_branch(repo, branch, options = T.unsafe(nil)); end + + # Delete a single reference + # + # @example Delete tags/v0.0.3 for sferik/rails_admin + # Octokit.delete_ref("sferik/rails_admin","tags/v0.0.3") + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param ref [String] The ref, e.g. tags/v0.0.3 + # @return [Boolean] Success + # @see https://developer.github.com/v3/git/refs/#delete-a-reference + # + # source://octokit//lib/octokit/client/refs.rb#125 + def delete_ref(repo, ref, options = T.unsafe(nil)); end + + # Delete a single reference + # + # @example Delete tags/v0.0.3 for sferik/rails_admin + # Octokit.delete_ref("sferik/rails_admin","tags/v0.0.3") + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param ref [String] The ref, e.g. tags/v0.0.3 + # @return [Boolean] Success + # @see https://developer.github.com/v3/git/refs/#delete-a-reference + # + # source://octokit//lib/octokit/client/refs.rb#125 + def delete_reference(repo, ref, options = T.unsafe(nil)); end + + # List all refs for a given user and repo + # + # @example Fetch all refs for sferik/rails_admin + # Octokit.refs("sferik/rails_admin") + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param namespace [String] The ref namespace, e.g. tag or heads + # @return [Array] A list of references matching the repo and the namespace + # @see https://developer.github.com/v3/git/refs/#get-all-references + # + # source://octokit//lib/octokit/client/refs.rb#17 + def list_references(repo, namespace = T.unsafe(nil), options = T.unsafe(nil)); end + + # List all refs for a given user and repo + # + # @example Fetch all refs for sferik/rails_admin + # Octokit.refs("sferik/rails_admin") + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param namespace [String] The ref namespace, e.g. tag or heads + # @return [Array] A list of references matching the repo and the namespace + # @see https://developer.github.com/v3/git/refs/#get-all-references + # + # source://octokit//lib/octokit/client/refs.rb#17 + def list_refs(repo, namespace = T.unsafe(nil), options = T.unsafe(nil)); end + + # Fetch matching refs + # + # @example Fetch refs matching tags/v2 for sferik/rails_admin + # Octokit.ref("sferik/rails_admin","tags/v2") + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param ref [String] The ref, e.g. tags/v0.0.3 or heads/rails-3 + # @return [Array] The reference matching the given repo and the ref id + # @see https://developer.github.com/v3/git/refs/#list-matching-references + # + # source://octokit//lib/octokit/client/refs.rb#34 + def matching_refs(repo, ref, options = T.unsafe(nil)); end + + # Fetch a given reference + # + # @example Fetch tags/v0.0.3 for sferik/rails_admin + # Octokit.ref("sferik/rails_admin","tags/v0.0.3") + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param ref [String] The ref, e.g. tags/v0.0.3 + # @return [Sawyer::Resource] The reference matching the given repo and the ref id + # @see https://developer.github.com/v3/git/refs/#get-a-reference + # + # source://octokit//lib/octokit/client/refs.rb#46 + def ref(repo, ref, options = T.unsafe(nil)); end + + # Fetch a given reference + # + # @example Fetch tags/v0.0.3 for sferik/rails_admin + # Octokit.ref("sferik/rails_admin","tags/v0.0.3") + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param ref [String] The ref, e.g. tags/v0.0.3 + # @return [Sawyer::Resource] The reference matching the given repo and the ref id + # @see https://developer.github.com/v3/git/refs/#get-a-reference + # + # source://octokit//lib/octokit/client/refs.rb#46 + def reference(repo, ref, options = T.unsafe(nil)); end + + # List all refs for a given user and repo + # + # @example Fetch all refs for sferik/rails_admin + # Octokit.refs("sferik/rails_admin") + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param namespace [String] The ref namespace, e.g. tag or heads + # @return [Array] A list of references matching the repo and the namespace + # @see https://developer.github.com/v3/git/refs/#get-all-references + # + # source://octokit//lib/octokit/client/refs.rb#17 + def references(repo, namespace = T.unsafe(nil), options = T.unsafe(nil)); end + + # List all refs for a given user and repo + # + # @example Fetch all refs for sferik/rails_admin + # Octokit.refs("sferik/rails_admin") + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param namespace [String] The ref namespace, e.g. tag or heads + # @return [Array] A list of references matching the repo and the namespace + # @see https://developer.github.com/v3/git/refs/#get-all-references + # + # source://octokit//lib/octokit/client/refs.rb#17 + def refs(repo, namespace = T.unsafe(nil), options = T.unsafe(nil)); end + + # Update a branch + # + # @example Force update heads/sc/featureA for octocat/Hello-World with sha aa218f56b14c9653891f9e74264a383fa43fefbd + # Octokit.update_branch("octocat/Hello-World", "sc/featureA", "aa218f56b14c9653891f9e74264a383fa43fefbd") + # @example Fast-forward update heads/sc/featureA for octocat/Hello-World with sha aa218f56b14c9653891f9e74264a383fa43fefbd + # Octokit.update_branch("octocat/Hello-World", "sc/featureA", "aa218f56b14c9653891f9e74264a383fa43fefbd", false) + # @param branch [String] The ref, e.g. feature/new-shiny + # @param force [Boolean] A flag indicating whether to force the update or to make sure the update is a fast-forward update. + # @param sha [String] A SHA, e.g. 827efc6d56897b048c772eb4087f854f46256132 + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @return [Array] The list of references updated + # @see https://developer.github.com/v3/git/refs/#update-a-reference + # + # source://octokit//lib/octokit/client/refs.rb#101 + def update_branch(repo, branch, sha, force = T.unsafe(nil), options = T.unsafe(nil)); end + + # Update a reference + # + # @example Force update heads/sc/featureA for octocat/Hello-World with sha aa218f56b14c9653891f9e74264a383fa43fefbd + # Octokit.update_ref("octocat/Hello-World", "heads/sc/featureA", "aa218f56b14c9653891f9e74264a383fa43fefbd") + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param ref [String] The ref, e.g. tags/v0.0.3 + # @param sha [String] A SHA, e.g. 827efc6d56897b048c772eb4087f854f46256132 + # @param force [Boolean] A flag indicating whether to force the update or to make sure the update is a fast-forward update. + # @return [Array] The list of references updated + # @see https://developer.github.com/v3/git/refs/#update-a-reference + # + # source://octokit//lib/octokit/client/refs.rb#80 + def update_ref(repo, ref, sha, force = T.unsafe(nil), options = T.unsafe(nil)); end + + # Update a reference + # + # @example Force update heads/sc/featureA for octocat/Hello-World with sha aa218f56b14c9653891f9e74264a383fa43fefbd + # Octokit.update_ref("octocat/Hello-World", "heads/sc/featureA", "aa218f56b14c9653891f9e74264a383fa43fefbd") + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param ref [String] The ref, e.g. tags/v0.0.3 + # @param sha [String] A SHA, e.g. 827efc6d56897b048c772eb4087f854f46256132 + # @param force [Boolean] A flag indicating whether to force the update or to make sure the update is a fast-forward update. + # @return [Array] The list of references updated + # @see https://developer.github.com/v3/git/refs/#update-a-reference + # + # source://octokit//lib/octokit/client/refs.rb#80 + def update_reference(repo, ref, sha, force = T.unsafe(nil), options = T.unsafe(nil)); end +end + +# Methods for the Releases API +# +# @see https://developer.github.com/v3/repos/releases/ +# +# source://octokit//lib/octokit/client/releases.rb#8 +module Octokit::Client::Releases + # Create a release + # + # @option options + # @option options + # @option options + # @option options + # @option options + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param tag_name [String] Git tag from which to create release + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] The release + # @see https://developer.github.com/v3/repos/releases/#create-a-release + # + # source://octokit//lib/octokit/client/releases.rb#30 + def create_release(repo, tag_name, options = T.unsafe(nil)); end + + # Delete a release + # + # @param url [String] URL for the release as returned from .releases + # @return [Boolean] Success or failure + # @see https://developer.github.com/v3/repos/releases/#delete-a-release + # + # source://octokit//lib/octokit/client/releases.rb#65 + def delete_release(url, options = T.unsafe(nil)); end + + # Delete a release asset + # + # @param asset_url [String] URL for the asset as returned from .release_assets + # @return [Boolean] Success or failure + # @see https://developer.github.com/v3/repos/releases/#delete-a-release-asset + # + # source://octokit//lib/octokit/client/releases.rb#128 + def delete_release_asset(asset_url, options = T.unsafe(nil)); end + + # Update a release + # + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @param url [String] URL for the release as returned from .releases + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] The release + # @see https://developer.github.com/v3/repos/releases/#edit-a-release + # + # source://octokit//lib/octokit/client/releases.rb#55 + def edit_release(url, options = T.unsafe(nil)); end + + # Update a release asset + # + # @option options + # @option options + # @param asset_url [String] URL for the asset as returned from .release_assets + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] The release asset + # @see https://developer.github.com/v3/repos/releases/#edit-a-release-asset + # + # source://octokit//lib/octokit/client/releases.rb#118 + def edit_release_asset(asset_url, options = T.unsafe(nil)); end + + # Get the latest release + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @return [Sawyer::Resource] The release + # @see https://developer.github.com/v3/repos/releases/#get-the-latest-release + # + # source://octokit//lib/octokit/client/releases.rb#147 + def latest_release(repo, options = T.unsafe(nil)); end + + # List releases for a repository + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @return [Array] A list of releases + # @see https://developer.github.com/v3/repos/releases/#list-releases-for-a-repository + # + # source://octokit//lib/octokit/client/releases.rb#14 + def list_releases(repo, options = T.unsafe(nil)); end + + # Get a release + # + # @param url [String] URL for the release as returned from .releases + # @return [Sawyer::Resource] The release + # @see https://developer.github.com/v3/repos/releases/#get-a-single-release + # + # source://octokit//lib/octokit/client/releases.rb#40 + def release(url, options = T.unsafe(nil)); end + + # Get a single release asset + # + # @param asset_url [String] URL for the asset as returned from .release_assets + # @return [Sawyer::Resource] The release asset + # @see https://developer.github.com/v3/repos/releases/#get-a-single-release-asset + # + # source://octokit//lib/octokit/client/releases.rb#107 + def release_asset(asset_url, options = T.unsafe(nil)); end + + # List release assets + # + # @param release_url [String] URL for the release as returned from .releases + # @return [Array] A list of release assets + # @see https://developer.github.com/v3/repos/releases/#list-assets-for-a-release + # + # source://octokit//lib/octokit/client/releases.rb#74 + def release_assets(release_url, options = T.unsafe(nil)); end + + # Get the release for a given tag + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param tag_name [String] the name for a tag + # @return [Sawyer::Resource] The release + # @see https://developer.github.com/v3/repos/releases/#get-a-release-by-tag-name + # + # source://octokit//lib/octokit/client/releases.rb#138 + def release_for_tag(repo, tag_name, options = T.unsafe(nil)); end + + # List releases for a repository + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @return [Array] A list of releases + # @see https://developer.github.com/v3/repos/releases/#list-releases-for-a-repository + # + # source://octokit//lib/octokit/client/releases.rb#14 + def releases(repo, options = T.unsafe(nil)); end + + # Update a release + # + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @param url [String] URL for the release as returned from .releases + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] The release + # @see https://developer.github.com/v3/repos/releases/#edit-a-release + # + # source://octokit//lib/octokit/client/releases.rb#55 + def update_release(url, options = T.unsafe(nil)); end + + # Update a release asset + # + # @option options + # @option options + # @param asset_url [String] URL for the asset as returned from .release_assets + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] The release asset + # @see https://developer.github.com/v3/repos/releases/#edit-a-release-asset + # + # source://octokit//lib/octokit/client/releases.rb#118 + def update_release_asset(asset_url, options = T.unsafe(nil)); end + + # Upload a release asset + # + # @option options + # @option options + # @param release_url [String] URL for the release as returned from .releases + # @param path_or_file [String] Path to file to upload + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] The release asset + # @see https://developer.github.com/v3/repos/releases/#upload-a-release-asset + # + # source://octokit//lib/octokit/client/releases.rb#86 + def upload_asset(release_url, path_or_file, options = T.unsafe(nil)); end + + private + + # source://octokit//lib/octokit/client/releases.rb#153 + def content_type_from_file(file); end +end + +# Methods for the Repositories API +# +# @see https://developer.github.com/v3/repos/ +# +# source://octokit//lib/octokit/client/repositories.rb#8 +module Octokit::Client::Repositories + # Add collaborator to repo + # + # This can also be used to update the permission of an existing collaborator + # + # Requires authenticated client. + # + # @example + # @client.add_collaborator('octokit/octokit.rb', 'holman') + # @example + # @client.add_collab('octokit/octokit.rb', 'holman') + # @example Add a collaborator with admin permissions + # @client.add_collaborator('octokit/octokit.rb', 'holman', permission: 'admin') + # @option options + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @param collaborator [String] Collaborator GitHub username to add. + # @param options [Hash] a customizable set of options + # @return [Boolean] True if collaborator added, false otherwise. + # @see https://developer.github.com/v3/repos/collaborators/#add-user-as-a-collaborator + # + # source://octokit//lib/octokit/client/repositories.rb#345 + def add_collab(repo, collaborator, options = T.unsafe(nil)); end + + # Add collaborator to repo + # + # This can also be used to update the permission of an existing collaborator + # + # Requires authenticated client. + # + # @example + # @client.add_collaborator('octokit/octokit.rb', 'holman') + # @example + # @client.add_collab('octokit/octokit.rb', 'holman') + # @example Add a collaborator with admin permissions + # @client.add_collaborator('octokit/octokit.rb', 'holman', permission: 'admin') + # @option options + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @param collaborator [String] Collaborator GitHub username to add. + # @param options [Hash] a customizable set of options + # @return [Boolean] True if collaborator added, false otherwise. + # @see https://developer.github.com/v3/repos/collaborators/#add-user-as-a-collaborator + # + # source://octokit//lib/octokit/client/repositories.rb#345 + def add_collaborator(repo, collaborator, options = T.unsafe(nil)); end + + # Add deploy key to a repo + # + # Requires authenticated client. + # + # @example + # @client.add_deploy_key('octokit/octokit.rb', 'Staging server', 'ssh-rsa AAA...') + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @param title [String] Title reference for the deploy key. + # @param key [String] Public key. + # @return [Sawyer::Resource] Hash representing newly added key. + # @see https://developer.github.com/v3/repos/keys/#add-a-new-deploy-key + # + # source://octokit//lib/octokit/client/repositories.rb#266 + def add_deploy_key(repo, title, key, options = T.unsafe(nil)); end + + # List all repositories + # + # This provides a dump of every repository, in the order that they were + # created. + # + # @option options + # @param options [Hash] Optional options + # @return [Array] List of repositories. + # @see https://developer.github.com/v3/repos/#list-all-public-repositories + # + # source://octokit//lib/octokit/client/repositories.rb#87 + def all_repositories(options = T.unsafe(nil)); end + + # Get a single branch from a repository + # + # @example Get branch 'master` from octokit/octokit.rb + # Octokit.branch("octokit/octokit.rb", "master") + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @param branch [String] Branch name + # @return [Sawyer::Resource] The branch requested, if it exists + # @see https://developer.github.com/v3/repos/#get-branch + # + # source://octokit//lib/octokit/client/repositories.rb#566 + def branch(repo, branch, options = T.unsafe(nil)); end + + # Get branch protection summary + # + # @example + # @client.branch_protection('octokit/octokit.rb', 'master') + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @param branch [String] Branch name + # @return [Sawyer::Resource, nil] Branch protection summary or nil if the branch + # is not protected + # @see https://developer.github.com/v3/repos/branches/#get-branch-protection + # + # source://octokit//lib/octokit/client/repositories.rb#606 + def branch_protection(repo, branch, options = T.unsafe(nil)); end + + # List branches + # + # Requires authenticated client for private repos. + # + # @example + # Octokit.branches('octokit/octokit.rb') + # @example + # @client.branches('octokit/octokit.rb') + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @return [Array] Array of hashes representing branches. + # @see https://developer.github.com/v3/repos/#list-branches + # + # source://octokit//lib/octokit/client/repositories.rb#554 + def branches(repo, options = T.unsafe(nil)); end + + # Check to see if a particular user is an assignee for a repository. + # + # @example + # Octokit.check_assignee('octokit/octokit.rb', 'andrew') + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @param assignee [String] User login to check + # @return [Boolean] True if assignable on project, false otherwise. + # @see https://developer.github.com/v3/issues/assignees/#check-assignee + # + # source://octokit//lib/octokit/client/repositories.rb#670 + def check_assignee(repo, assignee, options = T.unsafe(nil)); end + + # Checks if a user is a collaborator for a repo. + # + # Requires authenticated client. + # + # @example + # @client.collaborator?('octokit/octokit.rb', 'holman') + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @param collaborator [String] Collaborator GitHub username to check. + # @return [Boolean] True if user is a collaborator, false otherwise. + # @see https://developer.github.com/v3/repos/collaborators/#check-if-a-user-is-a-collaborator + # + # source://octokit//lib/octokit/client/repositories.rb#377 + def collaborator?(repo, collaborator, options = T.unsafe(nil)); end + + # List collaborators + # + # Requires authenticated client for private repos. + # + # @example + # Octokit.collaborators('octokit/octokit.rb') + # @example + # Octokit.collabs('octokit/octokit.rb') + # @example + # @client.collabs('octokit/octokit.rb') + # @option options + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @param options [Hash] a customizable set of options + # @return [Array] Array of hashes representing collaborating users. + # @see https://developer.github.com/v3/repos/collaborators/#list-collaborators + # + # source://octokit//lib/octokit/client/repositories.rb#320 + def collaborators(repo, options = T.unsafe(nil)); end + + # List collaborators + # + # Requires authenticated client for private repos. + # + # @example + # Octokit.collaborators('octokit/octokit.rb') + # @example + # Octokit.collabs('octokit/octokit.rb') + # @example + # @client.collabs('octokit/octokit.rb') + # @option options + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @param options [Hash] a customizable set of options + # @return [Array] Array of hashes representing collaborating users. + # @see https://developer.github.com/v3/repos/collaborators/#list-collaborators + # + # source://octokit//lib/octokit/client/repositories.rb#320 + def collabs(repo, options = T.unsafe(nil)); end + + # List contributors to a repo + # + # Requires authenticated client for private repos. + # + # @example + # Octokit.contributors('octokit/octokit.rb', true) + # @example + # Octokit.contribs('octokit/octokit.rb') + # @example + # @client.contribs('octokit/octokit.rb') + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @param anon [Boolean] Set true to include anonymous contributors. + # @return [Array] Array of hashes representing users. + # @see https://developer.github.com/v3/repos/#list-contributors + # + # source://octokit//lib/octokit/client/repositories.rb#457 + def contribs(repo, anon = T.unsafe(nil), options = T.unsafe(nil)); end + + # List contributors to a repo + # + # Requires authenticated client for private repos. + # + # @example + # Octokit.contributors('octokit/octokit.rb', true) + # @example + # Octokit.contribs('octokit/octokit.rb') + # @example + # @client.contribs('octokit/octokit.rb') + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @param anon [Boolean] Set true to include anonymous contributors. + # @return [Array] Array of hashes representing users. + # @see https://developer.github.com/v3/repos/#list-contributors + # + # source://octokit//lib/octokit/client/repositories.rb#457 + def contributors(repo, anon = T.unsafe(nil), options = T.unsafe(nil)); end + + # Create a repository for a user or organization + # + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @param name [String] Name of the new repo + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] Repository info for the new repository + # @see https://developer.github.com/v3/repos/#create + # + # source://octokit//lib/octokit/client/repositories.rb#154 + def create(name, options = T.unsafe(nil)); end + + # Create a repository for a user or organization + # + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @param name [String] Name of the new repo + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] Repository info for the new repository + # @see https://developer.github.com/v3/repos/#create + # + # source://octokit//lib/octokit/client/repositories.rb#154 + def create_repo(name, options = T.unsafe(nil)); end + + # Create a repository for a user or organization generated from a template repository + # + # @option options + # @option options + # @option options + # @option options + # @param repo [Integer, String, Hash, Repository] A GitHub template repository + # @param name [String] Name of the new repo + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] Repository info for the new repository + # + # source://octokit//lib/octokit/client/repositories.rb#203 + def create_repo_from_template(repo, name, options = T.unsafe(nil)); end + + # Create a repository for a user or organization + # + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @param name [String] Name of the new repo + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] Repository info for the new repository + # @see https://developer.github.com/v3/repos/#create + # + # source://octokit//lib/octokit/client/repositories.rb#154 + def create_repository(name, options = T.unsafe(nil)); end + + # Create a repository for a user or organization generated from a template repository + # + # @option options + # @option options + # @option options + # @option options + # @param repo [Integer, String, Hash, Repository] A GitHub template repository + # @param name [String] Name of the new repo + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] Repository info for the new repository + # + # source://octokit//lib/octokit/client/repositories.rb#203 + def create_repository_from_template(repo, name, options = T.unsafe(nil)); end + + # Delete repository + # + # Note: If OAuth is used, 'delete_repo' scope is required + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @return [Boolean] `true` if repository was deleted + # @see https://developer.github.com/v3/repos/#delete-a-repository + # + # source://octokit//lib/octokit/client/repositories.rb#175 + def delete_repo(repo, options = T.unsafe(nil)); end + + # Delete repository + # + # Note: If OAuth is used, 'delete_repo' scope is required + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @return [Boolean] `true` if repository was deleted + # @see https://developer.github.com/v3/repos/#delete-a-repository + # + # source://octokit//lib/octokit/client/repositories.rb#175 + def delete_repository(repo, options = T.unsafe(nil)); end + + # Delete a repository subscription + # + # @example + # @client.delete_subscription("octokit/octokit.rb") + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @return [Boolean] True if subscription deleted, false otherwise. + # @see https://developer.github.com/v3/activity/watching/#delete-a-repository-subscription + # + # source://octokit//lib/octokit/client/repositories.rb#721 + def delete_subscription(repo, options = T.unsafe(nil)); end + + # Get a single deploy key for a repo + # + # @example + # @client.deploy_key('octokit/octokit.rb', 8675309) + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @param id [Integer] Deploy key ID. + # @return [Sawyer::Resource] Deploy key. + # @see https://developer.github.com/v3/repos/keys/#get-a-deploy-key + # + # source://octokit//lib/octokit/client/repositories.rb#251 + def deploy_key(repo, id, options = T.unsafe(nil)); end + + # Get deploy keys on a repo + # + # Requires authenticated client. + # + # @example + # @client.deploy_keys('octokit/octokit.rb') + # @example + # @client.list_deploy_keys('octokit/octokit.rb') + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @return [Array] Array of hashes representing deploy keys. + # @see https://developer.github.com/v3/repos/keys/#list-deploy-keys + # + # source://octokit//lib/octokit/client/repositories.rb#238 + def deploy_keys(repo, options = T.unsafe(nil)); end + + # Disable vulnerability alerts for a repository + # + # @example Disable vulnerability alerts for a repository + # @client.disable_vulnerability_alerts("octokit/octokit.rb") + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @param options [Hash] + # @return [Boolean] True if vulnerability alerts disabled, false otherwise. + # @see https://docs.github.com/en/rest/reference/repos#disable-vulnerability-alerts + # + # source://octokit//lib/octokit/client/repositories.rb#774 + def disable_vulnerability_alerts(repo, options = T.unsafe(nil)); end + + # Create a repository dispatch event + # + # @option options + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @param event_type [String] A custom webhook event name. + # @param options [Hash] a customizable set of options + # @return [Boolean] True if event was dispatched, false otherwise. + # @see https://developer.github.com/v3/repos/#create-a-repository-dispatch-event + # + # source://octokit//lib/octokit/client/repositories.rb#734 + def dispatch_event(repo, event_type, options = T.unsafe(nil)); end + + # Edit a repository + # + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @param repo [String, Hash, Repository] A GitHub repository + # @param options [Hash] Repository information to update + # @return [Sawyer::Resource] Repository information + # @see https://developer.github.com/v3/repos/#update-a-repository + # + # source://octokit//lib/octokit/client/repositories.rb#46 + def edit(repo, options = T.unsafe(nil)); end + + # Edit a deploy key + # + # @deprecated This method is no longer supported in the API + # @example Update the key for a deploy key. + # @client.edit_deploy_key('octokit/octokit.rb', 8675309, :key => 'ssh-rsa BBB...') + # @example + # @client.update_deploy_key('octokit/octokit.rb', 8675309, :title => 'Uber', :key => 'ssh-rsa BBB...')) + # @option title + # @option key + # @param id [Integer] Deploy key ID. + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @param options [Hash] Attributes to edit. + # @param title [Hash] a customizable set of options + # @param key [Hash] a customizable set of options + # @return [Sawyer::Resource] Updated deploy key. + # @see https://developer.github.com/changes/2014-02-24-finer-grained-scopes-for-ssh-keys/ + # @see https://developer.github.com/v3/repos/keys/#edit-a-deploy-key + # + # source://octokit//lib/octokit/client/repositories.rb#285 + def edit_deploy_key(repo, id, options); end + + # Edit a repository + # + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @param repo [String, Hash, Repository] A GitHub repository + # @param options [Hash] Repository information to update + # @return [Sawyer::Resource] Repository information + # @see https://developer.github.com/v3/repos/#update-a-repository + # + # source://octokit//lib/octokit/client/repositories.rb#46 + def edit_repository(repo, options = T.unsafe(nil)); end + + # Enable vulnerability alerts for a repository + # + # @example Enable vulnerability alerts for a repository + # @client.enable_vulnerability_alerts("octokit/octokit.rb") + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @param options [Hash] + # @return [Boolean] True if vulnerability alerts enabled, false otherwise. + # @see https://docs.github.com/en/rest/reference/repos#enable-vulnerability-alerts + # + # source://octokit//lib/octokit/client/repositories.rb#761 + def enable_vulnerability_alerts(repo, options = T.unsafe(nil)); end + + # Fork a repository + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @return [Sawyer::Resource] Repository info for the new fork + # @see https://developer.github.com/v3/repos/forks/#create-a-fork + # + # source://octokit//lib/octokit/client/repositories.rb#134 + def fork(repo, options = T.unsafe(nil)); end + + # List forks + # + # Requires authenticated client for private repos. + # + # @example + # Octokit.forks('octokit/octokit.rb') + # @example + # Octokit.network('octokit/octokit.rb') + # @example + # @client.forks('octokit/octokit.rb') + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @return [Array] Array of hashes representing repos. + # @see https://developer.github.com/v3/repos/forks/#list-forks + # + # source://octokit//lib/octokit/client/repositories.rb#508 + def forks(repo, options = T.unsafe(nil)); end + + # Get a single branch from a repository + # + # @example Get branch 'master` from octokit/octokit.rb + # Octokit.branch("octokit/octokit.rb", "master") + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @param branch [String] Branch name + # @return [Sawyer::Resource] The branch requested, if it exists + # @see https://developer.github.com/v3/repos/#get-branch + # + # source://octokit//lib/octokit/client/repositories.rb#566 + def get_branch(repo, branch, options = T.unsafe(nil)); end + + # List languages of code in the repo. + # + # Requires authenticated client for private repos. + # + # @example + # Octokit.languages('octokit/octokit.rb') + # @example + # @client.languages('octokit/octokit.rb') + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @return [Array] Array of Hashes representing languages. + # @see https://developer.github.com/v3/repos/#list-languages + # + # source://octokit//lib/octokit/client/repositories.rb#524 + def languages(repo, options = T.unsafe(nil)); end + + # Get deploy keys on a repo + # + # Requires authenticated client. + # + # @example + # @client.deploy_keys('octokit/octokit.rb') + # @example + # @client.list_deploy_keys('octokit/octokit.rb') + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @return [Array] Array of hashes representing deploy keys. + # @see https://developer.github.com/v3/repos/keys/#list-deploy-keys + # + # source://octokit//lib/octokit/client/repositories.rb#238 + def list_deploy_keys(repo, options = T.unsafe(nil)); end + + # List user repositories + # + # If user is not supplied, repositories for the current + # authenticated user are returned. + # + # @note If the user provided is a GitHub organization, only the + # organization's public repositories will be listed. For retrieving + # organization repositories the {Organizations#organization_repositories} + # method should be used instead. + # @param user [Integer, String] Optional GitHub user login or id for which + # to list repos. + # @return [Array] List of repositories + # @see https://developer.github.com/v3/repos/#list-your-repositories + # @see https://developer.github.com/v3/repos/#list-user-repositories + # + # source://octokit//lib/octokit/client/repositories.rb#69 + def list_repos(user = T.unsafe(nil), options = T.unsafe(nil)); end + + # List user repositories + # + # If user is not supplied, repositories for the current + # authenticated user are returned. + # + # @note If the user provided is a GitHub organization, only the + # organization's public repositories will be listed. For retrieving + # organization repositories the {Organizations#organization_repositories} + # method should be used instead. + # @param user [Integer, String] Optional GitHub user login or id for which + # to list repos. + # @return [Array] List of repositories + # @see https://developer.github.com/v3/repos/#list-your-repositories + # @see https://developer.github.com/v3/repos/#list-user-repositories + # + # source://octokit//lib/octokit/client/repositories.rb#69 + def list_repositories(user = T.unsafe(nil), options = T.unsafe(nil)); end + + # List forks + # + # Requires authenticated client for private repos. + # + # @example + # Octokit.forks('octokit/octokit.rb') + # @example + # Octokit.network('octokit/octokit.rb') + # @example + # @client.forks('octokit/octokit.rb') + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @return [Array] Array of hashes representing repos. + # @see https://developer.github.com/v3/repos/forks/#list-forks + # + # source://octokit//lib/octokit/client/repositories.rb#508 + def network(repo, options = T.unsafe(nil)); end + + # Get a user's permission level for a repo. + # + # Requires authenticated client + # + # @example + # @client.permission_level('octokit/octokit.rb', 'lizzhale') + # @return [Sawyer::Resource] Hash representing the user's permission level for the given repository + # @see https://developer.github.com/v3/repos/collaborators/#review-a-users-permission-level + # + # source://octokit//lib/octokit/client/repositories.rb#389 + def permission_level(repo, collaborator, options = T.unsafe(nil)); end + + # Lock a single branch from a repository + # + # Requires authenticated client + # + # @example + # @client.protect_branch('octokit/octokit.rb', 'master', foo) + # @option options + # @option options + # @param branch [String] Branch name + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] The protected branch + # @see https://developer.github.com/v3/repos/#enabling-and-disabling-branch-protection + # + # source://octokit//lib/octokit/client/repositories.rb#591 + def protect_branch(repo, branch, options = T.unsafe(nil)); end + + # Remove collaborator from repo. + # + # Requires authenticated client. + # + # @example + # @client.remove_collaborator('octokit/octokit.rb', 'holman') + # @example + # @client.remove_collab('octokit/octokit.rb', 'holman') + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @param collaborator [String] Collaborator GitHub username to remove. + # @return [Boolean] True if collaborator removed, false otherwise. + # @see https://developer.github.com/v3/repos/collaborators/#remove-user-as-a-collaborator + # + # source://octokit//lib/octokit/client/repositories.rb#362 + def remove_collab(repo, collaborator, options = T.unsafe(nil)); end + + # Remove collaborator from repo. + # + # Requires authenticated client. + # + # @example + # @client.remove_collaborator('octokit/octokit.rb', 'holman') + # @example + # @client.remove_collab('octokit/octokit.rb', 'holman') + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @param collaborator [String] Collaborator GitHub username to remove. + # @return [Boolean] True if collaborator removed, false otherwise. + # @see https://developer.github.com/v3/repos/collaborators/#remove-user-as-a-collaborator + # + # source://octokit//lib/octokit/client/repositories.rb#362 + def remove_collaborator(repo, collaborator, options = T.unsafe(nil)); end + + # Remove deploy key from a repo + # + # Requires authenticated client. + # + # @example + # @client.remove_deploy_key('octokit/octokit.rb', 100000) + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @param id [Integer] Id of the deploy key to remove. + # @return [Boolean] True if key removed, false otherwise. + # @see https://developer.github.com/v3/repos/keys/#remove-a-deploy-key + # + # source://octokit//lib/octokit/client/repositories.rb#300 + def remove_deploy_key(repo, id, options = T.unsafe(nil)); end + + # Rename a single branch from a repository + # + # Requires authenticated client + # + # @example + # @client.rename_branch('octokit/octokit.rb', 'master', 'main') + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @param branch [String] Current branch name + # @param new_name [String] New branch name + # @return [Sawyer::Resource] The renamed branch + # @see https://developer.github.com/v3/repos/#rename-a-branch + # + # source://octokit//lib/octokit/client/repositories.rb#637 + def rename_branch(repo, branch, new_name, options = T.unsafe(nil)); end + + # Replace all topics for a repository + # + # Requires authenticated client. + # + # @example Replace topics for octokit/octokit.rb + # client.replace_all_topics('octokit/octokit.rb', ['octocat', 'atom', 'electron', 'API']) + # @example Clear all topics for octokit/octokit.rb + # client.replace_all_topics('octokit/octokit.rb', []) + # @param repo [Integer, String, Repository, Hash] A Github repository + # @param names [Array] An array of topics to add to the repository. + # @return [Sawyer::Resource] representing the replaced topics for given repo + # @see https://developer.github.com/v3/repos/#replace-all-topics-for-a-repository + # + # source://octokit//lib/octokit/client/repositories.rb#439 + def replace_all_topics(repo, names, options = T.unsafe(nil)); end + + # Get a single repository + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @return [Sawyer::Resource] Repository information + # @see https://developer.github.com/v3/repos/#get + # @see https://developer.github.com/v3/licenses/#get-a-repositorys-license + # + # source://octokit//lib/octokit/client/repositories.rb#26 + def repo(repo, options = T.unsafe(nil)); end + + # List users available for assigning to issues. + # + # Requires authenticated client for private repos. + # + # @example + # Octokit.repository_assignees('octokit/octokit.rb') + # @example + # Octokit.repo_assignees('octokit/octokit.rb') + # @example + # @client.repository_assignees('octokit/octokit.rb') + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @return [Array] Array of hashes representing users. + # @see https://developer.github.com/v3/issues/assignees/#list-assignees + # + # source://octokit//lib/octokit/client/repositories.rb#657 + def repo_assignees(repo, options = T.unsafe(nil)); end + + # List teams for a repo + # + # Requires authenticated client that is an owner or collaborator of the repo. + # + # @example + # @client.repository_teams('octokit/pengwynn') + # @example + # @client.repo_teams('octokit/pengwynn') + # @example + # @client.teams('octokit/pengwynn') + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @return [Array] Array of hashes representing teams. + # @see https://developer.github.com/v3/repos/#list-teams + # + # source://octokit//lib/octokit/client/repositories.rb#406 + def repo_teams(repo, options = T.unsafe(nil)); end + + # List user repositories + # + # If user is not supplied, repositories for the current + # authenticated user are returned. + # + # @note If the user provided is a GitHub organization, only the + # organization's public repositories will be listed. For retrieving + # organization repositories the {Organizations#organization_repositories} + # method should be used instead. + # @param user [Integer, String] Optional GitHub user login or id for which + # to list repos. + # @return [Array] List of repositories + # @see https://developer.github.com/v3/repos/#list-your-repositories + # @see https://developer.github.com/v3/repos/#list-user-repositories + # + # source://octokit//lib/octokit/client/repositories.rb#69 + def repos(user = T.unsafe(nil), options = T.unsafe(nil)); end + + # List user repositories + # + # If user is not supplied, repositories for the current + # authenticated user are returned. + # + # @note If the user provided is a GitHub organization, only the + # organization's public repositories will be listed. For retrieving + # organization repositories the {Organizations#organization_repositories} + # method should be used instead. + # @param user [Integer, String] Optional GitHub user login or id for which + # to list repos. + # @return [Array] List of repositories + # @see https://developer.github.com/v3/repos/#list-your-repositories + # @see https://developer.github.com/v3/repos/#list-user-repositories + # + # source://octokit//lib/octokit/client/repositories.rb#69 + def repositories(user = T.unsafe(nil), options = T.unsafe(nil)); end + + # Get a single repository + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @return [Sawyer::Resource] Repository information + # @see https://developer.github.com/v3/repos/#get + # @see https://developer.github.com/v3/licenses/#get-a-repositorys-license + # + # source://octokit//lib/octokit/client/repositories.rb#26 + def repository(repo, options = T.unsafe(nil)); end + + # Check if a repository exists + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @return [Boolean] + # @see https://developer.github.com/v3/repos/#get + # + # source://octokit//lib/octokit/client/repositories.rb#14 + def repository?(repo, options = T.unsafe(nil)); end + + # List users available for assigning to issues. + # + # Requires authenticated client for private repos. + # + # @example + # Octokit.repository_assignees('octokit/octokit.rb') + # @example + # Octokit.repo_assignees('octokit/octokit.rb') + # @example + # @client.repository_assignees('octokit/octokit.rb') + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @return [Array] Array of hashes representing users. + # @see https://developer.github.com/v3/issues/assignees/#list-assignees + # + # source://octokit//lib/octokit/client/repositories.rb#657 + def repository_assignees(repo, options = T.unsafe(nil)); end + + # List teams for a repo + # + # Requires authenticated client that is an owner or collaborator of the repo. + # + # @example + # @client.repository_teams('octokit/pengwynn') + # @example + # @client.repo_teams('octokit/pengwynn') + # @example + # @client.teams('octokit/pengwynn') + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @return [Array] Array of hashes representing teams. + # @see https://developer.github.com/v3/repos/#list-teams + # + # source://octokit//lib/octokit/client/repositories.rb#406 + def repository_teams(repo, options = T.unsafe(nil)); end + + # Hide a public repository + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @return [Sawyer::Resource] Updated repository info + # + # source://octokit//lib/octokit/client/repositories.rb#213 + def set_private(repo, options = T.unsafe(nil)); end + + # Unhide a private repository + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @return [Sawyer::Resource] Updated repository info + # + # source://octokit//lib/octokit/client/repositories.rb#222 + def set_public(repo, options = T.unsafe(nil)); end + + # Star a repository + # + # @param repo [String, Hash, Repository] A GitHub repository + # @return [Boolean] `true` if successfully starred + # @see https://developer.github.com/v3/activity/starring/#star-a-repository + # + # source://octokit//lib/octokit/client/repositories.rb#96 + def star(repo, options = T.unsafe(nil)); end + + # List stargazers of a repo + # + # Requires authenticated client for private repos. + # + # @example + # Octokit.stargazers('octokit/octokit.rb') + # @example + # @client.stargazers('octokit/octokit.rb') + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @return [Array] Array of hashes representing users. + # @see https://developer.github.com/v3/activity/starring/#list-stargazers + # + # source://octokit//lib/octokit/client/repositories.rb#474 + def stargazers(repo, options = T.unsafe(nil)); end + + # List watchers subscribing to notifications for a repo + # + # @example + # @client.subscribers("octokit/octokit.rb") + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @return [Array] Array of users watching. + # @see https://developer.github.com/v3/activity/watching/#list-watchers + # + # source://octokit//lib/octokit/client/repositories.rb#681 + def subscribers(repo, options = T.unsafe(nil)); end + + # Get a repository subscription + # + # @example + # @client.subscription("octokit/octokit.rb") + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @return [Sawyer::Resource] Repository subscription. + # @see https://developer.github.com/v3/activity/watching/#get-a-repository-subscription + # + # source://octokit//lib/octokit/client/repositories.rb#692 + def subscription(repo, options = T.unsafe(nil)); end + + # List tags + # + # Requires authenticated client for private repos. + # + # @example + # Octokit.tags('octokit/octokit.rb') + # @example + # @client.tags('octokit/octokit.rb') + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @return [Array] Array of hashes representing tags. + # @see https://developer.github.com/v3/repos/#list-tags + # + # source://octokit//lib/octokit/client/repositories.rb#539 + def tags(repo, options = T.unsafe(nil)); end + + # List teams for a repo + # + # Requires authenticated client that is an owner or collaborator of the repo. + # + # @example + # @client.repository_teams('octokit/pengwynn') + # @example + # @client.repo_teams('octokit/pengwynn') + # @example + # @client.teams('octokit/pengwynn') + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @return [Array] Array of hashes representing teams. + # @see https://developer.github.com/v3/repos/#list-teams + # + # source://octokit//lib/octokit/client/repositories.rb#406 + def teams(repo, options = T.unsafe(nil)); end + + # List all topics for a repository + # + # Requires authenticated client for private repos. + # + # @example List topics for octokit/octokit.rb + # Octokit.topics('octokit/octokit.rb') + # @example List topics for octokit/octokit.rb + # client.topics('octokit/octokit.rb') + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @return [Sawyer::Resource] representing the topics for given repo + # @see https://developer.github.com/v3/repos/#list-all-topics-for-a-repository + # + # source://octokit//lib/octokit/client/repositories.rb#423 + def topics(repo, options = T.unsafe(nil)); end + + # Transfer repository + # + # Transfer a repository owned by your organization + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param new_owner [String] The username or organization name the repository will be transferred to. + # @param options [Array] :team_ids ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories. + # @return [Sawyer::Resource] Repository info for the transferred repository + # @see https://developer.github.com/v3/repos/#transfer-a-repository + # + # source://octokit//lib/octokit/client/repositories.rb#189 + def transfer_repo(repo, new_owner, options = T.unsafe(nil)); end + + # Transfer repository + # + # Transfer a repository owned by your organization + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param new_owner [String] The username or organization name the repository will be transferred to. + # @param options [Array] :team_ids ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories. + # @return [Sawyer::Resource] Repository info for the transferred repository + # @see https://developer.github.com/v3/repos/#transfer-a-repository + # + # source://octokit//lib/octokit/client/repositories.rb#189 + def transfer_repository(repo, new_owner, options = T.unsafe(nil)); end + + # Unlock a single branch from a repository + # + # Requires authenticated client + # + # @example + # @client.unprotect_branch('octokit/octokit.rb', 'master') + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @param branch [String] Branch name + # @return [Sawyer::Resource] The unprotected branch + # @see https://developer.github.com/v3/repos/#enabling-and-disabling-branch-protection + # + # source://octokit//lib/octokit/client/repositories.rb#622 + def unprotect_branch(repo, branch, options = T.unsafe(nil)); end + + # Unstar a repository + # + # @param repo [String, Hash, Repository] A GitHub repository + # @return [Boolean] `true` if successfully unstarred + # @see https://developer.github.com/v3/activity/starring/#unstar-a-repository + # + # source://octokit//lib/octokit/client/repositories.rb#105 + def unstar(repo, options = T.unsafe(nil)); end + + # Unwatch a repository + # + # @deprecated Use #unstar instead + # @param repo [String, Hash, Repository] A GitHub repository + # @return [Boolean] `true` if successfully unwatched + # @see https://developer.github.com/v3/activity/watching/#stop-watching-a-repository-legacy + # + # source://octokit//lib/octokit/client/repositories.rb#125 + def unwatch(repo, options = T.unsafe(nil)); end + + # Edit a repository + # + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @param repo [String, Hash, Repository] A GitHub repository + # @param options [Hash] Repository information to update + # @return [Sawyer::Resource] Repository information + # @see https://developer.github.com/v3/repos/#update-a-repository + # + # source://octokit//lib/octokit/client/repositories.rb#46 + def update(repo, options = T.unsafe(nil)); end + + # Edit a deploy key + # + # @deprecated This method is no longer supported in the API + # @example Update the key for a deploy key. + # @client.edit_deploy_key('octokit/octokit.rb', 8675309, :key => 'ssh-rsa BBB...') + # @example + # @client.update_deploy_key('octokit/octokit.rb', 8675309, :title => 'Uber', :key => 'ssh-rsa BBB...')) + # @option title + # @option key + # @param id [Integer] Deploy key ID. + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @param options [Hash] Attributes to edit. + # @param title [Hash] a customizable set of options + # @param key [Hash] a customizable set of options + # @return [Sawyer::Resource] Updated deploy key. + # @see https://developer.github.com/changes/2014-02-24-finer-grained-scopes-for-ssh-keys/ + # @see https://developer.github.com/v3/repos/keys/#edit-a-deploy-key + # + # source://octokit//lib/octokit/client/repositories.rb#285 + def update_deploy_key(repo, id, options); end + + # Edit a repository + # + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @param repo [String, Hash, Repository] A GitHub repository + # @param options [Hash] Repository information to update + # @return [Sawyer::Resource] Repository information + # @see https://developer.github.com/v3/repos/#update-a-repository + # + # source://octokit//lib/octokit/client/repositories.rb#46 + def update_repository(repo, options = T.unsafe(nil)); end + + # Update repository subscription + # + # @example Subscribe to notifications for a repository + # @client.update_subscription("octokit/octokit.rb", {subscribed: true}) + # @option options + # @option options + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @param options [Hash] + # @return [Sawyer::Resource] Updated repository subscription. + # @see https://developer.github.com/v3/activity/watching/#set-a-repository-subscription + # + # source://octokit//lib/octokit/client/repositories.rb#709 + def update_subscription(repo, options = T.unsafe(nil)); end + + # Check to see if vulnerability alerts are enabled for a repository + # + # The authenticated user must have admin access to the repository. + # + # @example + # @client.vulnerability_alerts_enabled?("octokit/octokit.rb") + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @return [Boolean] True if vulnerability alerts are enabled, false otherwise. + # @see https://docs.github.com/en/rest/reference/repos#check-if-vulnerability-alerts-are-enabled-for-a-repository + # + # source://octokit//lib/octokit/client/repositories.rb#748 + def vulnerability_alerts_enabled?(repo, options = T.unsafe(nil)); end + + # Watch a repository + # + # @deprecated Use #star instead + # @param repo [String, Hash, Repository] A GitHub repository + # @return [Boolean] `true` if successfully watched + # @see https://developer.github.com/v3/activity/watching/#watch-a-repository-legacy + # + # source://octokit//lib/octokit/client/repositories.rb#115 + def watch(repo, options = T.unsafe(nil)); end + + # List watchers of repo. + # + # Requires authenticated client for private repos. + # + # @deprecated Use {#stargazers} instead + # @example + # Octokit.watchers('octokit/octokit.rb') + # @example + # @client.watchers('octokit/octokit.rb') + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @return [Array] Array of hashes representing users. + # @see https://developer.github.com/v3/repos/watching/#list-watchers + # + # source://octokit//lib/octokit/client/repositories.rb#491 + def watchers(repo, options = T.unsafe(nil)); end +end + +# Methods for the Repository Invitations API +# +# @see https://developer.github.com/v3/repos/invitations/ +# +# source://octokit//lib/octokit/client/repository_invitations.rb#8 +module Octokit::Client::RepositoryInvitations + # Accept a repository invitation + # + # Requires authenticated client + # + # @param invitation_id [Integer] The id of the invitation + # @return [Boolean] True if the acceptance of the invitation was successful + # @see https://developer.github.com/v3/repos/invitations/#accept-a-repository-invitation + # + # source://octokit//lib/octokit/client/repository_invitations.rb#78 + def accept_repo_invitation(invitation_id, options = T.unsafe(nil)); end + + # Accept a repository invitation + # + # Requires authenticated client + # + # @param invitation_id [Integer] The id of the invitation + # @return [Boolean] True if the acceptance of the invitation was successful + # @see https://developer.github.com/v3/repos/invitations/#accept-a-repository-invitation + # + # source://octokit//lib/octokit/client/repository_invitations.rb#78 + def accept_repository_invitation(invitation_id, options = T.unsafe(nil)); end + + # Decline a repository invitation + # + # Requires authenticated client + # + # @param invitation_id [Integer] The id of the invitation + # @return [Boolean] True if the acceptance of the invitation was successful + # @see https://developer.github.com/v3/repos/invitations/#decline-a-repository-invitation + # + # source://octokit//lib/octokit/client/repository_invitations.rb#90 + def decline_invitation(invitation_id, options = T.unsafe(nil)); end + + # Decline a repository invitation + # + # Requires authenticated client + # + # @param invitation_id [Integer] The id of the invitation + # @return [Boolean] True if the acceptance of the invitation was successful + # @see https://developer.github.com/v3/repos/invitations/#decline-a-repository-invitation + # + # source://octokit//lib/octokit/client/repository_invitations.rb#90 + def decline_repository_invitation(invitation_id, options = T.unsafe(nil)); end + + # Delete an invitation for a repository + # + # Requires authenticated client + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param invitation_id [Integer] The id of the invitation + # @return [Boolean] True if the invitation was successfully deleted + # @see https://developer.github.com/v3/repos/invitations/#delete-a-repository-invitation + # + # source://octokit//lib/octokit/client/repository_invitations.rb#42 + def delete_repo_invitation(repo, invitation_id, options = T.unsafe(nil)); end + + # Delete an invitation for a repository + # + # Requires authenticated client + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param invitation_id [Integer] The id of the invitation + # @return [Boolean] True if the invitation was successfully deleted + # @see https://developer.github.com/v3/repos/invitations/#delete-a-repository-invitation + # + # source://octokit//lib/octokit/client/repository_invitations.rb#42 + def delete_repository_invitation(repo, invitation_id, options = T.unsafe(nil)); end + + # Invite a user to a repository + # + # Requires authenticated client + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param user [String] User GitHub username to add + # @return [Sawyer::Resource] The repository invitation + # @see https://developer.github.com/v3/repos/collaborators/#add-user-as-a-collaborator + # + # source://octokit//lib/octokit/client/repository_invitations.rb#17 + def invite_user_to_repo(repo, user, options = T.unsafe(nil)); end + + # Invite a user to a repository + # + # Requires authenticated client + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param user [String] User GitHub username to add + # @return [Sawyer::Resource] The repository invitation + # @see https://developer.github.com/v3/repos/collaborators/#add-user-as-a-collaborator + # + # source://octokit//lib/octokit/client/repository_invitations.rb#17 + def invite_user_to_repository(repo, user, options = T.unsafe(nil)); end + + # List all invitations for a repository + # + # Requires authenticated client + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @return [Array] A list of invitations + # @see https://developer.github.com/v3/repos/invitations/#list-invitations-for-a-repository + # + # source://octokit//lib/octokit/client/repository_invitations.rb#29 + def repo_invitations(repo, options = T.unsafe(nil)); end + + # List all invitations for a repository + # + # Requires authenticated client + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @return [Array] A list of invitations + # @see https://developer.github.com/v3/repos/invitations/#list-invitations-for-a-repository + # + # source://octokit//lib/octokit/client/repository_invitations.rb#29 + def repository_invitations(repo, options = T.unsafe(nil)); end + + # Update an invitation for a repository + # + # Requires authenticated client + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param invitation_id [Integer] The id of the invitation + # @return [Sawyer::Resource] The updated repository invitation + # @see https://developer.github.com/v3/repos/invitations/#update-a-repository-invitation + # + # source://octokit//lib/octokit/client/repository_invitations.rb#55 + def update_repo_invitation(repo, invitation_id, options = T.unsafe(nil)); end + + # Update an invitation for a repository + # + # Requires authenticated client + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param invitation_id [Integer] The id of the invitation + # @return [Sawyer::Resource] The updated repository invitation + # @see https://developer.github.com/v3/repos/invitations/#update-a-repository-invitation + # + # source://octokit//lib/octokit/client/repository_invitations.rb#55 + def update_repository_invitation(repo, invitation_id, options = T.unsafe(nil)); end + + # List all repository invitations for the user + # + # Requires authenticated client + # + # @return [Array] The users repository invitations + # @see https://developer.github.com/v3/repos/invitations/#list-a-users-repository-invitations + # + # source://octokit//lib/octokit/client/repository_invitations.rb#66 + def user_repo_invitations(options = T.unsafe(nil)); end + + # List all repository invitations for the user + # + # Requires authenticated client + # + # @return [Array] The users repository invitations + # @see https://developer.github.com/v3/repos/invitations/#list-a-users-repository-invitations + # + # source://octokit//lib/octokit/client/repository_invitations.rb#66 + def user_repository_invitations(options = T.unsafe(nil)); end +end + +# Methods for the Reviews API +# +# @see https://developer.github.com/v3/pulls/reviews/ +# +# source://octokit//lib/octokit/client/reviews.rb#8 +module Octokit::Client::Reviews + # Create a pull request review + # + # @example + # comments = [ + # { path: '.travis.yml', position: 10, body: 'ruby-head is under development that is not stable.' }, + # { path: '.travis.yml', position: 32, body: 'ruby-head is also required in thervm section.' }, + # ] + # options = { event: 'REQUEST_CHANGES', comments: comments } + # @client.create_pull_request_review('octokit/octokit.rb', 844, options) + # @option options + # @option options + # @option options + # @option comments + # @option comments + # @option comments + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param number [Integer] Number ID of the pull request + # @param options [Hash] Method options + # @param comments [Hash] a customizable set of options + # @return [Sawyer::Resource] ] Hash respresenting the review + # @see https://developer.github.com/v3/pulls/reviews/#create-a-pull-request-review + # + # source://octokit//lib/octokit/client/reviews.rb#92 + def create_pull_request_review(repo, number, options = T.unsafe(nil)); end + + # Delete a pending review + # + # @example + # @client.delete_pull_request_review('octokit/octokit.rb', 825, 6505518) + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param number [Integer] Number ID of the pull request + # @param review [Integer] The id of the review + # @return [Sawyer::Resource] Hash representing the deleted review + # @see https://developer.github.com/v3/pulls/reviews/#delete-a-pending-review + # + # source://octokit//lib/octokit/client/reviews.rb#49 + def delete_pull_request_review(repo, number, review, options = T.unsafe(nil)); end + + # Delete a review request + # + # @example + # options = { + # "reviewers" => [ "octocat", "hubot", "other_user" ], + # "team_reviewers" => [ "justice-league" ] + # } + # @client.delete_pull_request_review_request('octokit/octokit.rb', 2, options) + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param id [Integer] The id of the pull request + # @param reviewers [Hash] :reviewers [Array] An array of user logins + # @param options [Hash] :team_reviewers [Array] An array of team slugs + # @return [Sawyer::Resource] ] Hash representing the pull request + # @see https://developer.github.com/v3/pulls/review_requests/#delete-a-review-request + # + # source://octokit//lib/octokit/client/reviews.rb#193 + def delete_pull_request_review_request(repo, id, reviewers = T.unsafe(nil), options = T.unsafe(nil)); end + + # Dismiss a pull request review + # + # @example + # @client.dismiss_pull_request_review('octokit/octokit.rb', 825, 6505518, 'The message.') + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param number [Integer] Number ID of the pull request + # @param review [Integer] The id of the review + # @param message [String] The message for the pull request review dismissal + # @return [Sawyer::Resource] Hash representing the dismissed review + # @see https://developer.github.com/v3/pulls/reviews/#dismiss-a-pull-request-review + # + # source://octokit//lib/octokit/client/reviews.rb#129 + def dismiss_pull_request_review(repo, number, review, message, options = T.unsafe(nil)); end + + # Get a single review + # + # @example + # @client.pull_request_review('octokit/octokit.rb', 825, 6505518) + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param number [Integer] Number ID of the pull request + # @param review [Integer] The id of the review + # @return [Sawyer::Resource] Hash representing the review + # @see https://developer.github.com/v3/pulls/reviews/#get-a-single-review + # + # source://octokit//lib/octokit/client/reviews.rb#34 + def pull_request_review(repo, number, review, options = T.unsafe(nil)); end + + # Get comments for a single review + # + # @example + # @client.pull_request_review_comments('octokit/octokit.rb', 825, 6505518) + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param number [Integer] Number ID of the pull request + # @param review [Integer] The id of the review + # @return [Array] Array of Hashes representing the review comments + # @see https://developer.github.com/v3/pulls/reviews/#get-comments-for-a-single-review + # + # source://octokit//lib/octokit/client/reviews.rb#64 + def pull_request_review_comments(repo, number, review, options = T.unsafe(nil)); end + + # List review requests + # + # @example + # @client.pull_request_review_requests('octokit/octokit.rb', 2) + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param number [Integer] Number ID of the pull request + # @return [Array] Array of Hashes representing the review requests + # @see https://developer.github.com/v3/pulls/review_requests/#list-review-requests + # + # source://octokit//lib/octokit/client/reviews.rb#144 + def pull_request_review_requests(repo, number, options = T.unsafe(nil)); end + + # List reviews on a pull request + # + # @example + # @client.pull_request_reviews('octokit/octokit.rb', 2) + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param number [Integer] Number ID of the pull request + # @return [Array] Array of Hashes representing the reviews + # @see https://developer.github.com/v3/pulls/reviews/#list-reviews-on-a-pull-request + # + # source://octokit//lib/octokit/client/reviews.rb#19 + def pull_request_reviews(repo, number, options = T.unsafe(nil)); end + + # Create a review request + # + # @example + # @client.request_pull_request_review('octokit/octokit.rb', 2, reviewers: ['soudy']) + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param number [Integer] Number ID of the pull request + # @param reviewers [Hash] :reviewers [Array] An array of user logins + # @param options [Hash] :team_reviewers [Array] An array of team slugs + # @return [Sawyer::Resource] ] Hash respresenting the pull request + # @see https://developer.github.com/v3/pulls/review_requests/#request-reviewers-for-a-pull-request + # + # source://octokit//lib/octokit/client/reviews.rb#160 + def request_pull_request_review(repo, number, reviewers = T.unsafe(nil), options = T.unsafe(nil)); end + + # Submit a pull request review + # + # @example + # @client.submit_pull_request_review('octokit/octokit.rb', 825, 6505518, + # 'APPROVE', body: 'LGTM!') + # @option options + # @param number [Integer] Number ID of the pull request + # @param event [String] The review action (event) to perform; can be one of + # APPROVE, REQUEST_CHANGES, or COMMENT. + # @param options [Hash] Method options + # @param review [Integer] The id of the review + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @return [Sawyer::Resource] Hash respresenting the review + # @see https://developer.github.com/v3/pulls/reviews/#submit-a-pull-request-review + # + # source://octokit//lib/octokit/client/reviews.rb#112 + def submit_pull_request_review(repo, number, review, event, options = T.unsafe(nil)); end + + # Update a review request comment + # + # @example + # @client.update_pull_request_review('octokit/octokit.rb', 825, 6505518, 'This is close to perfect! Please address the suggested inline change. And add more about this.') + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param number [Integer] Number ID of the pull request + # @param review [Integer] The id of the review + # @param options [Hash] Method options + # @param body [String] body text of the pull request review. + # @return [Sawyer::Resource] Hash representing the review comment + # @see https://developer.github.com/v3/pulls/reviews/#update-a-pull-request-review + # + # source://octokit//lib/octokit/client/reviews.rb#221 + def update_pull_request_review(repo, number, review, body, options = T.unsafe(nil)); end +end + +# Methods for the unpublished Octocat API +# +# source://octokit//lib/octokit/client/say.rb#6 +module Octokit::Client::Say + # Return a nifty ASCII Octocat with GitHub wisdom + # or your own + # + # @return [String] + # + # source://octokit//lib/octokit/client/say.rb#11 + def octocat(text = T.unsafe(nil), options = T.unsafe(nil)); end + + # Return a nifty ASCII Octocat with GitHub wisdom + # or your own + # + # @return [String] + # + # source://octokit//lib/octokit/client/say.rb#11 + def say(text = T.unsafe(nil), options = T.unsafe(nil)); end +end + +# Methods for the Search API +# +# @see https://developer.github.com/v3/search/ +# +# source://octokit//lib/octokit/client/search.rb#8 +module Octokit::Client::Search + # Search code + # + # @option options + # @option options + # @option options + # @option options + # @param query [String] Search term and qualifiers + # @param options [Hash] Sort and pagination options + # @return [Sawyer::Resource] Search results object + # @see https://developer.github.com/v3/search/#search-code + # + # source://octokit//lib/octokit/client/search.rb#19 + def search_code(query, options = T.unsafe(nil)); end + + # Search commits + # + # @option options + # @option options + # @option options + # @option options + # @param query [String] Search terms and qualifiers + # @param options [Hash] Sort and pagination options + # @return [Sawyer::Resource] Search results object + # @see https://developer.github.com/v3/search/#search-commits + # + # source://octokit//lib/octokit/client/search.rb#33 + def search_commits(query, options = T.unsafe(nil)); end + + # Search issues + # + # @option options + # @option options + # @option options + # @option options + # @param query [String] Search term and qualifiers + # @param options [Hash] Sort and pagination options + # @return [Sawyer::Resource] Search results object + # @see https://developer.github.com/v3/search/#search-issues-and-pull-requests + # @see https://docs.github.com/en/rest/search#limitations-on-query-length + # + # source://octokit//lib/octokit/client/search.rb#48 + def search_issues(query, options = T.unsafe(nil)); end + + # Search repositories + # + # @option options + # @option options + # @option options + # @option options + # @param query [String] Search term and qualifiers + # @param options [Hash] Sort and pagination options + # @return [Sawyer::Resource] Search results object + # @see https://developer.github.com/v3/search/#search-repositories + # + # source://octokit//lib/octokit/client/search.rb#62 + def search_repos(query, options = T.unsafe(nil)); end + + # Search repositories + # + # @option options + # @option options + # @option options + # @option options + # @param query [String] Search term and qualifiers + # @param options [Hash] Sort and pagination options + # @return [Sawyer::Resource] Search results object + # @see https://developer.github.com/v3/search/#search-repositories + # + # source://octokit//lib/octokit/client/search.rb#62 + def search_repositories(query, options = T.unsafe(nil)); end + + # Search topics + # + # @option options + # @option options + # @option options + # @option options + # @param query [String] Search term and qualifiers + # @param options [Hash] Sort and pagination options + # @return [Sawyer::Resource] Search results object + # @see https://developer.github.com/v3/search/#search-topics + # + # source://octokit//lib/octokit/client/search.rb#77 + def search_topics(query, options = T.unsafe(nil)); end + + # Search users + # + # @option options + # @option options + # @option options + # @option options + # @param query [String] Search term and qualifiers + # @param options [Hash] Sort and pagination options + # @return [Sawyer::Resource] Search results object + # @see https://developer.github.com/v3/search/#search-users + # + # source://octokit//lib/octokit/client/search.rb#91 + def search_users(query, options = T.unsafe(nil)); end + + private + + # source://octokit//lib/octokit/client/search.rb#97 + def search(path, query, options = T.unsafe(nil)); end +end + +# Methods for the GitHub Status API +# +# @see https://status.github.com/api +# +# source://octokit//lib/octokit/client/service_status.rb#8 +module Octokit::Client::ServiceStatus + # Returns the current system status + # + # @return [Sawyer::Resource] GitHub status + # @see https://www.githubstatus.com/api#status + # + # source://octokit//lib/octokit/client/service_status.rb#27 + def github_status; end + + # Returns the last human communication, status, and timestamp. + # + # @return [Sawyer::Resource] GitHub status last message + # @see https://www.githubstatus.com/api/#components + # + # source://octokit//lib/octokit/client/service_status.rb#35 + def github_status_last_message; end + + # Returns the most recent human communications with status and timestamp. + # + # @return [Array] GitHub status messages + # @see https://www.githubstatus.com/api#components + # + # source://octokit//lib/octokit/client/service_status.rb#43 + def github_status_messages; end + + # Returns a summary with the current status and the last status messages. + # + # @return [] GitHub status summary + # @see https://www.githubstatus.com/api#summory + # + # source://octokit//lib/octokit/client/service_status.rb#19 + def github_status_summary; end +end + +# source://octokit//lib/octokit/client/service_status.rb#13 +Octokit::Client::ServiceStatus::COMPONENTS_ROOT = T.let(T.unsafe(nil), String) + +# source://octokit//lib/octokit/client/service_status.rb#12 +Octokit::Client::ServiceStatus::STATUS_ROOT = T.let(T.unsafe(nil), String) + +# Root for status API +# +# @private +# +# source://octokit//lib/octokit/client/service_status.rb#11 +Octokit::Client::ServiceStatus::SUMMARY_ROOT = T.let(T.unsafe(nil), String) + +# Methods for the Source Import API +# +# @see https://developer.github.com/v3/migration/source_imports +# +# source://octokit//lib/octokit/client/source_import.rb#8 +module Octokit::Client::SourceImport + # Stop an import for a repository. + # + # @example + # @client.cancel_source_import("octokit/octokit.rb") + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @return [Boolean] True if the import has been cancelled, false otherwise. + # @see https://developer.github.com/v3/migration/source_imports/#cancel-an-import + # + # source://octokit//lib/octokit/client/source_import.rb#123 + def cancel_source_import(repo, options = T.unsafe(nil)); end + + # Update an author's identity for the import. + # + # @example + # author_url = "https://api.github.com/repos/octokit/octokit.rb/import/authors/1" + # @client.map_source_import_commit_author(author_url, { + # :email => "hubot@github.com", + # :name => "Hubot the Robot" + # }) + # @option values + # @option values + # @param author_url [String] The source import API url for the commit author + # @param values [Hash] The updated author attributes + # @return [Sawyer::Resource] Hash representing the updated commit author + # @see https://developer.github.com/v3/migration/source_imports/#map-a-commit-author + # + # source://octokit//lib/octokit/client/source_import.rb#110 + def map_source_import_commit_author(author_url, values, options = T.unsafe(nil)); end + + # Set preference for using Git LFS to import files over 100MB + # + # @example + # @client.opt_in_source_import_lfs("octokit/octokit.rb", "opt_in") + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @param use_lfs [String] Preference for using Git LFS to import large files. Can be one of "opt_in" or "opt_out" + # @return [Sawyer::Resource] Hash representing the repository import + # @see https://developer.github.com/v3/migration/source_imports/#set-git-lfs-preference + # + # source://octokit//lib/octokit/client/source_import.rb#150 + def set_source_import_lfs_preference(repo, use_lfs, options = T.unsafe(nil)); end + + # List source import commit authors + # + # @example + # @client.source_import_commit_authors("octokit/octokit.rb") + # @option options + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @param options [Hash] + # @return [Array] Array of hashes representing commit_authors. + # @see https://developer.github.com/v3/migration/source_imports/#get-commit-authors + # + # source://octokit//lib/octokit/client/source_import.rb#91 + def source_import_commit_authors(repo, options = T.unsafe(nil)); end + + # List source import large files + # + # @example + # @client.source_import_large_files("octokit/octokit.rb") + # @option options + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @param options [Hash] + # @return [Array] Array of hashes representing files over 100MB. + # @see https://developer.github.com/v3/migration/source_imports/#get-large-files + # + # source://octokit//lib/octokit/client/source_import.rb#137 + def source_import_large_files(repo, options = T.unsafe(nil)); end + + # View the progress of an import. + # + # @example + # @client.source_import_progress("octokit/octokit.rb") + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @return [Sawyer::Resource] Hash representing the progress of the import + # @see https://developer.github.com/v3/migration/source_imports/#get-import-progress + # + # source://octokit//lib/octokit/client/source_import.rb#57 + def source_import_progress(repo, options = T.unsafe(nil)); end + + # Start a source import to a GitHub repository using GitHub Importer. + # + # @example + # @client.start_source_import("octokit/octokit.rb", "http://svn.mycompany.com/svn/myproject", { + # :vcs => "subversion", + # :vcs_username" => "octocat", + # :vcs_password => "secret" + # }) + # @overload start_source_import + # @overload start_source_import + # @return [Sawyer::Resource] Hash representing the repository import + # @see https://developer.github.com/v3/migration/source_imports/#start-an-import + # + # source://octokit//lib/octokit/client/source_import.rb#37 + def start_source_import(*args); end + + # Update source import with authentication or project choice + # Restart source import if no options are passed + # + # https://developer.github.com/v3/migration/source_imports/#update-existing-import + # + # @example + # @client.update_source_import("octokit/octokit.rb", { + # :vcs_username" => "octocat", + # :vcs_password => "secret" + # }) + # @option options + # @option options + # @option options + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] Hash representing the repository import + # @see https://developer.github.com/v3/migration/source_imports/#update-existing-import + # + # source://octokit//lib/octokit/client/source_import.rb#77 + def update_source_import(repo, options = T.unsafe(nil)); end +end + +# Methods for the Repository Statistics API +# +# @see https://developer.github.com/v3/repos/statistics/ +# +# source://octokit//lib/octokit/client/stats.rb#8 +module Octokit::Client::Stats + # Get the number of additions and deletions per week + # + # @example Get code frequency stats for octokit + # @client.code_frequency_stats('octokit/octokit.rb') + # @option retry_timeout + # @option retry_wait + # @param retry_timeout [Hash] a customizable set of options + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param retry_wait [Hash] a customizable set of options + # @return [Array] Weekly aggregate of the number of additions + # and deletions pushed to a repository. + # @see https://developer.github.com/v3/repos/statistics/#get-the-number-of-additions-and-deletions-per-week + # + # source://octokit//lib/octokit/client/stats.rb#47 + def code_frequency_stats(repo, options = T.unsafe(nil)); end + + # Get the last year of commit activity data + # + # @example Get commit activity for octokit + # @client.commit_activity_stats('octokit/octokit.rb') + # @option retry_timeout + # @option retry_wait + # @param retry_timeout [Hash] a customizable set of options + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param retry_wait [Hash] a customizable set of options + # @return [Array] The last year of commit activity grouped by + # week. The days array is a group of commits per day, starting on Sunday. + # @see https://developer.github.com/v3/repos/statistics/#get-the-last-year-of-commit-activity-data + # + # source://octokit//lib/octokit/client/stats.rb#33 + def commit_activity_stats(repo, options = T.unsafe(nil)); end + + # Get contributors list with additions, deletions, and commit counts + # + # @example Get contributor stats for octokit + # @client.contributors_stats('octokit/octokit.rb') + # @option retry_timeout + # @option retry_wait + # @param retry_timeout [Hash] a customizable set of options + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param retry_wait [Hash] a customizable set of options + # @return [Array] Array of contributor stats + # @see https://developer.github.com/v3/repos/statistics/#get-contributors-list-with-additions-deletions-and-commit-counts + # + # source://octokit//lib/octokit/client/stats.rb#18 + def contributor_stats(repo, options = T.unsafe(nil)); end + + # Get contributors list with additions, deletions, and commit counts + # + # @example Get contributor stats for octokit + # @client.contributors_stats('octokit/octokit.rb') + # @option retry_timeout + # @option retry_wait + # @param retry_timeout [Hash] a customizable set of options + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param retry_wait [Hash] a customizable set of options + # @return [Array] Array of contributor stats + # @see https://developer.github.com/v3/repos/statistics/#get-contributors-list-with-additions-deletions-and-commit-counts + # + # source://octokit//lib/octokit/client/stats.rb#18 + def contributors_stats(repo, options = T.unsafe(nil)); end + + # Get the weekly commit count for the repo owner and everyone else + # + # @example Get weekly commit counts for octokit + # @client.participation_stats("octokit/octokit.rb") + # @option retry_timeout + # @option retry_wait + # @param retry_timeout [Hash] a customizable set of options + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param retry_wait [Hash] a customizable set of options + # @return [Sawyer::Resource] Total commit counts for the owner and total commit + # counts in all. all is everyone combined, including the owner in the last + # 52 weeks. If you’d like to get the commit counts for non-owners, you can + # subtract all from owner. + # @see https://developer.github.com/v3/repos/statistics/#get-the-weekly-commit-count-for-the-repository-owner-and-everyone-else + # + # source://octokit//lib/octokit/client/stats.rb#63 + def participation_stats(repo, options = T.unsafe(nil)); end + + # Get the number of commits per hour in each day + # + # @example Get octokit punch card + # @octokit.punch_card_stats + # @option retry_timeout + # @option retry_wait + # @param retry_timeout [Hash] a customizable set of options + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param retry_wait [Hash] a customizable set of options + # @return [Array] Arrays containing the day number, hour number, and + # number of commits + # @see https://developer.github.com/v3/repos/statistics/#get-the-number-of-commits-per-hour-in-each-day + # + # source://octokit//lib/octokit/client/stats.rb#77 + def punch_card(repo, options = T.unsafe(nil)); end + + # Get the number of commits per hour in each day + # + # @example Get octokit punch card + # @octokit.punch_card_stats + # @option retry_timeout + # @option retry_wait + # @param retry_timeout [Hash] a customizable set of options + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param retry_wait [Hash] a customizable set of options + # @return [Array] Arrays containing the day number, hour number, and + # number of commits + # @see https://developer.github.com/v3/repos/statistics/#get-the-number-of-commits-per-hour-in-each-day + # + # source://octokit//lib/octokit/client/stats.rb#77 + def punch_card_stats(repo, options = T.unsafe(nil)); end + + private + + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param metric [String] The metrics you are looking for + # @private Get stats for a repository + # @return [Array or nil] Stats in metric-specific format, or nil if not yet calculated. + # @see https://developer.github.com/v3/repos/statistics/ + # + # source://octokit//lib/octokit/client/stats.rb#90 + def get_stats(repo, metric, options = T.unsafe(nil)); end +end + +# Methods for the Commit Statuses API +# +# @see https://developer.github.com/v3/repos/statuses/ +# +# source://octokit//lib/octokit/client/statuses.rb#8 +module Octokit::Client::Statuses + # Get the combined status for a ref + # + # @param repo [Integer, String, Repository, Hash] a GitHub repository + # @param ref [String] A Sha or Ref to fetch the status of + # @return [Sawyer::Resource] The combined status for the commit + # @see https://developer.github.com/v3/repos/statuses/#get-the-combined-status-for-a-specific-ref + # + # source://octokit//lib/octokit/client/statuses.rb#26 + def combined_status(repo, ref, options = T.unsafe(nil)); end + + # Create status for a commit + # + # @option options + # @option options + # @option options + # @param options [Hash] a customizable set of options + # @param sha [String] The SHA1 for the commit + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param state [String] The state: pending, success, failure, error + # @return [Sawyer::Resource] A status + # @see https://developer.github.com/v3/repos/statuses/#create-a-status + # + # source://octokit//lib/octokit/client/statuses.rb#41 + def create_status(repo, sha, state, options = T.unsafe(nil)); end + + # List all statuses for a given commit + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param sha [String] The SHA1 for the commit + # @return [Array] A list of statuses + # @see https://developer.github.com/v3/repos/statuses/#list-statuses-for-a-specific-ref + # + # source://octokit//lib/octokit/client/statuses.rb#15 + def list_statuses(repo, sha, options = T.unsafe(nil)); end + + # Get the combined status for a ref + # + # @param repo [Integer, String, Repository, Hash] a GitHub repository + # @param ref [String] A Sha or Ref to fetch the status of + # @return [Sawyer::Resource] The combined status for the commit + # @see https://developer.github.com/v3/repos/statuses/#get-the-combined-status-for-a-specific-ref + # + # source://octokit//lib/octokit/client/statuses.rb#26 + def status(repo, ref, options = T.unsafe(nil)); end + + # List all statuses for a given commit + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param sha [String] The SHA1 for the commit + # @return [Array] A list of statuses + # @see https://developer.github.com/v3/repos/statuses/#list-statuses-for-a-specific-ref + # + # source://octokit//lib/octokit/client/statuses.rb#15 + def statuses(repo, sha, options = T.unsafe(nil)); end +end + +# Method to check scopes +# +# @see https://developer.github.com/v3/oauth_authorizations/#oauth-authorizations-api +# +# source://octokit//lib/octokit/client/tokens.rb#8 +module Octokit::Client::Tokens + # Check scopes for a token + # + # @param token [String] GitHub OAuth token + # @param options [Hash] Header params for request + # @raise [ArgumentError] + # @return [Array] OAuth scopes + # @see https://developer.github.com/v3/oauth/#scopes + # + # source://octokit//lib/octokit/client/tokens.rb#15 + def scopes(token = T.unsafe(nil), options = T.unsafe(nil)); end +end + +# Methods for the Traffic API +# +# @see https://developer.github.com/v3/repos/traffic/ +# +# source://octokit//lib/octokit/client/traffic.rb#8 +module Octokit::Client::Traffic + # Get the total number of clones and breakdown per day or week for the + # last 14 days + # + # @example Clones per day + # @client.clones('octokit/octokit.rb') + # @example Clones per week + # @client.clones('octokit/octokit.rb', per: 'week') + # @option options + # @param repo [Integer, String, Repository, Hash] A GitHub Repository + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] Breakdown of clone stats + # @see https://developer.github.com/v3/repos/traffic/#clones + # + # source://octokit//lib/octokit/client/traffic.rb#59 + def clones(repo, options = T.unsafe(nil)); end + + # Get the top 10 popular contents over the last 14 days + # + # @example + # @client.top_paths('octokit/octokit.rb') + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @return [Array] List of popular contents + # @see https://developer.github.com/v3/repos/traffic/#list-paths + # + # source://octokit//lib/octokit/client/traffic.rb#27 + def top_paths(repo, options = T.unsafe(nil)); end + + # Get the top 10 referrers over the last 14 days + # + # @example + # @client.top_referrers('octokit/octokit.rb') + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @return [Array] List of referrers and stats + # @see https://developer.github.com/v3/repos/traffic/#list-referrers + # + # source://octokit//lib/octokit/client/traffic.rb#16 + def top_referrers(repo, options = T.unsafe(nil)); end + + # Get the total number of views and breakdown per day or week for the + # last 14 days + # + # @example Views per day + # @client.views('octokit/octokit.rb') + # @example Views per week + # @client.views('octokit/octokit.rb', per: 'week') + # @option options + # @param repo [Integer, String, Repository, Hash] A GitHub Repository + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] Breakdown of view stats + # @see https://developer.github.com/v3/repos/traffic/#views + # + # source://octokit//lib/octokit/client/traffic.rb#43 + def views(repo, options = T.unsafe(nil)); end +end + +# Methods for the Users API +# +# @see https://developer.github.com/v3/users/ +# +# source://octokit//lib/octokit/client/users.rb#8 +module Octokit::Client::Users + # Add email address to user. + # + # Requires authenticated client. + # + # @example + # @client.add_email('new_email@user.com') + # @param email [String] Email address to add to the user. + # @return [Array] Array of all email addresses of the user. + # @see https://developer.github.com/v3/users/emails/#add-email-addresses + # + # source://octokit//lib/octokit/client/users.rb#339 + def add_email(email, _options = T.unsafe(nil)); end + + # Add public key to user account. + # + # Requires authenticated client. + # + # @example + # @client.add_key('Personal projects key', 'ssh-rsa AAA...') + # @param title [String] Title to give reference to the public key. + # @param key [String] Public key. + # @return [Sawyer::Resource] Hash representing the newly added public key. + # @see https://developer.github.com/v3/users/keys/#create-a-public-key + # + # source://octokit//lib/octokit/client/users.rb#282 + def add_key(title, key, options = T.unsafe(nil)); end + + # List all GitHub users + # + # This provides a list of every user, in the order that they signed up + # for GitHub. + # + # @option options + # @param options [Hash] Optional options. + # @return [Array] List of GitHub users. + # @see https://developer.github.com/v3/users/#get-all-users + # + # source://octokit//lib/octokit/client/users.rb#21 + def all_users(options = T.unsafe(nil)); end + + # Deletes a previous migration archive. + # + # Requires authenticated user. + # + # @param id [Integer] ID number of the migration. + # @see https://docs.github.com/en/rest/reference/migrations#delete-a-user-migration-archive + # + # source://octokit//lib/octokit/client/users.rb#425 + def delete_user_migration_archive(id, options = T.unsafe(nil)); end + + # List email addresses for a user. + # + # Requires authenticated client. + # + # @example + # @client.emails + # @return [Array] Array of email addresses. + # @see https://developer.github.com/v3/users/emails/#list-email-addresses-for-a-user + # + # source://octokit//lib/octokit/client/users.rb#326 + def emails(options = T.unsafe(nil)); end + + # Retrieve the access_token. + # + # @example + # Octokit.exchange_code_for_token('aaaa', 'xxxx', 'yyyy', {:accept => 'application/json'}) + # @param code [String] Authorization code generated by GitHub. + # @param app_id [String] Client Id we received when our application was registered with GitHub. Defaults to client_id. + # @param app_secret [String] Client Secret we received when our application was registered with GitHub. Defaults to client_secret. + # @return [Sawyer::Resource] Hash holding the access token. + # @see https://developer.github.com/v3/oauth/#web-application-flow + # + # source://octokit//lib/octokit/client/users.rb#46 + def exchange_code_for_token(code, app_id = T.unsafe(nil), app_secret = T.unsafe(nil), options = T.unsafe(nil)); end + + # Follow a user. + # + # Requires authenticatied client. + # + # @example + # @client.follow('holman') + # @param user [String] Username of the user to follow. + # @return [Boolean] True if follow was successful, false otherwise. + # @see https://developer.github.com/v3/users/followers/#follow-a-user + # + # source://octokit//lib/octokit/client/users.rb#176 + def follow(user, options = T.unsafe(nil)); end + + # Get a user's followers. + # + # @example + # Octokit.followers('pengwynn') + # @param user [Integer, String] GitHub user login or id of the user whose + # list of followers you are getting. + # @return [Array] Array of hashes representing users + # followers. + # @see https://developer.github.com/v3/users/followers/#list-followers-of-a-user + # + # source://octokit//lib/octokit/client/users.rb#126 + def followers(user = T.unsafe(nil), options = T.unsafe(nil)); end + + # Get list of users a user is following. + # + # @example + # Octokit.following('pengwynn') + # @param user [Intger, String] GitHub user login or id of the user who you + # are getting the list of the people they follow. + # @return [Array] Array of hashes representing users a + # user is following. + # @see https://developer.github.com/v3/users/followers/#list-users-followed-by-another-user + # + # source://octokit//lib/octokit/client/users.rb#139 + def following(user = T.unsafe(nil), options = T.unsafe(nil)); end + + # Check if you are following a user. Alternatively, check if a given user + # is following a target user. + # + # Requries an authenticated client. + # + # @example + # @client.follows?('pengwynn') + # @example + # @client.follows?('catsby', 'pengwynn') + # @overload follows? + # @overload follows? + # @return [Boolean] True following target user, false otherwise. + # @see https://developer.github.com/v3/users/followers/#check-if-you-are-following-a-user + # @see https://developer.github.com/v3/users/followers/#check-if-one-user-follows-another + # + # source://octokit//lib/octokit/client/users.rb#161 + def follows?(*args); end + + # Get a public key. + # + # Note, when using dot notation to retrieve the values, ruby will return + # the hash key for the public keys value instead of the actual value, use + # symbol or key string to retrieve the value. See example. + # + # Requires authenticated client. + # + # @example + # @client.key(1) + # @example Retrieve public key contents + # public_key = @client.key(1) + # public_key.key + # # => Error + # + # public_key[:key] + # # => "ssh-rsa AAA..." + # + # public_key['key'] + # # => "ssh-rsa AAA..." + # @param key_id [Integer] Key to retreive. + # @return [Sawyer::Resource] Hash representing the key. + # @see https://developer.github.com/v3/users/keys/#get-a-single-public-key + # + # source://octokit//lib/octokit/client/users.rb#244 + def key(key_id, options = T.unsafe(nil)); end + + # Get list of public keys for user. + # + # Requires authenticated client. + # + # @example + # @client.keys + # @return [Array] Array of hashes representing public keys. + # @see https://developer.github.com/v3/users/keys/#list-your-public-keys + # + # source://octokit//lib/octokit/client/users.rb#256 + def keys(options = T.unsafe(nil)); end + + # Refresh a user's access token with a refresh token. + # + # Applications can refresh an access token without requiring a user to re-authorize using refresh access token. + # + # @example + # client = Octokit::Client.new(:client_id => 'abcdefg12345', :client_secret => 'secret') + # client.refresh_access_token('40-character-refresh-token') + # @param code [String] 40 character GitHub OAuth refresh access token + # @return [Sawyer::Resource] + # @see https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/refreshing-user-access-tokens#refreshing-a-user-access-token-with-a-refresh-token + # + # source://octokit//lib/octokit/client/users.rb#72 + def refresh_access_token(code, app_id = T.unsafe(nil), app_secret = T.unsafe(nil), options = T.unsafe(nil)); end + + # Remove email from user. + # + # Requires authenticated client. + # + # @example + # @client.remove_email('old_email@user.com') + # @param email [String] Email address to remove. + # @return [Array] Array of all email addresses of the user. + # @see https://developer.github.com/v3/users/emails/#delete-email-addresses + # + # source://octokit//lib/octokit/client/users.rb#353 + def remove_email(email); end + + # Remove a public key from user account. + # + # Requires authenticated client. + # + # @example + # @client.remove_key(1) + # @param id [String] Id of the public key to remove. + # @return [Boolean] True if removal was successful, false otherwise. + # @see https://developer.github.com/v3/users/keys/#delete-a-public-key + # + # source://octokit//lib/octokit/client/users.rb#314 + def remove_key(id, options = T.unsafe(nil)); end + + # Get list of repos starred by a user. + # + # @example + # Octokit.starred('pengwynn') + # @option options + # @option options + # @param user [Integer, String] GitHub user login of the user to get the + # list of their starred repositories. + # @param options [Hash] Optional options + # @return [Array] Array of hashes representing repositories starred by user. + # @see https://developer.github.com/v3/activity/starring/#list-repositories-being-starred + # + # source://octokit//lib/octokit/client/users.rb#204 + def starred(user = T.unsafe(nil), options = T.unsafe(nil)); end + + # Check if you are starring a repo. + # + # Requires authenticated client. + # + # @example + # @client.starred?('pengwynn/octokit') + # @param repo [String, Hash, Repository] A GitHub repository + # @return [Boolean] True if you are following the repo, false otherwise. + # @see https://developer.github.com/v3/activity/starring/#check-if-you-are-starring-a-repository + # + # source://octokit//lib/octokit/client/users.rb#217 + def starred?(repo, options = T.unsafe(nil)); end + + # Initiates the generation of a migration archive. + # + # Requires authenticated user. + # + # @example + # @client.start_migration(['octocat/hello-world']) + # @option options + # @option options + # @param repositories [Array] :repositories Repositories for the organization. + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] Hash representing the new migration. + # @see https://docs.github.com/en/rest/reference/migrations#start-a-user-migration + # + # source://octokit//lib/octokit/client/users.rb#381 + def start_user_migration(repositories, options = T.unsafe(nil)); end + + # List repositories being watched by a user. + # + # @example + # @client.subscriptions("pengwynn") + # @param user [Integer, String] GitHub user login or id. + # @return [Array] Array of repositories. + # @see https://developer.github.com/v3/activity/watching/#list-repositories-being-watched + # + # source://octokit//lib/octokit/client/users.rb#365 + def subscriptions(user = T.unsafe(nil), options = T.unsafe(nil)); end + + # Unfollow a user. + # + # Requires authenticated client. + # + # @example + # @client.unfollow('holman') + # @param user [String] Username of the user to unfollow. + # @return [Boolean] True if unfollow was successful, false otherwise. + # @see https://developer.github.com/v3/users/followers/#unfollow-a-user + # + # source://octokit//lib/octokit/client/users.rb#189 + def unfollow(user, options = T.unsafe(nil)); end + + # Unlock a user repository which has been locked by a migration. + # + # Requires authenticated user. + # + # @param id [Integer] ID number of the migration. + # @param repo [String] Name of the repository. + # @see https://docs.github.com/en/rest/reference/migrations#unlock-a-user-repository + # + # source://octokit//lib/octokit/client/users.rb#446 + def unlock_user_repository(id, repo, options = T.unsafe(nil)); end + + # Update a public key + # + # Requires authenticated client + # + # @deprecated This method is no longer supported in the API + # @example + # @client.update_key(1, :title => 'new title', :key => "ssh-rsa BBB") + # @option options + # @option options + # @param key_id [Integer] Id of key to update. + # @param options [Hash] Hash containing attributes to update. + # @return [Sawyer::Resource] Hash representing the updated public key. + # @see https://developer.github.com/v3/users/keys/#update-a-public-key + # @see https://developer.github.com/changes/2014-02-24-finer-grained-scopes-for-ssh-keys/ + # + # source://octokit//lib/octokit/client/users.rb#301 + def update_key(key_id, options = T.unsafe(nil)); end + + # Update the authenticated user + # + # @example + # Octokit.update_user(:name => "Erik Michaels-Ober", :email => "sferik@gmail.com", :company => "Code for America", :location => "San Francisco", :hireable => false) + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @param options [Hash] A customizable set of options. + # @return [Sawyer::Resource] + # @see https://developer.github.com/v3/users/#update-the-authenticated-user + # + # source://octokit//lib/octokit/client/users.rb#113 + def update_user(options); end + + # Get a single user + # + # @example + # Octokit.user("sferik") + # @param user [Integer, String] GitHub user login or id. + # @return [Sawyer::Resource] + # @see https://developer.github.com/v3/users/#get-a-single-user + # @see https://developer.github.com/v3/users/#get-the-authenticated-user + # + # source://octokit//lib/octokit/client/users.rb#33 + def user(user = T.unsafe(nil), options = T.unsafe(nil)); end + + # Get list of public keys for user. + # + # @example + # @client.user_keys('pengwynn') + # @param user [Integer, String] GitHub user login or id. + # @return [Array] Array of hashes representing public keys. + # @see https://developer.github.com/v3/users/keys/#list-public-keys-for-a-user + # + # source://octokit//lib/octokit/client/users.rb#267 + def user_keys(user, options = T.unsafe(nil)); end + + # Fetches the URL to a migration archive. + # + # Requires authenticated user. + # + # @param id [Integer] ID number of the migration. + # @see https://docs.github.com/en/rest/reference/migrations#download-a-user-migration-archive + # + # source://octokit//lib/octokit/client/users.rb#412 + def user_migration_archive_url(id, options = T.unsafe(nil)); end + + # List repositories for a user migration. + # + # Requires authenticated user. + # + # @param id [Integer] ID number of the migration. + # @see https://docs.github.com/en/rest/reference/migrations#list-repositories-for-a-user-migration + # + # source://octokit//lib/octokit/client/users.rb#435 + def user_migration_repositories(id, options = T.unsafe(nil)); end + + # Fetches the status of a migration. + # + # Requires authenticated user. + # + # @param id [Integer] ID number of the migration. + # @see https://docs.github.com/en/rest/reference/migrations#get-a-user-migration-status + # + # source://octokit//lib/octokit/client/users.rb#402 + def user_migration_status(id, options = T.unsafe(nil)); end + + # Lists the most recent migrations. + # + # Requires authenticated user. + # + # @return [Array] Array of migration resources. + # @see https://docs.github.com/en/rest/reference/migrations#list-user-migrations + # + # source://octokit//lib/octokit/client/users.rb#392 + def user_migrations(options = T.unsafe(nil)); end + + # Validate user username and password + # + # @option options + # @option options + # @param options [Hash] User credentials + # @return [Boolean] True if credentials are valid + # + # source://octokit//lib/octokit/client/users.rb#93 + def validate_credentials(options = T.unsafe(nil)); end + + # List repositories being watched by a user. + # + # @example + # @client.subscriptions("pengwynn") + # @param user [Integer, String] GitHub user login or id. + # @return [Array] Array of repositories. + # @see https://developer.github.com/v3/activity/watching/#list-repositories-being-watched + # + # source://octokit//lib/octokit/client/users.rb#365 + def watched(user = T.unsafe(nil), options = T.unsafe(nil)); end +end + +# Raised on errors in the 400-499 range +# +# source://octokit//lib/octokit/error.rb#229 +class Octokit::ClientError < ::Octokit::Error; end + +# Raised when GitHub returns a 422 HTTP status code +# and body matches 'PullRequestReviewComment' and 'commit_id (or end_commit_oid) is not part of the pull request' +# +# source://octokit//lib/octokit/error.rb#334 +class Octokit::CommitIsNotPartOfPullRequest < ::Octokit::UnprocessableEntity; end + +# Configuration options for {Client}, defaulting to values +# in {Default} +# +# source://octokit//lib/octokit/configurable.rb#6 +module Octokit::Configurable + # Returns the value of attribute access_token. + # + # source://octokit//lib/octokit/configurable.rb#63 + def access_token; end + + # @return [String] OAuth2 access token for authentication + # @see https://developer.github.com/v3/oauth/ + # + # source://octokit//lib/octokit/configurable.rb#63 + def access_token=(_arg0); end + + # @return [String] Base URL for API requests. default: https://api.github.com/ + # + # source://octokit//lib/octokit/configurable.rb#133 + def api_endpoint; end + + # @return [String] Base URL for API requests. default: https://api.github.com/ + # + # source://octokit//lib/octokit/configurable.rb#67 + def api_endpoint=(_arg0); end + + # @return [Boolean] Auto fetch next page of results until rate limit reached + # + # source://octokit//lib/octokit/configurable.rb#63 + def auto_paginate; end + + # @return [Boolean] Auto fetch next page of results until rate limit reached + # + # source://octokit//lib/octokit/configurable.rb#63 + def auto_paginate=(_arg0); end + + # Returns the value of attribute bearer_token. + # + # source://octokit//lib/octokit/configurable.rb#63 + def bearer_token; end + + # @return [String] JWT bearer token for authentication + # @see https://developer.github.com/early-access/integrations/authentication/#as-an-integration + # + # source://octokit//lib/octokit/configurable.rb#63 + def bearer_token=(_arg0); end + + # @return [String] Configure OAuth app key + # @see https://developer.github.com/v3/oauth/ + # + # source://octokit//lib/octokit/configurable.rb#63 + def client_id; end + + # @return [String] Configure OAuth app key + # @see https://developer.github.com/v3/oauth/ + # + # source://octokit//lib/octokit/configurable.rb#63 + def client_id=(_arg0); end + + # Returns the value of attribute client_secret. + # + # source://octokit//lib/octokit/configurable.rb#63 + def client_secret; end + + # @return [String] Configure OAuth app secret + # @see https://developer.github.com/v3/oauth/ + # + # source://octokit//lib/octokit/configurable.rb#63 + def client_secret=(_arg0); end + + # Set configuration options using a block + # + # @yield [_self] + # @yieldparam _self [Octokit::Configurable] the object that the method was called on + # + # source://octokit//lib/octokit/configurable.rb#106 + def configure; end + + # @return [Hash] Configure connection options for Faraday + # @see https://github.com/lostisland/faraday + # + # source://octokit//lib/octokit/configurable.rb#63 + def connection_options; end + + # @return [Hash] Configure connection options for Faraday + # @see https://github.com/lostisland/faraday + # + # source://octokit//lib/octokit/configurable.rb#63 + def connection_options=(_arg0); end + + # @return [String] Configure preferred media type (for API versioning, for example) + # @see https://developer.github.com/v3/media/ + # + # source://octokit//lib/octokit/configurable.rb#63 + def default_media_type; end + + # @return [String] Configure preferred media type (for API versioning, for example) + # @see https://developer.github.com/v3/media/ + # + # source://octokit//lib/octokit/configurable.rb#63 + def default_media_type=(_arg0); end + + # @return [String] GitHub username for Basic Authentication + # + # source://octokit//lib/octokit/configurable.rb#152 + def login; end + + # @return [String] GitHub username for Basic Authentication + # + # source://octokit//lib/octokit/configurable.rb#67 + def login=(_arg0); end + + # @return [String] Base URL for API requests to the GitHub Enterprise Server Manage API + # + # source://octokit//lib/octokit/configurable.rb#141 + def manage_ghes_endpoint; end + + # @return [String] Base URL for API requests to the GitHub Enterprise Server Manage API + # + # source://octokit//lib/octokit/configurable.rb#67 + def manage_ghes_endpoint=(_arg0); end + + # @return [String] API user password for requests to the GitHub Enterprise Server Manage API + # + # source://octokit//lib/octokit/configurable.rb#67 + def manage_ghes_password=(_arg0); end + + # @return [String] API username for requests to the GitHub Enterprise Server Manage API + # + # source://octokit//lib/octokit/configurable.rb#67 + def manage_ghes_username=(_arg0); end + + # @return [String] Base URL for API requests to the GitHub Enterprise management console + # + # source://octokit//lib/octokit/configurable.rb#137 + def management_console_endpoint; end + + # @return [String] Base URL for API requests to the GitHub Enterprise management console + # + # source://octokit//lib/octokit/configurable.rb#67 + def management_console_endpoint=(_arg0); end + + # @return [String] An admin password set up for your GitHub Enterprise management console + # + # source://octokit//lib/octokit/configurable.rb#67 + def management_console_password=(_arg0); end + + # @return [Faraday::Builder or Faraday::RackBuilder] Configure middleware for Faraday + # @see https://github.com/lostisland/faraday + # + # source://octokit//lib/octokit/configurable.rb#63 + def middleware; end + + # @return [Faraday::Builder or Faraday::RackBuilder] Configure middleware for Faraday + # @see https://github.com/lostisland/faraday + # + # source://octokit//lib/octokit/configurable.rb#63 + def middleware=(_arg0); end + + # @return [Boolean] Instruct Octokit to get credentials from .netrc file + # + # source://octokit//lib/octokit/configurable.rb#63 + def netrc; end + + # @return [Boolean] Instruct Octokit to get credentials from .netrc file + # + # source://octokit//lib/octokit/configurable.rb#63 + def netrc=(_arg0); end + + # @return [Boolean] + # + # source://octokit//lib/octokit/configurable.rb#156 + def netrc?; end + + # @return [String] Path to .netrc file. default: ~/.netrc + # + # source://octokit//lib/octokit/configurable.rb#63 + def netrc_file; end + + # @return [String] Path to .netrc file. default: ~/.netrc + # + # source://octokit//lib/octokit/configurable.rb#63 + def netrc_file=(_arg0); end + + # @return [String] GitHub password for Basic Authentication + # + # source://octokit//lib/octokit/configurable.rb#67 + def password=(_arg0); end + + # @return [String] Configure page size for paginated results. API default: 30 + # + # source://octokit//lib/octokit/configurable.rb#63 + def per_page; end + + # @return [String] Configure page size for paginated results. API default: 30 + # + # source://octokit//lib/octokit/configurable.rb#63 + def per_page=(_arg0); end + + # @return [String] URI for proxy server + # @see https://github.com/lostisland/faraday + # + # source://octokit//lib/octokit/configurable.rb#63 + def proxy; end + + # @return [String] URI for proxy server + # @see https://github.com/lostisland/faraday + # + # source://octokit//lib/octokit/configurable.rb#63 + def proxy=(_arg0); end + + # Reset configuration options to default values + # + # source://octokit//lib/octokit/configurable.rb#111 + def reset!; end + + # Compares client options to a Hash of requested options + # + # @param opts [Hash] Options to compare with current client options + # @return [Boolean] + # + # source://octokit//lib/octokit/configurable.rb#129 + def same_options?(opts); end + + # Reset configuration options to default values + # + # source://octokit//lib/octokit/configurable.rb#111 + def setup; end + + # @return [String] SSL verify mode for ssl connections + # @see https://github.com/lostisland/faraday + # + # source://octokit//lib/octokit/configurable.rb#63 + def ssl_verify_mode; end + + # @return [String] SSL verify mode for ssl connections + # @see https://github.com/lostisland/faraday + # + # source://octokit//lib/octokit/configurable.rb#63 + def ssl_verify_mode=(_arg0); end + + # @return [String] Configure User-Agent header for requests. + # + # source://octokit//lib/octokit/configurable.rb#63 + def user_agent; end + + # Sets the attribute user_agent + # + # @param value the value to set the attribute user_agent to. + # + # source://octokit//lib/octokit/configurable.rb#63 + def user_agent=(_arg0); end + + # Base URL for generated web URLs + # + # @return [String] Default: https://github.com/ + # + # source://octokit//lib/octokit/configurable.rb#148 + def web_endpoint; end + + # @return [String] Base URL for web URLs. default: https://github.com/ + # + # source://octokit//lib/octokit/configurable.rb#67 + def web_endpoint=(_arg0); end + + private + + # source://octokit//lib/octokit/configurable.rb#166 + def fetch_client_id_and_secret(overrides = T.unsafe(nil)); end + + # source://octokit//lib/octokit/configurable.rb#162 + def options; end + + class << self + # List of configurable keys for {Octokit::Client} + # + # @return [Array] of option keys + # + # source://octokit//lib/octokit/configurable.rb#76 + def keys; end + end +end + +# Raised when GitHub returns a 409 HTTP status code +# +# source://octokit//lib/octokit/error.rb#321 +class Octokit::Conflict < ::Octokit::ClientError; end + +# Network layer for API clients. +# +# source://octokit//lib/octokit/connection.rb#7 +module Octokit::Connection + include ::Octokit::Authentication + + # Hypermedia agent for the GitHub API + # + # @return [Sawyer::Agent] + # + # source://octokit//lib/octokit/connection.rb#104 + def agent; end + + # Make a HTTP DELETE request + # + # @param url [String] The path, relative to {#api_endpoint} + # @param options [Hash] Query and header params for request + # @return [Sawyer::Resource] + # + # source://octokit//lib/octokit/connection.rb#54 + def delete(url, options = T.unsafe(nil)); end + + # Make a HTTP GET request + # + # @param url [String] The path, relative to {#api_endpoint} + # @param options [Hash] Query and header params for request + # @return [Sawyer::Resource] + # + # source://octokit//lib/octokit/connection.rb#18 + def get(url, options = T.unsafe(nil)); end + + # Make a HTTP HEAD request + # + # @param url [String] The path, relative to {#api_endpoint} + # @param options [Hash] Query and header params for request + # @return [Sawyer::Resource] + # + # source://octokit//lib/octokit/connection.rb#63 + def head(url, options = T.unsafe(nil)); end + + # Response for last HTTP request + # + # @return [Sawyer::Response] + # + # source://octokit//lib/octokit/connection.rb#131 + def last_response; end + + # Make one or more HTTP GET requests, optionally fetching + # the next page of results from URL in Link response header based + # on value in {#auto_paginate}. + # + # @param url [String] The path, relative to {#api_endpoint} + # @param options [Hash] Query and header params for request + # @param block [Block] Block to perform the data concatination of the + # multiple requests. The block is called with two parameters, the first + # contains the contents of the requests so far and the second parameter + # contains the latest response. + # @return [Sawyer::Resource] + # + # source://octokit//lib/octokit/connection.rb#78 + def paginate(url, options = T.unsafe(nil)); end + + # Make a HTTP PATCH request + # + # @param url [String] The path, relative to {#api_endpoint} + # @param options [Hash] Body and header params for request + # @return [Sawyer::Resource] + # + # source://octokit//lib/octokit/connection.rb#45 + def patch(url, options = T.unsafe(nil)); end + + # Make a HTTP POST request + # + # @param url [String] The path, relative to {#api_endpoint} + # @param options [Hash] Body and header params for request + # @return [Sawyer::Resource] + # + # source://octokit//lib/octokit/connection.rb#27 + def post(url, options = T.unsafe(nil)); end + + # Make a HTTP PUT request + # + # @param url [String] The path, relative to {#api_endpoint} + # @param options [Hash] Body and header params for request + # @return [Sawyer::Resource] + # + # source://octokit//lib/octokit/connection.rb#36 + def put(url, options = T.unsafe(nil)); end + + # Fetch the root resource for the API + # + # @return [Sawyer::Resource] + # + # source://octokit//lib/octokit/connection.rb#124 + def root; end + + protected + + # source://octokit//lib/octokit/connection.rb#137 + def endpoint; end + + private + + # Executes the request, checking if it was successful + # + # @return [Boolean] True on success, false otherwise + # + # source://octokit//lib/octokit/connection.rb#166 + def boolean_from_response(method, path, options = T.unsafe(nil)); end + + # source://octokit//lib/octokit/connection.rb#194 + def parse_query_and_convenience_headers(options); end + + # source://octokit//lib/octokit/connection.rb#147 + def request(method, path, data, options = T.unsafe(nil)); end + + # source://octokit//lib/octokit/connection.rb#143 + def reset_agent; end + + # source://octokit//lib/octokit/connection.rb#210 + def response_data_correctly_encoded(response); end + + # source://octokit//lib/octokit/connection.rb#173 + def sawyer_options; end +end + +# Header keys that can be passed in options hash to {#get},{#head} +# +# source://octokit//lib/octokit/connection.rb#11 +Octokit::Connection::CONVENIENCE_HEADERS = T.let(T.unsafe(nil), Set) + +# Default configuration options for {Client} +# +# source://octokit//lib/octokit/default.rb#24 +module Octokit::Default + class << self + # Default access token from ENV + # + # @return [String] + # + # source://octokit//lib/octokit/default.rb#64 + def access_token; end + + # Default API endpoint from ENV or {API_ENDPOINT} + # + # @return [String] + # + # source://octokit//lib/octokit/default.rb#70 + def api_endpoint; end + + # Default pagination preference from ENV + # + # @return [String] + # + # source://octokit//lib/octokit/default.rb#76 + def auto_paginate; end + + # Default bearer token from ENV + # + # @return [String] + # + # source://octokit//lib/octokit/default.rb#82 + def bearer_token; end + + # Default OAuth app key from ENV + # + # @return [String] + # + # source://octokit//lib/octokit/default.rb#88 + def client_id; end + + # Default OAuth app secret from ENV + # + # @return [String] + # + # source://octokit//lib/octokit/default.rb#94 + def client_secret; end + + # Default options for Faraday::Connection + # + # @return [Hash] + # + # source://octokit//lib/octokit/default.rb#130 + def connection_options; end + + # Default media type from ENV or {MEDIA_TYPE} + # + # @return [String] + # + # source://octokit//lib/octokit/default.rb#141 + def default_media_type; end + + # Default GitHub username for Basic Auth from ENV + # + # @return [String] + # + # source://octokit//lib/octokit/default.rb#147 + def login; end + + # Default GHES Manage API endpoint from ENV + # + # @return [String] + # + # source://octokit//lib/octokit/default.rb#112 + def manage_ghes_endpoint; end + + # Default GHES Manage API password from ENV + # + # @return [String] + # + # source://octokit//lib/octokit/default.rb#124 + def manage_ghes_password; end + + # Default GHES Manage API username from ENV + # + # @return [String] + # + # source://octokit//lib/octokit/default.rb#118 + def manage_ghes_username; end + + # Default management console endpoint from ENV + # + # @return [String] + # + # source://octokit//lib/octokit/default.rb#106 + def management_console_endpoint; end + + # Default management console password from ENV + # + # @return [String] + # + # source://octokit//lib/octokit/default.rb#100 + def management_console_password; end + + # Default middleware stack for Faraday::Connection + # from {MIDDLEWARE} + # + # @return [Faraday::RackBuilder or Faraday::Builder] + # + # source://octokit//lib/octokit/default.rb#154 + def middleware; end + + # Default behavior for reading .netrc file + # + # @return [Boolean] + # + # source://octokit//lib/octokit/default.rb#201 + def netrc; end + + # Default path for .netrc file + # + # @return [String] + # + # source://octokit//lib/octokit/default.rb#207 + def netrc_file; end + + # Configuration options + # + # @return [Hash] + # + # source://octokit//lib/octokit/default.rb#58 + def options; end + + # Default GitHub password for Basic Auth from ENV + # + # @return [String] + # + # source://octokit//lib/octokit/default.rb#160 + def password; end + + # Default pagination page size from ENV + # + # @return [Integer] Page size + # + # source://octokit//lib/octokit/default.rb#166 + def per_page; end + + # Default proxy server URI for Faraday connection from ENV + # + # @return [String] + # + # source://octokit//lib/octokit/default.rb#174 + def proxy; end + + # Default SSL verify mode from ENV + # + # @return [Integer] + # + # source://octokit//lib/octokit/default.rb#180 + def ssl_verify_mode; end + + # Default User-Agent header string from ENV or {USER_AGENT} + # + # @return [String] + # + # source://octokit//lib/octokit/default.rb#189 + def user_agent; end + + # Default web endpoint from ENV or {WEB_ENDPOINT} + # + # @return [String] + # + # source://octokit//lib/octokit/default.rb#195 + def web_endpoint; end + end +end + +# Default API endpoint +# +# source://octokit//lib/octokit/default.rb#26 +Octokit::Default::API_ENDPOINT = T.let(T.unsafe(nil), String) + +# Default media type +# +# source://octokit//lib/octokit/default.rb#32 +Octokit::Default::MEDIA_TYPE = T.let(T.unsafe(nil), String) + +# Default Faraday middleware stack +# +# source://octokit//lib/octokit/default.rb#38 +Octokit::Default::MIDDLEWARE = T.let(T.unsafe(nil), Faraday::RackBuilder) + +# Default User Agent header string +# +# source://octokit//lib/octokit/default.rb#29 +Octokit::Default::USER_AGENT = T.let(T.unsafe(nil), String) + +# Default WEB endpoint +# +# source://octokit//lib/octokit/default.rb#35 +Octokit::Default::WEB_ENDPOINT = T.let(T.unsafe(nil), String) + +# Raised when GHES Manage return a 410 HTTP status code +# +# source://octokit//lib/octokit/error.rb#324 +class Octokit::Deprecated < ::Octokit::ClientError; end + +# EnterpriseAdminClient is only meant to be used by GitHub Enterprise Admins +# and provides access the Admin only API endpoints including Admin Stats, +# Management Console, and the Search Indexing API. +# +# @see Octokit::Client Use Octokit::Client for regular API use for GitHub +# and GitHub Enterprise. +# @see https://developer.github.com/v3/enterprise/ +# +# source://octokit//lib/octokit/enterprise_admin_client/admin_stats.rb#4 +class Octokit::EnterpriseAdminClient + include ::Octokit::Configurable + include ::Octokit::Authentication + include ::Octokit::Connection + include ::Octokit::Warnable + include ::Octokit::EnterpriseAdminClient::AdminStats + include ::Octokit::EnterpriseAdminClient::License + include ::Octokit::EnterpriseAdminClient::Orgs + include ::Octokit::EnterpriseAdminClient::SearchIndexing + include ::Octokit::EnterpriseAdminClient::Users + + # @return [EnterpriseAdminClient] a new instance of EnterpriseAdminClient + # + # source://octokit//lib/octokit/enterprise_admin_client.rb#30 + def initialize(options = T.unsafe(nil)); end +end + +# Methods for the Enterprise Admin Stats API +# +# @see https://developer.github.com/v3/enterprise-admin/admin_stats/ +# +# source://octokit//lib/octokit/enterprise_admin_client/admin_stats.rb#8 +module Octokit::EnterpriseAdminClient::AdminStats + # Get only comment-related stats + # + # @example Get only comment-related stats + # @client.admin_comments_stats + # @return [Sawyer::Resource] Only comment-related stats + # + # source://octokit//lib/octokit/enterprise_admin_client/admin_stats.rb#104 + def admin_comments_stats; end + + # Get only gist-related stats + # + # @example Get only gist-related stats + # @client.admin_gits_stats + # @return [Sawyer::Resource] Only only gist-related stats + # + # source://octokit//lib/octokit/enterprise_admin_client/admin_stats.rb#95 + def admin_gists_stats; end + + # Get only hooks-related stats + # + # @example Get only hooks-related stats + # @client.admin_hooks_stats + # @return [Sawyer::Resource] Only hooks-related stats + # + # source://octokit//lib/octokit/enterprise_admin_client/admin_stats.rb#32 + def admin_hooks_stats; end + + # Get only issue-related stats + # + # @example Get only issue-related stats + # @client.admin_issues_stats + # @return [Sawyer::Resource] Only issue-related stats + # + # source://octokit//lib/octokit/enterprise_admin_client/admin_stats.rb#77 + def admin_issues_stats; end + + # Get only milestone-related stats + # + # @example Get only milestone-related stats + # @client.admin_milestones_stats + # @return [Sawyer::Resource] Only milestone-related stats + # + # source://octokit//lib/octokit/enterprise_admin_client/admin_stats.rb#86 + def admin_milestones_stats; end + + # Get only organization-related stats + # + # @example Get only organization-related stats + # @client.admin_organization_stats + # @return [Sawyer::Resource] Only organization-related stats + # + # source://octokit//lib/octokit/enterprise_admin_client/admin_stats.rb#50 + def admin_organization_stats; end + + # Get only pages-related stats + # + # @example Get only pages-related stats + # @client.admin_pages_stats + # @return [Sawyer::Resource] Only pages-related stats + # + # source://octokit//lib/octokit/enterprise_admin_client/admin_stats.rb#41 + def admin_pages_stats; end + + # Get only pull request-related stats + # + # @example Get only pull request-related stats + # @client.admin_pull_requests_stats + # @return [Sawyer::Resource] Only pull request-related stats + # + # source://octokit//lib/octokit/enterprise_admin_client/admin_stats.rb#68 + def admin_pull_requests_stats; end + + # Get only repository-related stats + # + # @example Get only repository-related stats + # @client.admin_repository_stats + # @return [Sawyer::Resource] Only repository-related stats + # + # source://octokit//lib/octokit/enterprise_admin_client/admin_stats.rb#23 + def admin_repository_stats; end + + # Get all available stats + # + # @example Get all available stats + # @client.admin_stats + # @return [Sawyer::Resource] All available stats + # + # source://octokit//lib/octokit/enterprise_admin_client/admin_stats.rb#14 + def admin_stats; end + + # Get only user-related stats + # + # @example Get only user-related stats + # @client.admin_users_stats + # @return [Sawyer::Resource] Only user-related stats + # + # source://octokit//lib/octokit/enterprise_admin_client/admin_stats.rb#59 + def admin_users_stats; end + + private + + # @param metric [String] The metrics you are looking for + # @private Get enterprise stats + # @return [Sawyer::Resource] Magical unicorn stats + # + # source://octokit//lib/octokit/enterprise_admin_client/admin_stats.rb#114 + def get_admin_stats(metric); end +end + +# source://octokit//lib/octokit/enterprise_admin_client/license.rb#8 +module Octokit::EnterpriseAdminClient::License + # source://octokit//lib/octokit/enterprise_admin_client/license.rb#12 + def license_info; end +end + +# Methods for the Enterprise Orgs API +# +# @see https://developer.github.com/v3/enterprise-admin/orgs/ +# +# source://octokit//lib/octokit/enterprise_admin_client/orgs.rb#8 +module Octokit::EnterpriseAdminClient::Orgs + # Create a new organization on the instance. + # + # @example + # @admin_client.create_organization('SuchAGreatOrg', 'gjtorikian') + # @option options + # @param login [String] The organization's username. + # @param admin [String] The login of the user who will manage this organization. + # @param options [Hash] A set of options. + # @return [nil] + # @see https://developer.github.com/v3/enterprise-admin/orgs/#create-an-organization + # + # source://octokit//lib/octokit/enterprise_admin_client/orgs.rb#19 + def create_organization(login, admin, options = T.unsafe(nil)); end +end + +# Methods for the Enterprise Search Indexing API +# +# @see https://developer.github.com/v3/enterprise-admin/search_indexing/ +# +# source://octokit//lib/octokit/enterprise_admin_client/search_indexing.rb#8 +module Octokit::EnterpriseAdminClient::SearchIndexing + # Queue a User or Organization to be indexed + # + # @param user [String] A GitHub Enterprise user or organization + # @return [Sawyer:Resource] Result of the queuing containing `:message` + # + # source://octokit//lib/octokit/enterprise_admin_client/search_indexing.rb#13 + def index_organization(user); end + + # Queue a user's or organization's repositories to be indexed + # + # @param user [String] A GitHub Enterprise user or organization + # @return [Sawyer:Resource] Result of the queuing containing `:message` + # + # source://octokit//lib/octokit/enterprise_admin_client/search_indexing.rb#46 + def index_organizations_repositories(user); end + + # Queue an index of all the code contained in all of a user's or + # organization's repositories + # + # @param user [String] A GitHub Enterprise user or organization + # @return [Sawyer:Resource] Result of the queuing containing `:message` + # + # source://octokit//lib/octokit/enterprise_admin_client/search_indexing.rb#66 + def index_organizations_repositories_code(user); end + + # Queue an index of all the issues across all of a user's or + # organization's repositories + # + # @param user [String] A GitHub Enterprise user or organization + # @return [Sawyer:Resource] Result of the queuing containing `:message` + # + # source://octokit//lib/octokit/enterprise_admin_client/search_indexing.rb#56 + def index_organizations_repositories_issues(user); end + + # Queue a Repository to be indexed + # + # @param repo [String, Hash, Repository] A GitHub repository + # @return [Sawyer:Resource] Result of the queuing containing `:message` + # + # source://octokit//lib/octokit/enterprise_admin_client/search_indexing.rb#22 + def index_repository(repo); end + + # Queue a repository's code to be indexed + # + # @param repo [String, Hash, Repository] A GitHub repository + # @return [Sawyer:Resource] Result of the queuing containing `:message` + # + # source://octokit//lib/octokit/enterprise_admin_client/search_indexing.rb#38 + def index_repository_code(repo); end + + # Queue a repository's Issues to be indexed + # + # @param repo [String, Hash, Repository] A GitHub repository + # @return [Sawyer:Resource] Result of the queuing containing `:message` + # + # source://octokit//lib/octokit/enterprise_admin_client/search_indexing.rb#30 + def index_repository_issues(repo); end + + # Queue a User or Organization to be indexed + # + # @param user [String] A GitHub Enterprise user or organization + # @return [Sawyer:Resource] Result of the queuing containing `:message` + # + # source://octokit//lib/octokit/enterprise_admin_client/search_indexing.rb#13 + def index_user(user); end + + # Queue a user's or organization's repositories to be indexed + # + # @param user [String] A GitHub Enterprise user or organization + # @return [Sawyer:Resource] Result of the queuing containing `:message` + # + # source://octokit//lib/octokit/enterprise_admin_client/search_indexing.rb#46 + def index_users_repositories(user); end + + # Queue an index of all the code contained in all of a user's or + # organization's repositories + # + # @param user [String] A GitHub Enterprise user or organization + # @return [Sawyer:Resource] Result of the queuing containing `:message` + # + # source://octokit//lib/octokit/enterprise_admin_client/search_indexing.rb#66 + def index_users_repositories_code(user); end + + # Queue an index of all the issues across all of a user's or + # organization's repositories + # + # @param user [String] A GitHub Enterprise user or organization + # @return [Sawyer:Resource] Result of the queuing containing `:message` + # + # source://octokit//lib/octokit/enterprise_admin_client/search_indexing.rb#56 + def index_users_repositories_issues(user); end + + private + + # @param target [String] Target to index + # @private Queue a target for indexing + # @return [Sawyer:Resource] Result of the queuing containing `:message` + # + # source://octokit//lib/octokit/enterprise_admin_client/search_indexing.rb#77 + def queue_index(target); end +end + +# Methods for the Enterprise User Administration API +# +# @see https://developer.github.com/enterprise/v3/enterprise-admin/users/ +# +# source://octokit//lib/octokit/enterprise_admin_client/users.rb#8 +module Octokit::EnterpriseAdminClient::Users + # Creates an impersonation OAuth token. + # + # @example + # @admin_client.create_impersonation_token('foobar', {:scopes => ['repo:write']}) + # @param login [String] The user to create a token for. + # @param options [Array] :scopes The scopes to apply. + # @see https://developer.github.com/enterprise/v3/enterprise-admin/users/#create-an-impersonation-oauth-token + # + # source://octokit//lib/octokit/enterprise_admin_client/users.rb#95 + def create_impersonation_token(login, options = T.unsafe(nil)); end + + # Create a new user. + # + # @example + # @admin_client.create_user('foobar', 'notreal@foo.bar') + # @param login [String] The user's username. + # @param email [String] The user's email address. + # @see https://developer.github.com/enterprise/v3/enterprise-admin/users#create-a-new-user + # + # source://octokit//lib/octokit/enterprise_admin_client/users.rb#16 + def create_user(login, email, options = T.unsafe(nil)); end + + # Deletes an impersonation OAuth token. + # + # @example + # @admin_client.delete_impersonation_token('foobar') + # @param login [String] The user whose token should be deleted. + # @see https://developer.github.com/enterprise/v3/enterprise-admin/users/#delete-an-impersonation-oauth-token + # + # source://octokit//lib/octokit/enterprise_admin_client/users.rb#105 + def delete_impersonation_token(login, options = T.unsafe(nil)); end + + # Deletes a public SSH keys. + # + # @example + # @admin_client.delete_key(1) + # @param id [Number] The ID of the key to delete. + # @see https://developer.github.com/enterprise/v3/enterprise-admin/users/#delete-a-public-key + # + # source://octokit//lib/octokit/enterprise_admin_client/users.rb#124 + def delete_key(id, options = T.unsafe(nil)); end + + # Deletes a user. + # + # @example + # @admin_client.delete_key(1) + # @param username [String] The username to delete. + # @see https://developer.github.com/enterprise/v3/enterprise-admin/users/#delete-a-user + # + # source://octokit//lib/octokit/enterprise_admin_client/users.rb#62 + def delete_user(username, options = T.unsafe(nil)); end + + # Demote a site administrator to an ordinary user + # + # @example + # @admin_client.demote('holman') + # @param user [String] Username of the user to demote. + # @return [Boolean] True if demote was successful, false otherwise. + # @see https://developer.github.com/enterprise/v3/enterprise-admin/users/#demote-a-site-administrator-to-an-ordinary-user + # + # source://octokit//lib/octokit/enterprise_admin_client/users.rb#40 + def demote(user, options = T.unsafe(nil)); end + + # Lists all the public SSH keys. + # + # @example + # @admin_client.list_all_keys + # @see https://developer.github.com/enterprise/v3/enterprise-admin/users/#list-all-public-keys + # + # source://octokit//lib/octokit/enterprise_admin_client/users.rb#114 + def list_all_keys(options = T.unsafe(nil)); end + + # Promote an ordinary user to a site administrator + # + # @example + # @admin_client.promote('holman') + # @param user [String] Username of the user to promote. + # @return [Boolean] True if promote was successful, false otherwise. + # @see https://developer.github.com/enterprise/v3/enterprise-admin/users/#promote-an-ordinary-user-to-a-site-administrator + # + # source://octokit//lib/octokit/enterprise_admin_client/users.rb#29 + def promote(user, options = T.unsafe(nil)); end + + # Rename a user. + # + # @example + # @admin_client.rename_user('foobar', 'foofoobar') + # @param old_login [String] The user's old username. + # @param new_login [String] The user's new username. + # @see https://developer.github.com/enterprise/v3/enterprise-admin/users/#rename-an-existing-user + # + # source://octokit//lib/octokit/enterprise_admin_client/users.rb#51 + def rename_user(old_login, new_login, options = T.unsafe(nil)); end + + # Suspend a user. + # + # @example + # @admin_client.suspend('holman') + # @param user [String] Username of the user to suspend. + # @return [Boolean] True if suspend was successful, false otherwise. + # @see https://developer.github.com/enterprise/v3/enterprise-admin/users/#suspend-a-user + # + # source://octokit//lib/octokit/enterprise_admin_client/users.rb#73 + def suspend(user, options = T.unsafe(nil)); end + + # Unsuspend a user. + # + # @example + # @admin_client.unsuspend('holman') + # @param user [String] Username of the user to unsuspend. + # @return [Boolean] True if unsuspend was successful, false otherwise. + # @see https://developer.github.com/enterprise/v3/enterprise-admin/users/#unsuspend-a-user + # + # source://octokit//lib/octokit/enterprise_admin_client/users.rb#84 + def unsuspend(user, options = T.unsafe(nil)); end +end + +# EnterpriseManagementConsoleClient is only meant to be used by GitHub Enterprise Admins +# and provides access to the management console API endpoints. +# +# @see Octokit::Client Use Octokit::Client for regular API use for GitHub +# and GitHub Enterprise. +# @see https://developer.github.com/v3/enterprise-admin/management_console/ +# +# source://octokit//lib/octokit/enterprise_management_console_client/management_console.rb#4 +class Octokit::EnterpriseManagementConsoleClient + include ::Octokit::Configurable + include ::Octokit::Authentication + include ::Octokit::Connection + include ::Octokit::Warnable + include ::Octokit::EnterpriseManagementConsoleClient::ManagementConsole + + # @return [EnterpriseManagementConsoleClient] a new instance of EnterpriseManagementConsoleClient + # + # source://octokit//lib/octokit/enterprise_management_console_client.rb#21 + def initialize(options = T.unsafe(nil)); end + + protected + + # source://octokit//lib/octokit/enterprise_management_console_client.rb#36 + def endpoint; end + + # Set Enterprise Management Console endpoint + # + # @param value [String] Management console endpoint + # + # source://octokit//lib/octokit/enterprise_management_console_client.rb#51 + def management_console_endpoint=(value); end + + # Set Enterprise Management Console password + # + # @param value [String] Management console admin password + # + # source://octokit//lib/octokit/enterprise_management_console_client.rb#43 + def management_console_password=(value); end + + private + + # source://octokit//lib/octokit/enterprise_management_console_client/management_console.rb#171 + def faraday_configuration; end + + # source://octokit//lib/octokit/enterprise_management_console_client/management_console.rb#165 + def password_hash; end +end + +# Methods for the Enterprise Management Console API +# +# @see https://developer.github.com/v3/enterprise-admin/management_console/ +# +# source://octokit//lib/octokit/enterprise_management_console_client/management_console.rb#8 +module Octokit::EnterpriseManagementConsoleClient::ManagementConsole + # Add an authorized SSH keys on the Enterprise install + # + # @param key Either the file path to a key, a File handler to the key, or the contents of the key itself + # @return [Sawyer::Resource] An array of authorized SSH keys + # + # source://octokit//lib/octokit/enterprise_management_console_client/management_console.rb#115 + def add_authorized_key(key); end + + # Fetch the authorized SSH keys on the Enterprise install + # + # @return [Sawyer::Resource] An array of authorized SSH keys + # + # source://octokit//lib/octokit/enterprise_management_console_client/management_console.rb#105 + def authorized_keys; end + + # Get information about the Enterprise installation + # + # @return [Sawyer::Resource] The installation information + # + # source://octokit//lib/octokit/enterprise_management_console_client/management_console.rb#54 + def config_check; end + + # Get information about the Enterprise installation + # + # @return [Sawyer::Resource] The installation information + # + # source://octokit//lib/octokit/enterprise_management_console_client/management_console.rb#54 + def config_status; end + + # Removes an authorized SSH keys from the Enterprise install + # + # @param key Either the file path to a key, a File handler to the key, or the contents of the key itself + # @return [Sawyer::Resource] An array of authorized SSH keys + # + # source://octokit//lib/octokit/enterprise_management_console_client/management_console.rb#140 + def delete_authorized_key(key); end + + # Start (or turn off) the Enterprise maintenance mode + # + # @param maintenance [Hash] A hash configuration of the maintenance settings + # @return [nil] + # + # source://octokit//lib/octokit/enterprise_management_console_client/management_console.rb#94 + def edit_maintenance_status(maintenance); end + + # Modify the Enterprise settings + # + # @param settings [Hash] A hash configuration of the new settings + # @return [nil] + # + # source://octokit//lib/octokit/enterprise_management_console_client/management_console.rb#74 + def edit_settings(settings); end + + # Fetch the authorized SSH keys on the Enterprise install + # + # @return [Sawyer::Resource] An array of authorized SSH keys + # + # source://octokit//lib/octokit/enterprise_management_console_client/management_console.rb#105 + def get_authorized_keys; end + + # Get information about the Enterprise maintenance status + # + # @return [Sawyer::Resource] The maintenance status + # + # source://octokit//lib/octokit/enterprise_management_console_client/management_console.rb#84 + def get_maintenance_status; end + + # Get information about the Enterprise installation + # + # @return [Sawyer::Resource] The settings + # + # source://octokit//lib/octokit/enterprise_management_console_client/management_console.rb#63 + def get_settings; end + + # Get information about the Enterprise maintenance status + # + # @return [Sawyer::Resource] The maintenance status + # + # source://octokit//lib/octokit/enterprise_management_console_client/management_console.rb#84 + def maintenance_status; end + + # Removes an authorized SSH keys from the Enterprise install + # + # @param key Either the file path to a key, a File handler to the key, or the contents of the key itself + # @return [Sawyer::Resource] An array of authorized SSH keys + # + # source://octokit//lib/octokit/enterprise_management_console_client/management_console.rb#140 + def remove_authorized_key(key); end + + # Start (or turn off) the Enterprise maintenance mode + # + # @param maintenance [Hash] A hash configuration of the maintenance settings + # @return [nil] + # + # source://octokit//lib/octokit/enterprise_management_console_client/management_console.rb#94 + def set_maintenance_status(maintenance); end + + # Get information about the Enterprise installation + # + # @return [Sawyer::Resource] The settings + # + # source://octokit//lib/octokit/enterprise_management_console_client/management_console.rb#63 + def settings; end + + # Start a configuration process. + # + # @return nil + # + # source://octokit//lib/octokit/enterprise_management_console_client/management_console.rb#31 + def start_configuration; end + + # Upgrade an Enterprise installation + # + # @param license [String] The path to your .ghl license file. + # @return nil + # + # source://octokit//lib/octokit/enterprise_management_console_client/management_console.rb#41 + def upgrade(license); end + + # source://octokit//lib/octokit/enterprise_management_console_client/management_console.rb#16 + def upload_license(license, settings = T.unsafe(nil)); end +end + +# Custom error class for rescuing from all GitHub errors +# +# source://octokit//lib/octokit/error.rb#5 +class Octokit::Error < ::StandardError + # @return [Error] a new instance of Error + # + # source://octokit//lib/octokit/error.rb#49 + def initialize(response = T.unsafe(nil)); end + + # source://octokit//lib/octokit/error.rb#43 + def build_error_context; end + + # Returns the value of attribute context. + # + # source://octokit//lib/octokit/error.rb#6 + def context; end + + # Documentation URL returned by the API for some errors + # + # @return [String] + # + # source://octokit//lib/octokit/error.rb#58 + def documentation_url; end + + # Array of validation errors + # + # @return [Array] Error info + # + # source://octokit//lib/octokit/error.rb#132 + def errors; end + + # Body returned by the GitHub server. + # + # @return [String] + # + # source://octokit//lib/octokit/error.rb#157 + def response_body; end + + # Headers returned by the GitHub server. + # + # @return [Hash] + # + # source://octokit//lib/octokit/error.rb#150 + def response_headers; end + + # Status code returned by the GitHub server. + # + # @return [Integer] + # + # source://octokit//lib/octokit/error.rb#143 + def response_status; end + + private + + # source://octokit//lib/octokit/error.rb#205 + def build_error_message; end + + # source://octokit//lib/octokit/error.rb#163 + def data; end + + # source://octokit//lib/octokit/error.rb#218 + def redact_url(url_string); end + + # source://octokit//lib/octokit/error.rb#186 + def response_error; end + + # source://octokit//lib/octokit/error.rb#190 + def response_error_summary; end + + # source://octokit//lib/octokit/error.rb#177 + def response_message; end + + class << self + # Returns most appropriate error for 401 HTTP status code + # + # @private + # + # source://octokit//lib/octokit/error.rb#65 + def error_for_401(headers); end + + # Returns most appropriate error for 403 HTTP status code + # + # @private + # + # source://octokit//lib/octokit/error.rb#76 + def error_for_403(body); end + + # Return most appropriate error for 404 HTTP status code + # + # @private + # + # source://octokit//lib/octokit/error.rb#107 + def error_for_404(body); end + + # Return most appropriate error for 422 HTTP status code + # + # @private + # + # source://octokit//lib/octokit/error.rb#119 + def error_for_422(body); end + + # Returns the appropriate Octokit::Error subclass based + # on status and response message + # + # + # @param response [Hash] HTTP response + # @return [Octokit::Error] + # + # source://octokit//lib/octokit/error.rb#14 + def from_response(response); end + end +end + +# Raised when GitHub returns a 403 HTTP status code +# +# source://octokit//lib/octokit/error.rb#265 +class Octokit::Forbidden < ::Octokit::ClientError; end + +# Class to parse and create Gist URLs +# +# source://octokit//lib/octokit/gist.rb#5 +class Octokit::Gist + # @return [Gist] a new instance of Gist + # + # source://octokit//lib/octokit/gist.rb#16 + def initialize(gist); end + + # !@attribute id + # @return [String] Gist ID + # + # source://octokit//lib/octokit/gist.rb#8 + def id; end + + # !@attribute id + # @return [String] Gist ID + # + # source://octokit//lib/octokit/gist.rb#8 + def id=(_arg0); end + + # Gist ID + # + # @return [String] + # + # source://octokit//lib/octokit/gist.rb#25 + def to_s; end + + # Gist URL + # + # @return [String] + # + # source://octokit//lib/octokit/gist.rb#31 + def url; end + + class << self + # Instantiate {Gist} object from Gist URL + # @ return [Gist] + # + # source://octokit//lib/octokit/gist.rb#12 + def from_url(url); end + end +end + +# Raised when GitHub returns a 403 HTTP status code +# and body matches 'suspended your access' +# +# source://octokit//lib/octokit/error.rb#305 +class Octokit::InstallationSuspended < ::Octokit::Forbidden; end + +# Raised when GitHub returns a 500 HTTP status code +# +# source://octokit//lib/octokit/error.rb#347 +class Octokit::InternalServerError < ::Octokit::ServerError; end + +# Raised when a repository is created with an invalid format +# +# source://octokit//lib/octokit/error.rb#366 +class Octokit::InvalidRepository < ::ArgumentError; end + +# Current major release. +# +# @return [Integer] +# +# source://octokit//lib/octokit/version.rb#6 +Octokit::MAJOR = T.let(T.unsafe(nil), Integer) + +# Current minor release. +# +# @return [Integer] +# +# source://octokit//lib/octokit/version.rb#10 +Octokit::MINOR = T.let(T.unsafe(nil), Integer) + +# ManageGHESClient is only meant to be used by GitHub Enterprise Server (GHES) operators +# and provides access to the Manage GHES API endpoints. +# +# @see Octokit::Client Use Octokit::Client for regular API use for GitHub +# and GitHub Enterprise. +# @see https://developer.github.com/v3/enterprise-admin/manage-ghes/ +# +# source://octokit//lib/octokit/manage_ghes_client/manage_ghes.rb#5 +class Octokit::ManageGHESClient + include ::Octokit::Configurable + include ::Octokit::Authentication + include ::Octokit::Connection + include ::Octokit::Warnable + include ::Octokit::ManageGHESClient::ManageAPI + + # @return [ManageGHESClient] a new instance of ManageGHESClient + # + # source://octokit//lib/octokit/manage_ghes_client.rb#21 + def initialize(options = T.unsafe(nil)); end + + # Add an authorized SSH keys on the Enterprise install + # + # @param key Either the file path to a key, a File handler to the key, or the contents of the key itself + # @return [nil] + # + # source://octokit//lib/octokit/manage_ghes_client/manage_ghes.rb#92 + def add_authorized_key(key); end + + # source://octokit//lib/octokit/manage_ghes_client/manage_ghes.rb#82 + def authorized_keys; end + + # Get information about the Enterprise installation + # + # @return [nil] + # + # source://octokit//lib/octokit/manage_ghes_client/manage_ghes.rb#57 + def config_check; end + + # Get information about the Enterprise installation + # + # @return [nil] + # + # source://octokit//lib/octokit/manage_ghes_client/manage_ghes.rb#57 + def config_status; end + + # Removes an authorized SSH keys from the Enterprise install + # + # @param key Either the file path to a key, a File handler to the key, or the contents of the key itself + # @return [nil] + # + # source://octokit//lib/octokit/manage_ghes_client/manage_ghes.rb#117 + def delete_authorized_key(key); end + + # Modify the Enterprise settings + # + # @param settings [Hash] A hash configuration of the new settings + # @return [nil] + # + # source://octokit//lib/octokit/manage_ghes_client/manage_ghes.rb#77 + def edit_settings(settings); end + + # source://octokit//lib/octokit/manage_ghes_client/manage_ghes.rb#82 + def get_authorized_keys; end + + # Get information about the Enterprise installation + # + # @return [nil] + # + # source://octokit//lib/octokit/manage_ghes_client/manage_ghes.rb#66 + def get_settings; end + + # Removes an authorized SSH keys from the Enterprise install + # + # @param key Either the file path to a key, a File handler to the key, or the contents of the key itself + # @return [nil] + # + # source://octokit//lib/octokit/manage_ghes_client/manage_ghes.rb#117 + def remove_authorized_key(key); end + + # Get information about the Enterprise installation + # + # @return [nil] + # + # source://octokit//lib/octokit/manage_ghes_client/manage_ghes.rb#66 + def settings; end + + # Start a configuration process. + # + # @return [nil] + # + # source://octokit//lib/octokit/manage_ghes_client/manage_ghes.rb#49 + def start_configuration; end + + # source://octokit//lib/octokit/manage_ghes_client/manage_ghes.rb#37 + def upload_license(license); end + + protected + + # source://octokit//lib/octokit/manage_ghes_client.rb#36 + def endpoint; end + + # Set Manage GHES API endpoint + # + # @param value [String] Manage GHES API endpoint + # + # source://octokit//lib/octokit/manage_ghes_client.rb#43 + def manage_ghes_endpoint=(value); end + + # Set Manage GHES API password + # + # @param value [String] Manage GHES API password + # + # source://octokit//lib/octokit/manage_ghes_client.rb#59 + def manage_ghes_password=(value); end + + # Set Manage GHES API username + # + # @param value [String] Manage GHES API username + # + # source://octokit//lib/octokit/manage_ghes_client.rb#51 + def manage_ghes_username=(value); end + + private + + # source://octokit//lib/octokit/manage_ghes_client/manage_ghes.rb#150 + def authenticated_client; end + + # @return [Boolean] + # + # source://octokit//lib/octokit/manage_ghes_client/manage_ghes.rb#141 + def basic_authenticated?; end + + # If no username is provided, we assume root site admin should be used + # + # @return [Boolean] + # + # source://octokit//lib/octokit/manage_ghes_client/manage_ghes.rb#146 + def root_site_admin_assumed?; end +end + +# Methods for the Manage GitHub Enterprise Server API +# +# @see https://developer.github.com/v3/enterprise-admin/manage-ghes +# +# source://octokit//lib/octokit/manage_ghes_client/manage_ghes.rb#9 +module Octokit::ManageGHESClient::ManageAPI + # Configure the maintenance mode of the GHES instance + # + # @param maintenance [Hash] A hash configuration of the maintenance mode status + # @return [nil] + # + # source://octokit//lib/octokit/manage_ghes_client/manage_ghes.rb#23 + def configure_maintenance_mode(enabled, options = T.unsafe(nil)); end + + # Get information about the maintenance status of the GHES instance + # + # @return [nil] + # + # source://octokit//lib/octokit/manage_ghes_client/manage_ghes.rb#13 + def maintenance_mode; end + + # Configure the maintenance mode of the GHES instance + # + # @param maintenance [Hash] A hash configuration of the maintenance mode status + # @return [nil] + # + # source://octokit//lib/octokit/manage_ghes_client/manage_ghes.rb#23 + def set_maintenance_mode(enabled, options = T.unsafe(nil)); end +end + +# Raised when GitHub returns a 405 HTTP status code +# +# source://octokit//lib/octokit/error.rb#315 +class Octokit::MethodNotAllowed < ::Octokit::ClientError; end + +# source://octokit//lib/octokit/middleware/follow_redirects.rb#12 +module Octokit::Middleware; end + +# Public: Follow HTTP 301, 302, 303, and 307 redirects. +# +# For HTTP 303, the original GET, POST, PUT, DELETE, or PATCH request gets +# converted into a GET. For HTTP 301, 302, and 307, the HTTP method remains +# unchanged. +# +# This middleware currently only works with synchronous requests; i.e. it +# doesn't support parallelism. +# +# source://octokit//lib/octokit/middleware/follow_redirects.rb#31 +class Octokit::Middleware::FollowRedirects < ::Faraday::Middleware + # Public: Initialize the middleware. + # + # options - An options Hash (default: {}): + # :limit - A Integer redirect limit (default: 3). + # + # @return [FollowRedirects] a new instance of FollowRedirects + # + # source://octokit//lib/octokit/middleware/follow_redirects.rb#53 + def initialize(app, options = T.unsafe(nil)); end + + # source://octokit//lib/octokit/middleware/follow_redirects.rb#60 + def call(env); end + + private + + # @return [Boolean] + # + # source://octokit//lib/octokit/middleware/follow_redirects.rb#66 + def convert_to_get?(response); end + + # source://octokit//lib/octokit/middleware/follow_redirects.rb#113 + def follow_limit; end + + # @return [Boolean] + # + # source://octokit//lib/octokit/middleware/follow_redirects.rb#108 + def follow_redirect?(env, response); end + + # source://octokit//lib/octokit/middleware/follow_redirects.rb#71 + def perform_with_redirection(env, follows); end + + # Internal: Escapes unsafe characters from a URL which might be a path + # component only or a fully-qualified URI so that it can be joined onto a + # URI:HTTP using the `+` operator. Doesn't escape "%" characters so to not + # risk double-escaping. + # + # source://octokit//lib/octokit/middleware/follow_redirects.rb#128 + def safe_escape(uri); end + + # @return [Boolean] + # + # source://octokit//lib/octokit/middleware/follow_redirects.rb#117 + def same_host?(original_url, redirect_url); end + + # source://octokit//lib/octokit/middleware/follow_redirects.rb#86 + def update_env(env, request_body, response); end +end + +# HTTP methods for which 30x redirects can be followed +# +# source://octokit//lib/octokit/middleware/follow_redirects.rb#33 +Octokit::Middleware::FollowRedirects::ALLOWED_METHODS = T.let(T.unsafe(nil), Set) + +# Keys in env hash which will get cleared between requests +# +# source://octokit//lib/octokit/middleware/follow_redirects.rb#39 +Octokit::Middleware::FollowRedirects::ENV_TO_CLEAR = T.let(T.unsafe(nil), Set) + +# Default value for max redirects followed +# +# source://octokit//lib/octokit/middleware/follow_redirects.rb#42 +Octokit::Middleware::FollowRedirects::FOLLOW_LIMIT = T.let(T.unsafe(nil), Integer) + +# HTTP redirect status codes that this middleware implements +# +# source://octokit//lib/octokit/middleware/follow_redirects.rb#36 +Octokit::Middleware::FollowRedirects::REDIRECT_CODES = T.let(T.unsafe(nil), Set) + +# Regex that matches characters that need to be escaped in URLs, sans +# the "%" character which we assume already represents an escaped +# sequence. +# +# source://octokit//lib/octokit/middleware/follow_redirects.rb#47 +Octokit::Middleware::FollowRedirects::URI_UNSAFE = T.let(T.unsafe(nil), Regexp) + +# Public: Exception thrown when the maximum amount of requests is exceeded. +# +# source://octokit//lib/octokit/middleware/follow_redirects.rb#14 +class Octokit::Middleware::RedirectLimitReached < ::Faraday::ClientError + # @return [RedirectLimitReached] a new instance of RedirectLimitReached + # + # source://octokit//lib/octokit/middleware/follow_redirects.rb#17 + def initialize(response); end + + # Returns the value of attribute response. + # + # source://octokit//lib/octokit/middleware/follow_redirects.rb#15 + def response; end +end + +# Raised when client fails to provide valid Content-Type +# +# source://octokit//lib/octokit/error.rb#359 +class Octokit::MissingContentType < ::ArgumentError; end + +# Raised when GitHub returns a 406 HTTP status code +# +# source://octokit//lib/octokit/error.rb#318 +class Octokit::NotAcceptable < ::Octokit::ClientError; end + +# Raised when GitHub returns a 404 HTTP status code +# +# source://octokit//lib/octokit/error.rb#308 +class Octokit::NotFound < ::Octokit::ClientError; end + +# Raised when GitHub returns a 501 HTTP status code +# +# source://octokit//lib/octokit/error.rb#350 +class Octokit::NotImplemented < ::Octokit::ServerError; end + +# Raised when GitHub returns a 401 HTTP status code +# and headers include "X-GitHub-OTP" +# +# source://octokit//lib/octokit/error.rb#239 +class Octokit::OneTimePasswordRequired < ::Octokit::ClientError + # Delivery method for the user's OTP + # + # @return [String] + # + # source://octokit//lib/octokit/error.rb#251 + def password_delivery; end + + private + + # source://octokit//lib/octokit/error.rb#257 + def delivery_method_from_header; end + + class << self + # @private + # + # source://octokit//lib/octokit/error.rb#244 + def required_header(headers); end + end +end + +# @private +# +# source://octokit//lib/octokit/error.rb#241 +Octokit::OneTimePasswordRequired::OTP_DELIVERY_PATTERN = T.let(T.unsafe(nil), Regexp) + +# GitHub organization class to generate API path urls +# +# source://octokit//lib/octokit/organization.rb#5 +class Octokit::Organization + class << self + # Get the api path for an organization + # + # @param org [String, Integer] GitHub organization login or id + # @return [String] Organization Api path + # + # source://octokit//lib/octokit/organization.rb#10 + def path(org); end + end +end + +# Current patch level. +# +# @return [Integer] +# +# source://octokit//lib/octokit/version.rb#14 +Octokit::PATCH = T.let(T.unsafe(nil), Integer) + +# Raised when GitHub returns a 422 HTTP status code and body matches 'Path diff too large'. +# It could occur when attempting to post review comments on a "too large" file. +# +# source://octokit//lib/octokit/error.rb#338 +class Octokit::PathDiffTooLarge < ::Octokit::UnprocessableEntity; end + +# source://octokit//lib/octokit/error.rb#368 +Octokit::RATE_LIMITED_ERRORS = T.let(T.unsafe(nil), Array) + +# Class for API Rate Limit info +# +# @see https://developer.github.com/v3/#rate-limiting +# +# source://octokit//lib/octokit/rate_limit.rb#16 +class Octokit::RateLimit < ::Struct + class << self + # Get rate limit info from HTTP response + # + # @param response [#headers] HTTP response + # @return [RateLimit] + # + # source://octokit//lib/octokit/rate_limit.rb#21 + def from_response(response); end + end +end + +# Class to extract options from Ruby arguments for +# Repository-related methods +# +# source://octokit//lib/octokit/repo_arguments.rb#6 +class Octokit::RepoArguments < ::Octokit::Arguments + # @return [RepoArguments] a new instance of RepoArguments + # + # source://octokit//lib/octokit/repo_arguments.rb#11 + def initialize(args); end + + # !@attribute [r] repo + # @return [Repository] + # + # source://octokit//lib/octokit/repo_arguments.rb#9 + def repo; end +end + +# Class to parse GitHub repository owner and name from +# URLs and to generate URLs +# +# source://octokit//lib/octokit/repository.rb#6 +class Octokit::Repository + # @raise [Octokit::InvalidRepository] if the repository + # has an invalid format + # @return [Repository] a new instance of Repository + # + # source://octokit//lib/octokit/repository.rb#23 + def initialize(repo); end + + # Returns the value of attribute id. + # + # source://octokit//lib/octokit/repository.rb#7 + def id; end + + # Sets the attribute id + # + # @param value the value to set the attribute id to. + # + # source://octokit//lib/octokit/repository.rb#7 + def id=(_arg0); end + + # @return [String] Api path for id identified repos + # + # source://octokit//lib/octokit/repository.rb#68 + def id_api_path; end + + # Returns the value of attribute name. + # + # source://octokit//lib/octokit/repository.rb#7 + def name; end + + # Sets the attribute name + # + # @param value the value to set the attribute name to. + # + # source://octokit//lib/octokit/repository.rb#7 + def name=(_arg0); end + + # @return [String] Api path for owner/name identified repos + # + # source://octokit//lib/octokit/repository.rb#63 + def named_api_path; end + + # Returns the value of attribute owner. + # + # source://octokit//lib/octokit/repository.rb#7 + def owner; end + + # Sets the attribute owner + # + # @param value the value to set the attribute owner to. + # + # source://octokit//lib/octokit/repository.rb#7 + def owner=(_arg0); end + + # @return [String] Repository API path + # + # source://octokit//lib/octokit/repository.rb#49 + def path; end + + # Returns the value of attribute name. + # + # source://octokit//lib/octokit/repository.rb#7 + def repo; end + + # Repository owner/name + # + # @return [String] + # + # source://octokit//lib/octokit/repository.rb#43 + def slug; end + + # Repository owner/name + # + # @return [String] + # + # source://octokit//lib/octokit/repository.rb#43 + def to_s; end + + # Repository URL based on {Octokit::Client#web_endpoint} + # + # @return [String] + # + # source://octokit//lib/octokit/repository.rb#74 + def url; end + + # Returns the value of attribute owner. + # + # source://octokit//lib/octokit/repository.rb#7 + def user; end + + # Returns the value of attribute owner. + # + # source://octokit//lib/octokit/repository.rb#7 + def username; end + + private + + # @raise [Octokit::InvalidRepository] + # + # source://octokit//lib/octokit/repository.rb#90 + def raise_invalid_repository!(repo); end + + # source://octokit//lib/octokit/repository.rb#84 + def validate_owner_and_name!(repo); end + + class << self + # Instantiate from a GitHub repository URL + # + # @return [Repository] + # + # source://octokit//lib/octokit/repository.rb#14 + def from_url(url); end + + # Get the api path for a repo + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @return [String] Api path. + # + # source://octokit//lib/octokit/repository.rb#58 + def path(repo); end + end +end + +# source://octokit//lib/octokit/repository.rb#9 +Octokit::Repository::NAME_WITH_OWNER_PATTERN = T.let(T.unsafe(nil), Regexp) + +# Raised when GitHub returns a 403 HTTP status code +# and body matches 'repository access blocked' +# +# source://octokit//lib/octokit/error.rb#285 +class Octokit::RepositoryUnavailable < ::Octokit::Forbidden; end + +# Faraday response middleware +# +# source://octokit//lib/octokit/response/base_middleware.rb#6 +module Octokit::Response; end + +# In Faraday 2.x, Faraday::Response::Middleware was removed +# +# source://octokit//lib/octokit/response/base_middleware.rb#8 +Octokit::Response::BaseMiddleware = Faraday::Middleware + +# Parses RSS and Atom feed responses. +# +# source://octokit//lib/octokit/response/feed_parser.rb#8 +class Octokit::Response::FeedParser < ::Faraday::Middleware + # source://octokit//lib/octokit/response/feed_parser.rb#9 + def on_complete(env); end +end + +# This class raises an Octokit-flavored exception based +# HTTP status codes returned by the API +# +# source://octokit//lib/octokit/response/raise_error.rb#11 +class Octokit::Response::RaiseError < ::Faraday::Middleware + # source://octokit//lib/octokit/response/raise_error.rb#12 + def on_complete(response); end +end + +# Raised when GitHub returns a 403 HTTP status code +# and body matches 'Resource protected by organization SAML enforcement' +# +# source://octokit//lib/octokit/error.rb#301 +class Octokit::SAMLProtected < ::Octokit::Forbidden; end + +# Raised on errors in the 500-599 range +# +# source://octokit//lib/octokit/error.rb#344 +class Octokit::ServerError < ::Octokit::Error; end + +# Raised when GitHub returns a 503 HTTP status code +# +# source://octokit//lib/octokit/error.rb#356 +class Octokit::ServiceUnavailable < ::Octokit::ServerError; end + +# Raised when GitHub returns a 403 HTTP status code +# and body matches 'returns blobs up to [0-9]+ MB' +# +# source://octokit//lib/octokit/error.rb#277 +class Octokit::TooLargeContent < ::Octokit::Forbidden; end + +# Raised when GitHub returns a 403 HTTP status code +# and body matches 'login attempts exceeded' +# +# source://octokit//lib/octokit/error.rb#273 +class Octokit::TooManyLoginAttempts < ::Octokit::Forbidden; end + +# Raised when GitHub returns a 403 HTTP status code +# and body matches 'rate limit exceeded' +# +# source://octokit//lib/octokit/error.rb#269 +class Octokit::TooManyRequests < ::Octokit::Forbidden; end + +# Raised when GitHub returns a 401 HTTP status code +# +# source://octokit//lib/octokit/error.rb#235 +class Octokit::Unauthorized < ::Octokit::ClientError; end + +# Raised when GitHub returns a 451 HTTP status code +# +# source://octokit//lib/octokit/error.rb#341 +class Octokit::UnavailableForLegalReasons < ::Octokit::ClientError; end + +# Raised when GitHub returns a 422 HTTP status code +# +# source://octokit//lib/octokit/error.rb#330 +class Octokit::UnprocessableEntity < ::Octokit::ClientError; end + +# Raised when GitHub returns a 414 HTTP status code +# +# source://octokit//lib/octokit/error.rb#327 +class Octokit::UnsupportedMediaType < ::Octokit::ClientError; end + +# Raised when GitHub returns a 403 HTTP status code +# and body matches 'email address must be verified' +# +# source://octokit//lib/octokit/error.rb#289 +class Octokit::UnverifiedEmail < ::Octokit::Forbidden; end + +# GitHub user class to generate API path urls +# +# source://octokit//lib/octokit/user.rb#5 +class Octokit::User + class << self + # Get the api path for a user + # + # @param user [String, Integer] GitHub user login or id + # @return [String] User Api path + # + # source://octokit//lib/octokit/user.rb#10 + def path(user); end + end +end + +# Full release version. +# +# @return [String] +# +# source://octokit//lib/octokit/version.rb#18 +Octokit::VERSION = T.let(T.unsafe(nil), String) + +# Allows warnings to be suppressed via environment variable. +# +# source://octokit//lib/octokit/warnable.rb#5 +module Octokit::Warnable + private + + # Wrapper around Kernel#warn to print warnings unless + # OCTOKIT_SILENT is set to true. + # + # @return [nil] + # + # source://octokit//lib/octokit/warnable.rb#12 + def octokit_warn(*message); end + + class << self + # Wrapper around Kernel#warn to print warnings unless + # OCTOKIT_SILENT is set to true. + # + # @return [nil] + # + # source://octokit//lib/octokit/warnable.rb#12 + def octokit_warn(*message); end + end +end