Add alpha and beta versions
This commit is contained in:
22
beta1/gitea_analyzer_app/parser.py
Normal file
22
beta1/gitea_analyzer_app/parser.py
Normal file
@@ -0,0 +1,22 @@
|
||||
def parse_repo_info(data):
|
||||
return (
|
||||
f"Название: {data.get('name', '—')}\n"
|
||||
f"Описание: {data.get('description') or '—'}\n"
|
||||
f"Автор: {data.get('owner', {}).get('login', '—')}\n"
|
||||
f"Создан: {data.get('created_at', '—')}\n"
|
||||
f"Изменён: {data.get('updated_at', '—')}\n"
|
||||
)
|
||||
|
||||
|
||||
def parse_authors(commits):
|
||||
authors = set()
|
||||
|
||||
for commit in commits:
|
||||
try:
|
||||
name = commit["commit"]["author"]["name"]
|
||||
if name:
|
||||
authors.add(name)
|
||||
except Exception:
|
||||
continue
|
||||
|
||||
return sorted(authors)
|
||||
Reference in New Issue
Block a user