[flatpak] improvement: only displaying the commit's 8 first characters

This commit is contained in:
Vinicius Moreira
2020-11-30 17:51:04 -03:00
parent 288810ca2d
commit ef28a18d02
2 changed files with 7 additions and 0 deletions

View File

@@ -261,6 +261,9 @@ def get_app_commits_data(app_ref: str, origin: str, installation: str) -> List[d
attr = data[0].strip().lower()
commit[attr] = data[1].strip()
if attr == 'commit':
commit[attr] = commit[attr][0:8]
if attr == 'date':
commit[attr] = datetime.strptime(commit[attr], '%Y-%m-%d %H:%M:%S +0000')