aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkongr45gpen <electrovesta@gmail.com>2016-09-16 14:45:30 +0300
committerkongr45gpen <electrovesta@gmail.com>2016-09-16 14:45:30 +0300
commitaf9f6faad73a4cc0e75394d4ff99134619164c05 (patch)
tree19d2ce253e7efb72ad1b9799cf13668a3b89bfe1
parentc1a40b6366fbc553cd8a15f5898de903ac05ecc0 (diff)
downloadsupybot_github-af9f6faad73a4cc0e75394d4ff99134619164c05.tar.gz
supybot_github-af9f6faad73a4cc0e75394d4ff99134619164c05.tar.bz2
supybot_github-af9f6faad73a4cc0e75394d4ff99134619164c05.zip
Add configuration option to hide pending statuses
-rw-r--r--config.py4
-rw-r--r--local/handler/StatusHandler.py3
2 files changed, 7 insertions, 0 deletions
diff --git a/config.py b/config.py
index dc29ba4..f91f05b 100644
--- a/config.py
+++ b/config.py
@@ -79,4 +79,8 @@ conf.registerGlobalValue(Github, 'showIssueEdits',
registry.Boolean(True,
"""Whether to show a message when an issue is edited"""))
+conf.registerGlobalValue(Github, 'showPendingStatuses',
+ registry.Boolean(True,
+ """Whether to show a message for a pending status (e.g. a build in progress)"""))
+
# vim:set shiftwidth=4 tabstop=4 expandtab textwidth=79:
diff --git a/local/handler/StatusHandler.py b/local/handler/StatusHandler.py
index 55114f4..4c56493 100644
--- a/local/handler/StatusHandler.py
+++ b/local/handler/StatusHandler.py
@@ -1,6 +1,9 @@
from ..utility import *
def handle(data, theme):
+ if data['state'] == 'pending' and not configValue("showPendingStatuses"):
+ return
+
theme.status(
status = data['state'],
description = data['description'],

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