Module: Gitlab::Email::Handler::ReplyProcessing

Included in:
CreateIssueHandler, CreateMergeRequestHandler, CreateNoteHandler, CreateNoteOnIssuableHandler, ServiceDeskHandler
Defined in:
lib/gitlab/email/handler/reply_processing.rb

Instance Method Summary collapse

Instance Method Details

#projectObject

rubocop:disable Gitlab/ModuleWithInstanceVariables


8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/gitlab/email/handler/reply_processing.rb', line 8

def project
  return @project if instance_variable_defined?(:@project)

  if project_id
    @project = Project.find_by_id(project_id)
    @project = nil unless valid_project_slug?(@project)
  else
    @project = Project.find_by_full_path(project_path)
  end

  @project
end