diff options
author | kongr45gpen <electrovesta@gmail.com> | 2016-09-16 14:29:11 +0300 |
---|---|---|
committer | kongr45gpen <electrovesta@gmail.com> | 2016-09-16 14:29:53 +0300 |
commit | 39c85de3c09c23a46260e2f67ea624d94f7ae9a0 (patch) | |
tree | c811aa67f5595daa2a16ae84f70ac545c6a21f16 | |
parent | 2778649953c9544b4ff0f2e4b50ef6d9e04a261b (diff) | |
download | supybot_github-39c85de3c09c23a46260e2f67ea624d94f7ae9a0.tar.gz supybot_github-39c85de3c09c23a46260e2f67ea624d94f7ae9a0.tar.bz2 supybot_github-39c85de3c09c23a46260e2f67ea624d94f7ae9a0.zip |
Add configuration option to hide issue edits
-rw-r--r-- | config.py | 4 | ||||
-rw-r--r-- | local/handler/IssueHandler.py | 3 |
2 files changed, 7 insertions, 0 deletions
@@ -75,4 +75,8 @@ conf.registerGlobalValue(Github, 'preventIssueNameSpam', registry.Boolean(True, """Whether to prevent the same issue name from showing up too often""")) +conf.registerGlobalValue(Github, 'showIssueEdits', + registry.Boolean(True, + """Whether to show a message when an issue is edited""")) + # vim:set shiftwidth=4 tabstop=4 expandtab textwidth=79: diff --git a/local/handler/IssueHandler.py b/local/handler/IssueHandler.py index 68317c8..d64f330 100644 --- a/local/handler/IssueHandler.py +++ b/local/handler/IssueHandler.py @@ -10,6 +10,9 @@ def handle(data, theme): else: type = 'something' + if data['action'] == 'edited' and not configValue("showIssueEdits"): + return + milestone = '' if issue['milestone'] and configValue("showMilestone"): milestone = issue['milestone']['title'] |