| Module | Gitlab::Client::Labels |
| In: |
lib/gitlab/client/labels.rb
|
Defines methods related to labels. @see github.com/gitlabhq/gitlabhq/blob/master/doc/api/labels.md
Creates a new label.
@example
Gitlab.create_label(42, "Backlog", '#DD10AA')
@param [Integer] project The ID of a project. @option [String] name The name of a label. @option [String] color The color of a label. @return [Gitlab::ObjectifiedHash] Information about created label.
Deletes a label.
@example
Gitlab.delete_label(2, 'Backlog')
@param [Integer] project The ID of a project. @param [String] name The name of a label. @return [Gitlab::ObjectifiedHash] Information about deleted label.
Updates a label.
@example
Gitlab.edit_label(42, "Backlog", { new_name: 'TODO' })
Gitlab.edit_label(42, "Backlog", { new_name: 'TODO', color: '#DD10AA' })
@param [Integer] project The ID of a project. @param [String] name The name of a label. @param [Hash] options A customizable set of options. @option options [String] :new_name The new name of a label. @option options [String] :color The color of a label. @return [Gitlab::ObjectifiedHash] Information about updated label.
Gets a list of project‘s labels.
@example
Gitlab.labels(5)
@param [Integer] project The ID of a project. @return [Array<Gitlab::ObjectifiedHash>]