code
stringlengths
26
124k
docstring
stringlengths
23
125k
func_name
stringlengths
1
98
language
stringclasses
1 value
repo
stringlengths
5
53
path
stringlengths
7
151
url
stringlengths
50
211
license
stringclasses
7 values
def list_secrets(repo) paginate "#{Repository.path repo}/actions/secrets" 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
list_secrets
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/actions_secrets.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/actions_secrets.rb
Apache-2.0
def get_secret(repo, name) get "#{Repository.path repo}/actions/secrets/#{name}" 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
get_secret
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/actions_secrets.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/actions_secrets.rb
Apache-2.0
def create_or_update_secret(repo, name, options) put "#{Repository.path repo}/actions/secrets/#{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
create_or_update_secret
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/actions_secrets.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/actions_secrets.rb
Apache-2.0
def delete_secret(repo, name) boolean_from_response :delete, "#{Repository.path repo}/actions/secrets/#{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
delete_secret
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/actions_secrets.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/actions_secrets.rb
Apache-2.0
def workflows(repo, options = {}) paginate "#{Repository.path repo}/actions/workflows", options 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
workflows
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/actions_workflows.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/actions_workflows.rb
Apache-2.0
def workflow(repo, id, options = {}) get "#{Repository.path repo}/actions/workflows/#{id}", options 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
workflow
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/actions_workflows.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/actions_workflows.rb
Apache-2.0
def workflow_dispatch(repo, id, ref, options = {}) boolean_from_response :post, "#{Repository.path repo}/actions/workflows/#{id}/dispatches", options.merge({ ref: ref }) 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
workflow_dispatch
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/actions_workflows.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/actions_workflows.rb
Apache-2.0
def workflow_runs(repo, workflow, options = {}) paginate "#{Repository.path repo}/actions/workflows/#{workflow}/runs", options end
List all runs for a repository workflow @param repo [Integer, String, Repository, Hash] A GitHub repository @param workflow [Integer, String] Id or file name of the workflow @option options [String] :actor Optional filtering by a user @option options [String] :branch Optional filtering by a branch @option options [String] :event Optional filtering by the event type @option options [String] :status Optional filtering by a status or conclusion @return [Sawyer::Resource] the total count and an array of workflows @see https://developer.github.com/v3/actions/workflow-runs/#list-workflow-runs
workflow_runs
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/actions_workflow_runs.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/actions_workflow_runs.rb
Apache-2.0
def repository_workflow_runs(repo, options = {}) paginate "#{Repository.path repo}/actions/runs", options end
List all workflow runs for a repository @param repo [Integer, String, Repository, Hash] A GitHub repository @option options [String] :actor Optional filtering by the login of a user @option options [String] :branch Optional filtering by a branch @option options [String] :event Optional filtering by the event type (e.g. push, pull_request, issue) @option options [String] :status Optional filtering by a status or conclusion (e.g. success, completed...) @return [Sawyer::Resource] the total count and an array of workflows @see https://developer.github.com/v3/actions/workflow-runs/#list-repository-workflow-runs
repository_workflow_runs
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/actions_workflow_runs.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/actions_workflow_runs.rb
Apache-2.0
def workflow_run(repo, id, options = {}) get "#{Repository.path repo}/actions/runs/#{id}", options 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
workflow_run
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/actions_workflow_runs.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/actions_workflow_runs.rb
Apache-2.0
def rerun_workflow_run(repo, id, options = {}) boolean_from_response :post, "#{Repository.path repo}/actions/runs/#{id}/rerun", options 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
rerun_workflow_run
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/actions_workflow_runs.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/actions_workflow_runs.rb
Apache-2.0
def cancel_workflow_run(repo, id, options = {}) boolean_from_response :post, "#{Repository.path repo}/actions/runs/#{id}/cancel", options end
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
cancel_workflow_run
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/actions_workflow_runs.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/actions_workflow_runs.rb
Apache-2.0
def delete_workflow_run(repo, id, options = {}) boolean_from_response :delete, "#{Repository.path repo}/actions/runs/#{id}", options 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
delete_workflow_run
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/actions_workflow_runs.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/actions_workflow_runs.rb
Apache-2.0
def workflow_run_logs(repo, id, options = {}) url = "#{Repository.path repo}/actions/runs/#{id}/logs" response = client_without_redirects.head(url, options) response.headers['Location'] 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
workflow_run_logs
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/actions_workflow_runs.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/actions_workflow_runs.rb
Apache-2.0
def delete_workflow_run_logs(repo, id, options = {}) boolean_from_response :delete, "#{Repository.path repo}/actions/runs/#{id}/logs", options end
Delets 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
delete_workflow_run_logs
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/actions_workflow_runs.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/actions_workflow_runs.rb
Apache-2.0
def app(options = {}) get 'app', options end
Get the authenticated App @param options [Hash] A customizable set of options @see https://developer.github.com/v3/apps/#get-the-authenticated-app @return [Sawyer::Resource] App information
app
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/apps.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/apps.rb
Apache-2.0
def find_app_installations(options = {}) paginate 'app/installations', options end
Find all installations that belong to an App @param options [Hash] A customizable set of options @see https://developer.github.com/v3/apps/#list-installations @return [Array<Sawyer::Resource>] the total_count and an array of installations
find_app_installations
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/apps.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/apps.rb
Apache-2.0
def find_user_installations(options = {}) paginate('user/installations', options) do |data, last_response| data.installations.concat last_response.data.installations end end
Find all installations that are accessible to the authenticated user @param options [Hash] A customizable set of options @see https://developer.github.com/v3/apps/installations/#list-installations-for-a-user @return [Sawyer::Resource] the total_count and an array of installations
find_user_installations
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/apps.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/apps.rb
Apache-2.0
def installation(id, options = {}) get "app/installations/#{id}", options end
Get a single installation @param id [Integer] Installation id @see https://developer.github.com/v3/apps/#get-an-installation @return [Sawyer::Resource] Installation information
installation
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/apps.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/apps.rb
Apache-2.0
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 https://developer.github.com/v3/apps/#create-a-new-installation-token @return [<Sawyer::Resource>] An installation token
create_app_installation_access_token
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/apps.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/apps.rb
Apache-2.0
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 https://developer.github.com/v3/apps/#get-an-organization-installation @return [Sawyer::Resource] Installation information
find_organization_installation
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/apps.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/apps.rb
Apache-2.0
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 https://developer.github.com/v3/apps/#get-a-repository-installation @return [Sawyer::Resource] Installation information
find_repository_installation
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/apps.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/apps.rb
Apache-2.0
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 https://developer.github.com/v3/apps/#get-a-user-installation @return [Sawyer::Resource] Installation information
find_user_installation
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/apps.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/apps.rb
Apache-2.0
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 https://developer.github.com/v3/apps/installations/#list-repositories @return [Sawyer::Resource] the total_count and an array of repositories
list_app_installation_repositories
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/apps.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/apps.rb
Apache-2.0
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 https://developer.github.com/v3/apps/installations/#add-repository-to-installation @return [Boolean] Success
add_repository_to_app_installation
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/apps.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/apps.rb
Apache-2.0
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 https://developer.github.com/v3/apps/installations/#remove-repository-from-installation @return [Boolean] Success
remove_repository_from_app_installation
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/apps.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/apps.rb
Apache-2.0
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 https://developer.github.com/v3/apps/installations/#list-repositories-accessible-to-the-user-for-an-installation @return [Sawyer::Resource] the total_count and an array of repositories
find_installation_repositories_for_user
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/apps.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/apps.rb
Apache-2.0
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 https://developer.github.com/v3/apps/#delete-an-installation @return [Boolean] Success
delete_installation
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/apps.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/apps.rb
Apache-2.0
def authorizations(options = {}) paginate 'authorizations', options end
List the authenticated user's authorizations API for users to manage their own tokens. You can only access your own tokens, and only through Basic Authentication. @return [Array<Sawyer::Resource>] A list of authorizations for the authenticated user @see https://developer.github.com/v3/oauth_authorizations/#list-your-authorizations @example List authorizations for user ctshryock client = Octokit::Client.new(:login => 'ctshryock', :password => 'secret') client.authorizations
authorizations
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/authorizations.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/authorizations.rb
Apache-2.0
def authorization(number, options = {}) get "authorizations/#{number}", options end
Get a single authorization for the authenticated user. You can only access your own tokens, and only through Basic Authentication. @return [Sawyer::Resource] A single authorization for the authenticated user @see https://developer.github.com/v3/oauth_authorizations/#get-a-single-authorization @example Show authorization for user ctshryock's Travis auth client = Octokit::Client.new(:login => 'ctshryock', :password => 'secret') client.authorization(999999)
authorization
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/authorizations.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/authorizations.rb
Apache-2.0
def create_authorization(options = {}) # Technically we can omit scopes as GitHub has a default, however the # API will reject us if we send a POST request with an empty body. options = options.dup if options.delete :idempotent client_id, client_secret = fetch_client_id_and_secret(options) unless client_id && client_secret raise ArgumentError, 'Client ID and Secret required for idempotent authorizations' end # Remove the client_id from the body otherwise # this will result in a 422. options.delete(:client_id) if (fingerprint = options.delete(:fingerprint)) put "authorizations/clients/#{client_id}/#{fingerprint}", options.merge(client_secret: client_secret) else put "authorizations/clients/#{client_id}", options.merge(client_secret: client_secret) end else post 'authorizations', options end end
Create an authorization for the authenticated user. You can create your own tokens, and only through Basic Authentication. @param options [Hash] A customizable set of options. @option options [Array] :scopes A list of scopes that this authorization is in. @option options [String] :note A note to remind you what the OAuth token is for. @option options [String] :note_url A URL to remind you what app the OAuth token is for. @option options [Boolean] :idempotent If true, will return an existing authorization if one has already been created. @option options [String] :client_id Client Id we received when our application was registered with GitHub. @option options [String] :client_secret Client Secret we received when our application was registered with GitHub. @return [Sawyer::Resource] A single authorization for the authenticated user @see https://developer.github.com/v3/oauth/#scopes Available scopes @see https://developer.github.com/v3/oauth_authorizations/#create-a-new-authorization @see https://developer.github.com/v3/oauth_authorizations/#get-or-create-an-authorization-for-a-specific-app @example Create a new authorization for user ctshryock's project Zoidberg client = Octokit::Client.new(:login => 'ctshryock', :password => 'secret') client.create_authorization({:scopes => ["public_repo", "gist"], :note => "Why not Zoidberg?", :note_url=> "https://en.wikipedia.org/wiki/Zoidberg"}) @example Create a new OR return an existing authorization to be used by a specific client for user ctshryock's project Zoidberg client = Octokit::Client.new(:login => 'ctshryock', :password => 'secret') client.create_authorization({:idempotent => true, :client_id => 'xxxx', :client_secret => 'yyyy', :scopes => ["user"]})
create_authorization
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/authorizations.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/authorizations.rb
Apache-2.0
def update_authorization(number, options = {}) patch "authorizations/#{number}", options end
Update an authorization for the authenticated user. You can update your own tokens, but only through Basic Authentication. @param options [Hash] A customizable set of options. @option options [Array] :scopes Replace the authorization scopes with these. @option options [Array] :add_scopes A list of scopes to add to this authorization. @option options [Array] :remove_scopes A list of scopes to remove from this authorization. @option options [String] :note A note to remind you what the OAuth token is for. @option options [String] :note_url A URL to remind you what app the OAuth token is for. @return [Sawyer::Resource] A single (updated) authorization for the authenticated user @see https://developer.github.com/v3/oauth_authorizations/#update-an-existing-authorization @see https://developer.github.com/v3/oauth/#scopes for available scopes @example Update the authorization for user ctshryock's project Zoidberg client = Octokit::Client.new(:login => 'ctshryock', :password => 'secret') client.update_authorization(999999, {:add_scopes => ["gist", "repo"], :note => "Why not Zoidberg possibly?"})
update_authorization
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/authorizations.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/authorizations.rb
Apache-2.0
def delete_authorization(number, options = {}) boolean_from_response :delete, "authorizations/#{number}", options end
Delete an authorization for the authenticated user. You can delete your own tokens, and only through Basic Authentication. @param number [Number] An existing Authorization ID @return [Boolean] Success @see https://developer.github.com/v3/oauth_authorizations/#delete-an-authorization @example Delete an authorization client = Octokit::Client.new(:login => 'ctshryock', :password => 'secret') client.delete_authorization(999999)
delete_authorization
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/authorizations.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/authorizations.rb
Apache-2.0
def scopes(token = @access_token, options = {}) options = options.dup raise ArgumentError, 'Access token required' if token.nil? auth = { 'Authorization' => "token #{token}" } headers = (options.delete(:headers) || {}).merge(auth) agent.call(:get, 'user', headers: headers) .headers['X-OAuth-Scopes'] .to_s .split(',') .map(&:strip) .sort end
Check scopes for a token @param token [String] GitHub OAuth token @param options [Hash] Header params for request @return [Array<String>] OAuth scopes @see https://developer.github.com/v3/oauth/#scopes
scopes
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/authorizations.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/authorizations.rb
Apache-2.0
def revoke_all_application_authorizations(_options = {}) octokit_warn('Deprecated: If you need to revoke all tokens for your application, you can do so via the settings page for your application.') false end
Revoke all tokens for an app Applications can revoke all of their tokens in a single request @deprecated As of January 25th, 2016: https://developer.github.com/changes/2014-04-08-reset-api-tokens/ @return [Boolean] false
revoke_all_application_authorizations
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/authorizations.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/authorizations.rb
Apache-2.0
def authorize_url(app_id = client_id, options = {}) opts = options.dup if app_id.to_s.empty? raise Octokit::ApplicationCredentialsRequired, 'client_id required' end authorize_url = opts.delete(:endpoint) || Octokit.web_endpoint authorize_url << "login/oauth/authorize?client_id=#{app_id}" require 'cgi' opts.each do |key, value| authorize_url << "&#{key}=#{CGI.escape value}" end authorize_url end
Get the URL to authorize a user for an application via the web flow @param app_id [String] Client Id we received when our application was registered with GitHub. @option options [String] :redirect_uri The url to redirect to after authorizing. @option options [String] :scope The scopes to request from the user. @option options [String] :state A random string to protect against CSRF. @return [String] The url to redirect the user to authorize. @see Octokit::Client @see https://developer.github.com/v3/oauth/#web-application-flow @example @client.authorize_url('xxxx')
authorize_url
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/authorizations.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/authorizations.rb
Apache-2.0
def update_check_run(repo, id, options = {}) patch "#{Repository.path repo}/check-runs/#{id}", options end
Update a 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 updated check run @see https://developer.github.com/v3/checks/runs/#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"
update_check_run
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/checks.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/checks.rb
Apache-2.0
def check_runs_for_ref(repo, ref, options = {}) paginate "#{Repository.path repo}/commits/#{ref}/check-runs", options do |data, last_response| data.check_runs.concat last_response.data.check_runs data.total_count += last_response.data.total_count end end
List check runs for a specific ref @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 @option options [String] :check_name Returns check runs with the specified <tt>name</tt> @option options [String] :status Returns check runs with the specified <tt>status</tt> @option options [String] :filter Filters check runs by their <tt>completed_at</tt> timestamp @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 @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"
check_runs_for_ref
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/checks.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/checks.rb
Apache-2.0
def check_runs_for_check_suite(repo, id, options = {}) paginate "#{Repository.path repo}/check-suites/#{id}/check-runs", options do |data, last_response| data.check_runs.concat last_response.data.check_runs data.total_count += last_response.data.total_count end end
List check runs in a check suite @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 @option options [String] :check_name Returns check runs with the specified <tt>name</tt> @option options [String] :status Returns check runs with the specified <tt>status</tt> @option options [String] :filter Filters check runs by their <tt>completed_at</tt> timestamp @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 @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"
check_runs_for_check_suite
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/checks.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/checks.rb
Apache-2.0
def check_run(repo, id, options = {}) get "#{Repository.path repo}/check-runs/#{id}", options end
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
check_run
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/checks.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/checks.rb
Apache-2.0
def check_run_annotations(repo, id, options = {}) paginate "#{Repository.path repo}/check-runs/#{id}/annotations", options end
List annotations for a check run @param repo [Integer, String, Hash, Repository] A GitHub repository @param id [Integer] The ID of the check run @return [Array<Sawyer::Resource>] An array of hashes representing check run annotations @see https://developer.github.com/v3/checks/runs/#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!"
check_run_annotations
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/checks.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/checks.rb
Apache-2.0
def check_suite(repo, id, options = {}) get "#{Repository.path repo}/check-suites/#{id}", options end
Methods for Check Suites @see https://developer.github.com/v3/checks/suites/ 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
check_suite
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/checks.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/checks.rb
Apache-2.0
def check_suites_for_ref(repo, ref, options = {}) paginate "#{Repository.path repo}/commits/#{ref}/check-suites", options do |data, last_response| data.check_suites.concat last_response.data.check_suites data.total_count += last_response.data.total_count end end
List check suites for a specific ref @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 @option options [Integer] :app_id Filters check suites by GitHub App <tt>id</tt> @option options [String] :check_name Filters checks suites by the <tt>name</tt> of the check run @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 @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
check_suites_for_ref
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/checks.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/checks.rb
Apache-2.0
def set_check_suite_preferences(repo, options = {}) patch "#{Repository.path repo}/check-suites/preferences", options end
Set preferences for check suites on a repository @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 @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"
set_check_suite_preferences
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/checks.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/checks.rb
Apache-2.0
def rerequest_check_suite(repo, id, options = {}) post "#{Repository.path repo}/check-suites/#{id}/rerequest", options true 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
rerequest_check_suite
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/checks.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/checks.rb
Apache-2.0
def parse_date(date) date = DateTime.parse(date.to_s) rescue ArgumentError raise ArgumentError, "#{date} is not a valid 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]
parse_date
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/commits.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/commits.rb
Apache-2.0
def community_profile(repo, options = {}) options = ensure_api_media_type(:community_profile, options) get "#{Repository.path repo}/community/profile", options end
Get community profile metrics for a repository @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 @example Get community profile metrics for octokit/octokit.rb @client.community_profile('octokit/octokit.rb')
community_profile
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/community_profile.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/community_profile.rb
Apache-2.0
def deployment(repo, deployment_id, options = {}) get("#{Repository.path repo}/deployments/#{deployment_id}", options) 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
deployment
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/deployments.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/deployments.rb
Apache-2.0
def deployments(repo, options = {}) get("#{Repository.path repo}/deployments", options) end
List all deployments for a repository @param repo [Integer, String, Repository, Hash] A GitHub repository @return [Array<Sawyer::Resource>] A list of deployments @see https://developer.github.com/v3/repos/deployments/#list-deployments
deployments
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/deployments.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/deployments.rb
Apache-2.0
def delete_deployment(repo, deployment_id, options = {}) delete("#{Repository.path repo}/deployments/#{deployment_id}", options) 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
delete_deployment
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/deployments.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/deployments.rb
Apache-2.0
def deployment_statuses(deployment_url, options = {}) deployment = get(deployment_url, accept: options[:accept]) get(deployment.rels[:statuses].href, options) end
List all statuses for a Deployment @param deployment_url [String] A URL for a deployment resource @return [Array<Sawyer::Resource>] A list of deployment statuses @see https://developer.github.com/v3/repos/deployments/#list-deployment-statuses
deployment_statuses
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/deployments.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/deployments.rb
Apache-2.0
def create_deployment_status(deployment_url, state, options = {}) deployment = get(deployment_url, accept: options[:accept]) options[:state] = state.to_s.downcase post(deployment.rels[:statuses].href, options) end
Create a deployment status for a Deployment @param deployment_url [String] A URL for a deployment resource @param state [String] The state: pending, success, failure, error @option options [String] :target_url The target URL to associate with this status. Default: "" @option options [String] :description A short description of the status. Maximum length of 140 characters. Default: "" @return [Sawyer::Resource] A deployment status @see https://developer.github.com/v3/repos/deployments/#create-a-deployment-status
create_deployment_status
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/deployments.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/deployments.rb
Apache-2.0
def downloads(repo, options = {}) paginate "#{Repository.path repo}/downloads", options end
List available downloads for a repository @param repo [Integer, String, Repository, Hash] A Github Repository @return [Array] A list of available downloads @deprecated As of December 11th, 2012: https://github.com/blog/1302-goodbye-uploads @see https://developer.github.com/v3/repos/downloads/#list-downloads-for-a-repository @example List all downloads for Github/Hubot Octokit.downloads("github/hubot")
downloads
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/downloads.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/downloads.rb
Apache-2.0
def download(repo, id, options = {}) get "#{Repository.path repo}/downloads/#{id}", options end
Get single download for a repository @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 @deprecated As of December 11th, 2012: https://github.com/blog/1302-goodbye-uploads @see https://developer.github.com/v3/repos/downloads/#get-a-single-download @example Get the "Robawt" download from Github/Hubot Octokit.download("github/hubot")
download
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/downloads.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/downloads.rb
Apache-2.0
def delete_download(repo, id, options = {}) boolean_from_response :delete, "#{Repository.path repo}/downloads/#{id}", options end
Delete a single download for a repository @param repo [Integer, String, Repository, Hash] A GitHub repository @param id [Integer] ID of the download @deprecated As of December 11th, 2012: https://github.com/blog/1302-goodbye-uploads @see https://developer.github.com/v3/repos/downloads/#delete-a-download @return [Boolean] Status @example Get the "Robawt" download from Github/Hubot Octokit.delete_download("github/hubot", 1234)
delete_download
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/downloads.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/downloads.rb
Apache-2.0
def emojis(options = {}) get 'emojis', options end
List all emojis used on GitHub @return [Sawyer::Resource] A list of all emojis on GitHub @see https://developer.github.com/v3/emojis/#emojis @example List all emojis Octokit.emojis
emojis
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/emojis.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/emojis.rb
Apache-2.0
def public_events(options = {}) paginate 'events', options end
List all public events for GitHub @return [Array<Sawyer::Resource>] A list of all public events from GitHub @see https://developer.github.com/v3/activity/events/#list-public-events @example List all pubilc events Octokit.public_events
public_events
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/events.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/events.rb
Apache-2.0
def user_events(user, options = {}) paginate "#{User.path user}/events", options end
List all user events @param user [Integer, String] GitHub user login or id. @return [Array<Sawyer::Resource>] A list of all user events @see https://developer.github.com/v3/activity/events/#list-events-performed-by-a-user @example List all user events Octokit.user_events("sferik")
user_events
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/events.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/events.rb
Apache-2.0
def user_public_events(user, options = {}) paginate "#{User.path user}/events/public", options end
List public user events @param user [Integer, String] GitHub user login or id @return [Array<Sawyer::Resource>] A list of public user events @see https://developer.github.com/v3/activity/events/#list-public-events-performed-by-a-user @example List public user events Octokit.user_events("sferik")
user_public_events
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/events.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/events.rb
Apache-2.0
def received_events(user, options = {}) paginate "#{User.path user}/received_events", options end
List events that a user has received @param user [Integer, String] GitHub user login or id @return [Array<Sawyer::Resource>] A list of all user received events @see https://developer.github.com/v3/activity/events/#list-events-that-a-user-has-received @example List all user received events Octokit.received_events("sferik")
received_events
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/events.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/events.rb
Apache-2.0
def received_public_events(user, options = {}) paginate "#{User.path user}/received_events/public", options end
List public events a user has received @param user [Integer, String] GitHub user login or id @return [Array<Sawyer::Resource>] A list of public user received events @see https://developer.github.com/v3/activity/events/#list-public-events-that-a-user-has-received @example List public user received events Octokit.received_public_events("sferik")
received_public_events
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/events.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/events.rb
Apache-2.0
def repository_events(repo, options = {}) paginate "#{Repository.path repo}/events", options end
List events for a repository @param repo [Integer, String, Repository, Hash] A GitHub repository @return [Array<Sawyer::Resource>] A list of events for a repository @see https://developer.github.com/v3/activity/events/#list-repository-events @example List events for a repository Octokit.repository_events("sferik/rails_admin")
repository_events
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/events.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/events.rb
Apache-2.0
def repository_network_events(repo, options = {}) paginate "networks/#{Repository.new(repo)}/events", options end
List public events for a repository's network @param repo [String, Repository, Hash] A GitHub repository @return [Array<Sawyer::Resource>] 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 @example List events for a repository's network Octokit.repository_network_events("sferik/rails_admin")
repository_network_events
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/events.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/events.rb
Apache-2.0
def organization_events(org, options = {}) paginate "users/#{login}/events/orgs/#{org}", options end
List all events for an organization Requires authenticated client. @param org [String] Organization GitHub handle @return [Array<Sawyer::Resource>] List of all events from a GitHub organization @see https://developer.github.com/v3/activity/events/#list-events-for-an-organization @example List events for the lostisland organization @client.organization_events("lostisland")
organization_events
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/events.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/events.rb
Apache-2.0
def organization_public_events(org, options = {}) paginate "#{Organization.path org}/events", options end
List an organization's public events @param org [String, Integer] Organization GitHub login or id. @return [Array<Sawyer::Resource>] List of public events from a GitHub organization @see https://developer.github.com/v3/activity/events/#list-public-events-for-an-organization @example List public events for GitHub Octokit.organization_public_events("GitHub")
organization_public_events
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/events.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/events.rb
Apache-2.0
def repository_issue_events(repo, options = {}) paginate "#{Repository.path repo}/issues/events", options end
Get all Issue Events for a given Repository @param repo [Integer, String, Repository, Hash] A GitHub repository @return [Array<Sawyer::Resource>] 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 @example Get all Issue Events for Octokit Octokit.repository_issue_events("octokit/octokit.rb")
repository_issue_events
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/events.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/events.rb
Apache-2.0
def issue_events(repo, number, options = {}) options = ensure_api_media_type(:project_card_events, options) paginate "#{Repository.path repo}/issues/#{number}/events", options end
List events for an Issue @param repo [Integer, String, Repository, Hash] A GitHub repository @param number [Integer] Issue number @return [Array<Sawyer::Resource>] Array of events for that issue @see https://developer.github.com/v3/issues/events/#list-events-for-an-issue @example List all issues events for issue #38 on octokit/octokit.rb Octokit.issue_events("octokit/octokit.rb", 38)
issue_events
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/events.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/events.rb
Apache-2.0
def issue_event(repo, number, options = {}) paginate "#{Repository.path repo}/issues/events/#{number}", options end
Get information on a single Issue Event @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 @example Get Event information for ID 3094334 (a pull request was closed) Octokit.issue_event("octokit/octokit.rb", 3094334)
issue_event
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/events.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/events.rb
Apache-2.0
def feeds get 'feeds' end
List Feeds The feeds returned depend on authentication, see the GitHub API docs for more information. @return [Array<Sawyer::Resource>] list of feeds @see https://developer.github.com/v3/activity/feeds/#list-feeds
feeds
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/feeds.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/feeds.rb
Apache-2.0
def feed(name, options = {}) if rel = feeds._links[name] get rel.href, accept: rel.type, options: options end end
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.
feed
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/feeds.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/feeds.rb
Apache-2.0
def gists(user = nil, options = {}) if user.nil? paginate 'gists', options else paginate "#{User.path user}/gists", options end end
List gists for a user or all public gists @param user [String] An optional user to filter listing @return [Array<Sawyer::Resource>] A list of gists @example Fetch all gists for defunkt Octokit.gists('defunkt') @example Fetch all public gists Octokit.gists @see https://developer.github.com/v3/gists/#list-gists
gists
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/gists.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/gists.rb
Apache-2.0
def public_gists(options = {}) paginate 'gists/public', options end
List public gists @return [Array<Sawyer::Resource>] A list of gists @example Fetch all public gists Octokit.public_gists @see https://developer.github.com/v3/gists/#list-gists
public_gists
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/gists.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/gists.rb
Apache-2.0
def gitignore_templates(options = {}) get 'gitignore/templates', options end
Listing available gitignore templates. These templates can be passed option when creating a repository. @see https://developer.github.com/v3/gitignore/#listing-available-templates @return [Array<String>] List of templates. @example Git all the gitignore templates @client.gitignore_templates
gitignore_templates
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/gitignore.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/gitignore.rb
Apache-2.0
def gitignore_template(template_name, options = {}) get "gitignore/templates/#{template_name}", options end
Get a gitignore template. Use the raw {http://developer.github.com/v3/media/ media type} to get the raw contents. @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. @see https://developer.github.com/v3/gitignore/#get-a-single-template @return [Sawyer::Resource] Gitignore template @example Get the Ruby gitignore template @client.gitignore_template('Ruby')
gitignore_template
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/gitignore.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/gitignore.rb
Apache-2.0
def available_hooks(options = {}) get 'hooks', options end
List all Service Hooks supported by GitHub @return [Sawyer::Resource] A list of all hooks on GitHub @see https://developer.github.com/v3/repos/hooks/#services @example List all hooks Octokit.available_hooks
available_hooks
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/hooks.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/hooks.rb
Apache-2.0
def hooks(repo, options = {}) paginate "#{Repository.path repo}/hooks", options end
List repo hooks Requires authenticated client. @param repo [Integer, String, Hash, Repository] A GitHub repository. @return [Array<Sawyer::Resource>] Array of hashes representing hooks. @see https://developer.github.com/v3/repos/hooks/#list-hooks @example @client.hooks('octokit/octokit.rb')
hooks
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/hooks.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/hooks.rb
Apache-2.0
def hook(repo, id, options = {}) get "#{Repository.path repo}/hooks/#{id}", options end
Get single hook Requires authenticated client. @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 @example @client.hook('octokit/octokit.rb', 100000)
hook
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/hooks.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/hooks.rb
Apache-2.0
def create_hook(repo, name, config, options = {}) options = { name: name, config: config, events: ['push'], active: true }.merge(options) post "#{Repository.path repo}/hooks", options end
Create a hook Requires authenticated client. @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. @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. @option options [Array<String>] :events ('["push"]') Determines what events the hook is triggered for. @option options [Boolean] :active Determines whether the hook is actually triggered on pushes. @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 @example @client.create_hook( 'octokit/octokit.rb', 'web', { :url => 'http://something.com/webhook', :content_type => 'json' }, { :events => ['push', 'pull_request'], :active => true } )
create_hook
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/hooks.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/hooks.rb
Apache-2.0
def edit_hook(repo, id, name, config, options = {}) options = { name: name, config: config }.merge(options) patch "#{Repository.path repo}/hooks/#{id}", options end
Edit a hook Requires authenticated client. @param repo [Integer, String, Hash, Repository] A GitHub repository. @param id [Integer] Id of the hook being updated. @param name [String] The name of the service that is being called. See {https://api.github.com/hooks Hooks} for the possible names. @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. @option options [Array<String>] :events ('["push"]') Determines what events the hook is triggered for. @option options [Array<String>] :add_events Determines a list of events to be added to the list of events that the Hook triggers for. @option options [Array<String>] :remove_events Determines a list of events to be removed from the list of events that the Hook triggers for. @option options [Boolean] :active Determines whether the hook is actually triggered on pushes. @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 @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 } )
edit_hook
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/hooks.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/hooks.rb
Apache-2.0
def remove_hook(repo, id, options = {}) boolean_from_response :delete, "#{Repository.path repo}/hooks/#{id}", options end
Delete hook Requires authenticated client. @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 @example @client.remove_hook('octokit/octokit.rb', 1000000)
remove_hook
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/hooks.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/hooks.rb
Apache-2.0
def test_hook(repo, id, options = {}) boolean_from_response :post, "#{Repository.path repo}/hooks/#{id}/tests", options end
Test hook Requires authenticated client. @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 @example @client.test_hook('octokit/octokit.rb', 1000000)
test_hook
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/hooks.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/hooks.rb
Apache-2.0
def ping_hook(repo, id, options = {}) boolean_from_response :post, "#{Repository.path repo}/hooks/#{id}/pings", options end
Ping hook Requires authenticated client. @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 @example @client.ping_hook('octokit/octokit.rb', 1000000)
ping_hook
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/hooks.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/hooks.rb
Apache-2.0
def org_hooks(org, options = {}) paginate "#{Organization.path org}/hooks", options end
List org hooks Requires client authenticated as admin for the org. @param org [String, Integer] Organization GitHub login or id. @return [Array<Sawyer::Resource>] Array of hashes representing hooks. @see https://developer.github.com/v3/orgs/hooks/#list-hooks @example @client.org_hooks('octokit')
org_hooks
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/hooks.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/hooks.rb
Apache-2.0
def org_hook(org, id, options = {}) get "#{Organization.path org}/hooks/#{id}", options end
Get an org hook Requires client authenticated as admin for the org. @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 @example @client.org_hook('octokit', 123)
org_hook
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/hooks.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/hooks.rb
Apache-2.0
def create_org_hook(org, config, options = {}) options = { name: 'web', config: config }.merge(options) post "#{Organization.path org}/hooks", options end
Create an org hook Requires client authenticated as admin for the org. @param org [String, Integer] Organization GitHub login or id. @param config [Hash] A Hash containing key/value pairs to provide settings for this hook. @option options [Array<String>] :events ('["push"]') Determines what events the hook is triggered for. @option options [Boolean] :active Determines whether the hook is actually triggered on pushes. @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 @example @client.create_org_hook( 'octokit', { :url => 'http://something.com/webhook', :content_type => 'json' }, { :events => ['push', 'pull_request'], :active => true } )
create_org_hook
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/hooks.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/hooks.rb
Apache-2.0
def edit_org_hook(org, id, config, options = {}) options = { config: config }.merge(options) patch "#{Organization.path org}/hooks/#{id}", options end
Update an org hook Requires client authenticated as admin for the org. @param org [String, Integer] Organization GitHub login or id. @param id [Integer] Id of the hook to update. @param config [Hash] A Hash containing key/value pairs to provide settings for this hook. @option options [Array<String>] :events ('["push"]') Determines what events the hook is triggered for. @option options [Boolean] :active Determines whether the hook is actually triggered on pushes. @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 @example @client.edit_org_hook( 'octokit', 123, { :url => 'http://something.com/webhook', :content_type => 'json' }, { :events => ['push', 'pull_request'], :active => true } )
edit_org_hook
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/hooks.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/hooks.rb
Apache-2.0
def ping_org_hook(org, id, options = {}) boolean_from_response :post, "#{Organization.path org}/hooks/#{id}/pings", options end
Ping org hook Requires client authenticated as admin for the org. @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 @example @client.ping_org_hook('octokit', 1000000)
ping_org_hook
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/hooks.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/hooks.rb
Apache-2.0
def remove_org_hook(org, id, options = {}) boolean_from_response :delete, "#{Organization.path org}/hooks/#{id}", options end
Remove org hook Requires client authenticated as admin for the org. @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 @example @client.remove_org_hook('octokit', 1000000)
remove_org_hook
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/hooks.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/hooks.rb
Apache-2.0
def parse_payload(payload_string) payload_hash = agent.class.decode payload_string Sawyer::Resource.new agent, payload_hash 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/
parse_payload
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/hooks.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/hooks.rb
Apache-2.0
def list_issues(repository = nil, options = {}) path = repository ? "#{Repository.new(repository).path}/issues" : 'issues' paginate path, options end
List issues for the authenticated user or repository @param repository [Integer, String, Repository, Hash] A GitHub repository. @param options [Sawyer::Resource] A customizable set of options. @option options [Integer] :milestone Milestone number. @option options [String] :state (open) State: <tt>open</tt>, <tt>closed</tt>, or <tt>all</tt>. @option options [String] :assignee User login. @option options [String] :creator User login. @option options [String] :mentioned User login. @option options [String] :labels List of comma separated Label names. Example: <tt>bug,ui,@high</tt>. @option options [String] :sort (created) Sort: <tt>created</tt>, <tt>updated</tt>, or <tt>comments</tt>. @option options [String] :direction (desc) Direction: <tt>asc</tt> or <tt>desc</tt>. @option options [Integer] :page (1) Page number. @return [Array<Sawyer::Resource>] 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 @example List issues for a repository Octokit.list_issues("sferik/rails_admin") @example List issues for the authenticated user across repositories @client = Octokit::Client.new(:login => 'foo', :password => 'bar') @client.list_issues
list_issues
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/issues.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/issues.rb
Apache-2.0
def user_issues(options = {}) paginate 'user/issues', options end
List all issues across owned and member repositories for the authenticated user @param options [Sawyer::Resource] A customizable set of options. @option options [String] :filter (assigned) State: <tt>assigned</tt>, <tt>created</tt>, <tt>mentioned</tt>, <tt>subscribed</tt> or <tt>closed</tt>. @option options [String] :state (open) State: <tt>open</tt>, <tt>closed</tt>, or <tt>all</tt>. @option options [Array<String>] :labels List of Label names. Example: <tt>['bug', 'ui', '@high']</tt>. @option options [String] :sort (created) Sort: <tt>created</tt>, <tt>updated</tt>, or <tt>comments</tt>. @option options [String] :direction (desc) Direction: <tt>asc</tt> or <tt>desc</tt>. @option options [Integer] :page (1) Page number. @option options [String] :since Timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ @return [Array<Sawyer::Resource>] A list of issues for a repository. @see https://developer.github.com/v3/issues/#list-issues @example List issues for the authenticated user across owned and member repositories @client = Octokit::Client.new(:login => 'foo', :password => 'bar') @client.user_issues
user_issues
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/issues.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/issues.rb
Apache-2.0
def org_issues(org, options = {}) paginate "#{Organization.path org}/issues", options end
List all issues for a given organization for the authenticated user @param org [String, Integer] Organization GitHub login or id. @param options [Sawyer::Resource] A customizable set of options. @option options [String] :filter (assigned) State: <tt>assigned</tt>, <tt>created</tt>, <tt>mentioned</tt>, <tt>subscribed</tt> or <tt>closed</tt>. @option options [String] :state (open) State: <tt>open</tt>, <tt>closed</tt>, or <tt>all</tt>. @option options [Array<String>] :labels List of Label names. Example: <tt>['bug', 'ui', '@high']</tt>. @option options [String] :sort (created) Sort: <tt>created</tt>, <tt>updated</tt>, or <tt>comments</tt>. @option options [String] :direction (desc) Direction: <tt>asc</tt> or <tt>desc</tt>. @option options [Integer] :page (1) Page number. @option options [String] :since Timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ @return [Array<Sawyer::Resource>] A list of issues. @see https://developer.github.com/v3/issues/#list-issues @example List all issues for a given organization for the authenticated user @client = Octokit::Client.new(:login => 'foo', :password => 'bar') @client.org_issues("octokit")
org_issues
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/issues.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/issues.rb
Apache-2.0
def create_issue(repo, title, body = nil, options = {}) options[:labels] = case options[:labels] when String options[:labels].split(',').map(&:strip) when Array options[:labels] else [] end parameters = { title: title } parameters[:body] = body unless body.nil? post "#{Repository.path repo}/issues", options.merge(parameters) end
Create an issue for a repository @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. @option options [String] :assignee User login. @option options [Array<String>] :assignees User login. @option options [Integer] :milestone Milestone number. @option options [String] :labels List of comma separated Label names. Example: <tt>bug,ui,@high</tt>. @return [Sawyer::Resource] Your newly created issue @see https://developer.github.com/v3/issues/#create-an-issue @example Create a new Issues for a repository Octokit.create_issue("sferik/rails_admin", 'Updated Docs', 'Added some extra links')
create_issue
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/issues.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/issues.rb
Apache-2.0
def issue(repo, number, options = {}) get "#{Repository.path repo}/issues/#{number}", options end
Get a single issue from a repository @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 @example Get issue #25 from octokit/octokit.rb Octokit.issue("octokit/octokit.rb", "25")
issue
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/issues.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/issues.rb
Apache-2.0
def close_issue(repo, number, options = {}) patch "#{Repository.path repo}/issues/#{number}", options.merge({ state: 'closed' }) end
Close an issue @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. @option options [String] :assignee User login. @option options [Array<String>] :assignees User login. @option options [Integer] :milestone Milestone number. @option options [Array<String>] :labels List of Label names. Example: <tt>['bug', 'ui', '@high']</tt>. @return [Sawyer::Resource] The updated Issue @see https://developer.github.com/v3/issues/#edit-an-issue @example Close Issue #25 from octokit/octokit.rb Octokit.close_issue("octokit/octokit.rb", "25")
close_issue
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/issues.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/issues.rb
Apache-2.0
def reopen_issue(repo, number, options = {}) patch "#{Repository.path repo}/issues/#{number}", options.merge({ state: 'open' }) end
Reopen an issue @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. @option options [String] :assignee User login. @option options [Array<String>] :assignees User login. @option options [Integer] :milestone Milestone number. @option options [Array<String>] :labels List of Label names. Example: <tt>['bug', 'ui', '@high']</tt>. @return [Sawyer::Resource] The updated Issue @see https://developer.github.com/v3/issues/#edit-an-issue @example Reopen Issue #25 from octokit/octokit.rb Octokit.reopen_issue("octokit/octokit.rb", "25")
reopen_issue
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/issues.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/issues.rb
Apache-2.0
def unlock_issue(repo, number, options = {}) boolean_from_response :delete, "#{Repository.path repo}/issues/#{number}/lock", options end
Unlock an issue's conversation, opening it to all viewers @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 @example Unlock Issue #25 from octokit/octokit.rb Octokit.close_issue("octokit/octokit.rb", "25")
unlock_issue
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/issues.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/issues.rb
Apache-2.0
def update_issue(repo, number, *args) arguments = Arguments.new(args) opts = arguments.options unless arguments.empty? opts[:title] = arguments.shift opts[:body] = arguments.shift end patch "#{Repository.path repo}/issues/#{number}", opts end
Update an issue @overload update_issue(repo, number, title, body, options) @param repo [Integer, String, Repository, Hash] A GitHub repository @param number [Integer] Number ID of the issue @param title [String] Updated title for the issue @param body [String] Updated body of the issue @param options [Hash] A customizable set of options. @option options [String] :assignee User login. @option options [Array<String>] :assignees User login. @option options [Integer] :milestone Milestone number. @option options [String] :labels List of comma separated Label names. Example: <tt>bug,ui,@high</tt>. @option options [String] :state State of the issue. <tt>open</tt> or <tt>closed</tt> @overload update_issue(repo, number, 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. @option options [String] :title Updated title for the issue @option options [String] :body Updated body of the issue @option options [String] :assignee User login. @option options [Array<String>] :assignees User login. @option options [Integer] :milestone Milestone number. @option options [Array<String>] :labels List of Label names. Example: <tt>['bug', 'ui', '@high']</tt>. @option options [String] :state State of the issue. <tt>open</tt> or <tt>closed</tt> @return [Sawyer::Resource] The updated Issue @see https://developer.github.com/v3/issues/#edit-an-issue @example Change the title of Issue #25 Octokit.update_issue("octokit/octokit.rb", "25", "A new title", "the same body") @example Change only the assignee of Issue #25 Octokit.update_issue("octokit/octokit.rb", "25", :assignee => "pengwynn")
update_issue
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/issues.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/issues.rb
Apache-2.0
def issues_comments(repo, options = {}) paginate "#{Repository.path repo}/issues/comments", options end
Get all comments attached to issues for the repository By default, Issue Comments are ordered by ascending ID. @param repo [Integer, String, Repository, Hash] A GitHub repository @param options [Hash] Optional parameters @option options [String] :sort created or updated @option options [String] :direction asc or desc. Ignored without sort parameter. @option options [String] :since Timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ @return [Array<Sawyer::Resource>] List of issues comments. @see https://developer.github.com/v3/issues/comments/#list-comments-in-a-repository @example Get the comments for issues in the octokit repository @client.issues_comments("octokit/octokit.rb") @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' })
issues_comments
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/issues.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/issues.rb
Apache-2.0
def issue_comments(repo, number, options = {}) paginate "#{Repository.path repo}/issues/#{number}/comments", options end
Get all comments attached to an issue @param repo [Integer, String, Repository, Hash] A GitHub repository @param number [Integer] Number ID of the issue @return [Array<Sawyer::Resource>] Array of comments that belong to an issue @see https://developer.github.com/v3/issues/comments/#list-comments-on-an-issue @example Get comments for issue #25 from octokit/octokit.rb Octokit.issue_comments("octokit/octokit.rb", "25")
issue_comments
ruby
collabnix/kubelabs
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/issues.rb
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/issues.rb
Apache-2.0