-
Notifications
You must be signed in to change notification settings - Fork 444
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sweep: Fix this sentry error PREdited pull_request.body Input should be a valid string #3899
Comments
🚀 Here's the PR! #3901💎 Sweep Pro: You have unlimited Sweep issues
Actions
Step 1: 🔎 SearchingHere are the code search results. I'm now analyzing these search results to write the PR. Relevant files (click to expand). Mentioned files will always appear here.Lines 1 to 221 in 6735e16
Lines 1 to 893 in 6735e16
sweep/sweepai/handlers/create_pr.py Lines 1 to 362 in 6735e16
sweep/sweepai/handlers/on_ticket.py Lines 1 to 798 in 6735e16
sweep/sweepai/config/client.py Lines 1 to 430 in 6735e16
sweep/sweepai/config/server.py Lines 1 to 214 in 6735e16
Step 2: ⌨️ Coding
|
…be a valid string (#3901) # Description This pull request addresses an issue where the `body` field of a pull request event could be `None`, which led to errors when attempting to create a `PREdited` object. The changes ensure that the `body` field is always a valid string, even if the original input is `None`. # Summary - Updated the handling of the `body` field in `pull_request` events to ensure it defaults to an empty string if `None`. - Modified the conditional check in `sweepai/api.py` to simplify the logic and prevent potential errors related to type handling. - Ensured that all `pull_request` events processed by the `handle_event` function in `sweepai/api.py` have a non-null `body` field. Fixes #3899. --- ### 💡 To get Sweep to edit this pull request, you can: * Comment below, and Sweep can edit the entire PR * Comment on a file, Sweep will only modify the commented file * Edit the original issue to get Sweep to recreate the PR from scratch *This is an automated message generated by [Sweep AI](https://sweep.dev).* --------- Co-authored-by: sweep-nightly[bot] <131841235+sweep-nightly[bot]@users.noreply.github.com> Co-authored-by: William Zeng <[email protected]> Co-authored-by: wwzeng1 <[email protected]>
sweepai/api.py in handle_event at line 814
The text was updated successfully, but these errors were encountered: