module Octokit::Client::Apps
Methods for the Apps
API
Public Instance Methods
Source
# File lib/octokit/client/apps.rb, line 128 def add_repository_to_app_installation(installation, repo, options = {}) boolean_from_response :put, "user/installations/#{installation}/repositories/#{repo}", options 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
@see docs.github.com/en/rest/apps/installations#add-a-repository-to-an-app-installation
@return [Boolean] Success
Source
# File lib/octokit/client/apps.rb, line 14 def app(options = {}) get 'app', options end
Get the authenticated App
@param options [Hash] A customizable set of options
@see docs.github.com/en/rest/apps/apps#get-the-authenticated-app
@return [Sawyer::Resource] App information
Source
# File lib/octokit/client/apps.rb, line 194 def app_hook_delivery(delivery_id, options = {}) get "/app/hook/deliveries/#{delivery_id}", options 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
@see docs.github.com/en/rest/apps/webhooks#get-a-delivery-for-an-app-webhook
@return [<Sawyer::Resource>] The webhook delivery
Source
# File lib/octokit/client/apps.rb, line 64 def create_app_installation_access_token(installation, options = {}) post "app/installations/#{installation}/access_tokens", options end
Create a new installation token
@param installation [Integer] The id of a GitHub App Installation @param options [Hash] A customizable set of options
@see docs.github.com/en/rest/apps/apps#create-an-installation-access-token-for-an-app
@return [<Sawyer::Resource>] An installation token
Source
# File lib/octokit/client/apps.rb, line 169 def delete_installation(installation, options = {}) boolean_from_response :delete, "app/installations/#{installation}", options 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
@see docs.github.com/en/rest/apps/apps#delete-an-installation-for-the-authenticated-app
@return [Boolean] Success
Source
# File lib/octokit/client/apps.rb, line 206 def deliver_app_hook(delivery_id, options = {}) boolean_from_response :post, "app/hook/deliveries/#{delivery_id}/attempts", options 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
@see docs.github.com/en/rest/apps/webhooks#redeliver-a-delivery-for-an-app-webhook
@return [Boolean] Success
Source
# File lib/octokit/client/apps.rb, line 155 def find_installation_repositories_for_user(installation, options = {}) paginate("user/installations/#{installation}/repositories", options) do |data, last_response| data.repositories.concat last_response.data.repositories end 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
@see docs.github.com/en/rest/apps/installations#list-repositories-accessible-to-the-user-access-token
@return [Sawyer::Resource] the total_count and an array of repositories
Source
# File lib/octokit/client/apps.rb, line 77 def find_organization_installation(organization, options = {}) get "#{Organization.path(organization)}/installation", options 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
@see docs.github.com/en/rest/apps/apps#get-an-organization-installation-for-the-authenticated-app
@return [Sawyer::Resource] Installation information
Source
# File lib/octokit/client/apps.rb, line 89 def find_repository_installation(repo, options = {}) get "#{Repository.path(repo)}/installation", options 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
@see docs.github.com/en/rest/apps/apps#get-a-repository-installation-for-the-authenticated-app
@return [Sawyer::Resource] Installation information
Source
# File lib/octokit/client/apps.rb, line 101 def find_user_installation(user, options = {}) get "#{User.path(user)}/installation", options 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
@see docs.github.com/en/rest/apps/apps#get-a-user-installation-for-the-authenticated-app
@return [Sawyer::Resource] Installation information
Source
# File lib/octokit/client/apps.rb, line 52 def installation(id, options = {}) get "app/installations/#{id}", options end
Get a single installation
@param id [Integer] Installation id
@see docs.github.com/en/rest/apps/apps#get-an-installation-for-the-authenticated-app
@return [Sawyer::Resource] Installation information
Source
# File lib/octokit/client/apps.rb, line 180 def list_app_hook_deliveries(options = {}) paginate('app/hook/deliveries', options) do |data, last_response| data.concat last_response.data end end
Returns a list of webhook deliveries for the webhook configured for a GitHub App.
@param options [Hash] A customizable set of options
@see docs.github.com/en/rest/apps/webhooks#list-deliveries-for-an-app-webhook
@return [Array<Hash>] an array of hook deliveries
Source
# File lib/octokit/client/apps.rb, line 112 def list_app_installation_repositories(options = {}) paginate('installation/repositories', options) do |data, last_response| data.repositories.concat last_response.data.repositories end end
List repositories that are accessible to the authenticated installation
@param options [Hash] A customizable set of options
@see docs.github.com/en/rest/apps/installations#list-repositories-accessible-to-the-app-installation
@return [Sawyer::Resource] the total_count and an array of repositories
Source
# File lib/octokit/client/apps.rb, line 25 def list_app_installations(options = {}) paginate 'app/installations', options end
List all installations that belong to an App
@param options [Hash] A customizable set of options
@see docs.github.com/en/rest/apps/apps#list-installations-for-the-authenticated-app
@return [Array<Sawyer::Resource>] the total_count and an array of installations
Source
# File lib/octokit/client/apps.rb, line 38 def list_user_installations(options = {}) paginate('user/installations', options) do |data, last_response| data.installations.concat last_response.data.installations end end
List 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
Source
# File lib/octokit/client/apps.rb, line 142 def remove_repository_from_app_installation(installation, repo, options = {}) boolean_from_response :delete, "user/installations/#{installation}/repositories/#{repo}", options 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
@see docs.github.com/en/rest/apps/installations#remove-a-repository-from-an-app-installation
@return [Boolean] Success