1
0

environments.py aktualisiert

This commit is contained in:
Denys Konovalov 2023-09-23 21:30:04 +02:00
parent 623221502c
commit e450ecfc61

@ -13,6 +13,7 @@ class Environment:
github_repository,
github_sha,
github_actor,
github_run_id
tag
):
self.chat_id = chat_id
@ -26,6 +27,7 @@ class Environment:
self.github_repository = github_repository
self.github_sha = github_sha
self.github_actor = github_actor
self.github_run_id = github_run_id
self.tag = tag
def get_link(self):
@ -33,7 +35,7 @@ class Environment:
return f'https://api.telegram.org/bot{self.token}/sendMessage'
def get_commit_link(self):
'''Get link to commit'''
return f'https://github.com/{self.github_repository}/commit/{self.github_sha}'
return f'https://git.cantorgymnasium.de/{self.github_repository}/commit/{self.github_sha}'
def __fix_commit_message(self, message):
'''Replacing unsupported characters'''
replace_dict = {'<':'(', '>':')', '\n':'\n '}