aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkongr45gpen <electrovesta@gmail.com>2016-09-16 14:21:25 +0300
committerkongr45gpen <electrovesta@gmail.com>2016-09-16 14:29:53 +0300
commit2778649953c9544b4ff0f2e4b50ef6d9e04a261b (patch)
treedad083336b1e4038aea4ad2f3543434fc6a1d100
parent97483dc403c2ac89f9647bfb5f4982c7f1e83259 (diff)
downloadsupybot_github-2778649953c9544b4ff0f2e4b50ef6d9e04a261b.tar.gz
supybot_github-2778649953c9544b4ff0f2e4b50ef6d9e04a261b.tar.bz2
supybot_github-2778649953c9544b4ff0f2e4b50ef6d9e04a261b.zip
Add config option to toggle preventing issue name spam
-rw-r--r--config.py4
-rw-r--r--local/utility.py4
2 files changed, 8 insertions, 0 deletions
diff --git a/config.py b/config.py
index a6f76e6..a56e3f2 100644
--- a/config.py
+++ b/config.py
@@ -71,4 +71,8 @@ conf.registerGlobalValue(Github, 'hideURL',
registry.Boolean(False,
"""Whether to not display the URLs of actions"""))
+conf.registerGlobalValue(Github, 'preventIssueNameSpam',
+ registry.Boolean(True,
+ """Whether to prevent the same issue name from showing up too often"""))
+
# vim:set shiftwidth=4 tabstop=4 expandtab textwidth=79:
diff --git a/local/utility.py b/local/utility.py
index 9120104..b16646f 100644
--- a/local/utility.py
+++ b/local/utility.py
@@ -168,6 +168,10 @@ def showIssueName(repoId, issueId):
"""Returns whether we should show the issue name for a repo issue"""
now = datetime.now()
+ if not configValue("preventIssueNameSpam"):
+ globals.shownIssues.clear()
+ return True
+
if not repoId in globals.shownIssues:
globals.shownIssues[repoId] = {}

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