Module: Gitlab::Client::Labels
- Included in:
- Gitlab::Client
- Defined in:
- lib/gitlab/client/labels.rb
Overview
Defines methods related to labels.
Instance Method Summary collapse
-
#create_label(project, name, color) ⇒ Gitlab::ObjectifiedHash
Creates a new label.
-
#delete_label(project, name) ⇒ Gitlab::ObjectifiedHash
Deletes a label.
-
#edit_label(project, name, options = {}) ⇒ Gitlab::ObjectifiedHash
Updates a label.
-
#labels(project) ⇒ Array<Gitlab::ObjectifiedHash>
Gets a list of project’s labels.
Instance Method Details
#create_label(project, name, color) ⇒ Gitlab::ObjectifiedHash
Creates a new label.
25 26 27 |
# File 'lib/gitlab/client/labels.rb', line 25 def create_label(project, name, color) post("/projects/#{project}/labels", :body => { :name => name, :color => color}) end |
#delete_label(project, name) ⇒ Gitlab::ObjectifiedHash
Deletes a label.
53 54 55 |
# File 'lib/gitlab/client/labels.rb', line 53 def delete_label(project, name) delete("/projects/#{project}/labels", :body => {:name => name} ) end |
#edit_label(project, name, options = {}) ⇒ Gitlab::ObjectifiedHash
Updates a label.
41 42 43 |
# File 'lib/gitlab/client/labels.rb', line 41 def edit_label(project, name, ={}) put("/projects/#{project}/labels", :body => .merge({:name => name})) end |
#labels(project) ⇒ Array<Gitlab::ObjectifiedHash>
Gets a list of project’s labels.
12 13 14 |
# File 'lib/gitlab/client/labels.rb', line 12 def labels(project) get("/projects/#{project}/labels") end |