Module: Avmtrf1::Patches::Avm::Git::Issue::Complete::InstanceMethods

Defined in:
lib/avmtrf1/patches/avm/git/issue/complete.rb

Instance Method Summary collapse

Instance Method Details

#issue_idObject


24
25
26
27
28
# File 'lib/avmtrf1/patches/avm/git/issue/complete.rb', line 24

def issue_id
  %w[redmine esosti jira].find do |provider|
    issue_id_by_provider(provider)
  end
end

#issue_id_by_provider(provider) ⇒ Object


30
31
32
33
34
# File 'lib/avmtrf1/patches/avm/git/issue/complete.rb', line 30

def issue_id_by_provider(provider)
  issue_id_pattern_by_provider(provider).match(branch_name).if_present do |m|
    [provider, m[1]]
  end
end

#issue_id_pattern_by_provider(provider) ⇒ Object


36
37
38
# File 'lib/avmtrf1/patches/avm/git/issue/complete.rb', line 36

def issue_id_pattern_by_provider(provider)
  self.class.const_get("#{provider}_issue_id_pattern".upcase)
end