Class: Dependabot::PullRequestCreator::Azure
- Inherits:
-
Object
- Object
- Dependabot::PullRequestCreator::Azure
- Defined in:
- lib/dependabot/pull_request_creator/azure.rb
Instance Attribute Summary collapse
-
#base_commit ⇒ Object
readonly
Returns the value of attribute base_commit.
-
#branch_name ⇒ Object
readonly
Returns the value of attribute branch_name.
-
#commit_message ⇒ Object
readonly
Returns the value of attribute commit_message.
-
#credentials ⇒ Object
readonly
Returns the value of attribute credentials.
-
#files ⇒ Object
readonly
Returns the value of attribute files.
-
#labeler ⇒ Object
readonly
Returns the value of attribute labeler.
-
#pr_description ⇒ Object
readonly
Returns the value of attribute pr_description.
-
#pr_name ⇒ Object
readonly
Returns the value of attribute pr_name.
-
#source ⇒ Object
readonly
Returns the value of attribute source.
Instance Method Summary collapse
- #create ⇒ Object
-
#initialize(source:, branch_name:, base_commit:, credentials:, files:, commit_message:, pr_description:, pr_name:, labeler:) ⇒ Azure
constructor
A new instance of Azure.
Constructor Details
#initialize(source:, branch_name:, base_commit:, credentials:, files:, commit_message:, pr_description:, pr_name:, labeler:) ⇒ Azure
Returns a new instance of Azure.
13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/dependabot/pull_request_creator/azure.rb', line 13 def initialize(source:, branch_name:, base_commit:, credentials:, files:, commit_message:, pr_description:, pr_name:, labeler:) @source = source @branch_name = branch_name @base_commit = base_commit @credentials = credentials @files = files @commit_message = @pr_description = pr_description @pr_name = pr_name @labeler = labeler end |
Instance Attribute Details
#base_commit ⇒ Object (readonly)
Returns the value of attribute base_commit.
9 10 11 |
# File 'lib/dependabot/pull_request_creator/azure.rb', line 9 def base_commit @base_commit end |
#branch_name ⇒ Object (readonly)
Returns the value of attribute branch_name.
9 10 11 |
# File 'lib/dependabot/pull_request_creator/azure.rb', line 9 def branch_name @branch_name end |
#commit_message ⇒ Object (readonly)
Returns the value of attribute commit_message.
9 10 11 |
# File 'lib/dependabot/pull_request_creator/azure.rb', line 9 def @commit_message end |
#credentials ⇒ Object (readonly)
Returns the value of attribute credentials.
9 10 11 |
# File 'lib/dependabot/pull_request_creator/azure.rb', line 9 def credentials @credentials end |
#files ⇒ Object (readonly)
Returns the value of attribute files.
9 10 11 |
# File 'lib/dependabot/pull_request_creator/azure.rb', line 9 def files @files end |
#labeler ⇒ Object (readonly)
Returns the value of attribute labeler.
9 10 11 |
# File 'lib/dependabot/pull_request_creator/azure.rb', line 9 def labeler @labeler end |
#pr_description ⇒ Object (readonly)
Returns the value of attribute pr_description.
9 10 11 |
# File 'lib/dependabot/pull_request_creator/azure.rb', line 9 def pr_description @pr_description end |
#pr_name ⇒ Object (readonly)
Returns the value of attribute pr_name.
9 10 11 |
# File 'lib/dependabot/pull_request_creator/azure.rb', line 9 def pr_name @pr_name end |
#source ⇒ Object (readonly)
Returns the value of attribute source.
9 10 11 |
# File 'lib/dependabot/pull_request_creator/azure.rb', line 9 def source @source end |
Instance Method Details
#create ⇒ Object
27 28 29 30 31 32 33 |
# File 'lib/dependabot/pull_request_creator/azure.rb', line 27 def create return if branch_exists? && pull_request_exists? create_commit unless branch_exists? && commit_exists? create_pull_request end |