aboutsummaryrefslogtreecommitdiff
path: root/modules/git_webhooks/__init__.py
diff options
context:
space:
mode:
authorGravatar jesopo2019-10-18 14:03:20 +0100
committerGravatar jesopo2019-10-18 14:03:20 +0100
commit86147ded77531c8a9b47a2033b697096c6c861be (patch)
tree0177cbe8d1c597d9a4d999b6ae352644cd4ce8ab /modules/git_webhooks/__init__.py
parentcorrectly color/phrase opened, closed and merged for MRs (diff)
signature
pass git_webhook urls up to __init__.py to be shortened
Diffstat (limited to 'modules/git_webhooks/__init__.py')
-rw-r--r--modules/git_webhooks/__init__.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/modules/git_webhooks/__init__.py b/modules/git_webhooks/__init__.py
index 721b2a26..d43c310a 100644
--- a/modules/git_webhooks/__init__.py
+++ b/modules/git_webhooks/__init__.py
@@ -118,10 +118,15 @@ class Module(ModuleManager.BaseModule):
if repo_name and hide_org:
source = repo_name
- for output in outputs:
+ for output, url in outputs:
output = "(%s) %s" % (
utils.irc.color(source, colors.COLOR_REPO), output)
+ if url:
+ shorturl = self.exports.get_one("shorturl")(server, url,
+ context=channel) or url
+ output = "%s - %s" % (output, shorturl)
+
if channel.get_setting("git-prevent-highlight", False):
output = self._prevent_highlight(server, channel,
output)