20 lines
546 B
Python
20 lines
546 B
Python
from typing import List
|
|
from .types import ReportRow
|
|
|
|
|
|
def format_md(rows: List[ReportRow]) -> str:
|
|
lines = [
|
|
"| Проект | Версия | Задача | Статус | Затрачено |",
|
|
"|--------|--------|--------|--------|-----------|"
|
|
]
|
|
|
|
for r in rows:
|
|
task_cell = f"{r['issue_id']}. {r['subject']}"
|
|
|
|
lines.append(
|
|
f"| {r['display_project']} | {r['display_version']} "
|
|
f"| {task_cell} | {r['status_ru']} | {r['time_text']} |"
|
|
)
|
|
|
|
return "\n".join(lines)
|