Skip to content

Truncate issue#32

Merged
maryliag merged 3 commits into
open-telemetry:mainfrom
maryliag:truncate-issue
Jul 2, 2026
Merged

Truncate issue#32
maryliag merged 3 commits into
open-telemetry:mainfrom
maryliag:truncate-issue

Conversation

@maryliag

@maryliag maryliag commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Workflow is failing for large repo with hundreds of PRs (e.g. opentelemetry-collector-contrib), because of the limit of characters on the issue body.
This PR adds an option to limit the amount of PRs per section and also to skip draft entirely.

Copilot AI review requested due to automatic review settings July 2, 2026 18:44
@maryliag maryliag requested review from a team and trask as code owners July 2, 2026 18:44

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds configurability to prevent the Pull Request Dashboard issue body from exceeding GitHub’s issue-body size limit in very large repositories by allowing row truncation per section and optionally omitting drafts.

Changes:

  • Introduces max_rows_per_section to cap rendered rows per routing section (and drafts) and adds a “More X PRs not shown” truncation note.
  • Introduces skip_drafts to optionally omit the Draft pull requests section entirely.
  • Wires both options through the reusable workflow inputs, repository configuration, CLI flags, and rendering logic.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
pull-request-dashboard/README.md Documents new max_rows_per_section and skip_drafts configuration options.
.github/workflows/pull-request-dashboard.yml Passes new matrix options through to the reusable workflow.
.github/workflows/pull-request-dashboard-repo.yml Adds workflow_call inputs and forwards them into the dashboard CLI invocation.
.github/scripts/pull-request-dashboard/repositories.json Enables truncation + draft skipping for opentelemetry-collector-contrib.
.github/scripts/pull-request-dashboard/render.py Implements row limiting + truncation note; adds optional draft skipping.
.github/scripts/pull-request-dashboard/dashboard.py Adds CLI flags and forwards them into rendering.
Comments suppressed due to low confidence (1)

.github/scripts/pull-request-dashboard/dashboard.py:1140

  • --max-rows-per-section accepts negative values today; because the value is later used for slicing, a negative number would drop rows from the end and compute an incorrect truncation count. Since the flag documents 0 = no limit, reject values < 0 during argument validation.
    args = parser.parse_args()
    if args.required_approvals < 1:
        parser.error("--required-approvals must be at least 1")
    with state_branch.temporary_state_dir() as state_dir:

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/scripts/pull-request-dashboard/render.py
@maryliag maryliag merged commit 2e8f2c7 into open-telemetry:main Jul 2, 2026
5 checks passed
@maryliag maryliag deleted the truncate-issue branch July 2, 2026 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants