aboutsummaryrefslogtreecommitdiffstats
path: root/local
diff options
context:
space:
mode:
authorkongr45gpen <electrovesta@gmail.com>2017-01-04 00:50:12 +0200
committerkongr45gpen <electrovesta@gmail.com>2017-01-04 00:50:12 +0200
commit81fc93a87a978735130cec0011ba3fb1eec90116 (patch)
tree604cf3cc0520dd946c0f56d811c1292eef1b868d /local
parent7f46f55d67c50f50dc51a00d2487250c4c1e5e94 (diff)
downloadsupybot_github-81fc93a87a978735130cec0011ba3fb1eec90116.tar.gz
supybot_github-81fc93a87a978735130cec0011ba3fb1eec90116.tar.bz2
supybot_github-81fc93a87a978735130cec0011ba3fb1eec90116.zip
Show force pushes even if push display is disabled
Closes #15
Diffstat (limited to 'local')
-rw-r--r--local/handler/GithubHandler.py1
-rw-r--r--local/handler/PushHandler.py4
2 files changed, 4 insertions, 1 deletions
diff --git a/local/handler/GithubHandler.py b/local/handler/GithubHandler.py
index ce6edd2..6a7d075 100644
--- a/local/handler/GithubHandler.py
+++ b/local/handler/GithubHandler.py
@@ -41,6 +41,7 @@ import IssueCommentHandler
from .. import theme as themes
+#TODO: Use a better name and location for this
class GithubHandler(BaseHTTPServer.BaseHTTPRequestHandler):
def do_POST(s):
"""Respond to a POST request."""
diff --git a/local/handler/PushHandler.py b/local/handler/PushHandler.py
index 13052a3..903b1b6 100644
--- a/local/handler/PushHandler.py
+++ b/local/handler/PushHandler.py
@@ -46,7 +46,9 @@ def handle(data, theme):
regularCommitCount = len(data['commits']) - mergedCommitCount
isMerge = True
- if configValue("hidePush",None) == False and not branched:
+ visible = configValue("hidePush") == False or (configValue("alwaysShowForcedPushes") == True and data['forced'])
+
+ if visible and not branched:
theme.push(
branch = branch,
actor = data['pusher']['name'],

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