Module: Gitlab::Client::Milestones
- Included in:
- Gitlab::Client
- Defined in:
- lib/gitlab/client/milestones.rb
Overview
Defines methods related to milestones.
Instance Method Summary collapse
-
#create_milestone(project, title, options = {}) ⇒ Gitlab::ObjectifiedHash
Creates a new milestone.
-
#delete_milestone(project, id) ⇒ nil
Delete a project milestone.
-
#edit_milestone(project, id, options = {}) ⇒ Gitlab::ObjectifiedHash
Updates a milestone.
-
#milestone(project, id) ⇒ Gitlab::ObjectifiedHash
Gets a single milestone.
-
#milestone_issues(project, milestone, options = {}) ⇒ Array<Gitlab::ObjectifiedHash>
Gets the issues of a given milestone.
-
#milestone_merge_requests(project, milestone, options = {}) ⇒ Array<Gitlab::ObjectifiedHash>
Gets the merge_requests of a given milestone.
-
#milestones(project, options = {}) ⇒ Array<Gitlab::ObjectifiedHash>
Gets a list of project’s milestones.
Instance Method Details
#create_milestone(project, title, options = {}) ⇒ Gitlab::ObjectifiedHash
Creates a new milestone.
72 73 74 75 |
# File 'lib/gitlab/client/milestones.rb', line 72 def create_milestone(project, title, = {}) body = { title: title }.merge() post("/projects/#{url_encode project}/milestones", body: body) end |
#delete_milestone(project, id) ⇒ nil
Delete a project milestone.
102 103 104 |
# File 'lib/gitlab/client/milestones.rb', line 102 def delete_milestone(project, id) delete("/projects/#{url_encode project}/milestones/#{id}") end |
#edit_milestone(project, id, options = {}) ⇒ Gitlab::ObjectifiedHash
Updates a milestone.
90 91 92 |
# File 'lib/gitlab/client/milestones.rb', line 90 def edit_milestone(project, id, = {}) put("/projects/#{url_encode project}/milestones/#{id}", body: ) end |
#milestone(project, id) ⇒ Gitlab::ObjectifiedHash
Gets a single milestone.
29 30 31 |
# File 'lib/gitlab/client/milestones.rb', line 29 def milestone(project, id) get("/projects/#{url_encode project}/milestones/#{id}") end |
#milestone_issues(project, milestone, options = {}) ⇒ Array<Gitlab::ObjectifiedHash>
Gets the issues of a given milestone.
43 44 45 |
# File 'lib/gitlab/client/milestones.rb', line 43 def milestone_issues(project, milestone, = {}) get("/projects/#{url_encode project}/milestones/#{milestone}/issues", query: ) end |
#milestone_merge_requests(project, milestone, options = {}) ⇒ Array<Gitlab::ObjectifiedHash>
Gets the merge_requests of a given milestone.
57 58 59 |
# File 'lib/gitlab/client/milestones.rb', line 57 def milestone_merge_requests(project, milestone, = {}) get("/projects/#{url_encode project}/milestones/#{milestone}/merge_requests", query: ) end |
#milestones(project, options = {}) ⇒ Array<Gitlab::ObjectifiedHash>
Gets a list of project’s milestones.
17 18 19 |
# File 'lib/gitlab/client/milestones.rb', line 17 def milestones(project, = {}) get("/projects/#{url_encode project}/milestones", query: ) end |