From 4cce0bb54eac6359b2b099c82a9f42c6834c37ab Mon Sep 17 00:00:00 2001 From: jesopo Date: Sat, 19 Oct 2019 17:09:04 +0100 Subject: dont shorten git webhook urls by default --- modules/git_webhooks/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'modules/git_webhooks/__init__.py') diff --git a/modules/git_webhooks/__init__.py b/modules/git_webhooks/__init__.py index d43c310a..bdce810f 100644 --- a/modules/git_webhooks/__init__.py +++ b/modules/git_webhooks/__init__.py @@ -19,6 +19,8 @@ DEFAULT_EVENT_CATEGORIES = [ "Hide/show organisation in repository names")) @utils.export("channelset", utils.BoolSetting("git-hide-prefix", "Hide/show command-like prefix on git webhook outputs")) +@utils.export("channelset", utils.BoolSetting("git-shorten-urls", + "Weather or not git webhook URLs should be shortened")) @utils.export("botset", utils.BoolSetting("git-show-private", "Whether or not to show git activity for private repositories")) class Module(ModuleManager.BaseModule): @@ -122,7 +124,7 @@ class Module(ModuleManager.BaseModule): output = "(%s) %s" % ( utils.irc.color(source, colors.COLOR_REPO), output) - if url: + if url and channel.get_setting("git-shorten-urls", False): shorturl = self.exports.get_one("shorturl")(server, url, context=channel) or url output = "%s - %s" % (output, shorturl) -- cgit v1.3.1-10-gc9f91