Permalink
Browse files

screw it

  • Loading branch information...
1 parent 28cac99 commit 1784e00e0cd12d8fe0f6a09a2b24b453671107a5 @defunkt committed Feb 9, 2011
Showing with 4 additions and 2 deletions.
  1. +4 −2 lib/cijoe/server.rb
View
@@ -27,8 +27,10 @@ class Server < Sinatra::Base
end
post '/?' do
- payload = YAML.load(params[:payload].to_s.gsub("\n",' ')) || {}
- pushed_branch = payload['ref'].to_s.split('/').last
+ payload = params[:payload].to_s
+ if payload =~ /"ref":"(.+?)"/
+ pushed_branch = $1.split('/').last
+ end
# Only build if we were given an explicit branch via `?branch=blah`,
# no payload exists (we're probably testing), or the payload exists and

0 comments on commit 1784e00

Please sign in to comment.