Class: Dependabot::PullRequestCreator::BranchNamer
- Inherits:
-
Object
- Object
- Dependabot::PullRequestCreator::BranchNamer
- 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/dependency_group_strategy.rb
Defined Under Namespace
Classes: Base, DependencyGroupStrategy, 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.
-
#max_length ⇒ Object
readonly
Returns the value of attribute max_length.
-
#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) ⇒ 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) ⇒ BranchNamer
Returns a new instance of BranchNamer.
16 17 18 19 20 21 22 23 24 25 |
# File 'lib/dependabot/pull_request_creator/branch_namer.rb', line 16 def initialize(dependencies:, files:, target_branch:, dependency_group: nil, separator: "/", prefix: "dependabot", max_length: nil) @dependencies = dependencies @files = files @target_branch = target_branch @dependency_group = dependency_group @separator = separator @prefix = prefix @max_length = max_length end |
Instance Attribute Details
#dependencies ⇒ Object (readonly)
Returns the value of attribute dependencies.
14 15 16 |
# File 'lib/dependabot/pull_request_creator/branch_namer.rb', line 14 def dependencies @dependencies end |
#dependency_group ⇒ Object (readonly)
Returns the value of attribute dependency_group.
14 15 16 |
# File 'lib/dependabot/pull_request_creator/branch_namer.rb', line 14 def dependency_group @dependency_group end |
#files ⇒ Object (readonly)
Returns the value of attribute files.
14 15 16 |
# File 'lib/dependabot/pull_request_creator/branch_namer.rb', line 14 def files @files end |
#max_length ⇒ Object (readonly)
Returns the value of attribute max_length.
14 15 16 |
# File 'lib/dependabot/pull_request_creator/branch_namer.rb', line 14 def max_length @max_length end |
#prefix ⇒ Object (readonly)
Returns the value of attribute prefix.
14 15 16 |
# File 'lib/dependabot/pull_request_creator/branch_namer.rb', line 14 def prefix @prefix end |
#separator ⇒ Object (readonly)
Returns the value of attribute separator.
14 15 16 |
# File 'lib/dependabot/pull_request_creator/branch_namer.rb', line 14 def separator @separator end |
#target_branch ⇒ Object (readonly)
Returns the value of attribute target_branch.
14 15 16 |
# File 'lib/dependabot/pull_request_creator/branch_namer.rb', line 14 def target_branch @target_branch end |
Instance Method Details
#new_branch_name ⇒ Object
27 28 29 |
# File 'lib/dependabot/pull_request_creator/branch_namer.rb', line 27 def new_branch_name strategy.new_branch_name end |