Method: Gitlab::Client::Users#add_user_custom_attribute

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

#add_user_custom_attribute(key, value, user_id) ⇒ Gitlab::ObjectifiedHash

Creates a new custom_attribute

Examples:

Gitlab.add_custom_attribute('some_new_key', 'some_new_value', 2)

Parameters:

  • key (String)

    The custom_attributes key

  • value (String)

    The custom_attributes value

  • user_id (Integer)

    The ID of a user.

Returns:


315
316
317
318
# File 'lib/gitlab/client/users.rb', line 315

def add_user_custom_attribute(key, value, user_id)
  url = "/users/#{user_id}/custom_attributes/#{key}"
  put(url, body: { value: value })
end