| 114 | } |
| 115 | |
| 116 | function buildSummary({ totalReposChecked, archivedFindings, outdatedFindings, cutoffDate }) { |
| 117 | const lines = []; |
| 118 | lines.push('# Repo Checks'); |
| 119 | lines.push(''); |
| 120 | lines.push(`- GitHub repos checked: ${totalReposChecked}`); |
| 121 | lines.push(`- Archived findings: ${archivedFindings.length}`); |
| 122 | lines.push(`- Outdated community project findings: ${outdatedFindings.length}`); |
| 123 | lines.push(`- Community staleness cutoff: ${cutoffDate.toISOString().slice(0, 10)} (${MAX_AGE_MONTHS} months)`); |
| 124 | lines.push(''); |
| 125 | lines.push(...buildTable('Archived Repositories', archivedFindings)); |
| 126 | lines.push(...buildTable('Outdated Community Projects', outdatedFindings)); |
| 127 | return lines.join('\n'); |
| 128 | } |
| 129 | |
| 130 | async function writeGitHubSummary(markdown) { |
| 131 | const summaryPath = process.env.GITHUB_STEP_SUMMARY; |