Skip to content

fix(git-ops): truncate PR body to stay within GitHub's character limit#30

Merged
EspenAlbert merged 9 commits intomainfrom
pr-body-truncate
Feb 25, 2026
Merged

fix(git-ops): truncate PR body to stay within GitHub's character limit#30
EspenAlbert merged 9 commits intomainfrom
pr-body-truncate

Conversation

@EspenAlbert
Copy link
Copy Markdown
Owner

@EspenAlbert EspenAlbert commented Feb 25, 2026

Summary

GitHub rejects PR bodies exceeding 65,536 characters. This causes create_or_update_pr and update_pr_body to fail when path-sync generates large command output (e.g., verbose dependency update logs).

Adds a _truncate_body helper that caps the body at 64,536 characters (with a 1,000-char buffer) and appends a truncation notice. Applied in both update_pr_body and create_or_update_pr.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Feb 25, 2026

Codecov Report

❌ Patch coverage is 33.33333% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 65.38%. Comparing base (8edafab) to head (9ea4aa8).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
path_sync/_internal/git_ops.py 33.33% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #30      +/-   ##
==========================================
- Coverage   65.55%   65.38%   -0.17%     
==========================================
  Files          24       24              
  Lines        1344     1352       +8     
==========================================
+ Hits          881      884       +3     
- Misses        463      468       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@EspenAlbert EspenAlbert changed the title todo update me with the PR title for branch pr-body-truncate fix(git-ops): truncate PR body to stay within GitHub's character limit Feb 25, 2026
@EspenAlbert EspenAlbert marked this pull request as ready for review February 25, 2026 07:07
@EspenAlbert EspenAlbert force-pushed the pr-body-truncate branch 2 times, most recently from 6dd5b4d to 9cea2ff Compare February 25, 2026 10:54
@EspenAlbert EspenAlbert merged commit 6daa8ed into main Feb 25, 2026
16 checks passed
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.

2 participants