sweepai / sweep

Sweep: open-source AI-powered Software Developer for small features and bug fixes.
https://sweep.dev
Other
7.45k stars 426 forks source link

Sweep: in on_ticket.py, move the "Install Sweep Configs: Pull Request" above the email line #2918

Open kevinlu1248 opened 9 months ago

kevinlu1248 commented 9 months ago
Checklist - [X] Modify `sweepai/handlers/on_ticket.py` βœ“ https://github.com/sweepai/sweep/commit/7dbe4245fc1bb2fb211840bb2b84fe981bc58466 [Edit](https://github.com/sweepai/sweep/edit/sweep/in_on_ticketpy_move_the_install_sweep_co_98954/sweepai/handlers/on_ticket.py#L434-L448) - [X] Running GitHub Actions for `sweepai/handlers/on_ticket.py` βœ“ [Edit](https://github.com/sweepai/sweep/edit/sweep/in_on_ticketpy_move_the_install_sweep_co_98954/sweepai/handlers/on_ticket.py#L434-L448)
sweep-nightly[bot] commented 9 months ago

πŸš€ Here's the PR! #3018

See Sweep's progress at the progress dashboard!
πŸ’Ž Sweep Pro: I'm using GPT-4. You have unlimited GPT-4 tickets. (tracking ID: 88badd965c)

[!TIP] I'll email you at kevinlu1248@gmail.com when I complete this pull request!


Actions (click)

GitHub Actionsβœ“

Here are the GitHub Actions logs prior to making any changes:

Sandbox logs for 581c4a8
Checking sweepai/handlers/on_ticket.py for syntax errors... βœ… sweepai/handlers/on_ticket.py has no syntax errors! 1/1 βœ“
Checking sweepai/handlers/on_ticket.py for syntax errors...
βœ… sweepai/handlers/on_ticket.py has no syntax errors!

Sandbox passed on the latest main, so sandbox checks will be enabled for this issue.


Step 1: πŸ”Ž Searching

I found the following snippets in your repository. I will now analyze these snippets and come up with a plan.

Some code snippets I think are relevant in decreasing order of relevance (click to expand). If some file is missing from here, you can mention the path in the ticket description. https://github.com/sweepai/sweep/blob/581c4a8240c2fc6430ad31750ea52fdd077c22d4/sweepai/handlers/on_ticket.py#L434-L448

Step 2: ⌨️ Coding

--- 
+++ 
@@ -412,24 +412,6 @@
             ticket_progress.save()

             config_pr_url = None
-
-            user_settings = UserSettings.from_username(username=username)
-            user_settings_message = user_settings.get_message()
-
-            def get_comment_header(
-                index,
-                errored=False,
-                pr_message="",
-                done=False,
-                initial_sandbox_response: int | SandboxResponse = -1,
-                initial_sandbox_response_file=None,
-            ):
-                config_pr_message = (
-                    "\n"
-                    + f"
Install Sweep Configs: Pull Request
" - if config_pr_url is not None - else "" - ) actions_message = create_action_buttons( [ RESTART_SWEEP_BUTTON, @@ -1464,6 +1446,14 @@ f"Sorry, I could not edit `{e.filename}` as this file is too long." " We are currently working on improved file streaming to address" " this issue.\n" + config_pr_message = ( + "\n" + + f"
Install Sweep Configs: Pull Request
" + if config_pr_url is not None + else "" + ) + user_settings = UserSettings.from_username(username=username) + user_settings_message = user_settings.get_message() ), -1, )

Ran GitHub Actions for 7dbe4245fc1bb2fb211840bb2b84fe981bc58466:
β€’ Vercel Preview Comments: βœ“


Step 3: πŸ” Code Review

I have finished reviewing the code for completeness. I did not find errors for sweep/in_on_ticketpy_move_the_install_sweep_co_98954.


πŸŽ‰ Latest improvements to Sweep:
  • New dashboard launched for real-time tracking of Sweep issues, covering all stages from search to coding.
  • Integration of OpenAI's latest Assistant API for more efficient and reliable code planning and editing, improving speed by 3x.
  • Use the GitHub issues extension for creating Sweep issues directly from your editor.

πŸ’‘ To recreate the pull request edit the issue title or description. To tweak the pull request, leave a comment on the pull request.Something wrong? Let us know.