Class: Versi::GenerateCommand::Interactors::ExtractReleaseTypeFromCommitMessage

Inherits:
Object
  • Object
show all
Includes:
RescueInteractor
Defined in:
lib/versi/generate_command/interactors/extract_release_type_from_commit_message.rb

Constant Summary collapse

MERGE_COMMIT_REGEXES =
[MERGE_COMMIT_REGEX_BITBUCKET = /.*Merge\sbranch\s\'(.*)\'.*/,
MERGE_COMMIT_REGEX_GITHUB = /.*Merge.*from\s([^\s]*).*/,
MERGE_COMMIT_REGEX_GIT = /.*Merged\s([^\s]*)\sinto\s([^\s]*).*/]

Instance Method Summary collapse

Instance Method Details

#callObject



15
16
17
18
19
20
# File 'lib/versi/generate_command/interactors/extract_release_type_from_commit_message.rb', line 15

def call
  source_branch = extract_source_branch
  return if !source_branch
  
  context.release_type = extract_release_type_from_merge_source_branch(source_branch)
end