gickup icon indicating copy to clipboard operation
gickup copied to clipboard

Ability to backup contributed repositories

Open newhinton opened this issue 2 years ago • 1 comments

It would be great if it would be possible to also fetch repositiories that are not starred but that a user has contributed to. Specifically for github.

The goal is to allow an easy mirror of repositories that i regularly use but are not a part of besides contributing.

Alternatively, is it possible to provide a list of bare url's that will only be "cloned"? This would provide an easy way to get the desired behaviour, albeit this may be too 'unautomated' for this project

newhinton avatar Apr 19 '22 15:04 newhinton

I'll have a look at that. I would implement an option to clone the repositories that you are contributed to.

cooperspencer avatar Apr 20 '22 09:04 cooperspencer

I just found the time to investigate the issue. Afaik there's no option to get that information from the api v3, but v4 which uses GraphQL. I need to investigate a bit further, but that will be one of the next features!

cooperspencer avatar Nov 17 '22 11:11 cooperspencer

Possible workaround for now: you could enable cloning starred repositories, although that may be backing up stuff beyond what you are looking to back up. If you don't mind that, enable this setting like so: https://github.com/cooperspencer/gickup/blob/main/conf.example.yml#L28

TMUniversal avatar Dec 09 '22 16:12 TMUniversal

I was finally able to implement that function. it is currently in the main branch, I will create a new release after a few tests. In order to use the v4 of the Github api, a token is needed.

@newhinton sorry that it took so long

source:
  github:
    - user: cooperspencer
      token: GITHUB_TOKEN
      contributed: true
destination:
  local:
    - path: ~/backup
      structured: true

cooperspencer avatar Feb 28 '23 18:02 cooperspencer