With our CRON-job, we want to make updating the repository and all its elements like PullRequests, Reviews and Comments as efficient as possible. This entails only fetching updated elements and updating entities instead of having to recreate them.
Description
This PR modifies the Github sync algorithm to allow for efficient refetching and updates:
The sync algorithm now uses a cutOffDate to determine how many PRs have to be refetched
The sync algorithm now checks for existing entities before creating new ones
Fields in entities can now be updated with the update-function of their respective converters
Relationships in entities now propagate changes via REFRESH instead of MERGE
Remark
The GitHubDataSyncService may get overly complex at some point. I would appreciate any suggestions on how to improve its structure or separate the logic into multiple classes,
Checklist
General
[x] PR title is clear and descriptive
[x] PR description explains the purpose and changes
[x] Code follows project coding standards
[x] Self-review of the code has been done
[x] Changes have been tested locally
[ ] Screenshots have been attached (if applicable)
[ ] Documentation has been updated (if applicable)
Server
[x] Code is performant and follows best practices
[x] No security vulnerabilities introduced
[x] Proper error handling has been implemented
[ ] Added tests for new functionality
[ ] Changes have been tested in different environments (if applicable)
Motivation
With our CRON-job, we want to make updating the repository and all its elements like PullRequests, Reviews and Comments as efficient as possible. This entails only fetching updated elements and updating entities instead of having to recreate them.
Description
This PR modifies the Github sync algorithm to allow for efficient refetching and updates:
cutOffDate
to determine how many PRs have to be refetchedupdate
-function of their respective convertersREFRESH
instead ofMERGE
Remark The
GitHubDataSyncService
may get overly complex at some point. I would appreciate any suggestions on how to improve its structure or separate the logic into multiple classes,Checklist
General
Server