From af9f6faad73a4cc0e75394d4ff99134619164c05 Mon Sep 17 00:00:00 2001 From: kongr45gpen Date: Fri, 16 Sep 2016 14:45:30 +0300 Subject: Add configuration option to hide pending statuses --- config.py | 4 ++++ local/handler/StatusHandler.py | 3 +++ 2 files changed, 7 insertions(+) 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'], -- cgit v1.2.3