Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Trim builds after they have been deleted from github.

  • Loading branch information...
commit afd0c69bad14a344b7712cd5557b3c219010127d 1 parent 17fdddf
Graham Christensen authored
Showing with 9 additions and 1 deletion.
  1. +4 −0 lib/integrity/payload.rb
  2. +5 −1 lib/integrity/payload_builder.rb
View
4 lib/integrity/payload.rb
@@ -29,6 +29,10 @@ def commits
}
end
+ def deleted?
+ @payload["deleted"]
+ end
+
def uri
if uri = @payload["uri"]
return uri
View
6 lib/integrity/payload_builder.rb
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.