Class: RightBranch::Updater
- Inherits:
-
Object
- Object
- RightBranch::Updater
- Defined in:
- lib/right_branch/updater.rb
Instance Attribute Summary collapse
-
#credentials ⇒ Object
readonly
Returns the value of attribute credentials.
-
#repository ⇒ Object
readonly
Returns the value of attribute repository.
Instance Method Summary collapse
-
#initialize(options) ⇒ Updater
constructor
A new instance of Updater.
- #run!(old_pr_number, new_branch) ⇒ Object
Constructor Details
#initialize(options) ⇒ Updater
Returns a new instance of Updater.
7 8 9 10 |
# File 'lib/right_branch/updater.rb', line 7 def initialize() @repository = [:repository] @credentials = [:credentials] end |
Instance Attribute Details
#credentials ⇒ Object (readonly)
Returns the value of attribute credentials.
5 6 7 |
# File 'lib/right_branch/updater.rb', line 5 def credentials @credentials end |
#repository ⇒ Object (readonly)
Returns the value of attribute repository.
5 6 7 |
# File 'lib/right_branch/updater.rb', line 5 def repository @repository end |
Instance Method Details
#run!(old_pr_number, new_branch) ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'lib/right_branch/updater.rb', line 12 def run!(old_pr_number, new_branch) new_pr = resubmit_pr(old_pr_number, new_branch) update_pr(old_pr_number, state: 'closed') comment_on_issue old_pr_number , "Reopened against `#{new_branch}` (##{new_pr.number})" end |