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

Implement LocalRepoOperator and RemoteRepoOperator classes #981

Draft
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

codegen-sh[bot]
Copy link
Contributor

@codegen-sh codegen-sh bot commented Mar 27, 2025

This PR implements the LocalRepoOperator and RemoteRepoOperator classes that extend the base RepoOperator class. These classes provide specialized functionality for working with local and remote Git repositories.

Changes

New Classes

  • LocalRepoOperator: A specialized implementation for working with repositories that are already on the local filesystem
  • RemoteRepoOperator: A specialized implementation for working with repositories hosted on GitHub or GitHub Enterprise

Unit Tests

  • Added unit tests for both new classes to ensure proper functionality

Implementation Details

  • Both classes extend the base RepoOperator class
  • LocalRepoOperator includes a from_repo_id class method for creating instances from database repository IDs
  • RemoteRepoOperator overrides the remote_git_repo property and setup_repo_dir method to provide specialized behavior

These implementations should help standardize how repository operations are handled throughout the codebase and provide a cleaner interface for working with different types of repositories.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants