Revert "Shorten commit URLs in irc messages..."
This reverts commit ddc5d6e7ed
.
This commit is contained in:
parent
967be83623
commit
93e3b9f7b0
1 changed files with 1 additions and 9 deletions
|
@ -6,7 +6,6 @@
|
|||
# update hook for FI repos -> zodbot.
|
||||
|
||||
import os
|
||||
import requests
|
||||
import sys
|
||||
import subprocess
|
||||
import shlex
|
||||
|
@ -53,14 +52,7 @@ def construct_url(slug):
|
|||
lines = [line.strip() for line in f.readlines()]
|
||||
|
||||
if repo in lines and slug:
|
||||
url = tmpl.format(repo=repo, slug=slug)
|
||||
try:
|
||||
short_url = requests.get('https://da.gd/s?strip=1&url=' + url)
|
||||
if short_url.status_code == 200:
|
||||
return " " + short_url.text
|
||||
except:
|
||||
pass
|
||||
return " " + url
|
||||
return " " + tmpl.format(repo=repo, slug=slug)
|
||||
else:
|
||||
return ""
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue