Module: Octokit::Client::Milestones
- Included in:
- Octokit::Client
- Defined in:
- lib/octokit/client/milestones.rb
Instance Method Summary collapse
-
#create_milestone(repository, title, options = {}) ⇒ Milestone
Create a milestone for a repository.
-
#delete_milestone(repository, number, options = {}) ⇒ Response
Delete a single milestone for a repository.
-
#list_milestones(repository, options = {}) ⇒ Array
(also: #milestones)
List milestones for a repository.
-
#milestone(repository, number, options = {}) ⇒ Milestone
Get a single milestone for a repository.
-
#update_milestone(repository, number, options = {}) ⇒ Milestone
(also: #edit_milestone)
Update a milestone for a repository.
Instance Method Details
#create_milestone(repository, title, options = {}) ⇒ Milestone
Create a milestone for a repository
50 51 52 |
# File 'lib/octokit/client/milestones.rb', line 50 def create_milestone(repository, title, ={}) post("/repos/#{Repository.new(repository)}/milestones", .merge({:title => title}), 3) end |
#delete_milestone(repository, number, options = {}) ⇒ Response
Delete a single milestone for a repository
81 82 83 |
# File 'lib/octokit/client/milestones.rb', line 81 def delete_milestone(repository, number, ={}) delete("/repos/#{Repository.new(repository)}/milestones/#{number}", , 3, true, true) end |
#list_milestones(repository, options = {}) ⇒ Array Also known as: milestones
List milestones for a repository
17 18 19 |
# File 'lib/octokit/client/milestones.rb', line 17 def list_milestones(repository, ={}) get("/repos/#{Repository.new(repository)}/milestones", , 3) end |
#milestone(repository, number, options = {}) ⇒ Milestone
Get a single milestone for a repository
34 35 36 |
# File 'lib/octokit/client/milestones.rb', line 34 def milestone(repository, number, ={}) get("/repos/#{Repository.new(repository)}/milestones/#{number}", , 3) end |
#update_milestone(repository, number, options = {}) ⇒ Milestone Also known as: edit_milestone
Update a milestone for a repository
67 68 69 |
# File 'lib/octokit/client/milestones.rb', line 67 def update_milestone(repository, number, ={}) post("/repos/#{Repository.new(repository)}/milestones/#{number}", , 3) end |