Skip to content

Commit 2d09618

Browse files
committed
feat(reports): add automation percentage to summary table
Move automation percentage from Bot Activity section to summary table for better visibility. Shows percentage and full breakdown (245 bot PRs out of 389 total PRs) to give immediate insight into automation levels. Resolves pending todo: simplify bot activity table visibility. Assisted-by: Claude Sonnet 4.5 via GitHub Copilot
1 parent 595c817 commit 2d09618

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

reports/2026-01-31-report.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import GitHubProfileCard from '@site/src/components/GitHubProfileCard';
1313
| | |
1414
|--------|-------|
1515
| **Total Items** | 144 (36 planned, 108 opportunistic) |
16+
| **Automation** | 63.0% (245 bot PRs out of 389 total PRs) |
1617
| **Contributors** | 23 total, 10 new |
1718

1819

scripts/lib/markdown-generator.mjs

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,22 @@ import GitHubProfileCard from '@site/src/components/GitHubProfileCard';
113113
// Calculate total items
114114
const totalItems = plannedItems.length + opportunisticItems.length;
115115

116+
// Calculate automation percentage for summary
117+
const totalBotPRs = botActivity.reduce(
118+
(sum, activity) => sum + activity.count,
119+
0,
120+
);
121+
const totalHumanPRs = plannedItems.length + opportunisticItems.length;
122+
const totalPRs = totalHumanPRs + totalBotPRs;
123+
const automationPercentage = ((totalBotPRs / totalPRs) * 100).toFixed(1);
124+
116125
// Generate summary section as compact table
117126
const summary = `# Summary
118127
119128
| | |
120129
|--------|-------|
121130
| **Total Items** | ${totalItems} (${plannedItems.length} planned, ${opportunisticItems.length} opportunistic) |
131+
| **Automation** | ${automationPercentage}% (${totalBotPRs} bot PRs out of ${totalPRs} total PRs) |
122132
| **Contributors** | ${contributors.length} total, ${newContributors.length} new |
123133
`;
124134

@@ -230,13 +240,7 @@ ${kindSections}`;
230240
);
231241

232242
// Generate bot activity section (non-homebrew only, since homebrew is now under Development)
233-
// Calculate total PRs (human + all bots including homebrew)
234-
const totalBotPRs = botActivity.reduce(
235-
(sum, activity) => sum + activity.count,
236-
0,
237-
);
238-
const totalHumanPRs = plannedItems.length + opportunisticItems.length;
239-
const totalPRs = totalHumanPRs + totalBotPRs;
243+
// Note: totalBotPRs, totalHumanPRs, totalPRs already calculated above for summary
240244

241245
const botSection = generateBotActivitySection(
242246
otherBotActivity,

0 commit comments

Comments
 (0)