Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Sweep: Fix this sentry error PREdited pull_request.body Input should …
…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]>
- Loading branch information