Class: Dependabot::PullRequest
- Inherits:
-
Object
- Object
- Dependabot::PullRequest
- Includes:
- Straw::Memoizable
- Defined in:
- lib/dependabot/pull_request.rb
Instance Attribute Summary collapse
-
#base ⇒ Object
readonly
Returns the value of attribute base.
-
#head ⇒ Object
readonly
Returns the value of attribute head.
Instance Method Summary collapse
- #commit_message ⇒ Object
-
#initialize(nwo:, base:, head:, dependency:) ⇒ PullRequest
constructor
A new instance of PullRequest.
- #run_against(api) ⇒ Object
Constructor Details
#initialize(nwo:, base:, head:, dependency:) ⇒ PullRequest
Returns a new instance of PullRequest.
9 10 11 12 13 14 |
# File 'lib/dependabot/pull_request.rb', line 9 def initialize(nwo:, base:, head:, dependency:) @nwo = nwo @base = base @head = head @dependency = dependency end |
Instance Attribute Details
#base ⇒ Object (readonly)
Returns the value of attribute base.
7 8 9 |
# File 'lib/dependabot/pull_request.rb', line 7 def base @base end |
#head ⇒ Object (readonly)
Returns the value of attribute head.
7 8 9 |
# File 'lib/dependabot/pull_request.rb', line 7 def head @head end |
Instance Method Details
#commit_message ⇒ Object
16 17 18 19 20 21 22 23 24 |
# File 'lib/dependabot/pull_request.rb', line 16 def memoize(:commit_message) do <<~COMMIT #{title} #{description} COMMIT end end |
#run_against(api) ⇒ Object
26 27 28 |
# File 'lib/dependabot/pull_request.rb', line 26 def run_against(api) api.create_pull_request(nwo, base, head, title, description) end |