Skip to content
This repository has been archived by the owner on Jun 8, 2023. It is now read-only.

Commit

Permalink
Janky accepts an optional template parameter
Browse files Browse the repository at this point in the history
See discussion on Janky pull
github/janky#127
  • Loading branch information
Iristyle committed Jan 4, 2013
1 parent 604ebcb commit b272a16
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/scripts/janky.coffee
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -88,10 +88,13 @@ module.exports = (robot) ->


msg.send response msg.send response


robot.respond /ci setup ([\.\-\/_a-z0-9]+)(\s?([\.\-_a-z0-9]+))?/i, (msg) -> robot.respond /ci setup ([\.\-\/_a-z0-9]+)(\s?([\.\-_a-z0-9]+))?(\s?([\.\-_a-z0-9]+))?/i, (msg) ->
nwo = msg.match[1] nwo = msg.match[1]
params = "?nwo=#{nwo}" params = "?nwo=#{nwo}"
params += "&name=#{msg.match[3]}" if msg.match[3] != undefined if msg.match[3] != undefined
params += "&name=#{msg.match[3]}"
if msg.match[5] != undefined
params += "&template=#{msg.match[5]}"


post "setup#{params}", {}, (err, statusCode, body) -> post "setup#{params}", {}, (err, statusCode, body) ->
if statusCode == 201 if statusCode == 201
Expand Down

0 comments on commit b272a16

Please sign in to comment.