Module: Gitlab::Client::Labels
- Included in:
- Gitlab::Client
- Defined in:
- lib/gitlab/client/labels.rb
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.
23 24 25 |
# File 'lib/gitlab/client/labels.rb', line 23 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.
51 52 53 |
# File 'lib/gitlab/client/labels.rb', line 51 def delete_label(project, name) delete("/projects/#{project}/labels", :body => {:name => name} ) end |
#edit_label(project, name, options = {}) ⇒ Gitlab::ObjectifiedHash
Updates a label.
39 40 41 |
# File 'lib/gitlab/client/labels.rb', line 39 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.
10 11 12 |
# File 'lib/gitlab/client/labels.rb', line 10 def labels(project) get("/projects/#{project}/labels") end |