Class: Dependabot::PullRequestCreator::BranchNamer::MultiEcosystemStrategy

Inherits:
Base
  • Object
show all
Extended by:
T::Sig
Defined in:
lib/dependabot/pull_request_creator/branch_namer/multi_ecosystem_strategy.rb

Instance Attribute Summary

Attributes inherited from Base

#dependencies, #files, #max_length, #prefix, #separator, #target_branch

Instance Method Summary collapse

Constructor Details

#initialize(dependencies:, files:, target_branch:, includes_security_fixes:, multi_ecosystem_name:, separator: "/", prefix: "dependabot", max_length: nil) ⇒ MultiEcosystemStrategy

Returns a new instance of MultiEcosystemStrategy.



26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'lib/dependabot/pull_request_creator/branch_namer/multi_ecosystem_strategy.rb', line 26

def initialize(
  dependencies:,
  files:,
  target_branch:,
  includes_security_fixes:,
  multi_ecosystem_name:,
  separator: "/",
  prefix: "dependabot",
  max_length: nil
)
  super(
    dependencies: dependencies,
    files: files,
    target_branch: target_branch,
    separator: separator,
    prefix: prefix,
    max_length: max_length,
  )

  @multi_ecosystem_name = multi_ecosystem_name
  @includes_security_fixes = includes_security_fixes
end

Instance Method Details

#new_branch_nameObject



50
51
52
# File 'lib/dependabot/pull_request_creator/branch_namer/multi_ecosystem_strategy.rb', line 50

def new_branch_name
  sanitize_branch_name(File.join(prefixes, group_name_with_dependency_digest))
end