Permalink
Browse files

ignore branch create/delete

  • Loading branch information...
1 parent 35c8063 commit 5d86ccf72c2ef4fd8dc6293043a1613d0e911108 @tmm1 tmm1 committed Mar 7, 2011
Showing with 6 additions and 3 deletions.
  1. +6 −3 src/app.coffee
View
@@ -22,9 +22,12 @@ app.post "/", (req, res) ->
project = "#{owner}-#{info.repository.name}"
- job = app.jinkies.job_for project
- job.triggerBuild branch, req.body.payload, (err, data) ->
- res.send data, {"Content-Type": "application/json"}, 200
+ if info.deleted or (info.created and info.commits.length == 0)
+ # ignore branch deletions, and new branches with no commits
+ else
+ job = app.jinkies.job_for project
+ job.triggerBuild branch, req.body.payload, (err, data) ->
+ res.send data, {"Content-Type": "application/json"}, 200
app.get "/jobs", (req, res) ->
app.jinkies.jobs (err, jobs) ->

0 comments on commit 5d86ccf

Please sign in to comment.