aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkongr45gpen <electrovesta@gmail.com>2015-06-02 21:26:59 +0300
committerkongr45gpen <electrovesta@gmail.com>2015-06-02 21:26:59 +0300
commit643303860ce80fcbeecb06bc87d5c0ea5c96e4a4 (patch)
tree07a7df2a3d8ec89de4c7a6bcdf6da080d195c66d
parent225c1bc1664bb8b56b2ff72a42d70433282eeaaa (diff)
downloadsupybot_github-643303860ce80fcbeecb06bc87d5c0ea5c96e4a4.tar.gz
supybot_github-643303860ce80fcbeecb06bc87d5c0ea5c96e4a4.tar.bz2
supybot_github-643303860ce80fcbeecb06bc87d5c0ea5c96e4a4.zip
Show branch name for travis builds
-rw-r--r--local/handler/TravisHandler.py1
-rw-r--r--local/theme/DefaultTheme.py5
-rw-r--r--test.py2
3 files changed, 5 insertions, 3 deletions
diff --git a/local/handler/TravisHandler.py b/local/handler/TravisHandler.py
index bdfb484..3648422 100644
--- a/local/handler/TravisHandler.py
+++ b/local/handler/TravisHandler.py
@@ -3,6 +3,7 @@ from ..utility import *
def handle(data, theme):
if isStatusVisible(data['repository']['url'], data['status_message'].lower()):
theme.travis(
+ branch = data['branch'],
repo = data['repository']['name'],
status = data['status_message'],
commitId = data['commit'],
diff --git a/local/theme/DefaultTheme.py b/local/theme/DefaultTheme.py
index 1645cf4..48badb8 100644
--- a/local/theme/DefaultTheme.py
+++ b/local/theme/DefaultTheme.py
@@ -135,8 +135,9 @@ class DefaultTheme(Theme):
pageurl,
))
- def travis(self, repo, status, commitId, commitMessage, commitAuthor, buildUrl):
- self.msgs.append( "%s: Build status: %s * %s by %s (%s - %s)" % (
+ def travis(self, branch, repo, status, commitId, commitMessage, commitAuthor, buildUrl):
+ self.msgs.append( "%s @ %s: Build status: %s * %s by %s (%s - %s)" % (
+ ircutils.bold(ircutils.mircColor(branch, "blue")),
ircutils.bold(repo),
colorAction(status.lower()),
ircutils.bold(commitId[0:6]),
diff --git a/test.py b/test.py
index d015c3b..be5d8cb 100644
--- a/test.py
+++ b/test.py
@@ -73,7 +73,7 @@ class GithubTestCase(ExpectationPluginTestCase):
self.sendRequest('travis-notification')
self.describe('first message',
- it().should.contain('minimal'),
+ it().should.contain('master @ minimal'),
it().should.contain('passed'),
it().should.contain('62aae'),
it().should.contain('Sven Fuchs'),

© 2014-2024 Faster IT GmbH | imprint | privacy policy