Open lubosmj opened 10 months ago
I believe, we can create a git remote that will point to a git repo and have a git-ref that is a commit, a branch or a tag. Sync first stage will then make a bare clone and use gitpython to extract the files from that revision and feed them into the sync pipeline. Without the need of a checkout tree.
GitHub and GitLab
It is possible to sync a GitHub repository by leveraging the GitHub API: https://api.github.com/repos/pulp/pulpcore/git/trees/main?recursive=1
Similarly, for GitLab: https://docs.gitlab.com/ee/api/repository_files.html.
The response lists paths, sha256, and the size of each file. With this, we can sync remote repositories.
Problems
Git
For now, we can use
gitpython
to get the information needed for syncing, like so:Problems