aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkongr45gpen <electrovesta@gmail.com>2016-09-16 14:29:11 +0300
committerkongr45gpen <electrovesta@gmail.com>2016-09-16 14:29:53 +0300
commit39c85de3c09c23a46260e2f67ea624d94f7ae9a0 (patch)
treec811aa67f5595daa2a16ae84f70ac545c6a21f16
parent2778649953c9544b4ff0f2e4b50ef6d9e04a261b (diff)
downloadsupybot_github-39c85de3c09c23a46260e2f67ea624d94f7ae9a0.tar.gz
supybot_github-39c85de3c09c23a46260e2f67ea624d94f7ae9a0.tar.bz2
supybot_github-39c85de3c09c23a46260e2f67ea624d94f7ae9a0.zip
Add configuration option to hide issue edits
-rw-r--r--config.py4
-rw-r--r--local/handler/IssueHandler.py3
2 files changed, 7 insertions, 0 deletions
diff --git a/config.py b/config.py
index a56e3f2..dc29ba4 100644
--- a/config.py
+++ b/config.py
@@ -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']

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