Module: Octokit::Client::Milestones
- Included in:
- Octokit::Client
- Defined in:
- lib/octokit/client/milestones.rb
Overview
Methods for the Issues Milestones API
Instance Method Summary collapse
-
#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.
-
#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.
-
#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
51 52 53 |
# 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
82 83 84 |
# File 'lib/octokit/client/milestones.rb', line 82 def delete_milestone(repository, number, = {}) boolean_from_response :delete, "#{Repository.path repository}/milestones/#{number}", end |
#list_milestones(repository, options = {}) ⇒ Array<Sawyer::Resource> Also known as: milestones
List milestones for a repository
21 22 23 |
# 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
35 36 37 |
# File 'lib/octokit/client/milestones.rb', line 35 def milestone(repository, number, = {}) get "#{Repository.path repository}/milestones/#{number}", end |
#update_milestone(repository, number, options = {}) ⇒ Sawyer::Resource Also known as: edit_milestone
Update a milestone for a repository
68 69 70 |
# File 'lib/octokit/client/milestones.rb', line 68 def update_milestone(repository, number, = {}) patch "#{Repository.path repository}/milestones/#{number}", end |