diff options
author | kongr45gpen <electrovesta@gmail.com> | 2016-09-16 14:45:30 +0300 |
---|---|---|
committer | kongr45gpen <electrovesta@gmail.com> | 2016-09-16 14:45:30 +0300 |
commit | af9f6faad73a4cc0e75394d4ff99134619164c05 (patch) | |
tree | 19d2ce253e7efb72ad1b9799cf13668a3b89bfe1 | |
parent | c1a40b6366fbc553cd8a15f5898de903ac05ecc0 (diff) | |
download | supybot_github-af9f6faad73a4cc0e75394d4ff99134619164c05.tar.gz supybot_github-af9f6faad73a4cc0e75394d4ff99134619164c05.tar.bz2 supybot_github-af9f6faad73a4cc0e75394d4ff99134619164c05.zip |
Add configuration option to hide pending statuses
-rw-r--r-- | config.py | 4 | ||||
-rw-r--r-- | local/handler/StatusHandler.py | 3 |
2 files changed, 7 insertions, 0 deletions
@@ -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'], |