Sha256: a0a1cc891bf73ec49b2008631b72b1f4e1b4e332df1101b11f0fbe33c0e0275a
Contents?: true
Size: 667 Bytes
Versions: 5
Compression:
Stored size: 667 Bytes
Contents
# frozen_string_literal: true module Geet module Gitlab class Label attr_reader :name, :color def initialize(name, color) @name = name @color = color end # Returns a flat list of names in string form. def self.list(api_interface) api_path = "projects/#{api_interface.path_with_namespace(encoded: true)}/labels" response = api_interface.send_request(api_path, multipage: true) response.map do |label_entry| name = label_entry.fetch('name') color = label_entry.fetch('color').sub('#', '') # normalize new(name, color) end end end end end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
geet-0.3.7 | lib/geet/gitlab/label.rb |
geet-0.3.6 | lib/geet/gitlab/label.rb |
geet-0.3.5 | lib/geet/gitlab/label.rb |
geet-0.3.4 | lib/geet/gitlab/label.rb |
geet-0.3.3 | lib/geet/gitlab/label.rb |