Method: Gitlab::Client::GroupLabels#create_group_label

Defined in:
lib/gitlab/client/group_labels.rb

#create_group_label(group, name, color, options = {}) ⇒ Gitlab::ObjectifiedHash

Creates a new group label.

Examples:

Gitlab.create_group_label('globex', 'Backlog', '#DD10AA')

Parameters:

  • group (Integer, String)

    The ID or name of a group.

  • name (String)

    The name of a label.

  • color (String)

    The color of a label.

  • options (Hash) (defaults to: {})

    A customizable set of options.

Options Hash (options):

  • :description (String)

    The description of the label.

Returns:


31
32
33
# File 'lib/gitlab/client/group_labels.rb', line 31

def create_group_label(group, name, color, options = {})
  post("/groups/#{url_encode group}/labels", body: options.merge(name: name, color: color))
end