CrowdAnki icon indicating copy to clipboard operation
CrowdAnki copied to clipboard

Automatically push to configured remote repository on snapshot

Open Stvad opened this issue 6 years ago • 2 comments

Recs:

  • Make it optional
  • make the remote/branch configurable through settings
  • automatically recognize remote if it's present in the repo?

Stvad avatar Apr 11 '19 09:04 Stvad

any updates on this? is this still planned?

DrBuhu avatar Jul 11 '25 14:07 DrBuhu

Still planned, no updates — our developmental manpower is low! (All help welcome!)

TBH I'm not quite sure what exactly was envisaged, though. Snapshots currently involve all decks, each of which is locally saved to its own git repo. Consequently, it would be logical for each to be pushed to its own remote. In principle, these could be "namespaced" — automatically generated based on a pattern (e.g. git+https://github.com/username/{DECKNAME}), but that still has various issues:

  1. When a new deck is created, we'd need a new remote repo, which is tricky: pushing to an existing remote git repo is standardised, but creating a new one depends on the host (github/gitlab/codeberg/etc. all deal with this differently) and usually isn't supported in pure git (e.g. for github I believe you need hub or gh), so dulwich (the git library we're using) wouldn't be able to handle it.
  2. Since the user likely has quite a few decks, there'd be a large number of remotes with automatically selected names, potentially resulting in name collisions with other projects (the user might already have repos with the target names).

I think that having a "snapshot remote" git repo manually configured per deck (i.e. you could select a remote for each deck, and all decks having such a remote would have their snapshots pushed there) would make most sense, at the very least as a first step. Is this approximately what you'd be interested in?

(No promises on implementation timeline — see above.)

aplaice avatar Jul 16 '25 19:07 aplaice