Closed contentfree closed 1 year ago
⚡ Sweep Free Trial: I used GPT-4 to create this ticket. You have 5 GPT-4 tickets left. For more GPT-4 tickets, visit our payment portal.
I found the following snippets in your repository. I will now analyze these snippets and come up with a plan.
I also found the following external resources that might be helpful:
Summaries of links found in the content:
From looking through the relevant snippets, I decided to make the following modifications:
File Path | Proposed Changes |
---|---|
sweepai/handlers/create_pr.py |
Abstract the GitHub-specific logic into a generic interface that can handle interactions with any Git hosting service. This includes operations like creating pull requests, fetching file contents, and handling webhooks. |
sweepai/utils/config/server.py |
Modify the configuration handling to support Bitbucket-specific configurations such as API keys and webhook secrets. |
sweepai/handlers/bitbucket_pr.py |
Implement the generic interface created in sweepai/handlers/create_pr.py for Bitbucket. This includes operations like creating pull requests, fetching file contents, and handling webhooks using Bitbucket's API. |
sweepai/utils/config/bitbucket_server.py |
Create a new configuration file to handle Bitbucket-specific configurations such as API keys and webhook secrets. |
I have created a plan for writing the pull request. I am now working my plan and coding the required changes to address this issue. Here is the planned pull request:
Abstract GitHub-specific logic and add Bitbucket support
sweep/abstract-github-logic-bitbucket-support
Description
This PR abstracts the GitHub-specific logic in
sweepai/handlers/create_pr.py
and modifies the configuration handling insweepai/utils/config/server.py
to add support for Bitbucket repositories.Changes Made
- Abstracted the GitHub-specific logic in
sweepai/handlers/create_pr.py
into a generic interface that can handle interactions with any Git hosting service.- Modified the configuration handling in
sweepai/utils/config/server.py
to support Bitbucket-specific configurations such as API keys and webhook secrets.- Created
sweepai/handlers/bitbucket_pr.py
to implement the generic interface for Bitbucket, including operations like creating pull requests, fetching file contents, and handling webhooks using Bitbucket's API.- Created
sweepai/utils/config/bitbucket_server.py
as a new configuration file to handle Bitbucket-specific configurations.Summary
This PR makes Sweep available on Bitbucket repositories by abstracting the GitHub-specific logic and adding support for Bitbucket. It includes changes to the
create_pr.py
file to create a generic interface for interacting with any Git hosting service, and modifications to theserver.py
file to handle Bitbucket-specific configurations. Additionally, new filesbitbucket_pr.py
andbitbucket_server.py
have been added to implement the Bitbucket functionality and configurations, respectively.Please review and merge this PR to enable Sweep to work on any Git repository, not just GitHub-hosted repositories.
I have finished coding the issue. I am now reviewing it for completeness.
Success! 🚀
I'm a bot that handles simple bugs and feature requests but I might make mistakes. Please be kind! Join Our Discord
Hey @contentfree this is a great suggestion. We're really focused on supporting github at the moment though. Would you be willing to try it with GitHub and see if you like it first?
Supporting all git hosting is on our mind, but it's too early for that.
Details
Ideally Sweep would work on any git repository and not just Github-hosted repositories.
Files to change
No response