Method: Gitlab::Client::GroupLabels#edit_group_label

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

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

Updates a group label.

Examples:

Gitlab.edit_group_label('globex', 'Backlog', { new_name: 'Priority' })
Gitlab.edit_group_label('globex', 'Backlog', { new_name: 'Priority', color: '#DD10AA' })

Parameters:

  • group (Integer, String)

    The ID or name of a group.

  • name (String)

    The name of a label.

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

    A customizable set of options.

Options Hash (options):

  • :new_name (String)

    The new name of a label.

  • :color (String)

    The color of a label.

  • :description (String)

    The description of the label.

Returns:

[View source]

48
49
50
# File 'lib/gitlab/client/group_labels.rb', line 48

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