Closed d-walsh closed 1 week ago
None
)[!TIP] I can email you next time I complete a pull request if you set up your email here!
I found the following snippets in your repository. I will now analyze these snippets and come up with a plan.
sweepai/cli.py
✓ https://github.com/d-walsh/sweep/commit/a669104b5d8dcab495eed2d69b92573092f18323 Edit
Modify sweepai/cli.py with contents: At the top of the file:
• Import the `main` function from `sweepai/watch.py`
At the end of the watch
function, after the stream_events
and handle_event
function definitions:
• Call main(repo, repo_name)
to start the watching server with the user-specified repository
sweepai/watch.py
✓ https://github.com/d-walsh/sweep/commit/a669104b5d8dcab495eed2d69b92573092f18323 Edit
Modify sweepai/watch.py with contents: Update the `main` function signature to: ```python def main(repo: Repository, repo_name: str): ```
• Accept the `repo` and `repo_name` as parameters
In the main
function:
• Remove the lines that get the GITHUB_PAT
from environment variable and create the Github
instance
• Remove the line that gets the repo_name
from environment variable
• Remove the line that gets the repo
using g.get_repo(repo_name)
• Use the passed in repo
and repo_name
variables instead
I have finished reviewing the code for completeness. I did not find errors for sweep/sweep_watch_cli_just_exits_without_start
.
💡 To recreate the pull request edit the issue title or description. Something wrong? Let us know.
This is an automated message generated by Sweep AI.
I think you just have to remove the "if main" check in the watch function for cli.py
Branch
No response
Checklist
- [X] Modify `sweepai/cli.py` ✓ https://github.com/d-walsh/sweep/commit/a669104b5d8dcab495eed2d69b92573092f18323 [Edit](https://github.com/d-walsh/sweep/edit/sweep/sweep_watch_cli_just_exits_without_start/sweepai/cli.py) - [X] Modify `sweepai/watch.py` ✓ https://github.com/d-walsh/sweep/commit/a669104b5d8dcab495eed2d69b92573092f18323 [Edit](https://github.com/d-walsh/sweep/edit/sweep/sweep_watch_cli_just_exits_without_start/sweepai/watch.py)