Skip to content

fix: Empty diff entries caused a 422 error from the GitHub Gists API #75

Merged
oeisenberg merged 2 commits intomainfrom
feat/review-debug-flag
Apr 14, 2026
Merged

fix: Empty diff entries caused a 422 error from the GitHub Gists API #75
oeisenberg merged 2 commits intomainfrom
feat/review-debug-flag

Conversation

@oeisenberg
Copy link
Copy Markdown
Contributor

@oeisenberg oeisenberg commented Apr 14, 2026

Summary

  • Add --debug flag to poly review command that enables DEBUG-level logging for easier troubleshooting
  • Fix bug where empty diff entries caused a 422 error from the GitHub Gists API (missing_field: files)

Test plan

  • Run poly review --debug and verify debug logs appear
  • Run poly review without --debug and verify only warnings are shown
  • Verify that projects with empty diffs no longer trigger a 422 gist creation error

🤖 Generated with Claude Code

…eation

Add a --debug flag to the review command that sets logging to DEBUG level,
making it easier to diagnose issues. Also fix a bug where empty diff entries
would cause a 422 error from the GitHub Gists API by skipping files with
no content.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions

This comment has been minimized.

The --debug flag is already handled globally in _run_command, so the
per-command logging setup in the review block was redundant. Also align
the --debug arg style with other subparsers.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

Coverage Report

Base (main) PR Change
71.5% 71.5% -0.0% ⚠️

Changed file coverage

File Coverage Change
poly/cli.py 43.4% -0.0% ⚠️

@oeisenberg oeisenberg changed the title feat: add --debug flag to poly review fix: git gists can't be created when a file has been deleted Apr 14, 2026
@oeisenberg oeisenberg changed the title fix: git gists can't be created when a file has been deleted fix: Empty diff entries caused a 422 error from the GitHub Gists API Apr 14, 2026
@oeisenberg oeisenberg requested a review from Ruari-Phipps April 14, 2026 10:00
@oeisenberg oeisenberg merged commit 6ffa08f into main Apr 14, 2026
3 checks passed
@oeisenberg oeisenberg deleted the feat/review-debug-flag branch April 14, 2026 10:06
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