diff options
author | kongr45gpen <electrovesta@gmail.com> | 2016-09-16 14:21:25 +0300 |
---|---|---|
committer | kongr45gpen <electrovesta@gmail.com> | 2016-09-16 14:29:53 +0300 |
commit | 2778649953c9544b4ff0f2e4b50ef6d9e04a261b (patch) | |
tree | dad083336b1e4038aea4ad2f3543434fc6a1d100 | |
parent | 97483dc403c2ac89f9647bfb5f4982c7f1e83259 (diff) | |
download | supybot_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.py | 4 | ||||
-rw-r--r-- | local/utility.py | 4 |
2 files changed, 8 insertions, 0 deletions
@@ -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] = {} |