From 904cb2d94cb7c7a7ebc5769b05cecbdbef32f6c7 Mon Sep 17 00:00:00 2001 From: David Schultz Date: Wed, 19 Jan 2022 21:32:50 -0600 Subject: [PATCH] git_webhooks/github.py: remove git url shortening --- modules/git_webhooks/github.py | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/modules/git_webhooks/github.py b/modules/git_webhooks/github.py index 8bf61114..8ead7b9c 100644 --- a/modules/git_webhooks/github.py +++ b/modules/git_webhooks/github.py @@ -172,15 +172,10 @@ class GitHub(object): return list(zip(out, [None]*len(out))) def _short_url(self, url): - self.log.debug("git.io shortening: %s" % url) - try: - page = utils.http.request("https://git.io", method="POST", - post_data={"url": url}) - return page.headers["Location"] - except utils.http.HTTPTimeoutException: - self.log.warn( - "HTTPTimeoutException while waiting for github short URL", []) - return url + # TODO: find an alternative to git.io + # see https://github.com/jesopo/bitbot/issues/338 + # ~ examknow 1/19/2022 + return url def _iso8601(self, s): return utils.datetime.parse.iso8601(s)