Files
redmine-reporter/redmine_reporter/formatter_md.py
2026-01-24 16:09:25 +07:00

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)