Created
May 13, 2015 12:52
-
-
Save spraints/61147fdd8e828690cc47 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def process(pull, attributes) | |
pull.review_comments.find_each do |comment| | |
rewrite_urls_in_model_body(comment) | |
comment.updated_at = comment.created_at # fix for referred_at | |
quiesce(comment, :ensure_synced_with_pull) do | |
comment.save | |
end | |
end | |
issue_post_processor.process(pull.issue, attributes) | |
end | |
def quiesce(object, method_name) | |
original_method = object.method(method_name) | |
object.send(:define_method, method_name) { } | |
yield | |
ensure | |
object.send(:define_method, method_name, original_method) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment