Method: Gitlab::Client::Projects#add_project_custom_attribute

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

#add_project_custom_attribute(key, value, project_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

  • project_id (Integer)

    The ID of a project.

Returns:



679
680
681
682
# File 'lib/gitlab/client/projects.rb', line 679

def add_project_custom_attribute(key, value, project_id)
  url = "/projects/#{project_id}/custom_attributes/#{key}"
  put(url, body: { value: value })
end