Skip to content
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: Refactor edit_sweep_comment function in on_ticket.py to remove nonlocal usage #4026

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

sweep-nightly[bot]
Copy link
Contributor

@sweep-nightly sweep-nightly bot commented Jun 17, 2024

Purpose

This pull request refactors the edit_sweep_comment function in the on_ticket.py file to remove the use of nonlocal variables. Instead, all necessary variables are passed as arguments to the function.

Description

The main changes in this pull request are:

  1. The edit_sweep_comment function now takes additional arguments: current_index, user_token, g, repo, issue_comment, initial_sandbox_response, and initial_sandbox_response_file.
  2. The nonlocal usage has been removed from the edit_sweep_comment function, and all necessary variables are now passed as arguments.
  3. The function calls to edit_sweep_comment have been updated to include the new arguments.

Summary

  • Refactored edit_sweep_comment function in sweepai/handlers/on_ticket.py to remove nonlocal usage
  • Added new arguments to the edit_sweep_comment function to pass all necessary variables
  • Updated all calls to edit_sweep_comment to include the new arguments

Fixes #3672.


Tip

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.

@sweep-nightly sweep-nightly bot added the sweep Assigns Sweep to an issue or pull request. label Jun 17, 2024
Copy link

vercel bot commented Jun 17, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sweep-chat 🔄 Building (Inspect) Visit Preview 💬 Add feedback Jun 17, 2024 9:25pm
sweep-chat-demo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 17, 2024 9:25pm
sweep-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 17, 2024 9:25pm
sweep-pulley 🔄 Building (Inspect) Visit Preview 💬 Add feedback Jun 17, 2024 9:25pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sweep Assigns Sweep to an issue or pull request.
Projects
None yet
1 participant