Class: Gitlab::Triage::Resource::MergeRequest

Inherits:
Base
  • Object
show all
Includes:
Shared::Issuable
Defined in:
lib/gitlab/triage/resource/merge_request.rb

Constant Summary

Constants included from Shared::Issuable

Shared::Issuable::MAX_PARENT_LOOKUP, Shared::Issuable::SourceTooDeep

Constants inherited from Base

Base::CONFIDENTIAL_TEXT

Instance Attribute Summary

Attributes inherited from Base

#parent, #resource

Instance Method Summary collapse

Methods included from Shared::Issuable

#author, #full_resource_reference, #group_url, #label_events, #labels, #labels_chronologically, #labels_with_details, #milestone, #project_path, #project_url, #query_label_events, #request_group, #request_project, #root_id, #state

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

#first_contribution?Boolean

Returns:

  • (Boolean)


12
13
14
15
16
17
18
19
# File 'lib/gitlab/triage/resource/merge_request.rb', line 12

def first_contribution?
  if resource.key?(:first_contribution)
    resource[:first_contribution]
  else
    expanded = expand_resource!
    expanded[:first_contribution]
  end
end