Class: Dependabot::PullRequestUpdater
- Inherits:
-
Object
- Object
- Dependabot::PullRequestUpdater
- Defined in:
- lib/dependabot/pull_request_updater.rb,
lib/dependabot/pull_request_updater/github.rb
Defined Under Namespace
Classes: Github
Instance Attribute Summary collapse
-
#author_details ⇒ Object
readonly
Returns the value of attribute author_details.
-
#base_commit ⇒ Object
readonly
Returns the value of attribute base_commit.
-
#credentials ⇒ Object
readonly
Returns the value of attribute credentials.
-
#files ⇒ Object
readonly
Returns the value of attribute files.
-
#old_commit ⇒ Object
readonly
Returns the value of attribute old_commit.
-
#pull_request_number ⇒ Object
readonly
Returns the value of attribute pull_request_number.
-
#signature_key ⇒ Object
readonly
Returns the value of attribute signature_key.
-
#source ⇒ Object
readonly
Returns the value of attribute source.
Instance Method Summary collapse
-
#initialize(source:, base_commit:, old_commit:, files:, credentials:, pull_request_number:, author_details: nil, signature_key: nil) ⇒ PullRequestUpdater
constructor
A new instance of PullRequestUpdater.
- #update ⇒ Object
Constructor Details
#initialize(source:, base_commit:, old_commit:, files:, credentials:, pull_request_number:, author_details: nil, signature_key: nil) ⇒ PullRequestUpdater
Returns a new instance of PullRequestUpdater.
10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/dependabot/pull_request_updater.rb', line 10 def initialize(source:, base_commit:, old_commit:, files:, credentials:, pull_request_number:, author_details: nil, signature_key: nil) @source = source @base_commit = base_commit @old_commit = old_commit @files = files @credentials = credentials @pull_request_number = pull_request_number @author_details = @signature_key = signature_key end |
Instance Attribute Details
#author_details ⇒ Object (readonly)
Returns the value of attribute author_details.
7 8 9 |
# File 'lib/dependabot/pull_request_updater.rb', line 7 def @author_details end |
#base_commit ⇒ Object (readonly)
Returns the value of attribute base_commit.
7 8 9 |
# File 'lib/dependabot/pull_request_updater.rb', line 7 def base_commit @base_commit end |
#credentials ⇒ Object (readonly)
Returns the value of attribute credentials.
7 8 9 |
# File 'lib/dependabot/pull_request_updater.rb', line 7 def credentials @credentials end |
#files ⇒ Object (readonly)
Returns the value of attribute files.
7 8 9 |
# File 'lib/dependabot/pull_request_updater.rb', line 7 def files @files end |
#old_commit ⇒ Object (readonly)
Returns the value of attribute old_commit.
7 8 9 |
# File 'lib/dependabot/pull_request_updater.rb', line 7 def old_commit @old_commit end |
#pull_request_number ⇒ Object (readonly)
Returns the value of attribute pull_request_number.
7 8 9 |
# File 'lib/dependabot/pull_request_updater.rb', line 7 def pull_request_number @pull_request_number end |
#signature_key ⇒ Object (readonly)
Returns the value of attribute signature_key.
7 8 9 |
# File 'lib/dependabot/pull_request_updater.rb', line 7 def signature_key @signature_key end |
#source ⇒ Object (readonly)
Returns the value of attribute source.
7 8 9 |
# File 'lib/dependabot/pull_request_updater.rb', line 7 def source @source end |
Instance Method Details
#update ⇒ Object
23 24 25 26 27 28 |
# File 'lib/dependabot/pull_request_updater.rb', line 23 def update case source.provider when "github" then github_updater.update else raise "Unsupported provider #{source.provider}" end end |