clockfort / GitHub-Backup

Backup all the repositories of a github user or organization automatically.
Creative Commons Zero v1.0 Universal
359 stars 103 forks source link

Big update #34

Closed crass closed 4 years ago

crass commented 5 years ago

This fixes #21 and adds a bunch of new features. It also changes the directory structure of the backup. Some changes:

  1. By default log progress messages
  2. Debug logging now enables PyGithub debug output, like request logging
  3. Unauthenticated access is supported again.
  4. Allow backing up a user other than the one you are authenticated as. This helps to bypass guthub anonymous api usage limits
  5. Option to download account data (still more account data that could be retrieved)
  6. Option to download the repository wiki, issues, pull requests, and assets
  7. Option to backup account gists
  8. Option to save ssh keys
  9. If -p is given with no argument, then search for config file (~/.github-backup.conf) to get APITOKEN or PASSWORD keys to use for the password, and if no config file then to prompt the user for a password. This way passwords won't show up in the history or ps output.

This doesn't backup everything, so there's more to add, but it goes a long way. If you'd rather have this broken up into several commits let me know.

stv0g commented 5 years ago

Hi @crass,

I started to review your code. Unfortunately, I got an exception with Python 3. I would propose that we drop Python 2 support at this time.. See: https://pythonclock.org/

Which version of the pygithub Package are we using actually? I am confused. There are so many different versions... We should clarify this by including the proper dependency into  requirements.txt

stv0g commented 5 years ago

See also #35, #32

crass commented 5 years ago

Hey Steffen,

I got busy and now just getting back to this. Thanks for reviewing the PR.

I started to review your code. Unfortunately, I got an exception with Python 3. I would propose that we drop Python 2 support at this time.. See: https://pythonclock.org/

I think if we can easily maintain Python 2 support we should. I just forgot to check Python 3 compatibility (I'm using python 2 by default still). The updated branch now works with both Python 2 and 3.

Which version of the pygithub Package are we using actually? I am confused. There are so many different versions... We should clarify this by including the proper dependency into requirements.txt

The requirements.txt is correct, we are using the latest version of PyGithub

I've replied to your suggested changes with your comments and updated the branch to resolve some of your suggested changes. Let me know if you have any additional suggestions.

klm1 commented 4 years ago

Just curios – any reason this PR hasn't been approved and merged?

stv0g commented 4 years ago

Sorry, I lost track of it.. I am merging it now :) Thanks @crass