Skip to content

Simple repo wrapper - improved! 馃啎

Martin Hoeher requested to merge simple-repo-wrapper into main

This change brings a first "real" implementation of the wrapper. For this, we add a custom class "Repo", which for now fulfills two tasks:

  • Making a local copy of repo available.
  • Allowing us to run arbitrary repo commands on that local copy.

To safeguard this shared state, we currently lock the repo clone folder both for update and use. This definitely needs improvements as otherwise, any call to the wrapper will be sequentialized (this might not really be desirable).

The repo clone will be put in a user specific cache directory. This can be overridden in the user config file or via environment variables (thanks to pydantic's BaseSettings).

The same way, the clone URL where to get repo itself from is maintained and hence can be easily updated for specific user environments (read: behind a firewall).

Merge request reports