Skip to content

Limit automatic exclusion PR and commit titles - #8036

Merged
smlambert merged 4 commits into
masterfrom
copilot/fix-long-commit-pr-titles
Dec 1, 2026
Merged

smlambert merged 4 commits into
masterfrom
copilot/fix-long-commit-pr-titles

Conversation

@sophia-guo

@sophia-guo sophia-guo commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Automatic exclusion commands can generate excessively long PR titles and commit subjects, particularly when they list multiple tests.

  • Title limits: Truncate titles with ... so commit subjects remain within 72 characters, including the legacy AUTO: prefix.
  • Exclusion details: Preserve the full test list in the /exclude PR body.
  • Input handling: Use the first comment line when constructing titles and parsing test names.

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
@sophia-guo sophia-guo changed the title [WIP] Detect and shorten long commit and PR titles in AutoTestPR.yml Limit automatic exclusion PR and commit titles Nov 24, 2026
@sophia-guo

Copy link
Copy Markdown
Contributor Author

@copilot how would titles be truncate? I would prefer if there are multiple testcases just keep the first one all others can be truncated as .. .

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>

Copilot AI commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

@copilot how would titles be truncate? I would prefer if there are multiple testcases just keep the first one all others can be truncated as .. .

Updated in 873dc6d: multiple-test titles now show the first test followed by .... If that first name is too long, it is also truncated to keep the title within 72 characters. The full list remains in the PR body.

@sophia-guo
sophia-guo marked this pull request as ready for review November 24, 2026 20:18
Copilot AI balanced review requested due to automatic review settings November 24, 2026 20:18

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.

🟡 Changes recommended

The commit message lacks a blank line before the related-comment footer, causing Git to include the URL in the subject and exceed the 72-character limit.

1 open issue
What changed in this PR

This PR addresses #8035 by bounding titles generated by the automatic test-exclusion workflow while preserving the full /exclude test list in the PR body.

Changes:

  • Truncate generated titles with ..., reserving space for the legacy AUTO: prefix.
  • Use the first comment line for title construction and test-name parsing.
  • Add regression tests for length boundaries, multiple tests, multiline input, and Unicode.
File Description
scripts/​disabled_tests/​tests/​test_auto_test_pr_workflow.py Adds tests for title limits, input handling, and full test-list preservation.
.github/​workflows/​autoTestPR.yml Generates bounded titles and reuses them for PR titles and commit messages.

Review effort: Balanced

Comment thread .github/workflows/autoTestPR.yml Resolved
smlambert
smlambert previously approved these changes Nov 24, 2026
karianna
karianna previously approved these changes Nov 27, 2026
Fix formatting issues in autoTestPR.yml for commit message.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@sophia-guo
sophia-guo dismissed stale reviews from karianna and smlambert via 1a6b7ea November 30, 2026 15:08
@sophia-guo
sophia-guo requested review from andrew-m-leonard and smlambert and removed request for andrew-m-leonard December 1, 2026 14:52
@smlambert
smlambert merged commit 5dc05be into master Dec 1, 2026
4 checks passed
@smlambert
smlambert deleted the copilot/fix-long-commit-pr-titles branch December 1, 2026 20:29
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.

Github workflow AutoTestPR.yml can exceed char limits in commit and PR titles

5 participants