Skip to content

Commit

Permalink
try that instead
Browse files Browse the repository at this point in the history
  • Loading branch information
tmm1 committed Mar 9, 2011
1 parent f3c3c9d commit 0031d45
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "Translate GitHub post commits to Jenkins CI builds and back",
"keywords": "github post-receive hudson jenkins",
"author": "Corey Donohoe",
"version": "0.2.7",
"version": "0.2.8",
"licenses": [{
"type": "MIT",
"url": "http://github.com/atmos/jinkies/raw/master/LICENSE"
Expand Down
3 changes: 2 additions & 1 deletion src/app.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,13 @@ app.configure ->

app.post "/", (req, res) ->
info = JSON.parse(req.body.payload)
payload = info.payload
owner = info.repository.owner.name
branch = info["ref"].split("/")[2]

project = "#{owner}-#{info.repository.name}"

if info.deleted or (info.created and info.commits.length == 0)
if payload.deleted or (payload.created and payload.commits.length == 0)
# ignore branch deletions, and new branches with no commits
else
job = app.jinkies.job_for project
Expand Down

0 comments on commit 0031d45

Please sign in to comment.