Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Travis me! #3

Merged
merged 2 commits into from

3 participants

@sferik
me:    hubot travis me sferik/rails_admin
hubot: Build status for sferik/rails_admin: Passing
@holman holman merged commit df62eba into github:master
@holman

Heck yeah, Travis.

@joshk

hahaha, great work @sferik!

Would be cool to be able to specify the branch as well.

hubot travis me sferik/rails_admin#master

:heart::heart::heart:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 25, 2011
  1. @sferik

    Travis me!

    sferik authored
  2. @sferik

    Move into scripts

    sferik authored
This page is out of date. Refresh to see the latest.
Showing with 17 additions and 0 deletions.
  1. +17 −0 src/scripts/travis.coffee
View
17 src/scripts/travis.coffee
@@ -0,0 +1,17 @@
+# Find the build status of an open-source project on Travis
+#
+# hubot <travis me> sferik/rails_admin - Returns the build status of https://github.com/sferik/rails_admin
+#
+
+module.exports = (robot) ->
+ robot.respond /travis me (.*)/i, (msg) ->
+ project = escape(msg.match[1])
+ msg.http("http://travis-ci.org/#{project}.json")
+ .get() (err, res, body) ->
+ response = JSON.parse(body)
+ if response.last_build_status == 0
+ msg.send "Build status for #{project}: Passing"
+ else if response.last_build_status == 1
+ msg.send "Build status for #{project}: Failing"
+ else
+ msg.send "Build status for #{project}: Unknown"
Something went wrong with that request. Please try again.