Skip to content
Browse files

correct the failed pr rebuild logic

  • Loading branch information...
1 parent c483b6d commit 03e1d9ff34b8fe7fa5d5b1d2d49459be5fdd783e @chriskite committed Feb 14, 2014
Showing with 4 additions and 1 deletion.
  1. +4 −1 app/models/repo.rb
View
5 app/models/repo.rb
@@ -58,13 +58,16 @@ def self.sync_all_with_github
new_pull.comment_on_jira_issue(client)
end
else
- # If the remote pull request has been updated, save and rebuild
+ # If the remote pull request has been updated, save and check back out
if DateTime.parse(pull.updated_at) > existing_pull.updated_at
existing_pull.update_attributes(
title: pull.title,
github_updated_at: pull.updated_at
)
existing_pull.checkout
+
+ # if it was failed, rebuild with the updated code
+ existing_pull.delayed_build if 2 == existing_pull.status
end
end
end

0 comments on commit 03e1d9f

Please sign in to comment.
Something went wrong with that request. Please try again.