diff options
| author | 2019-10-19 17:09:04 +0100 | |
|---|---|---|
| committer | 2019-10-19 17:09:04 +0100 | |
| commit | 4cce0bb54eac6359b2b099c82a9f42c6834c37ab (patch) | |
| tree | 86b6061c8d6b131cd991911eb2d119e0b97b8cf9 /modules/git_webhooks/__init__.py | |
| parent | youtube playlist info should be returning URL as a tuple item (diff) | |
| signature | ||
dont shorten git webhook urls by default
Diffstat (limited to 'modules/git_webhooks/__init__.py')
| -rw-r--r-- | modules/git_webhooks/__init__.py | 4 |
1 files changed, 3 insertions, 1 deletions
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) |
