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

Refactor 'run' method to use an enum per API, and a file per API #3

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

Conversation

sweep-ai[bot]
Copy link

@sweep-ai sweep-ai bot commented Aug 3, 2023

Description

This PR refactors the codebase to improve modularity and scalability by separating each API implementation into its own file and dynamically handling all API types in the run() function using an enum to function mapping.

Summary of Changes

  • Refactored the run() function in main/index.ts to handle all API types dynamically using an enum to function mapping.
  • Created new files for each API in the main/ directory and moved the corresponding code from main/index.ts to these new files.
  • Exported a function for each API implementation in their respective files.
  • Updated the run() function to call the appropriate API function based on the API type.
  • Removed the individual API implementations from main/index.ts.
  • Improved code organization and maintainability.

Fixes #1.


To checkout this PR branch, run the following command in your terminal:

git checkout sweep/refactor-run-method

To make tweaks to this pull request, leave a comment below or in the code.

@sweep-ai sweep-ai bot added the sweep Assigns Sweep to an issue or pull request. label Aug 3, 2023
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
Development

Successfully merging this pull request may close these issues.

Sweep: refactor 'run' method to use an enum per api, and a file per api
0 participants