mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-07 03:34:15 +02:00
flatpak: converting history string dates to datetime instances
This commit is contained in:
@@ -11,6 +11,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||
### Improvements
|
||||
- AUR:
|
||||
- Optional dependencies are not checked by default in their installation popup.
|
||||
- Flatpak:
|
||||
- History panel now shows formatted dates
|
||||
- History panel can now me maximized, minimized and allows to copy column content.
|
||||
- Minor UI improvements
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import re
|
||||
import subprocess
|
||||
from datetime import datetime
|
||||
from io import StringIO
|
||||
from typing import List
|
||||
|
||||
@@ -196,7 +197,11 @@ def get_app_commits_data(app_ref: str, origin: str) -> List[dict]:
|
||||
commit = {}
|
||||
|
||||
for idx, data in enumerate(res):
|
||||
commit[data[0].strip().lower()] = data[1].strip()
|
||||
attr = data[0].strip().lower()
|
||||
commit[attr] = data[1].strip()
|
||||
|
||||
if attr == 'date':
|
||||
commit[attr] = datetime.strptime(commit[attr], '%Y-%m-%d %H:%M:%S +0000')
|
||||
|
||||
if (idx + 1) % 3 == 0:
|
||||
commits.append(commit)
|
||||
|
||||
Reference in New Issue
Block a user