Module: Octokit::Client::Milestones
Relationships & Source Files | |
Extension / Inclusion / Inheritance Descendants | |
Included In:
| |
Defined in: | lib/octokit/client/milestones.rb |
Overview
Methods for the Issues
Milestones API
Instance Method Summary
-
#create_milestone(repository, title, options = {}) ⇒ Sawyer::Resource
Create a milestone for a repository.
-
#delete_milestone(repository, number, options = {}) ⇒ Boolean
Delete a single milestone for a repository.
-
#edit_milestone(repository, number, options = {})
Alias for #update_milestone.
-
#list_milestones(repository, options = {}) ⇒ Array<Sawyer::Resource>
(also: #milestones)
List milestones for a repository.
-
#milestone(repository, number, options = {}) ⇒ Sawyer::Resource
Get a single milestone for a repository.
-
#milestones(repository, options = {})
Alias for #list_milestones.
-
#update_milestone(repository, number, options = {}) ⇒ Sawyer::Resource
(also: #edit_milestone)
Update a milestone for a repository.
Instance Method Details
#create_milestone(repository, title, options = {}) ⇒ Sawyer::Resource
Create a milestone for a repository
# File 'lib/octokit/client/milestones.rb', line 51
def create_milestone(repository, title, = {}) post "#{Repository.path repository}/milestones", .merge({ title: title }) end
#delete_milestone(repository, number, options = {}) ⇒ Boolean
Delete a single milestone for a repository
# File 'lib/octokit/client/milestones.rb', line 82
def delete_milestone(repository, number, = {}) boolean_from_response :delete, "#{Repository.path repository}/milestones/#{number}", end
#edit_milestone(repository, number, options = {})
Alias for #update_milestone.
# File 'lib/octokit/client/milestones.rb', line 71
alias edit_milestone update_milestone
#list_milestones(repository, options = {}) ⇒ Array
<Sawyer::Resource
>
Also known as: #milestones
List milestones for a repository
# File 'lib/octokit/client/milestones.rb', line 21
def list_milestones(repository, = {}) paginate "#{Repository.path repository}/milestones", end
#milestone(repository, number, options = {}) ⇒ Sawyer::Resource
Get a single milestone for a repository
# File 'lib/octokit/client/milestones.rb', line 35
def milestone(repository, number, = {}) get "#{Repository.path repository}/milestones/#{number}", end
#milestones(repository, options = {})
Alias for #list_milestones.
# File 'lib/octokit/client/milestones.rb', line 24
alias milestones list_milestones
#update_milestone(repository, number, options = {}) ⇒ Sawyer::Resource
Also known as: #edit_milestone
Update a milestone for a repository
# File 'lib/octokit/client/milestones.rb', line 68
def update_milestone(repository, number, = {}) patch "#{Repository.path repository}/milestones/#{number}", end