module Gitlab::Client::GroupLabels

def create_group_label(group, name, color, options = {})

Returns:
  • (Gitlab::ObjectifiedHash) - Information about created label.

Options Hash: (**options)
  • :description (String) -- The description of the label.

Parameters:
  • options (Hash) -- A customizable set of options.
  • color (String) -- The color of a label.
  • name (String) -- The name of a label.
  • group (Integer, String) -- The ID or name of a group.
def create_group_label(group, name, color, options = {})
  post("/groups/#{url_encode group}/labels", body: options.merge(name: name, color: color))
end

def delete_group_label(group, name)

Returns:
  • (Gitlab::ObjectifiedHash) - Information about deleted label.

Parameters:
  • name (String) -- The name of a label.
  • group (Integer, String) -- The ID or name of a group.
def delete_group_label(group, name)
  delete("/groups/#{url_encode group}/labels/#{name}")
end

def edit_group_label(group, name, options = {})

Returns:
  • (Gitlab::ObjectifiedHash) - Information about updated label.

Options Hash: (**options)
  • :description (String) -- The description of the label.
  • :color (String) -- The color of a label.
  • :new_name (String) -- The new name of a label.

Parameters:
  • options (Hash) -- A customizable set of options.
  • name (String) -- The name of a label.
  • group (Integer, String) -- The ID or name of a group.
def edit_group_label(group, name, options = {})
  put("/groups/#{url_encode group}/labels", body: options.merge(name: name))
end

def group_labels(group, options = {})

Returns:
  • (Array) -

Parameters:
  • group (Integer, String) -- The ID or name of a group.
def group_labels(group, options = {})
  get("/groups/#{url_encode group}/labels", query: options)
end

def subscribe_to_group_label(group, name)

Returns:
  • (Gitlab::ObjectifiedHash) - Information about the label subscribed to.

Parameters:
  • name (String) -- The name of a label.
  • group (Integer, String) -- The ID or name of a group.
def subscribe_to_group_label(group, name)
  post("/groups/#{url_encode group}/labels/#{url_encode name}/subscribe")
end

def unsubscribe_from_group_label(group, name)

Returns:
  • (Gitlab::ObjectifiedHash) - Information about the label unsubscribed from.

Parameters:
  • name (String) -- The name of a label.
  • group (Integer, String) -- The ID or name of a group.
def unsubscribe_from_group_label(group, name)
  post("/groups/#{url_encode group}/labels/#{url_encode name}/unsubscribe")
end