:heart: js


On Sun, May 4, 2014 at 7:00 PM, Ben Lavender <notifications@github.com>wrote:

> In src/scripts/janky.coffee:
>
> > @@ -141,6 +141,23 @@ module.exports = (robot) ->
> >        else
> >          msg.send "I couldn't update the room. Got HTTP status #{statusCode}"
> >
> > +  robot.respond /ci set context ([-_0-9a-zA-Z\.]+) (.*)$/i, (msg) ->
> > +    repo = msg.match[1]
> > +    context = encodeURIComponent(msg.match[2])
> > +    put "#{repo}/context?context=#{context}", {}, (err, statusCode, body) ->
> > +      if [404, 403, 200].indexOf(statusCode) > -1
> > +        msg.send body
> > +      else
> > +        msg.send "I couldn't update the context. Got HTTP status #{statusCode}"
> > +
> > +  robot.respond /ci unset context ([-_0-9a-zA-Z\.]+)$/i, (msg) ->
> > +    repo = msg.match[1]
> > +    delete "#{repo}/context", {}, (err, statusCode, body) ->
>
> This needs to be del, right?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/github/hubot-scripts/pull/1421/files#r12266033>
> .
>