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

Extracts logic from GitHubProjectDataSource #278

Merged
merged 9 commits into from
Jul 29, 2024

Conversation

simonbs
Copy link
Contributor

@simonbs simonbs commented Jul 25, 2024

This PR refactors the GitHubProjectDataSource type to split it into the following two types:

Type Description
GitHubRepositoryDataSource Loads Git repositories from GitHub using their GraphQL API.
GitHubProjectDataSource Depends on GitHubRepositoryDataSource to load repositories and map them to our Project model.

The logic essentially remains the some but now resides in two types instead of one. This separation of the logic makes it easier to test the types and extend the types, for example using the decorator pattern as is the case in #279.

@simonbs simonbs enabled auto-merge July 26, 2024 06:11
@simonbs simonbs merged commit 0fe523c into develop Jul 29, 2024
5 checks passed
@simonbs simonbs deleted the enhancement/githubprojectdatasource-refactor branch July 29, 2024 09:06
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.

2 participants