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

Add Commands to set/unset context for janky #1421

Merged
merged 2 commits into from May 7, 2014

Conversation

Mezzle
Copy link
Contributor

@Mezzle Mezzle commented Apr 23, 2014

This requires github/janky#197

@technicalpickles
Copy link
Contributor

cc @bhuga @atmos

@atmos
Copy link
Contributor

atmos commented Apr 24, 2014


robot.respond /ci unset context ([-_0-9a-zA-Z\.]+)$/i, (msg) ->
repo = msg.match[1]
delete "#{repo}/context", {}, (err, statusCode, body) ->
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be del, right?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️ js

On Sun, May 4, 2014 at 7:00 PM, Ben Lavender notifications@github.comwrote:

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 GitHubhttps://github.com//pull/1421/files#r12266033
.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup :)

technicalpickles added a commit that referenced this pull request May 7, 2014
Add Commands to set/unset context for janky
@technicalpickles technicalpickles merged commit 6998d09 into github:master May 7, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants