remove from diagnostic section#33
Conversation
There was a problem hiding this comment.
Pull request overview
This PR extends the max_rows_per_section cap—previously applied only to the "Waiting on …" tables and the drafts table—to also cover the Diagnostics section, preventing the dashboard issue body from exceeding GitHub's 65,536-character limit in very large repositories.
Changes:
- Refactored
render_diagnostics_sectionto acceptmax_rows_per_section, pre-filter PRs with content into a list, apply_limit_rows, and append a_truncation_notewhen rows are dropped. - Threaded
max_rows_per_sectionthrough the single call site inrender_pr_tables. - Enhanced the dashboard-write log line to report the rendered character count against the 65,536 limit, and updated the README to reflect that the cap now includes the Diagnostics block.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
.github/scripts/pull-request-dashboard/render.py |
Applies the row cap and truncation note to the diagnostics section and passes the cap from the caller. |
.github/scripts/pull-request-dashboard/dashboard.py |
Adds rendered character count to the write log for easier size diagnostics. |
pull-request-dashboard/README.md |
Documents that the cap now applies to the Diagnostics block. |
The refactored render_diagnostics_section preserves the original filtering behavior (PRs with classifications or errors), correctly returns early on empty content, and applies truncation consistently with render_draft_pr_section and the route tables via the shared _limit_rows/_truncation_note helpers. The README section names match the code, and there are no test files for these scripts, so no test-coverage feedback applies. No issues found.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Prior PR added a cap to the tables, but I forgot to add the same cap to the diagnostic section.
Also printed the size of the body, to help with debug