Shorten the representation of long repo names

This commit is contained in:
Jack Grigg 2024-01-04 15:33:39 +00:00
parent fb57882712
commit 5c21905c82
1 changed files with 5 additions and 1 deletions

View File

@ -127,7 +127,11 @@ class GitHubIssue:
def __repr__(self):
if self.repo_id in REPOS:
repo = '/'.join(REPOS[self.repo_id])
repo = REPOS[self.repo_id]
# Shorten the representation of long repo names.
if repo[0] == 'Electric-Coin-Company':
repo = ('ECC', repo[1])
repo = '/'.join(repo)
return '%s#%d' % (repo, self.issue_number)
else:
return 'Unknown'