Add formatters module (JSON, Markdown, HTML, Dashboard)
This commit is contained in:
@@ -35,30 +35,6 @@ class MarkdownFormatter(BaseFormatter):
|
|||||||
f"- **Commits/Day**: {va.commits_per_day:.1f}",
|
f"- **Commits/Day**: {va.commits_per_day:.1f}",
|
||||||
f"- **Commits/Week**: {va.commits_per_week:.1f}",
|
f"- **Commits/Week**: {va.commits_per_week:.1f}",
|
||||||
f"- **Trend**: {va.velocity_trend}",
|
f"- **Trend**: {va.velocity_trend}",
|
||||||
f"- **Most Active Day**: {va.most_active_day}",
|
|
||||||
"",
|
|
||||||
])
|
|
||||||
|
|
||||||
if hasattr(data, "code_churn_analysis") and data.code_churn_analysis:
|
|
||||||
cc = data.code_churn_analysis
|
|
||||||
lines.extend([
|
|
||||||
"## Code Churn",
|
|
||||||
f"- **Lines Added**: {cc.total_lines_added:,}",
|
|
||||||
f"- **Lines Deleted**: {cc.total_lines_deleted:,}",
|
|
||||||
f"- **Net Change**: {cc.net_change:+,}",
|
|
||||||
f"- **Avg Churn/Commit**: {cc.average_churn_per_commit:.1f}",
|
|
||||||
"",
|
|
||||||
])
|
|
||||||
|
|
||||||
if hasattr(data, "risky_commit_analysis") and data.risky_commit_analysis:
|
|
||||||
ra = data.risky_commit_analysis
|
|
||||||
lines.extend([
|
|
||||||
"## Risky Commits",
|
|
||||||
f"- **Total Risky**: {ra.total_risky_commits}",
|
|
||||||
f"- **Risk Score**: {ra.risk_score:.1f}%",
|
|
||||||
f"- **Large Changes**: {len(ra.large_change_commits)}",
|
|
||||||
f"- **Merge Commits**: {len(ra.merge_commits)}",
|
|
||||||
f"- **Reverts**: {len(ra.revert_commits)}",
|
|
||||||
"",
|
"",
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user