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 issue_comment(repo, number, options = {})
paginate "#{Repository.path repo}/issues/comments/#{number}", options
end
|
Get a single comment attached to an issue
@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
@example Get comment #1194549 from an issue on octokit/octokit.rb
Octokit.issue_comment("octokit/octokit.rb", 1194549)
|
issue_comment
|
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 add_comment(repo, number, comment, options = {})
post "#{Repository.path repo}/issues/#{number}/comments", options.merge({ body: comment })
end
|
Add a comment to an issue
@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
@example Add the comment "Almost to v1" to Issue #23 on octokit/octokit.rb
Octokit.add_comment("octokit/octokit.rb", 23, "Almost to v1")
|
add_comment
|
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_comment(repo, number, comment, options = {})
patch "#{Repository.path repo}/issues/comments/#{number}", options.merge({ body: comment })
end
|
Update a single comment on an issue
@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
@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")
|
update_comment
|
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 delete_comment(repo, number, options = {})
boolean_from_response :delete, "#{Repository.path repo}/issues/comments/#{number}", options
end
|
Delete a single comment
@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
@example Delete the comment #1194549 on an issue on octokit/octokit.rb
Octokit.delete_comment("octokit/octokit.rb", 1194549)
|
delete_comment
|
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_timeline(repo, number, options = {})
options = ensure_api_media_type(:issue_timelines, options)
paginate "#{Repository.path repo}/issues/#{number}/timeline", options
end
|
Get the timeline for an issue
@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/
@example Get timeline for issue #1435 on octokit/octokit.rb
Octokit.issue_timeline("octokit/octokit.rb", 1435)
|
issue_timeline
|
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 list_assignees(repo, options = {})
paginate "#{Repository.path repo}/assignees", options
end
|
Lists the available assignees for issues in a repository.
@param repo [Integer, String, Repository, Hash] A GitHub repository
@return [Array<Sawyer::Resource>] List of GitHub users.
@see https://developer.github.com/v3/issues/assignees/#list-assignees
@example Get available assignees on repository octokit/octokit.rb
Octokit.list_assignees("octokit/octokit.rb")
|
list_assignees
|
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 add_assignees(repo, number, assignees, options = {})
post "#{Repository.path repo}/issues/#{number}/assignees", options.merge({ assignees: assignees })
end
|
Add assignees to an issue
@param repo [Integer, String, Repository, Hash] A GitHub repository
@param number [Integer] Issue number
@param assignees [Array<String>] Assignees to be added
@return [Sawyer::Resource] Issue
@see https://developer.github.com/v3/issues/assignees/#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"])
|
add_assignees
|
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 remove_assignees(repo, number, assignees, options = {})
delete "#{Repository.path repo}/issues/#{number}/assignees", options.merge({ assignees: assignees })
end
|
Remove assignees from an issue
@param repo [Integer, String, Repository, Hash] A GitHub repository
@param number [Integer] Issue number
@param assignees [Array<String>] Assignees to be removed
@param options [Hash] Header params for request
@return [Sawyer::Resource] Issue
@see https://developer.github.com/v3/issues/assignees/#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")
|
remove_assignees
|
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 labels(repo, options = {})
paginate "#{Repository.path repo}/labels", options
end
|
List available labels for a repository
@param repo [Integer, String, Repository, Hash] A GitHub repository
@return [Array<Sawyer::Resource>] A list of the labels across the repository
@see https://developer.github.com/v3/issues/labels/#list-all-labels-for-this-repository
@example List labels for octokit/octokit.rb
Octokit.labels("octokit/octokit.rb")
|
labels
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/labels.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/labels.rb
|
Apache-2.0
|
def label(repo, name, options = {})
get "#{Repository.path repo}/labels/#{ERB::Util.url_encode(name)}", options
end
|
Get single label for a repository
@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
@example Get the "V3 Addition" label from octokit/octokit.rb
Octokit.label("octokit/octokit.rb", "V3 Addition")
|
label
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/labels.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/labels.rb
|
Apache-2.0
|
def add_label(repo, label, color = 'ffffff', options = {})
post "#{Repository.path repo}/labels", options.merge({ name: label, color: color })
end
|
Add a label to a repository
@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
@example Add a new label "Version 1.0" with color "#cccccc"
Octokit.add_label("octokit/octokit.rb", "Version 1.0", "cccccc")
|
add_label
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/labels.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/labels.rb
|
Apache-2.0
|
def update_label(repo, label, options = {})
patch "#{Repository.path repo}/labels/#{ERB::Util.url_encode(label)}", options
end
|
Update a label
@param repo [Integer, String, Repository, Hash] A GitHub repository
@param label [String] The name of the label which will be updated
@param options [Hash] A customizable set of options.
@option options [String] :name An updated label name
@option options [String] :color An updated color value, in hex, without leading #
@return [Sawyer::Resource] The updated label
@see https://developer.github.com/v3/issues/labels/#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"})
|
update_label
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/labels.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/labels.rb
|
Apache-2.0
|
def delete_label!(repo, label, options = {})
boolean_from_response :delete, "#{Repository.path repo}/labels/#{ERB::Util.url_encode(label)}", options
end
|
Delete a label from a repository.
This deletes the label from the repository, and removes it from all issues.
@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
@example Delete the label "Version 1.0" from the repository.
Octokit.delete_label!("octokit/octokit.rb", "Version 1.0")
|
delete_label!
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/labels.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/labels.rb
|
Apache-2.0
|
def remove_label(repo, number, label, options = {})
delete "#{Repository.path repo}/issues/#{number}/labels/#{ERB::Util.url_encode(label)}", options
end
|
Remove a label from an Issue
This removes the label from the Issue
@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<Sawyer::Resource>] A list of the labels currently on the issue
@see https://developer.github.com/v3/issues/labels/#remove-a-label-from-an-issue
@example Remove the label "Version 1.0" from the repository.
Octokit.remove_label("octokit/octokit.rb", 23, "Version 1.0")
|
remove_label
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/labels.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/labels.rb
|
Apache-2.0
|
def remove_all_labels(repo, number, options = {})
boolean_from_response :delete, "#{Repository.path repo}/issues/#{number}/labels", options
end
|
Remove all label from an Issue
This removes the label from the Issue
@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
@example Remove all labels from Issue #23
Octokit.remove_all_labels("octokit/octokit.rb", 23)
|
remove_all_labels
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/labels.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/labels.rb
|
Apache-2.0
|
def labels_for_issue(repo, number, options = {})
paginate "#{Repository.path repo}/issues/#{number}/labels", options
end
|
List labels for a given issue
@param repo [Integer, String, Repository, Hash] A GitHub repository
@param number [Integer] Number ID of the issue
@return [Array<Sawyer::Resource>] A list of the labels currently on the issue
@see https://developer.github.com/v3/issues/labels/#list-labels-on-an-issue
@example List labels for octokit/octokit.rb, issue # 1
Octokit.labels_for_issue("octokit/octokit.rb", 1)
|
labels_for_issue
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/labels.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/labels.rb
|
Apache-2.0
|
def add_labels_to_an_issue(repo, number, labels)
post "#{Repository.path repo}/issues/#{number}/labels", labels
end
|
Add label(s) to an Issue
@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<Sawyer::Resource>] A list of the labels currently on the issue
@see https://developer.github.com/v3/issues/labels/#add-labels-to-an-issue
@example Add two labels for octokit/octokit.rb
Octokit.add_labels_to_an_issue("octokit/octokit.rb", 10, ['V3 Transition', 'Improvement'])
|
add_labels_to_an_issue
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/labels.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/labels.rb
|
Apache-2.0
|
def replace_all_labels(repo, number, labels, _options = {})
put "#{Repository.path repo}/issues/#{number}/labels", labels
end
|
Replace all labels on an Issue
@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<Sawyer::Resource>] A list of the labels currently on the issue
@see https://developer.github.com/v3/issues/labels/#replace-all-labels-for-an-issue
@example Replace labels for octokit/octokit.rb Issue #10
Octokit.replace_all_labels("octokit/octokit.rb", 10, ['V3 Transition', 'Improvement'])
|
replace_all_labels
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/labels.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/labels.rb
|
Apache-2.0
|
def labels_for_milestone(repo, number, options = {})
paginate "#{Repository.path repo}/milestones/#{number}/labels", options
end
|
Get labels for every issue in a milestone
@param repo [Integer, String, Repository, Hash] A GitHub repository
@param number [Integer] Number ID of the milestone
@return [Array<Sawyer::Resource>] A list of the labels across the milestone
@see http://developer.github.com/v3/issues/labels/#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)
|
labels_for_milestone
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/labels.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/labels.rb
|
Apache-2.0
|
def legacy_search_repositories(q, options = {})
get("legacy/repos/search/#{q}", options)['repositories']
end
|
Legacy repository search
@see https://developer.github.com/v3/search/#search-repositories
@param q [String] Search keyword
@return [Array<Sawyer::Resource>] List of repositories found
|
legacy_search_repositories
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/legacy_search.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/legacy_search.rb
|
Apache-2.0
|
def legacy_search_issues(repo, search_term, state = 'open', options = {})
get("legacy/issues/search/#{Repository.new(repo)}/#{state}/#{search_term}", options)['issues']
end
|
Legacy search issues within a repository
@param repo [String, Repository, Hash] A GitHub repository
@param search_term [String] The term to search for
@param state [String] :state (open) <tt>open</tt> or <tt>closed</tt>.
@return [Array<Sawyer::Resource>] A list of issues matching the search term and state
@example Search for 'test' in the open issues for sferik/rails_admin
Octokit.search_issues("sferik/rails_admin", 'test', 'open')
|
legacy_search_issues
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/legacy_search.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/legacy_search.rb
|
Apache-2.0
|
def legacy_search_users(search, options = {})
get("legacy/user/search/#{search}", options)['users']
end
|
Search for user.
@param search [String] User to search for.
@return [Array<Sawyer::Resource>] Array of hashes representing users.
@see https://developer.github.com/v3/search/#search-users
@example
Octokit.search_users('pengwynn')
|
legacy_search_users
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/legacy_search.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/legacy_search.rb
|
Apache-2.0
|
def markdown(text, options = {})
options[:text] = text
options[:repo] = Repository.new(options[:repo]) if options[:repo]
options[:accept] = 'application/vnd.github.raw'
post 'markdown', options
end
|
Render an arbitrary Markdown document
@param text [String] Markdown source
@option options [String] (optional) :mode (`markdown` or `gfm`)
@option options [String] (optional) :context Repo context
@return [String] HTML renderization
@see https://developer.github.com/v3/markdown/#render-an-arbitrary-markdown-document
@example Render some GFM
Octokit.markdown('Fixed in #111', :mode => "gfm", :context => "octokit/octokit.rb")
|
markdown
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/markdown.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/markdown.rb
|
Apache-2.0
|
def list_plans(options = {})
paginate '/marketplace_listing/plans', options
end
|
List all plans for an app's marketplace listing
@param options [Hash] A customizable set of options
@see https://developer.github.com/v3/apps/marketplace/#list-all-plans-for-your-marketplace-listing
@return [Array<Sawyer::Resource>] A list of plans
|
list_plans
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/marketplace.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/marketplace.rb
|
Apache-2.0
|
def list_accounts_for_plan(plan_id, options = {})
paginate "/marketplace_listing/plans/#{plan_id}/accounts", options
end
|
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
@see https://developer.github.com/v3/apps/marketplace/#list-all-github-accounts-user-or-organization-on-a-specific-plan
@return [Array<Sawyer::Resource>] A list of accounts
|
list_accounts_for_plan
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/marketplace.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/marketplace.rb
|
Apache-2.0
|
def plan_for_account(account_id, options = {})
get "/marketplace_listing/accounts/#{account_id}", options
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
@see https://developer.github.com/v3/apps/marketplace/#check-if-a-github-account-is-associated-with-any-marketplace-listing
@return <Sawyer::Resource> Account with plan details, or nil
|
plan_for_account
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/marketplace.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/marketplace.rb
|
Apache-2.0
|
def marketplace_purchases(options = {})
get '/user/marketplace_purchases', options
end
|
Get user's Marketplace purchases
@param options [Hash] A customizable set of options
@see https://developer.github.com/v3/apps/marketplace/#get-a-users-marketplace-purchases
@return [Array<Sawyer::Resource>] A list of Marketplace purchases
|
marketplace_purchases
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/marketplace.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/marketplace.rb
|
Apache-2.0
|
def meta(options = {})
get 'meta', options
end
|
Get meta information about GitHub.com, the service.
@see https://developer.github.com/v3/meta/#meta
@return [Sawyer::Resource] Hash with meta information.
@example Get GitHub meta information
@client.github_meta
|
meta
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/meta.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/meta.rb
|
Apache-2.0
|
def list_milestones(repository, options = {})
paginate "#{Repository.path repository}/milestones", options
end
|
List milestones for a repository
@param repository [Integer, String, Repository, Hash] A GitHub repository
@param options [Hash] 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] :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>.
@return [Array<Sawyer::Resource>] A list of milestones for a repository.
@see https://developer.github.com/v3/issues/milestones/#list-milestones-for-a-repository
@example List milestones for a repository
Octokit.list_milestones("octokit/octokit.rb")
|
list_milestones
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/milestones.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/milestones.rb
|
Apache-2.0
|
def milestone(repository, number, options = {})
get "#{Repository.path repository}/milestones/#{number}", options
end
|
Get a single milestone for a repository
@param repository [Integer, String, Repository, Hash] A GitHub repository
@param options [Hash] A customizable set of options.
@option options [Integer] :milestone Milestone number.
@return [Sawyer::Resource] A single milestone from a repository.
@see https://developer.github.com/v3/issues/milestones/#get-a-single-milestone
@example Get a single milestone for a repository
Octokit.milestone("octokit/octokit.rb", 1)
|
milestone
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/milestones.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/milestones.rb
|
Apache-2.0
|
def create_milestone(repository, title, options = {})
post "#{Repository.path repository}/milestones", options.merge({ title: title })
end
|
Create a milestone for a repository
@param repository [Integer, String, Repository, Hash] A GitHub repository
@param title [String] A unique title.
@param options [Hash] A customizable set of options.
@option options [String] :state (open) State: <tt>open</tt> or <tt>closed</tt>.
@option options [String] :description A meaningful description
@option options [Time] :due_on Set if the milestone has a due date
@return [Sawyer::Resource] A single milestone object
@see https://developer.github.com/v3/issues/milestones/#create-a-milestone
@example Create a milestone for a repository
Octokit.create_milestone("octokit/octokit.rb", "0.7.0", {:description => 'Add support for v3 of Github API'})
|
create_milestone
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/milestones.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/milestones.rb
|
Apache-2.0
|
def update_milestone(repository, number, options = {})
patch "#{Repository.path repository}/milestones/#{number}", options
end
|
Update a milestone for a repository
@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.
@option options [String] :title A unique title.
@option options [String] :state (open) State: <tt>open</tt> or <tt>closed</tt>.
@option options [String] :description A meaningful description
@option options [Time] :due_on Set if the milestone has a due date
@return [Sawyer::Resource] A single milestone object
@see https://developer.github.com/v3/issues/milestones/#update-a-milestone
@example Update a milestone for a repository
Octokit.update_milestone("octokit/octokit.rb", 1, {:description => 'Add support for v3 of Github API'})
|
update_milestone
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/milestones.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/milestones.rb
|
Apache-2.0
|
def delete_milestone(repository, number, options = {})
boolean_from_response :delete, "#{Repository.path repository}/milestones/#{number}", options
end
|
Delete a single milestone for a repository
@param repository [Integer, String, Repository, Hash] A GitHub repository
@param options [Hash] A customizable set of options.
@option options [Integer] :milestone Milestone number.
@return [Boolean] Success
@see https://developer.github.com/v3/issues/milestones/#delete-a-milestone
@example Delete a single milestone from a repository
Octokit.delete_milestone("octokit/octokit.rb", 1)
|
delete_milestone
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/milestones.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/milestones.rb
|
Apache-2.0
|
def notifications(options = {})
paginate 'notifications', options
end
|
List your notifications
@param options [Hash] Optional parameters
@option options [Boolean] :all 'true' to show notifications marked as
read.
@option options [Boolean] :participating 'true' to show only
notifications in which the user is directly participating or
mentioned.
@option options [String] :since Time filters out any notifications
updated before the given time. The time should be passed in as UTC in
the ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ. Ex. '2012-10-09T23:39:01Z'
@return [Array<Sawyer::Resource>] Array of notifications.
@see https://developer.github.com/v3/activity/notifications/#list-your-notifications
@example Get users notifications
@client.notifications
@example Get all notifications since a certain time.
@client.notifications({all: true, since: '2012-10-09T23:39:01Z'})
|
notifications
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/notifications.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/notifications.rb
|
Apache-2.0
|
def repository_notifications(repo, options = {})
paginate "#{Repository.path repo}/notifications", options
end
|
List your notifications in a repository
@param repo [Integer, String, Hash, Repository] A GitHub repository
@param options [Hash] Optional parameters
@option options [Boolean] :all 'true' to show notifications marked as
read.
@option options [Boolean] :participating 'true' to show only
notifications in which the user is directly participating or
mentioned.
@option options [String] :since Time filters out any notifications
updated before the given time. The time should be passed in as UTC in
the ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ. Ex. '2012-10-09T23:39:01Z'
@return [Array<Sawyer::Resource>] Array of notifications.
@see https://developer.github.com/v3/activity/notifications/#list-your-notifications-in-a-repository
@example Get your notifications for octokit/octokit.rb
@client.repository_notifications('octokit/octokit.rb')
@example Get your notifications for octokit/octokit.rb since a time.
@client.repository_notifications({since: '2012-10-09T23:39:01Z'})
|
repository_notifications
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/notifications.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/notifications.rb
|
Apache-2.0
|
def mark_notifications_as_read(options = {})
request :put, 'notifications', options
last_response.status == 205
end
|
Mark notifications as read
@param options [Hash] Optional parameters
@option options [Boolean] :unread Changes the unread status of the
threads.
@option options [Boolean] :read Inverse of 'unread'.
@option options [String] :last_read_at ('Now') Describes the last point
that notifications were checked. Anything updated since this time
will not be updated. The time should be passed in as UTC in the
ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ. Ex. '2012-10-09T23:39:01Z'
@return [Boolean] True if marked as read, false otherwise
@see https://developer.github.com/v3/activity/notifications/#mark-as-read
@example
@client.mark_notifications_as_read
|
mark_notifications_as_read
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/notifications.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/notifications.rb
|
Apache-2.0
|
def mark_repository_notifications_as_read(repo, options = {})
request :put, "#{Repository.path repo}/notifications", options
last_response.status == 205
end
|
Mark notifications from a specific repository as read
@param repo [Integer, String, Hash, Repository] A GitHub repository
@param options [Hash] Optional parameters
@option options [Boolean] :unread Changes the unread status of the
threads.
@option options [Boolean] :read Inverse of 'unread'.
@option options [String] :last_read_at ('Now') Describes the last point
that notifications were checked. Anything updated since this time
will not be updated. The time should be passed in as UTC in the
ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ. Ex. '2012-10-09T23:39:01Z'
@return [Boolean] True if marked as read, false otherwise
@see https://developer.github.com/v3/activity/notifications/#mark-notifications-as-read-in-a-repository
@example
@client.mark_notifications_as_read("octokit/octokit.rb")
|
mark_repository_notifications_as_read
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/notifications.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/notifications.rb
|
Apache-2.0
|
def thread_notifications(thread_id, options = {})
get "notifications/threads/#{thread_id}", options
end
|
List notifications for a specific thread
@param thread_id [Integer] Id of the thread.
@return [Array<Sawyer::Resource>] Array of notifications.
@see https://developer.github.com/v3/activity/notifications/#view-a-single-thread
@example
@client.notification_thread(1000)
|
thread_notifications
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/notifications.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/notifications.rb
|
Apache-2.0
|
def mark_thread_as_read(thread_id, options = {})
request :patch, "notifications/threads/#{thread_id}", options
last_response.status == 205
end
|
Mark thread as read
@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
@example
@client.mark_thread_as_read(1, :read => false)
|
mark_thread_as_read
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/notifications.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/notifications.rb
|
Apache-2.0
|
def thread_subscription(thread_id, options = {})
get "notifications/threads/#{thread_id}/subscription", options
end
|
Get thread subscription
@param thread_id [Integer] Id of the thread.
@return [Sawyer::Resource] Subscription.
@see https://developer.github.com/v3/activity/notifications/#get-a-thread-subscription
@example
@client.thread_subscription(1)
|
thread_subscription
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/notifications.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/notifications.rb
|
Apache-2.0
|
def update_thread_subscription(thread_id, options = {})
put "notifications/threads/#{thread_id}/subscription", options
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).
@param thread_id [Integer] Id of the thread.
@param options
@option options [Boolean] :subscribed Determines if notifications
should be received from this repository.
@option options [Boolean] :ignored Deterimines if all notifications
should be blocked from this repository.
@return [Sawyer::Resource] Updated subscription.
@see https://developer.github.com/v3/activity/notifications/#set-a-thread-subscription
@example Subscribe to notifications
@client.update_thread_subscription(1, :subscribed => true)
@example Ignore notifications from a repo
@client.update_thread_subscription(1, :ignored => true)
|
update_thread_subscription
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/notifications.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/notifications.rb
|
Apache-2.0
|
def delete_thread_subscription(thread_id, options = {})
boolean_from_response :delete, "notifications/threads/#{thread_id}/subscription", options
end
|
Delete a thread subscription
@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
@example
@client.delete_thread_subscription(1)
|
delete_thread_subscription
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/notifications.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/notifications.rb
|
Apache-2.0
|
def reset_token(access_token, options = {})
options = ensure_api_media_type(:applications_api, options.dup)
options[:access_token] = access_token
key = options.delete(:client_id) || client_id
secret = options.delete(:client_secret) || client_secret
as_app(key, secret) do |app_client|
app_client.patch "applications/#{client_id}/token", options
end
end
|
Reset a token
Applications can reset a token without requiring a user to re-authorize.
@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
@example
client = Octokit::Client.new(:client_id => 'abcdefg12345', :client_secret => 'secret')
client.reset_token('deadbeef1234567890deadbeef987654321')
|
reset_token
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/oauth_applications.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/oauth_applications.rb
|
Apache-2.0
|
def delete_app_token(access_token, options = {})
options = ensure_api_media_type(:applications_api, options.dup)
options[:access_token] = access_token
key = options.delete(:client_id) || client_id
secret = options.delete(:client_secret) || client_secret
begin
as_app(key, secret) do |app_client|
app_client.delete "applications/#{client_id}/token", options
app_client.last_response.status == 204
end
rescue Octokit::NotFound
false
end
end
|
Delete an app token
Applications can revoke (delete) a token
@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
@example
client = Octokit::Client.new(:client_id => 'abcdefg12345', :client_secret => 'secret')
client.delete_token('deadbeef1234567890deadbeef987654321')
|
delete_app_token
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/oauth_applications.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/oauth_applications.rb
|
Apache-2.0
|
def delete_app_authorization(access_token, options = {})
options = ensure_api_media_type(:applications_api, options.dup)
options[:access_token] = access_token
key = options.delete(:client_id) || client_id
secret = options.delete(:client_secret) || client_secret
begin
as_app(key, secret) do |app_client|
app_client.delete "applications/#{client_id}/grant", options
app_client.last_response.status == 204
end
rescue Octokit::NotFound
false
end
end
|
Delete an app authorization
OAuth application owners can revoke a grant for their OAuth application and a specific user.
@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
@example
client = Octokit::Client.new(:client_id => 'abcdefg12345', :client_secret => 'secret')
client.delete_app_authorization('deadbeef1234567890deadbeef987654321')
|
delete_app_authorization
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/oauth_applications.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/oauth_applications.rb
|
Apache-2.0
|
def tree(repo, tree_sha, options = {})
get "#{Repository.path repo}/git/trees/#{tree_sha}", options
end
|
Get a single tree, fetching information about its root-level objects
Pass <tt>:recursive => true</tt> in <tt>options</tt> to fetch information about all of the tree's objects, including those in subdirectories.
@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
@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"
|
tree
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/objects.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/objects.rb
|
Apache-2.0
|
def create_tree(repo, tree, options = {})
parameters = { tree: tree }
post "#{Repository.path repo}/git/trees", options.merge(parameters)
end
|
Create a tree
Pass <tt>:base_tree => "827efc6..."</tt> in <tt>options</tt> to update an existing tree with new data.
@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
@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"
|
create_tree
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/objects.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/objects.rb
|
Apache-2.0
|
def blob(repo, blob_sha, options = {})
get "#{Repository.path repo}/git/blobs/#{blob_sha}", options
end
|
Get a single blob, fetching its content and encoding
@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
@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"
|
blob
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/objects.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/objects.rb
|
Apache-2.0
|
def create_blob(repo, content, encoding = 'utf-8', options = {})
parameters = {
content: content,
encoding: encoding
}
blob = post "#{Repository.path repo}/git/blobs", options.merge(parameters)
blob.sha
end
|
Create a blob
@param repo [Integer, String, Hash, Repository] A GitHub repository
@param content [String] Content of the blob
@param encoding [String] The content's encoding. <tt>utf-8</tt> and <tt>base64</tt> 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. <tt>827efc6d56897b048c772eb4087f854f46256132</tt>
@see https://developer.github.com/v3/git/blobs/#create-a-blob
@example Create a blob containing <tt>foo bar baz</tt>
Octokit.create_blob("octocat/Hello-World", "foo bar baz")
@example Create a blob containing <tt>foo bar baz</tt>, encoded using base64
require "base64"
Octokit.create_blob("octocat/Hello-World", Base64.encode64("foo bar baz"), "base64")
|
create_blob
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/objects.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/objects.rb
|
Apache-2.0
|
def tag(repo, tag_sha, options = {})
get "#{Repository.path repo}/git/tags/#{tag_sha}", options
end
|
Get a tag
@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
@example Fetch a tag
Octokit.tag('octokit/octokit.rb', '23aad20633f4d2981b1c7209a800db3014774e96')
|
tag
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/objects.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/objects.rb
|
Apache-2.0
|
def organization(org, options = {})
get Organization.path(org), options
end
|
Get an organization
@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
@example
Octokit.organization('github')
@example
Octokit.org('github')
|
organization
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/organizations.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/organizations.rb
|
Apache-2.0
|
def update_organization(org, values, options = {})
patch Organization.path(org), options.merge(values)
end
|
Update an organization.
Requires authenticated client with proper organization permissions.
@param org [String, Integer] Organization GitHub login or id.
@param values [Hash] The updated organization attributes.
@option values [String] :billing_email Billing email address. This address is not publicized.
@option values [String] :company Company name.
@option values [String] :email Publicly visible email address.
@option values [String] :location Location of organization.
@option values [String] :name GitHub username for organization.
@option values [String] :default_repository_permission The default permission members have on organization repositories.
@option values [Boolean] :members_can_create_repositories Set true to allow members to create repositories on the organization.
@return [Sawyer::Resource] Hash representing GitHub organization.
@see https://developer.github.com/v3/orgs/#edit-an-organization
@example
@client.update_organization('github', {
:billing_email => '[email protected]',
:company => 'GitHub',
:email => '[email protected]',
:location => 'San Francisco',
:name => 'github'
})
@example
@client.update_org('github', {:company => 'Unicorns, Inc.'})
|
update_organization
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/organizations.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/organizations.rb
|
Apache-2.0
|
def organizations(user = nil, options = {})
paginate "#{User.path user}/orgs", options
end
|
Get organizations for a user.
Nonauthenticated calls to this method will return organizations that
the user is a public member.
Use an authenicated 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.
@param user [Integer, String] GitHub user login or id of the user to get
list of organizations.
@return [Array<Sawyer::Resource>] 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
@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
|
organizations
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/organizations.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/organizations.rb
|
Apache-2.0
|
def pages(repo, options = {})
get "#{Repository.path repo}/pages", options
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
|
pages
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/pages.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/pages.rb
|
Apache-2.0
|
def pages_build(repo, id, options = {})
opts = ensure_api_media_type(:pages, options)
get "#{Repository.path repo}/pages/builds/#{id}", opts
end
|
Get a specific Pages build by ID
@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
@example
Octokit.pages_build("github/developer.github.com", 5472601)
|
pages_build
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/pages.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/pages.rb
|
Apache-2.0
|
def pages_builds(repo, options = {})
get "#{Repository.path repo}/pages/builds", options
end
|
List Pages builds for a repository
@param repo [Integer, String, Repository, Hash] A GitHub repository
@return [Array<Sawyer::Resource>] A list of build history for a repository.
@see https://developer.github.com/v3/repos/pages/#list-pages-builds
|
pages_builds
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/pages.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/pages.rb
|
Apache-2.0
|
def latest_pages_build(repo, options = {})
get "#{Repository.path repo}/pages/builds/latest", options
end
|
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
|
latest_pages_build
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/pages.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/pages.rb
|
Apache-2.0
|
def request_page_build(repo, options = {})
opts = ensure_api_media_type(:pages, options)
post "#{Repository.path repo}/pages/builds", opts
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
|
request_page_build
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/pages.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/pages.rb
|
Apache-2.0
|
def projects(repo, options = {})
opts = ensure_api_media_type(:projects, options)
paginate "#{Repository.path repo}/projects", opts
end
|
List projects for a repository
Requires authenticated client
@param repo [Integer, String, Repository, Hash] A GitHub repository
@return [Array<Sawyer::Resource>] Repository projects
@see https://developer.github.com/v3/projects/#list-repository-projects
@example
@client.projects('octokit/octokit.rb')
|
projects
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/projects.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/projects.rb
|
Apache-2.0
|
def create_project(repo, name, options = {})
opts = ensure_api_media_type(:projects, options)
opts[:name] = name
post "#{Repository.path repo}/projects", opts
end
|
Create a project
Requires authenticated client
@param repo [Integer, String, Repository, Hash] A GitHub repository
@param name [String] Project name
@option options [String] :body Body of the project
@return [Sawyer::Resource] Fresh new project
@see https://developer.github.com/v3/projects/#create-a-repository-project
@example Create project with only a name
@client.create_project('octokit/octokit.rb', 'implement new APIs')
@example Create project with name and body
@client.create_project('octokit/octokit.rb', 'bugs be gone', body: 'Fix all the bugs @joeyw creates')
|
create_project
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/projects.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/projects.rb
|
Apache-2.0
|
def org_projects(org, options = {})
opts = ensure_api_media_type(:projects, options)
paginate "orgs/#{org}/projects", opts
end
|
List organization projects
Requires authenticated client
@param org [String] A GitHub organization
@return [Array<Sawyer::Resource>] Organization projects
@see https://developer.github.com/v3/projects/#list-organization-projects
@example
@client.org_projects("octokit")
|
org_projects
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/projects.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/projects.rb
|
Apache-2.0
|
def create_org_project(org, name, options = {})
opts = ensure_api_media_type(:projects, options)
opts[:name] = name
post "orgs/#{org}/projects", opts
end
|
Create organization project
Requires authenticated client
@param org [String] A GitHub organization
@param name [String] Project name
@option options [String] :body Project body
@return [Sawyer::Resource] Organization project
@see https://developer.github.com/v3/projects/#create-an-organization-project
@example Create with only a name
@client.create_org_project("octocat", "make more octocats")
@example Create a project with name and body
@client.create_org_project("octokit", "octocan", body: 'Improve clients')
|
create_org_project
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/projects.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/projects.rb
|
Apache-2.0
|
def project(id, options = {})
opts = ensure_api_media_type(:projects, options)
get "projects/#{id}", opts
end
|
Get a project by id
@param id [Integer] Project id
@return [Sawyer::Resource] Project
@see https://developer.github.com/v3/projects/#get-a-project
@example
Octokit.project(123942)
|
project
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/projects.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/projects.rb
|
Apache-2.0
|
def update_project(id, options = {})
opts = ensure_api_media_type(:projects, options)
patch "projects/#{id}", opts
end
|
Update a project
Requires authenticated client
@param id [Integer] Project id
@option options [String] :name Project name
@option options [String] :body Project body
@return [Sawyer::Resource] Project
@see https://developer.github.com/v3/projects/#update-a-project
@example Update project name
@client.update_project(123942, name: 'New name')
|
update_project
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/projects.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/projects.rb
|
Apache-2.0
|
def delete_project(id, options = {})
opts = ensure_api_media_type(:projects, options)
boolean_from_response :delete, "projects/#{id}", opts
end
|
Delete a project
Requires authenticated client
@param id [Integer] Project id
@return [Boolean] Result of deletion
@see https://developer.github.com/v3/projects/#delete-a-project
@example
@client.delete_project(123942)
|
delete_project
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/projects.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/projects.rb
|
Apache-2.0
|
def project_columns(id, options = {})
opts = ensure_api_media_type(:projects, options)
paginate "projects/#{id}/columns", opts
end
|
List project columns
@param id [Integer] Project id
@return [Array<Sawyer::Resource>] List of project columns
@see https://developer.github.com/v3/projects/columns/#list-project-columns
@example
@client.project_columns(123942)
|
project_columns
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/projects.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/projects.rb
|
Apache-2.0
|
def create_project_column(id, name, options = {})
opts = ensure_api_media_type(:projects, options)
opts[:name] = name
post "projects/#{id}/columns", opts
end
|
Create a project column
Requires authenticated client
@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
@example
@client.create_project_column(123942, "To Dones")
|
create_project_column
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/projects.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/projects.rb
|
Apache-2.0
|
def project_column(id, options = {})
opts = ensure_api_media_type(:projects, options)
get "projects/columns/#{id}", opts
end
|
Get a project column by ID
@param id [Integer] Project column id
@return [Sawyer::Resource] Project column
@see https://developer.github.com/v3/projects/columns/#get-a-project-column
@example
Octokit.project_column(30294)
|
project_column
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/projects.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/projects.rb
|
Apache-2.0
|
def update_project_column(id, name, options = {})
opts = ensure_api_media_type(:projects, options)
opts[:name] = name
patch "projects/columns/#{id}", opts
end
|
Update a project column
Requires authenticated client
@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
@example
@client.update_project_column(30294, "new column name")
|
update_project_column
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/projects.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/projects.rb
|
Apache-2.0
|
def delete_project_column(id, options = {})
opts = ensure_api_media_type(:projects, options)
boolean_from_response :delete, "projects/columns/#{id}", opts
end
|
Delete a project column
Requires authenticated client
@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
@example
@client.delete_project_column(30294)
|
delete_project_column
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/projects.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/projects.rb
|
Apache-2.0
|
def move_project_column(id, position, options = {})
opts = ensure_api_media_type(:projects, options)
opts[:position] = position
post "projects/columns/#{id}/moves", opts
end
|
Move a project column
Requires authenticated client
@param id [Integer] Project column id
@param position [String] New position for the column. Can be one of
<tt>first</tt>, <tt>last</tt>, or <tt>after:<column-id></tt>, where
<tt><column-id></tt> 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
@example
@client.move_project_column(30294, "last")
|
move_project_column
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/projects.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/projects.rb
|
Apache-2.0
|
def column_cards(id, options = {})
opts = ensure_api_media_type(:projects, options)
paginate "projects/columns/#{id}/cards", opts
end
|
List columns cards
Requires authenticated client
@param id [Integer] Project column id
@return [Array<Sawyer::Resource>] Cards in the column
@see https://developer.github.com/v3/projects/cards/#list-project-cards
@example
@client.column_cards(30294)
|
column_cards
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/projects.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/projects.rb
|
Apache-2.0
|
def create_project_card(id, options = {})
opts = ensure_api_media_type(:projects, options)
post "projects/columns/#{id}/cards", opts
end
|
Create project card
Requires authenticated client
@param id [Integer] Project column id
@option options [String] :note Card contents for a note type
@option options [Integer] :content_id Issue ID for the card contents
@option options [String] :content_type Type of content to associate
with the card. <tt>Issue</tt> is presently the only avaiable value
@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.
@return [Sawyer::Resource] Newly created card
@see https://developer.github.com/v3/projects/cards/#create-a-project-card
@example Create a project card with a note
@client.create_project_card(123495, note: 'New note card')
@example Create a project card for an repository issue
@client.create_project_card(123495, content_id: 1, content_type: 'Issue')
|
create_project_card
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/projects.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/projects.rb
|
Apache-2.0
|
def project_card(id, options = {})
opts = ensure_api_media_type(:projects, options)
get "projects/columns/cards/#{id}", opts
end
|
Get a project card
Requires authenticated client
@param id [Integer] Project card id
@return [Sawyer::Resource] Project card
@see https://developer.github.com/v3/projects/cards/#get-a-project-card
@example
@client.project_card(123495)
|
project_card
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/projects.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/projects.rb
|
Apache-2.0
|
def update_project_card(id, options = {})
opts = ensure_api_media_type(:projects, options)
patch "projects/columns/cards/#{id}", opts
end
|
Update a project card
Requires authenticated client
@param id [Integer] Project card id
@option options [String] :note The card's note content. Only valid for
cards without another type of content, so this cannot be specified if
the card already has a content_id and content_type.
@return [Sawyer::Resource] Updated project card
@see https://developer.github.com/v3/projects/cards/#update-a-project-card
@example
@client.update_project_card(12345, note: 'new note')
|
update_project_card
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/projects.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/projects.rb
|
Apache-2.0
|
def move_project_card(id, position, options = {})
opts = ensure_api_media_type(:projects, options)
opts[:position] = position
post "projects/columns/cards/#{id}/moves", opts
end
|
Move a project card
Requires authenticated client
@param id [Integer] Project card id
@param position [String] Can be one of <tt>top</tt>, <tt>bottom</tt>,
or <tt>after:<card-id></tt>, where <card-id> is the id value of a
card in the same column, or in the new column specified by column_id.
@option options [Integer] :column_id The column id to move the card to,
must be column in same project
@return [Sawyer::Resource] Empty sawyer resource
@see https://developer.github.com/v3/projects/cards/#move-a-project-card
@example Move a card to the bottom of the same column
@client.move_project_card(123495, 'bottom')
@example Move a card to the top of another column
@client.move_project_card(123495, 'top', column_id: 59402)
|
move_project_card
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/projects.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/projects.rb
|
Apache-2.0
|
def delete_project_card(id, options = {})
opts = ensure_api_media_type(:projects, options)
boolean_from_response :delete, "projects/columns/cards/#{id}", opts
end
|
Delete a project card
Requires authenticated client
@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
@example
@client.delete_project_card(123495)
|
delete_project_card
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/projects.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/projects.rb
|
Apache-2.0
|
def subscribe(topic, callback, secret = nil)
options = {
"hub.callback": callback,
"hub.mode": 'subscribe',
"hub.topic": topic
}
options.merge!("hub.secret": secret) unless secret.nil?
response = pub_sub_hubbub_request(options)
response.status == 204
end
|
Subscribe to a pubsub topic
@param topic [String] A recoginized and supported pubsub topic
@param callback [String] A callback url to be posted to when the topic event is fired
@param secret [String] An optional shared secret used to generate a SHA1 HMAC of the outgoing body content
@return [Boolean] true if the subscribe was successful, otherwise an error is raised
@see https://developer.github.com/v3/repos/hooks/#subscribing
@example Subscribe to push events from one of your repositories, having an email sent when fired
client = Octokit::Client.new(:oauth_token = "token")
client.subscribe("https://github.com/joshk/devise_imapable/events/push", "github://[email protected]")
|
subscribe
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/pub_sub_hubbub.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/pub_sub_hubbub.rb
|
Apache-2.0
|
def unsubscribe(topic, callback)
options = {
"hub.callback": callback,
"hub.mode": 'unsubscribe',
"hub.topic": topic
}
response = pub_sub_hubbub_request(options)
response.status == 204
end
|
Unsubscribe from a pubsub topic
@param topic [String] A recoginized pubsub topic
@param callback [String] A callback url to be unsubscribed from
@return [Boolean] true if the unsubscribe was successful, otherwise an error is raised
@see https://developer.github.com/v3/repos/hooks/#subscribing
@example Unsubscribe to push events from one of your repositories, no longer having an email sent when fired
client = Octokit::Client.new(:oauth_token = "token")
client.unsubscribe("https://github.com/joshk/devise_imapable/events/push", "github://[email protected]")
|
unsubscribe
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/pub_sub_hubbub.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/pub_sub_hubbub.rb
|
Apache-2.0
|
def subscribe_service_hook(repo, service_name, service_arguments = {}, secret = nil)
topic = "#{Octokit.web_endpoint}#{Repository.new(repo)}/events/push"
callback = "github://#{service_name}?#{service_arguments.collect { |k, v| [k, v].map { |p| URI.encode_www_form_component(p) }.join('=') }.join('&')}"
subscribe(topic, callback, secret)
end
|
Subscribe to a repository through pubsub
@param repo [String, Repository, Hash] A GitHub repository
@param service_name [String] service name owner
@param service_arguments [Hash] params that will be passed by subscribed hook.
List of services is available @ https://github.com/github/github-services/tree/master/docs.
Please refer Data node for complete list of arguments.
@param secret [String] An optional shared secret used to generate a SHA1 HMAC of the outgoing body content
@return [Boolean] True if subscription successful, false otherwise
@see https://developer.github.com/v3/repos/hooks/#subscribing
@example Subscribe to push events to one of your repositories to Travis-CI
client = Octokit::Client.new(:oauth_token = "token")
client.subscribe_service_hook('joshk/device_imapable', 'Travis', { :token => "test", :domain => "domain", :user => "user" })
|
subscribe_service_hook
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/pub_sub_hubbub.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/pub_sub_hubbub.rb
|
Apache-2.0
|
def unsubscribe_service_hook(repo, service_name)
topic = "#{Octokit.web_endpoint}#{Repository.new(repo)}/events/push"
callback = "github://#{service_name}"
unsubscribe(topic, callback)
end
|
Unsubscribe repository through pubsub
@param repo [String, Repository, Hash] A GitHub repository
@param service_name [String] service name owner
List of services is available @ https://github.com/github/github-services/tree/master/docs.
@see https://developer.github.com/v3/repos/hooks/#subscribing
@example Subscribe to push events to one of your repositories to Travis-CI
client = Octokit::Client.new(:oauth_token = "token")
client.unsubscribe_service_hook('joshk/device_imapable', 'Travis')
|
unsubscribe_service_hook
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/pub_sub_hubbub.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/pub_sub_hubbub.rb
|
Apache-2.0
|
def pull_requests(repo, options = {})
paginate "#{Repository.path repo}/pulls", options
end
|
List pull requests for a repository
@overload pull_requests(repo, options)
@param repo [Integer, String, Hash, Repository] A GitHub repository
@param options [Hash] Method options
@option options [String] :state `open` or `closed` or `all`.
@return [Array<Sawyer::Resource>] Array of pulls
@see https://developer.github.com/v3/pulls/#list-pull-requests
@example
Octokit.pull_requests('rails/rails', :state => 'closed')
|
pull_requests
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/pull_requests.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/pull_requests.rb
|
Apache-2.0
|
def pull_request(repo, number, options = {})
get "#{Repository.path repo}/pulls/#{number}", options
end
|
Get a pull request
@see https://developer.github.com/v3/pulls/#get-a-single-pull-request
@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
@example
Octokit.pull_request('rails/rails', 42, :state => 'closed')
|
pull_request
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/pull_requests.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/pull_requests.rb
|
Apache-2.0
|
def update_pull_request(*args)
arguments = Octokit::Arguments.new(args)
repo = arguments.shift
number = arguments.shift
patch "#{Repository.path repo}/pulls/#{number}", arguments.options
end
|
Update a pull request
@overload update_pull_request(repo, number, title=nil, body=nil, state=nil, options = {})
@deprecated
@param repo [Integer, String, Hash, Repository] A GitHub repository.
@param number [Integer] Number of pull request to update.
@param title [String] Title for the pull request.
@param body [String] Body content for pull request. Supports GFM.
@param state [String] State of the pull request. `open` or `closed`.
@overload update_pull_request(repo, number, options = {})
@param repo [Integer, String, Hash, Repository] A GitHub repository.
@param number [Integer] Number of pull request to update.
@option options [String] :title Title for the pull request.
@option options [String] :body Body for the pull request.
@option options [String] :state State for the pull request.
@return [Sawyer::Resource] Hash representing updated pull request.
@see https://developer.github.com/v3/pulls/#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, '')
|
update_pull_request
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/pull_requests.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/pull_requests.rb
|
Apache-2.0
|
def close_pull_request(repo, number, options = {})
options.merge! state: 'closed'
update_pull_request(repo, number, options)
end
|
Close a pull request
@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
@example
@client.close_pull_request('octokit/octokit.rb', 67)
|
close_pull_request
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/pull_requests.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/pull_requests.rb
|
Apache-2.0
|
def pull_requests_comments(repo, options = {})
paginate("#{Repository.path repo}/pulls/comments", options)
end
|
List pull request comments for a repository
By default, Review 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] List of pull request review comments.
@see https://developer.github.com/v3/pulls/comments/#list-comments-in-a-repository
@example Get the pull request review comments in the octokit repository
@client.issues_comments("octokit/octokit.rb")
@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'
})
|
pull_requests_comments
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/pull_requests.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/pull_requests.rb
|
Apache-2.0
|
def pull_request_comments(repo, number, options = {})
# return the comments for a pull request
paginate("#{Repository.path repo}/pulls/#{number}/comments", options)
end
|
List comments on a pull request
@see https://developer.github.com/v3/pulls/comments/#list-comments-on-a-pull-request
@param repo [Integer, String, Hash, Repository] A GitHub repository
@param number [Integer] Number of pull request
@return [Array<Sawyer::Resource>] List of comments
|
pull_request_comments
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/pull_requests.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/pull_requests.rb
|
Apache-2.0
|
def pull_request_comment(repo, comment_id, options = {})
get "#{Repository.path repo}/pulls/comments/#{comment_id}", options
end
|
Get a pull request comment
@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
@example
@client.pull_request_comment("pengwynn/octkit", 1903950)
|
pull_request_comment
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/pull_requests.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/pull_requests.rb
|
Apache-2.0
|
def create_pull_request_comment_reply(repo, pull_id, body, comment_id, options = {})
options.merge!({
body: body,
in_reply_to: comment_id
})
post "#{Repository.path repo}/pulls/#{pull_id}/comments", options
end
|
Create reply to a pull request comment
@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
@example
@client.create_pull_request_comment_reply("octokit/octokit.rb", 163, "done.", 1903950)
|
create_pull_request_comment_reply
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/pull_requests.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/pull_requests.rb
|
Apache-2.0
|
def update_pull_request_comment(repo, comment_id, body, options = {})
options.merge! body: body
patch("#{Repository.path repo}/pulls/comments/#{comment_id}", options)
end
|
Update pull request comment
@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
@example
@client.update_pull_request_comment("octokit/octokit.rb", 1903950, ":shipit:")
|
update_pull_request_comment
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/pull_requests.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/pull_requests.rb
|
Apache-2.0
|
def delete_pull_request_comment(repo, comment_id, options = {})
boolean_from_response(:delete, "#{Repository.path repo}/pulls/comments/#{comment_id}", options)
end
|
Delete pull request comment
@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
@example
@client.delete_pull_request_comment("octokit/octokit.rb", 1902707)
|
delete_pull_request_comment
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/pull_requests.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/pull_requests.rb
|
Apache-2.0
|
def pull_request_files(repo, number, options = {})
paginate "#{Repository.path repo}/pulls/#{number}/files", options
end
|
List files on a pull request
@see https://developer.github.com/v3/pulls/#list-pull-requests-files
@param repo [Integer, String, Hash, Repository] A GitHub repository
@param number [Integer] Number of pull request
@return [Array<Sawyer::Resource>] List of files
|
pull_request_files
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/pull_requests.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/pull_requests.rb
|
Apache-2.0
|
def pull_merged?(repo, number, options = {})
boolean_from_response :get, "#{Repository.path repo}/pulls/#{number}/merge", options
end
|
Check pull request merge status
@see https://developer.github.com/v3/pulls/#get-if-a-pull-request-has-been-merged
@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
|
pull_merged?
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/pull_requests.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/pull_requests.rb
|
Apache-2.0
|
def issue_reactions(repo, number, options = {})
options = ensure_api_media_type(:reactions, options)
get "#{Repository.path repo}/issues/#{number}/reactions", options
end
|
List reactions for an issue
@param repo [Integer, String, Hash, Repository] A GitHub repository
@param number [Integer] The Issue number
@see https://developer.github.com/v3/reactions/#list-reactions-for-an-issue
@example
@client.issue_reactions("octokit/octokit.rb", 1)
@return [Array<Sawyer::Resource>] Array of Hashes representing the reactions.
|
issue_reactions
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/reactions.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/reactions.rb
|
Apache-2.0
|
def create_issue_reaction(repo, number, reaction, options = {})
options = ensure_api_media_type(:reactions, options.merge(content: reaction))
post "#{Repository.path repo}/issues/#{number}/reactions", options
end
|
Create reaction for an issue
@param repo [Integer, String, Hash, Repository] A GitHub repository
@param number [Integer] The Issue number
@param reaction [String] The Reaction
@see https://developer.github.com/v3/reactions/#create-reaction-for-an-issue
@see https://developer.github.com/v3/reactions/#reaction-types
@example
@client.create_issue_reaction("octokit/octokit.rb", 1)
@return [<Sawyer::Resource>] Hash representing the reaction.
|
create_issue_reaction
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/reactions.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/reactions.rb
|
Apache-2.0
|
def issue_comment_reactions(repo, id, options = {})
options = ensure_api_media_type(:reactions, options)
get "#{Repository.path repo}/issues/comments/#{id}/reactions", options
end
|
List reactions for an issue comment
@param repo [Integer, String, Hash, Repository] A GitHub repository
@param id [Integer] The Issue comment id
@see https://developer.github.com/v3/reactions/#list-reactions-for-an-issue-comment
@example
@client.issue_comment_reactions("octokit/octokit.rb", 1)
@return [Array<Sawyer::Resource>] Array of Hashes representing the reactions.
|
issue_comment_reactions
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/reactions.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/reactions.rb
|
Apache-2.0
|
def create_issue_comment_reaction(repo, id, reaction, options = {})
options = ensure_api_media_type(:reactions, options.merge(content: reaction))
post "#{Repository.path repo}/issues/comments/#{id}/reactions", options
end
|
Create reaction for an issue comment
@param repo [Integer, String, Hash, Repository] A GitHub repository
@param id [Integer] The Issue comment id
@param reaction [String] The Reaction
@see https://developer.github.com/v3/reactions/#create-reaction-for-an-issue-comment
@see https://developer.github.com/v3/reactions/#reaction-types
@example
@client.create_issue_comment_reaction("octokit/octokit.rb", 1)
@return [<Sawyer::Resource>] Hashes representing the reaction.
|
create_issue_comment_reaction
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/reactions.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/reactions.rb
|
Apache-2.0
|
def pull_request_review_comment_reactions(repo, id, options = {})
options = ensure_api_media_type(:reactions, options)
get "#{Repository.path repo}/pulls/comments/#{id}/reactions", options
end
|
List reactions for a pull request review comment
@param repo [Integer, String, Hash, Repository] A GitHub repository
@param id [Integer] The Issue comment id
@see https://developer.github.com/v3/reactions/#list-reactions-for-a-pull-request-review-comment
@example
@client.pull_request_review_comment_reactions("octokit/octokit.rb", 1)
@return [Array<Sawyer::Resource>] Array of Hashes representing the reactions.
|
pull_request_review_comment_reactions
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/reactions.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/reactions.rb
|
Apache-2.0
|
def create_pull_request_review_comment_reaction(repo, id, reaction, options = {})
options = ensure_api_media_type(:reactions, options.merge(content: reaction))
post "#{Repository.path repo}/pulls/comments/#{id}/reactions", options
end
|
Create reaction for a pull request review comment
@param repo [Integer, String, Hash, Repository] A GitHub repository
@param id [Integer] The Issue comment id
@param reaction [String] 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
@example
@client.create_pull_request_reiew_comment_reaction("octokit/octokit.rb", 1)
@return [<Sawyer::Resource>] Hash representing the reaction.
|
create_pull_request_review_comment_reaction
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/reactions.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/reactions.rb
|
Apache-2.0
|
def delete_reaction(id, options = {})
options = ensure_api_media_type(:reactions, options)
boolean_from_response :delete, "reactions/#{id}", options
end
|
Delete a reaction
@param id [Integer] Reaction id
@see https://developer.github.com/v3/reactions/#delete-a-reaction
@example
@client.delete_reaction(1)
@return [Boolean] Return true if reaction was deleted, false otherwise.
|
delete_reaction
|
ruby
|
collabnix/kubelabs
|
.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/reactions.rb
|
https://github.com/collabnix/kubelabs/blob/master/.bundles_cache/ruby/2.6.0/gems/octokit-4.25.1/lib/octokit/client/reactions.rb
|
Apache-2.0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.