-
-
Save bronzehedwick/68969fd36341e5631ddb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Description | |
# A command to check Github's web status | |
# | |
# Dependencies: | |
# None | |
# | |
# Configuration: | |
# None | |
# | |
# Commands: | |
# hubot github status - Returns Github's status | |
# | |
# Notes: | |
# | |
# | |
# Author: | |
# bronzehedwick | |
module.exports = (robot) -> | |
robot.respond /(github)( status)?/i, (msg) -> | |
msg.http('https://status.github.com/api/last-message.json') | |
.get() (err, res, body) -> | |
data = JSON.parse(body) | |
msg.send data.body | |
msg.send data.created_on |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment