cooperspencer / gickup

https://cooperspencer.github.io/gickup-documentation/
Apache License 2.0
962 stars 34 forks source link

Ability to backup contributed repositories #105

Closed newhinton closed 1 year ago

newhinton commented 2 years ago

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

cooperspencer commented 2 years ago

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

cooperspencer commented 1 year ago

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!

TMUniversal commented 1 year ago

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

cooperspencer commented 1 year ago

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