From 12181bfec6c3219571d50779a21e649f23e2b030 Mon Sep 17 00:00:00 2001 From: jesopo Date: Tue, 25 Jun 2019 17:53:00 +0100 Subject: Add system to have multiple url shorteners and chose which to use --- modules/git_webhooks/__init__.py | 5 +++++ modules/git_webhooks/github.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'modules/git_webhooks') diff --git a/modules/git_webhooks/__init__.py b/modules/git_webhooks/__init__.py index 55a45999..83e27d68 100644 --- a/modules/git_webhooks/__init__.py +++ b/modules/git_webhooks/__init__.py @@ -1,3 +1,8 @@ +#--depends-on channel_access +#--depends-on check_mode +#--depends-on commands +#--depends-on shorturl + import itertools, json, re, urllib.parse from src import ModuleManager, utils from . import colors, gitea, github diff --git a/modules/git_webhooks/github.py b/modules/git_webhooks/github.py index 1df948e4..a5fd32ed 100644 --- a/modules/git_webhooks/github.py +++ b/modules/git_webhooks/github.py @@ -343,7 +343,7 @@ class GitHub(object): url = "" if data["check_run"]["details_url"]: url = data["check_run"]["details_url"] - url = " - %s" % self.exports.get_one("shortlink")(url) + url = " - %s" % self.exports.get_one("shorturl-any")(url) duration = "" if data["check_run"]["completed_at"]: -- cgit v1.3.1-10-gc9f91