Class: Dependabot::PullRequestCreator::BranchNamer
- Inherits:
-
Object
- Object
- Dependabot::PullRequestCreator::BranchNamer
- Extended by:
- T::Sig
- Defined in:
- lib/dependabot/pull_request_creator/branch_namer.rb,
lib/dependabot/pull_request_creator/branch_namer/base.rb,
lib/dependabot/pull_request_creator/branch_namer/solo_strategy.rb,
lib/dependabot/pull_request_creator/branch_namer/multi_ecosystem_strategy.rb,
lib/dependabot/pull_request_creator/branch_namer/dependency_group_strategy.rb
Defined Under Namespace
Classes: Base, DependencyGroupStrategy, MultiEcosystemStrategy, SoloStrategy
Instance Attribute Summary collapse
-
#dependencies ⇒ Object
readonly
Returns the value of attribute dependencies.
-
#dependency_group ⇒ Object
readonly
Returns the value of attribute dependency_group.
-
#files ⇒ Object
readonly
Returns the value of attribute files.
-
#includes_security_fixes ⇒ Object
readonly
Returns the value of attribute includes_security_fixes.
-
#max_length ⇒ Object
readonly
Returns the value of attribute max_length.
-
#multi_ecosystem_name ⇒ Object
readonly
Returns the value of attribute multi_ecosystem_name.
-
#prefix ⇒ Object
readonly
Returns the value of attribute prefix.
-
#separator ⇒ Object
readonly
Returns the value of attribute separator.
-
#target_branch ⇒ Object
readonly
Returns the value of attribute target_branch.
Instance Method Summary collapse
-
#initialize(dependencies:, files:, target_branch:, dependency_group: nil, separator: "/", prefix: "dependabot", max_length: nil, includes_security_fixes: false, multi_ecosystem_name: nil) ⇒ BranchNamer
constructor
A new instance of BranchNamer.
- #new_branch_name ⇒ Object
Constructor Details
#initialize(dependencies:, files:, target_branch:, dependency_group: nil, separator: "/", prefix: "dependabot", max_length: nil, includes_security_fixes: false, multi_ecosystem_name: nil) ⇒ BranchNamer
Returns a new instance of BranchNamer.
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
# File 'lib/dependabot/pull_request_creator/branch_namer.rb', line 59 def initialize( dependencies:, files:, target_branch:, dependency_group: nil, separator: "/", prefix: "dependabot", max_length: nil, includes_security_fixes: false, multi_ecosystem_name: nil ) @dependencies = dependencies @files = files @target_branch = target_branch @dependency_group = dependency_group @separator = separator @prefix = prefix @max_length = max_length @includes_security_fixes = includes_security_fixes @multi_ecosystem_name = multi_ecosystem_name end |
Instance Attribute Details
#dependencies ⇒ Object (readonly)
Returns the value of attribute dependencies.
19 20 21 |
# File 'lib/dependabot/pull_request_creator/branch_namer.rb', line 19 def dependencies @dependencies end |
#dependency_group ⇒ Object (readonly)
Returns the value of attribute dependency_group.
37 38 39 |
# File 'lib/dependabot/pull_request_creator/branch_namer.rb', line 37 def dependency_group @dependency_group end |
#files ⇒ Object (readonly)
Returns the value of attribute files.
22 23 24 |
# File 'lib/dependabot/pull_request_creator/branch_namer.rb', line 22 def files @files end |
#includes_security_fixes ⇒ Object (readonly)
Returns the value of attribute includes_security_fixes.
40 41 42 |
# File 'lib/dependabot/pull_request_creator/branch_namer.rb', line 40 def includes_security_fixes @includes_security_fixes end |
#max_length ⇒ Object (readonly)
Returns the value of attribute max_length.
34 35 36 |
# File 'lib/dependabot/pull_request_creator/branch_namer.rb', line 34 def max_length @max_length end |
#multi_ecosystem_name ⇒ Object (readonly)
Returns the value of attribute multi_ecosystem_name.
43 44 45 |
# File 'lib/dependabot/pull_request_creator/branch_namer.rb', line 43 def multi_ecosystem_name @multi_ecosystem_name end |
#prefix ⇒ Object (readonly)
Returns the value of attribute prefix.
31 32 33 |
# File 'lib/dependabot/pull_request_creator/branch_namer.rb', line 31 def prefix @prefix end |
#separator ⇒ Object (readonly)
Returns the value of attribute separator.
28 29 30 |
# File 'lib/dependabot/pull_request_creator/branch_namer.rb', line 28 def separator @separator end |
#target_branch ⇒ Object (readonly)
Returns the value of attribute target_branch.
25 26 27 |
# File 'lib/dependabot/pull_request_creator/branch_namer.rb', line 25 def target_branch @target_branch end |
Instance Method Details
#new_branch_name ⇒ Object
82 83 84 |
# File 'lib/dependabot/pull_request_creator/branch_namer.rb', line 82 def new_branch_name strategy.new_branch_name end |