Class: Gitlab::Triage::Resource::LabelEvent

Inherits:
Base
  • Object
show all
Defined in:
lib/gitlab/triage/resource/label_event.rb

Constant Summary collapse

FIELDS =
%i[
  id
  user
  resource_type
  resource_id
  action
].freeze
TIME_FIELDS =
%i[
  created_at
].freeze

Constants inherited from Base

Base::CONFIDENTIAL_TEXT

Instance Attribute Summary

Attributes inherited from Base

#parent, #resource

Instance Method Summary collapse

Methods inherited from Base

#build_url, define_field, #expand_resource!, #initialize, #network, #redact_confidential_attributes?, #resource_id, #resource_url, #source, #source_resource, #source_url, #url, #url_opts

Constructor Details

This class inherits a constructor from Gitlab::Triage::Resource::Base

Instance Method Details

#labelObject



38
39
40
41
42
43
44
# File 'lib/gitlab/triage/resource/label_event.rb', line 38

def label
  return unless resource[:label]

  @label ||= Label.new(
    resource[:label].reverse_merge(added_at: resource[:created_at]),
    parent: self)
end