Permalink
Browse files

Trim builds after they have been deleted from github.

  • Loading branch information...
1 parent 17fdddf commit afd0c69bad14a344b7712cd5557b3c219010127d Graham Christensen committed Jan 5, 2012
Showing with 9 additions and 1 deletion.
  1. +4 −0 lib/integrity/payload.rb
  2. +5 −1 lib/integrity/payload_builder.rb
View
@@ -29,6 +29,10 @@ def commits
}
end
+ def deleted?
+ @payload["deleted"]
+ end
+
def uri
if uri = @payload["uri"]
return uri
@@ -10,7 +10,11 @@ def initialize(payload, build_all)
end
def build
- builds.each { |build| build.run }.size
+ if payload.deleted?
+ projects.each { |project| project.destroy }
+ else
+ builds.each { |build| build.run }.size
+ end
end
def builds

0 comments on commit afd0c69

Please sign in to comment.