Skip to content

Commit

Permalink
If the payload is empty or specifies our branch, build.
Browse files Browse the repository at this point in the history
If it's not empty and doesn't specify our branch, it's probably a post-receive hook telling us about something we're not interested in.
  • Loading branch information
defunkt committed Aug 26, 2009
1 parent 7e5efd9 commit 8fa7ad8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/cijoe/server.rb
Expand Up @@ -39,7 +39,10 @@ def self.start(host, port, project_path)
end

post '/' do
joe.build if params[:payload].to_s.include? joe.git_branch
payload = params[:payload].to_s
if payload.empty? || payload.include?(joe.git_branch)
joe.build
end
redirect '/'
end

Expand Down

0 comments on commit 8fa7ad8

Please sign in to comment.