Compare commits

...

8 Commits

Author SHA1 Message Date
Jose Diaz-Gonzalez
638bf7a77e Release version 0.37.0 2021-01-01 21:23:49 -05:00
Jose Diaz-Gonzalez
725f2c3b8f Merge pull request #158 from albertyw/python3
Remove support for python 2
2021-01-01 21:22:30 -05:00
Jose Diaz-Gonzalez
41ece08152 Merge pull request #165 from garymoon/add-skip-archived
Add option to skip archived repositories
2021-01-01 21:22:15 -05:00
Gary Moon
3a5ef5158d Add ability to skip archived repositories 2020-10-30 15:39:32 -04:00
Albert Wang
cb1b0b6c6b Add support for python 3.7 and 3.8 in package classifiers 2020-08-28 23:45:30 -07:00
Albert Wang
d7f0747432 Remove support for python 2.7 in package classifiers 2020-08-28 23:45:30 -07:00
Albert Wang
d411e20580 Remove python 2 specific import logic 2020-08-28 23:45:30 -07:00
Albert Wang
d7b85264cd Remove python 2 specific logic 2020-08-28 23:45:30 -07:00
4 changed files with 421 additions and 53 deletions

View File

@@ -1,14 +1,41 @@
Changelog Changelog
========= =========
0.37.0 (2021-01-01)
-------------------
------------
- Merge pull request #158 from albertyw/python3. [Jose Diaz-Gonzalez]
Remove support for python 2
- Add support for python 3.7 and 3.8 in package classifiers. [Albert
Wang]
- Remove support for python 2.7 in package classifiers. [Albert Wang]
- Remove python 2 specific import logic. [Albert Wang]
- Remove python 2 specific logic. [Albert Wang]
- Merge pull request #165 from garymoon/add-skip-archived. [Jose Diaz-
Gonzalez]
Add option to skip archived repositories
- Add ability to skip archived repositories. [Gary Moon]
0.36.0 (2020-08-29) 0.36.0 (2020-08-29)
------------------- -------------------
------------------------ - Release version 0.36.0. [Jose Diaz-Gonzalez]
- Merge pull request #157 from albertyw/lint. [Jose Diaz-Gonzalez]
- Add flake8 instructions to readme. [Albert Wang] - Add flake8 instructions to readme. [Albert Wang]
- Fix regex string. [Albert Wang] - Fix regex string. [Albert Wang]
- Update boolean check. [Albert Wang]
- Fix whitespace issues. [Albert Wang] - Fix whitespace issues. [Albert Wang]
- Do not use bare excepts. [Albert Wang] - Do not use bare excepts. [Albert Wang]
- Merge pull request #161 from albertyw/circleci-project-setup. [Jose
Diaz-Gonzalez]
Add circleci config
- Add .circleci/config.yml. [Albert Wang] - Add .circleci/config.yml. [Albert Wang]
- Merge pull request #160 from wbolster/patch-1. [Jose Diaz-Gonzalez]
Include --private flag in example
- Include --private flag in example. [wouter bolsterlee] - Include --private flag in example. [wouter bolsterlee]
By default, private repositories are not included. This is surprising. By default, private repositories are not included. This is surprising.
@@ -18,16 +45,38 @@ Changelog
0.35.0 (2020-08-05) 0.35.0 (2020-08-05)
------------------- -------------------
- Release version 0.35.0. [Jose Diaz-Gonzalez]
- Merge pull request #156 from samanthaq/restore-optional-throttling.
[Jose Diaz-Gonzalez]
Make API request throttling optional
- Make API request throttling optional. [Samantha Baldwin] - Make API request throttling optional. [Samantha Baldwin]
0.34.0 (2020-07-24) 0.34.0 (2020-07-24)
------------------- -------------------
- Release version 0.34.0. [Jose Diaz-Gonzalez]
- Merge pull request #153 from 0x6d617474/gist_ssh. [Jose Diaz-Gonzalez]
Add logic for transforming gist repository urls to ssh
- Add logic for transforming gist repository urls to ssh. [Matt Fields] - Add logic for transforming gist repository urls to ssh. [Matt Fields]
0.33.1 (2020-05-28)
-------------------
- Release version 0.33.1. [Jose Diaz-Gonzalez]
- Merge pull request #151 from garymoon/readme-update-0.33. [Jose Diaz-
Gonzalez]
- Update the readme for new switches added in 0.33. [Gary Moon]
0.33.0 (2020-04-13) 0.33.0 (2020-04-13)
------------------- -------------------
- Release version 0.33.0. [Jose Diaz-Gonzalez]
- Merge pull request #149 from eht16/simple_api_request_throttling.
[Jose Diaz-Gonzalez]
Add basic API request throttling
- Add basic API request throttling. [Enrico Tröger] - Add basic API request throttling. [Enrico Tröger]
A simple approach to throttle API requests and so keep within the rate A simple approach to throttle API requests and so keep within the rate
@@ -39,23 +88,50 @@ Changelog
0.32.0 (2020-04-13) 0.32.0 (2020-04-13)
------------------- -------------------
- Release version 0.32.0. [Jose Diaz-Gonzalez]
- Merge pull request #148 from eht16/logging_with_timestamp. [Jose Diaz-
Gonzalez]
Add timestamp to log messages
- Add timestamp to log messages. [Enrico Tröger] - Add timestamp to log messages. [Enrico Tröger]
- Merge pull request #147 from tomhoover/update-readme. [Jose Diaz-
Gonzalez]
Update README.rst to match 'github-backup -h'
- Update README.rst to match 'github-backup -h' [Tom Hoover]
0.31.0 (2020-02-25) 0.31.0 (2020-02-25)
------------------- -------------------
- Release version 0.31.0. [Jose Diaz-Gonzalez]
- Merge pull request #146 from timm3/upstream-123. [Jose Diaz-Gonzalez]
Authenticate as Github App
- #123 update: changed --as-app 'help' description. [ethan] - #123 update: changed --as-app 'help' description. [ethan]
- #123: Support Authenticating As Github Application. [ethan] - #123: Support Authenticating As Github Application. [ethan]
0.30.0 (2020-02-14)
-------------------
- Release version 0.30.0. [Jose Diaz-Gonzalez]
0.29.0 (2020-02-14) 0.29.0 (2020-02-14)
------------------- -------------------
- Release version 0.29.0. [Jose Diaz-Gonzalez]
- Merge pull request #145 from timm3/50-v0.28.0. [Jose Diaz-Gonzalez]
#50 - refactor for friendlier import
- #50 update: keep main() in bin. [ethan] - #50 update: keep main() in bin. [ethan]
- #50 - refactor for friendlier import. [ethan] - #50 - refactor for friendlier import. [ethan]
0.28.0 (2020-02-03) 0.28.0 (2020-02-03)
------------------- -------------------
- Release version 0.28.0. [Jose Diaz-Gonzalez]
- Merge pull request #143 from smiley/patch-1. [Jose Diaz-Gonzalez]
Remove deprecated (and removed) "git lfs fetch" flags
- Remove deprecated (and removed) git lfs flags. [smiley] - Remove deprecated (and removed) git lfs flags. [smiley]
"--tags" and "--force" were removed at some point from "git lfs fetch". This broke our backup script. "--tags" and "--force" were removed at some point from "git lfs fetch". This broke our backup script.
@@ -63,6 +139,11 @@ Changelog
0.27.0 (2020-01-22) 0.27.0 (2020-01-22)
------------------- -------------------
- Release version 0.27.0. [Jose Diaz-Gonzalez]
- Merge pull request #142 from einsteinx2/issue/141-import-error-
version. [Jose Diaz-Gonzalez]
Fixed script fails if not installed from pip
- Fixed script fails if not installed from pip. [Ben Baron] - Fixed script fails if not installed from pip. [Ben Baron]
At the top of the script, the line from github_backup import __version__ gets the script's version number to use if the script is called with the -v or --version flags. The problem is that if the script hasn't been installed via pip (for example I cloned the repo directly to my backup server), the script will fail due to an import exception. At the top of the script, the line from github_backup import __version__ gets the script's version number to use if the script is called with the -v or --version flags. The problem is that if the script hasn't been installed via pip (for example I cloned the repo directly to my backup server), the script will fail due to an import exception.
@@ -70,14 +151,26 @@ Changelog
Also presumably it will always use the version number from pip even if running a modified version from git or a fork or something, though this does not fix that as I have no idea how to check if it's running the pip installed version or not. But at least the script will now work fine if cloned from git or just copied to another machine. Also presumably it will always use the version number from pip even if running a modified version from git or a fork or something, though this does not fix that as I have no idea how to check if it's running the pip installed version or not. But at least the script will now work fine if cloned from git or just copied to another machine.
closes https://github.com/josegonzalez/python-github-backup/issues/141 closes https://github.com/josegonzalez/python-github-backup/issues/141
- Merge pull request #136 from einsteinx2/issue/88-macos-keychain-
broken-python3. [Jose Diaz-Gonzalez]
Fixed macOS keychain access when using Python 3
- Fixed macOS keychain access when using Python 3. [Ben Baron] - Fixed macOS keychain access when using Python 3. [Ben Baron]
Python 3 is returning bytes rather than a string, so the string concatenation to create the auth variable was throwing an exception which the script was interpreting to mean it couldn't find the password. Adding a conversion to string first fixed the issue. Python 3 is returning bytes rather than a string, so the string concatenation to create the auth variable was throwing an exception which the script was interpreting to mean it couldn't find the password. Adding a conversion to string first fixed the issue.
- Merge pull request #137 from einsteinx2/issue/134-only-use-auth-token-
when-needed. [Jose Diaz-Gonzalez]
Public repos no longer include the auth token
- Public repos no longer include the auth token. [Ben Baron] - Public repos no longer include the auth token. [Ben Baron]
When backing up repositories using an auth token and https, the GitHub personal auth token is leaked in each backed up repository. It is included in the URL of each repository's git remote url. When backing up repositories using an auth token and https, the GitHub personal auth token is leaked in each backed up repository. It is included in the URL of each repository's git remote url.
This is not needed as they are public and can be accessed without the token and can cause issues in the future if the token is ever changed, so I think it makes more sense not to have the token stored in each repo backup. I think the token should only be "leaked" like this out of necessity, e.g. it's a private repository and the --prefer-ssh option was not chosen so https with auth token was required to perform the clone. This is not needed as they are public and can be accessed without the token and can cause issues in the future if the token is ever changed, so I think it makes more sense not to have the token stored in each repo backup. I think the token should only be "leaked" like this out of necessity, e.g. it's a private repository and the --prefer-ssh option was not chosen so https with auth token was required to perform the clone.
- Merge pull request #130 from einsteinx2/issue/129-fix-crash-on-
release-asset-download-error. [Jose Diaz-Gonzalez]
Crash when an release asset doesn't exist
- Fixed comment typo. [Ben Baron] - Fixed comment typo. [Ben Baron]
- Switched log_info to log_warning in download_file. [Ben Baron] - Switched log_info to log_warning in download_file. [Ben Baron]
- Crash when an release asset doesn't exist. [Ben Baron] - Crash when an release asset doesn't exist. [Ben Baron]
@@ -85,6 +178,10 @@ Changelog
Currently, the script crashes whenever a release asset is unable to download (for example a 404 response). This change instead logs the failure and allows the script to continue. No retry logic is enabled, but at least it prevents the crash and allows the backup to complete. Retry logic can be implemented later if wanted. Currently, the script crashes whenever a release asset is unable to download (for example a 404 response). This change instead logs the failure and allows the script to continue. No retry logic is enabled, but at least it prevents the crash and allows the backup to complete. Retry logic can be implemented later if wanted.
closes https://github.com/josegonzalez/python-github-backup/issues/129 closes https://github.com/josegonzalez/python-github-backup/issues/129
- Merge pull request #132 from einsteinx2/issue/126-prevent-overwriting-
release-assets. [Jose Diaz-Gonzalez]
Separate release assets and skip re-downloading
- Moved asset downloading loop inside the if block. [Ben Baron] - Moved asset downloading loop inside the if block. [Ben Baron]
- Separate release assets and skip re-downloading. [Ben Baron] - Separate release assets and skip re-downloading. [Ben Baron]
@@ -95,21 +192,36 @@ Changelog
This change also now checks if the asset file already exists on disk and skips downloading it. This drastically speeds up addiotnal syncs as it no longer downloads every single release every single time. It will now only download new releases which I believe is the expected behavior. This change also now checks if the asset file already exists on disk and skips downloading it. This drastically speeds up addiotnal syncs as it no longer downloads every single release every single time. It will now only download new releases which I believe is the expected behavior.
closes https://github.com/josegonzalez/python-github-backup/issues/126 closes https://github.com/josegonzalez/python-github-backup/issues/126
- Merge pull request #131 from einsteinx2/improve-gitignore. [Jose Diaz-
Gonzalez]
Improved gitignore, macOS files and IDE configs
- Added newline to end of file. [Ben Baron] - Added newline to end of file. [Ben Baron]
- Improved gitignore, macOS files and IDE configs. [Ben Baron] - Improved gitignore, macOS files and IDE configs. [Ben Baron]
Ignores the annoying hidden macOS files .DS_Store and ._* as well as the IDE configuration folders for contributors using the popular Visual Studio Code and Atom IDEs (more can be added later as needed). Ignores the annoying hidden macOS files .DS_Store and ._* as well as the IDE configuration folders for contributors using the popular Visual Studio Code and Atom IDEs (more can be added later as needed).
- Update ISSUE_TEMPLATE.md. [Jose Diaz-Gonzalez]
0.26.0 (2019-09-23) 0.26.0 (2019-09-23)
------------------- -------------------
- Release version 0.26.0. [Jose Diaz-Gonzalez]
- Merge pull request #128 from Snawoot/master. [Jose Diaz-Gonzalez]
Workaround gist clone in `--prefer-ssh` mode
- Workaround gist clone in `--prefer-ssh` mode. [Vladislav Yarmak] - Workaround gist clone in `--prefer-ssh` mode. [Vladislav Yarmak]
- Create PULL_REQUEST.md. [Jose Diaz-Gonzalez] - Create PULL_REQUEST.md. [Jose Diaz-Gonzalez]
- Create ISSUE_TEMPLATE.md. [Jose Diaz-Gonzalez] - Create ISSUE_TEMPLATE.md. [Jose Diaz-Gonzalez]
- Update README.rst. [Jose Diaz-Gonzalez]
- Update README.rst. [Jose Diaz-Gonzalez]
0.25.0 (2019-07-03) 0.25.0 (2019-07-03)
------------------- -------------------
- Release version 0.25.0. [Jose Diaz-Gonzalez]
- Merge pull request #120 from 8h2a/patch-1. [Jose Diaz-Gonzalez]
Issue 119: Change retrieve_data to be a generator
- Issue 119: Change retrieve_data to be a generator. [2a] - Issue 119: Change retrieve_data to be a generator. [2a]
See issue #119. See issue #119.
@@ -117,21 +229,43 @@ Changelog
0.24.0 (2019-06-27) 0.24.0 (2019-06-27)
------------------- -------------------
- Release version 0.24.0. [Jose Diaz-Gonzalez]
- Merge pull request #117 from QuicketSolutions/master. [Jose Diaz-
Gonzalez]
Add option for Releases
- Merge pull request #5 from QuicketSolutions/QKT-45. [Ethan Timm]
- QKT-45: include assets - update readme. [Ethan Timm] - QKT-45: include assets - update readme. [Ethan Timm]
update readme with flag information for including assets alongside their respective releases update readme with flag information for including assets alongside their respective releases
- Merge pull request #4 from whwright/wip-releases. [Ethan Timm]
Download github assets
- Make assets it's own flag. [Harrison Wright] - Make assets it's own flag. [Harrison Wright]
- Fix super call for python2. [Harrison Wright] - Fix super call for python2. [Harrison Wright]
- Fix redirect to s3. [Harrison Wright] - Fix redirect to s3. [Harrison Wright]
- WIP: download assets. [Harrison Wright] - WIP: download assets. [Harrison Wright]
- Merge pull request #3 from QuicketSolutions/QKT-42. [Ethan Timm]
- QKT-42: releases - add readme info. [ethan] - QKT-42: releases - add readme info. [ethan]
- Merge pull request #2 from QuicketSolutions/QKT-42. [Ethan Timm]
QKT-42 update: shorter command flag
- QKT-42 update: shorter command flag. [ethan] - QKT-42 update: shorter command flag. [ethan]
- Merge pull request #1 from QuicketSolutions/QKT-42. [Ethan Timm]
- QKT-42: support saving release information. [ethan] - QKT-42: support saving release information. [ethan]
- Merge pull request #118 from whwright/115-fix-pull-details. [Jose
Diaz-Gonzalez]
Fix pull details
- Fix pull details. [Harrison Wright] - Fix pull details. [Harrison Wright]
0.23.0 (2019-06-04) 0.23.0 (2019-06-04)
------------------- -------------------
- Release version 0.23.0. [Jose Diaz-Gonzalez]
- Merge pull request #113 from kleag/master. [Jose Diaz-Gonzalez]
Avoid to crash in case of HTTP 502 error
- Avoid to crash in case of HTTP 502 error. [Gael de Chalendar] - Avoid to crash in case of HTTP 502 error. [Gael de Chalendar]
Survive also on socket.error connections like on HTTPError or URLError. Survive also on socket.error connections like on HTTPError or URLError.
@@ -148,15 +282,32 @@ Fix
Refs #106 Refs #106
Other
~~~~~
- Release version 0.22.2. [Jose Diaz-Gonzalez]
- Merge pull request #107 from josegonzalez/patch-1. [Jose Diaz-
Gonzalez]
fix: warn instead of error
0.22.1 (2019-02-21) 0.22.1 (2019-02-21)
------------------- -------------------
- Release version 0.22.1. [Jose Diaz-Gonzalez]
- Merge pull request #106 from jstetic/master. [Jose Diaz-Gonzalez]
Log URL error
- Log URL error https://github.com/josegonzalez/python-github- - Log URL error https://github.com/josegonzalez/python-github-
backup/issues/105. [JOHN STETIC] backup/issues/105. [JOHN STETIC]
0.22.0 (2019-02-01) 0.22.0 (2019-02-01)
------------------- -------------------
- Release version 0.22.0. [Jose Diaz-Gonzalez]
- Merge pull request #103 from whwright/98-better-logging. [Jose Diaz-
Gonzalez]
Fix accidental system exit with better logging strategy
- Remove unnecessary sys.exit call. [W. Harrison Wright] - Remove unnecessary sys.exit call. [W. Harrison Wright]
- Add org check to avoid incorrect log output. [W. Harrison Wright] - Add org check to avoid incorrect log output. [W. Harrison Wright]
- Fix accidental system exit with better logging strategy. [W. Harrison - Fix accidental system exit with better logging strategy. [W. Harrison
@@ -165,6 +316,10 @@ Fix
0.21.1 (2018-12-25) 0.21.1 (2018-12-25)
------------------- -------------------
- Release version 0.21.1. [Jose Diaz-Gonzalez]
- Merge pull request #101 from ecki/patch-2. [Jose Diaz-Gonzalez]
Mark options which are not included in --all
- Mark options which are not included in --all. [Bernd] - Mark options which are not included in --all. [Bernd]
As discussed in Issue #100 As discussed in Issue #100
@@ -172,12 +327,22 @@ Fix
0.21.0 (2018-11-28) 0.21.0 (2018-11-28)
------------------- -------------------
- Release version 0.21.0. [Jose Diaz-Gonzalez]
- Merge pull request #97 from whwright/94-fix-user-repos. [Jose Diaz-
Gonzalez]
Correctly download repos when user arg != authenticated user
- Correctly download repos when user arg != authenticated user. [W. - Correctly download repos when user arg != authenticated user. [W.
Harrison Wright] Harrison Wright]
0.20.1 (2018-09-29) 0.20.1 (2018-09-29)
------------------- -------------------
- Release version 0.20.1. [Jose Diaz-Gonzalez]
- Merge pull request #92 from whwright/87-fix-starred-bug. [Jose Diaz-
Gonzalez]
Clone the specified user's starred repos/gists, not the authenticated user
- Clone the specified user's gists, not the authenticated user. [W. - Clone the specified user's gists, not the authenticated user. [W.
Harrison Wright] Harrison Wright]
- Clone the specified user's starred repos, not the authenticated user. - Clone the specified user's starred repos, not the authenticated user.
@@ -186,6 +351,7 @@ Fix
0.20.0 (2018-03-24) 0.20.0 (2018-03-24)
------------------- -------------------
- Release version 0.20.0. [Jose Diaz-Gonzalez]
- Chore: drop Python 2.6. [Jose Diaz-Gonzalez] - Chore: drop Python 2.6. [Jose Diaz-Gonzalez]
- Feat: simplify release script. [Jose Diaz-Gonzalez] - Feat: simplify release script. [Jose Diaz-Gonzalez]
@@ -197,15 +363,33 @@ Fix
~~~ ~~~
- Cleanup pep8 violations. [Jose Diaz-Gonzalez] - Cleanup pep8 violations. [Jose Diaz-Gonzalez]
Other
~~~~~
- Release version 0.19.2. [Jose Diaz-Gonzalez]
0.19.1 (2018-03-24)
-------------------
- Release version 0.19.1. [Jose Diaz-Gonzalez]
0.19.0 (2018-03-24) 0.19.0 (2018-03-24)
------------------- -------------------
- Release version 0.19.0. [Jose Diaz-Gonzalez]
- Merge pull request #77 from mayflower/pull-details. [Jose Diaz-
Gonzalez]
Pull Details
- Add additional output for the current request. [Robin Gloster] - Add additional output for the current request. [Robin Gloster]
This is useful to have some progress indication for huge repositories. This is useful to have some progress indication for huge repositories.
- Add option to backup additional PR details. [Robin Gloster] - Add option to backup additional PR details. [Robin Gloster]
Some payload is only included when requesting a single pull request Some payload is only included when requesting a single pull request
- Merge pull request #84 from johbo/fix-python36-skip-existing. [Jose
Diaz-Gonzalez]
Mark string as binary in comparison for skip_existing
- Mark string as binary in comparison for skip_existing. [Johannes - Mark string as binary in comparison for skip_existing. [Johannes
Bornhold] Bornhold]
@@ -216,11 +400,20 @@ Fix
0.18.0 (2018-02-22) 0.18.0 (2018-02-22)
------------------- -------------------
- Release version 0.18.0. [Jose Diaz-Gonzalez]
- Merge pull request #82 from sgreene570/add-followers. [Jose Diaz-
Gonzalez]
Add option to fetch followers/following JSON data
- Add option to fetch followers/following JSON data. [Stephen Greene] - Add option to fetch followers/following JSON data. [Stephen Greene]
0.17.0 (2018-02-20) 0.17.0 (2018-02-20)
------------------- -------------------
- Release version 0.17.0. [Jose Diaz-Gonzalez]
- Merge pull request #81 from whwright/gists. [Jose Diaz-Gonzalez]
Add ability to back up gists
- Short circuit gists backup process. [W. Harrison Wright] - Short circuit gists backup process. [W. Harrison Wright]
- Formatting. [W. Harrison Wright] - Formatting. [W. Harrison Wright]
- Add ability to backup gists. [W. Harrison Wright] - Add ability to backup gists. [W. Harrison Wright]
@@ -228,41 +421,94 @@ Fix
0.16.0 (2018-01-22) 0.16.0 (2018-01-22)
------------------- -------------------
- Release version 0.16.0. [Jose Diaz-Gonzalez]
- Merge pull request #78 from whwright/clone-starred-repos. [Jose Diaz-
Gonzalez]
Clone starred repos
- Update README.rst. [Jose Diaz-Gonzalez]
- Update documentation. [W. Harrison Wright]
- Change option to --all-starred. [W. Harrison Wright] - Change option to --all-starred. [W. Harrison Wright]
- JK don't update documentation. [W. Harrison Wright] - JK don't update documentation. [W. Harrison Wright]
- Update documentation. [W. Harrison Wright]
- Put starred clone repoistories under a new option. [W. Harrison - Put starred clone repoistories under a new option. [W. Harrison
Wright] Wright]
- Add comment. [W. Harrison Wright] - Add comment. [W. Harrison Wright]
- Add ability to clone starred repos. [W. Harrison Wright] - Add ability to clone starred repos. [W. Harrison Wright]
0.15.0 (2017-12-11)
-------------------
- Release version 0.15.0. [Jose Diaz-Gonzalez]
- Merge pull request #75 from slibby/slibby-patch-windows. [Jose Diaz-
Gonzalez]
update check_io() to allow scripts to run on Windows
- Update logging_subprocess function. [Sam Libby]
1. added newline for return
2. added one-time warning (once per subprocess)
- Update check_io() to allow scripts to run on Windows. [Sam Libby]
0.14.1 (2017-10-11) 0.14.1 (2017-10-11)
------------------- -------------------
- Release version 0.14.1. [Jose Diaz-Gonzalez]
- Merge pull request #70 from epfremmer/patch-1. [Jose Diaz-Gonzalez]
Fix arg not defined error
- Fix arg not defined error. [Edward Pfremmer] - Fix arg not defined error. [Edward Pfremmer]
0.14.0 (2017-10-11) 0.14.0 (2017-10-11)
------------------- -------------------
- Release version 0.14.0. [Jose Diaz-Gonzalez]
- Merge pull request #68 from pieterclaerhout/master. [Jose Diaz-
Gonzalez]
Added support for LFS clones
- Updated the readme. [pieterclaerhout]
- Added a check to see if git-lfs is installed when doing an LFS clone. - Added a check to see if git-lfs is installed when doing an LFS clone.
[pieterclaerhout] [pieterclaerhout]
- Added support for LFS clones. [pieterclaerhout] - Added support for LFS clones. [pieterclaerhout]
- Merge pull request #66 from albertyw/python3. [Jose Diaz-Gonzalez]
Explicitly support python 3
- Add pypi info to readme. [Albert Wang] - Add pypi info to readme. [Albert Wang]
- Explicitly support python 3 in package description. [Albert Wang] - Explicitly support python 3 in package description. [Albert Wang]
- Merge pull request #65 from mumblez/master. [Jose Diaz-Gonzalez]
add couple examples to help new users
- Add couple examples to help new users. [Yusuf Tran] - Add couple examples to help new users. [Yusuf Tran]
0.13.2 (2017-05-06) 0.13.2 (2017-05-06)
------------------- -------------------
- Release version 0.13.2. [Jose Diaz-Gonzalez]
- Merge pull request #64 from karlicoss/fix-remotes. [Jose Diaz-
Gonzalez]
Fix remotes while updating repository
- Fix remotes while updating repository. [Dima Gerasimov] - Fix remotes while updating repository. [Dima Gerasimov]
0.13.1 (2017-04-11) 0.13.1 (2017-04-11)
------------------- -------------------
- Release version 0.13.1. [Jose Diaz-Gonzalez]
- Merge pull request #61 from McNetic/fix_empty_updated_at. [Jose Diaz-
Gonzalez]
Fix error when repository has no updated_at value
- Fix error when repository has no updated_at value. [Nicolai Ehemann] - Fix error when repository has no updated_at value. [Nicolai Ehemann]
0.13.0 (2017-04-05) 0.13.0 (2017-04-05)
------------------- -------------------
- Release version 0.13.0. [Jose Diaz-Gonzalez]
- Merge pull request #59 from martintoreilly/master. [Jose Diaz-
Gonzalez]
Add support for storing PAT in OSX keychain
- Add OS check for OSX specific keychain args. [Martin O'Reilly] - Add OS check for OSX specific keychain args. [Martin O'Reilly]
Keychain arguments are only supported on Mac OSX. Keychain arguments are only supported on Mac OSX.
@@ -280,11 +526,19 @@ Fix
0.12.1 (2017-03-27) 0.12.1 (2017-03-27)
------------------- -------------------
- Release version 0.12.1. [Jose Diaz-Gonzalez]
- Merge pull request #57 from acdha/reuse-existing-remotes. [Jose Diaz-
Gonzalez]
Avoid remote branch name churn
- Avoid remote branch name churn. [Chris Adams] - Avoid remote branch name churn. [Chris Adams]
This avoids the backup output having lots of "[new branch]" messages This avoids the backup output having lots of "[new branch]" messages
because removing the old remote name removed all of the existing branch because removing the old remote name removed all of the existing branch
references. references.
- Merge pull request #55 from amaczuga/master. [Jose Diaz-Gonzalez]
Fix detection of bare git directories
- Fix detection of bare git directories. [Andrzej Maczuga] - Fix detection of bare git directories. [Andrzej Maczuga]
@@ -299,22 +553,49 @@ Fix
Other Other
~~~~~ ~~~~~
- Release version 0.12.0. [Jose Diaz-Gonzalez]
- Pep8: E501 line too long (83 > 79 characters) [Jose Diaz-Gonzalez] - Pep8: E501 line too long (83 > 79 characters) [Jose Diaz-Gonzalez]
- Pep8: E128 continuation line under-indented for visual indent. [Jose - Pep8: E128 continuation line under-indented for visual indent. [Jose
Diaz-Gonzalez] Diaz-Gonzalez]
- Merge pull request #54 from amaczuga/master. [Jose Diaz-Gonzalez]
Support archivization using bare git clones
- Support archivization using bare git clones. [Andrzej Maczuga] - Support archivization using bare git clones. [Andrzej Maczuga]
- Merge pull request #53 from trel/master. [Jose Diaz-Gonzalez]
fix typo, 3x
- Fix typo, 3x. [Terrell Russell] - Fix typo, 3x. [Terrell Russell]
0.11.0 (2016-10-26) 0.11.0 (2016-10-26)
------------------- -------------------
- Release version 0.11.0. [Jose Diaz-Gonzalez]
- Merge pull request #52 from bjodah/fix-gh-51. [Jose Diaz-Gonzalez]
Support --token file:///home/user/token.txt (fixes gh-51)
- Support --token file:///home/user/token.txt (fixes gh-51) [Björn - Support --token file:///home/user/token.txt (fixes gh-51) [Björn
Dahlgren] Dahlgren]
- Merge pull request #48 from albertyw/python3. [Jose Diaz-Gonzalez]
Support Python 3
- Fix some linting. [Albert Wang] - Fix some linting. [Albert Wang]
- Fix byte/string conversion for python 3. [Albert Wang] - Fix byte/string conversion for python 3. [Albert Wang]
- Support python 3. [Albert Wang] - Support python 3. [Albert Wang]
- Merge pull request #46 from remram44/encode-password. [Jose Diaz-
Gonzalez]
Encode special characters in password
- Encode special characters in password. [Remi Rampin] - Encode special characters in password. [Remi Rampin]
- Merge pull request #45 from remram44/cli-programname. [Jose Diaz-
Gonzalez]
Fix program name
- Update README.rst. [Remi Rampin]
- Don't pretend program name is "Github Backup" [Remi Rampin] - Don't pretend program name is "Github Backup" [Remi Rampin]
- Merge pull request #44 from remram44/readme-git-https. [Jose Diaz-
Gonzalez]
Don't install over insecure connection
- Don't install over insecure connection. [Remi Rampin] - Don't install over insecure connection. [Remi Rampin]
The git:// protocol is unauthenticated and unencrypted, and no longer advertised by GitHub. Using HTTPS shouldn't impact performance. The git:// protocol is unauthenticated and unencrypted, and no longer advertised by GitHub. Using HTTPS shouldn't impact performance.
@@ -322,6 +603,10 @@ Other
0.10.3 (2016-08-21) 0.10.3 (2016-08-21)
------------------- -------------------
- Release version 0.10.3. [Jose Diaz-Gonzalez]
- Merge pull request #30 from jonasrmichel/master. [Jose Diaz-Gonzalez]
Fixes #29
- Fixes #29. [Jonas Michel] - Fixes #29. [Jonas Michel]
Reporting an error when the user's rate limit is exceeded causes Reporting an error when the user's rate limit is exceeded causes
@@ -339,13 +624,23 @@ Other
0.10.2 (2016-08-21) 0.10.2 (2016-08-21)
------------------- -------------------
- Release version 0.10.2. [Jose Diaz-Gonzalez]
- Add a note regarding git version requirement. [Jose Diaz-Gonzalez] - Add a note regarding git version requirement. [Jose Diaz-Gonzalez]
Closes #37 Closes #37
0.10.1 (2016-08-21)
-------------------
- Release version 0.10.1. [Jose Diaz-Gonzalez]
0.10.0 (2016-08-18) 0.10.0 (2016-08-18)
------------------- -------------------
- Release version 0.10.0. [Jose Diaz-Gonzalez]
- Merge pull request #42 from robertwb/master. [Jose Diaz-Gonzalez]
Implement incremental updates
- Implement incremental updates. [Robert Bradshaw] - Implement incremental updates. [Robert Bradshaw]
Guarded with an --incremental flag. Guarded with an --incremental flag.
@@ -358,11 +653,21 @@ Other
0.9.0 (2016-03-29) 0.9.0 (2016-03-29)
------------------ ------------------
- Release version 0.9.0. [Jose Diaz-Gonzalez]
- Merge pull request #36 from zlabjp/fix-cloning-private-repos. [Jose
Diaz-Gonzalez]
Fix cloning private repos with basic auth or token
- Fix cloning private repos with basic auth or token. [Kazuki Suda] - Fix cloning private repos with basic auth or token. [Kazuki Suda]
0.8.0 (2016-02-14) 0.8.0 (2016-02-14)
------------------ ------------------
- Release version 0.8.0. [Jose Diaz-Gonzalez]
- Merge pull request #35 from eht16/issue23_store_pullrequests_once.
[Jose Diaz-Gonzalez]
Don't store issues which are actually pull requests
- Don't store issues which are actually pull requests. [Enrico Tröger] - Don't store issues which are actually pull requests. [Enrico Tröger]
This prevents storing pull requests twice since the Github API returns This prevents storing pull requests twice since the Github API returns
@@ -373,31 +678,65 @@ Other
0.7.0 (2016-02-02) 0.7.0 (2016-02-02)
------------------ ------------------
- Release version 0.7.0. [Jose Diaz-Gonzalez]
- Merge pull request #32 from albertyw/soft-fail-hooks. [Jose Diaz-
Gonzalez]
Softly fail if not able to read hooks
- Softly fail if not able to read hooks. [Albert Wang] - Softly fail if not able to read hooks. [Albert Wang]
- Merge pull request #33 from albertyw/update-readme. [Jose Diaz-
Gonzalez]
Add note about 2-factor auth in readme
- Add note about 2-factor auth. [Albert Wang] - Add note about 2-factor auth. [Albert Wang]
- Merge pull request #31 from albertyw/fix-private-repos. [Jose Diaz-
Gonzalez]
Fix reading user's private repositories
- Make user repository search go through endpoint capable of reading - Make user repository search go through endpoint capable of reading
private repositories. [Albert Wang] private repositories. [Albert Wang]
- Merge pull request #28 from alexmojaki/getpass. [Jose Diaz-Gonzalez]
Prompt for password if only username given
- Update README with new CLI usage. [Alex Hall]
- Prompt for password if only username given. [Alex Hall] - Prompt for password if only username given. [Alex Hall]
0.6.0 (2015-11-10) 0.6.0 (2015-11-10)
------------------ ------------------
- Release version 0.6.0. [Jose Diaz-Gonzalez]
- Force proper remote url. [Jose Diaz-Gonzalez] - Force proper remote url. [Jose Diaz-Gonzalez]
- Merge pull request #24 from eht16/add_backup_hooks. [Jose Diaz-
Gonzalez]
Add backup hooks
- Improve error handling in case of HTTP errors. [Enrico Tröger] - Improve error handling in case of HTTP errors. [Enrico Tröger]
In case of a HTTP status code 404, the returned 'r' was never assigned. In case of a HTTP status code 404, the returned 'r' was never assigned.
In case of URL errors which are not timeouts, we probably should bail In case of URL errors which are not timeouts, we probably should bail
out. out.
- Add --hooks to also include web hooks into the backup. [Enrico Tröger] - Add --hooks to also include web hooks into the backup. [Enrico Tröger]
- Merge pull request #22 from eht16/issue_17_create_output_directory.
[Jose Diaz-Gonzalez]
Create the user specified output directory if it does not exist
- Create the user specified output directory if it does not exist. - Create the user specified output directory if it does not exist.
[Enrico Tröger] [Enrico Tröger]
Fixes #17. Fixes #17.
- Merge pull request #21 from eht16/fix_get_response_missing_auth. [Jose
Diaz-Gonzalez]
Add missing auth argument to _get_response()
- Add missing auth argument to _get_response() [Enrico Tröger] - Add missing auth argument to _get_response() [Enrico Tröger]
When running unauthenticated and Github starts rate-limiting the client, When running unauthenticated and Github starts rate-limiting the client,
github-backup crashes because the used auth variable in _get_response() github-backup crashes because the used auth variable in _get_response()
was not available. This change should fix it. was not available. This change should fix it.
- Merge pull request #20 from
eht16/improve_error_msg_on_non_existing_repo. [Jose Diaz-Gonzalez]
Add repository URL to error message for non-existing repositories
- Add repository URL to error message for non-existing repositories. - Add repository URL to error message for non-existing repositories.
[Enrico Tröger] [Enrico Tröger]
@@ -408,28 +747,69 @@ Other
0.5.0 (2015-10-10) 0.5.0 (2015-10-10)
------------------ ------------------
- Release version 0.5.0. [Jose Diaz-Gonzalez]
- Add release script. [Jose Diaz-Gonzalez] - Add release script. [Jose Diaz-Gonzalez]
- Refactor to both simplify codepath as well as follow PEP8 standards. - Refactor to both simplify codepath as well as follow PEP8 standards.
[Jose Diaz-Gonzalez] [Jose Diaz-Gonzalez]
- Merge pull request #19 from Embed-Engineering/retry-timeout. [Jose
Diaz-Gonzalez]
Retry 3 times when the connection times out
- Retry 3 times when the connection times out. [Mathijs Jonker] - Retry 3 times when the connection times out. [Mathijs Jonker]
- Merge pull request #15 from kromkrom/master. [Jose Diaz-Gonzalez]
Preserve Unicode characters in the output file
- Update github-backup. [Kirill Grushetsky]
- Update github-backup. [Kirill Grushetsky]
- Made unicode output defalut. [Kirill Grushetsky] - Made unicode output defalut. [Kirill Grushetsky]
- Import alphabetised. [Kirill Grushetsky] - Import alphabetised. [Kirill Grushetsky]
- Preserve Unicode characters in the output file. [Kirill Grushetsky] - Preserve Unicode characters in the output file. [Kirill Grushetsky]
Added option to preserve Unicode characters in the output file Added option to preserve Unicode characters in the output file
- Merge pull request #14 from aensley/master. [Jose Diaz-Gonzalez]
Added backup of labels and milestones.
- Josegonzales/python-github-backup#12 Added backup of labels and - Josegonzales/python-github-backup#12 Added backup of labels and
milestones. [aensley] milestones. [aensley]
- Merge pull request #11 from Embed-Engineering/master. [Jose Diaz-
Gonzalez]
Added test for uninitialized repo's (or wiki's)
- Fixed indent. [Mathijs Jonker] - Fixed indent. [Mathijs Jonker]
- Update github-backup. [mjonker-embed]
- Skip unitialized repo's. [mjonker-embed] - Skip unitialized repo's. [mjonker-embed]
These gave me errors which caused mails from crontab. These gave me errors which caused mails from crontab.
- Merge pull request #10 from Embed-Engineering/master. [Jose Diaz-
Gonzalez]
Added prefer-ssh
- Added prefer-ssh. [mjonker-embed] - Added prefer-ssh. [mjonker-embed]
Was needed for my back-up setup, code includes this but readme wasn't updated Was needed for my back-up setup, code includes this but readme wasn't updated
- Merge pull request #9 from acdha/ratelimit-retries. [Jose Diaz-
Gonzalez]
Retry API requests which failed due to rate-limiting
- Retry API requests which failed due to rate-limiting. [Chris Adams] - Retry API requests which failed due to rate-limiting. [Chris Adams]
This allows operation to continue, albeit at a slower pace, This allows operation to continue, albeit at a slower pace,
if you have enough data to trigger the API rate limits if you have enough data to trigger the API rate limits
- Release 0.4.0. [Jose Diaz-Gonzalez]
- Merge pull request #7 from acdha/repo-backup-overhaul. [Jose Diaz-
Gonzalez]
Repo backup overhaul
- Update repository back up handling for wikis. [Chris Adams]
* Now wikis will follow the same logic as the main repo
checkout for --prefer-ssh.
* The regular repository and wiki paths both use the same
function to handle either cloning or updating a local copy
of the remote repo
* All git updates will now use “git fetch --all --tags”
to ensure that tags and branches other than master will
also be backed up
- Logging_subprocess: always log when a command fails. [Chris Adams] - Logging_subprocess: always log when a command fails. [Chris Adams]
Previously git clones could fail without any indication Previously git clones could fail without any indication
@@ -444,10 +824,19 @@ Other
The previous commit used the wrong URL for a private repo. This was The previous commit used the wrong URL for a private repo. This was
masked by the lack of error loging in logging_subprocess (which will be masked by the lack of error loging in logging_subprocess (which will be
in a separate branch) in a separate branch)
- Merge pull request #6 from acdha/allow-clone-over-ssh. [Jose Diaz-
Gonzalez]
Add an option to prefer checkouts over SSH
- Add an option to prefer checkouts over SSH. [Chris Adams] - Add an option to prefer checkouts over SSH. [Chris Adams]
This is really useful with private repos to avoid being nagged This is really useful with private repos to avoid being nagged
for credentials for every repository for credentials for every repository
- Release 0.3.0. [Jose Diaz-Gonzalez]
- Merge pull request #4 from klaude/pull_request_support. [Jose Diaz-
Gonzalez]
Add pull request support
- Add pull request support. [Kevin Laude] - Add pull request support. [Kevin Laude]
Back up reporitory pull requests by passing the --include-pulls Back up reporitory pull requests by passing the --include-pulls
@@ -459,6 +848,10 @@ Other
Pull requests are automatically backed up when the --all argument is Pull requests are automatically backed up when the --all argument is
uesd. uesd.
- Merge pull request #5 from klaude/github-enterprise-support. [Jose
Diaz-Gonzalez]
Add GitHub Enterprise Support
- Add GitHub Enterprise support. [Kevin Laude] - Add GitHub Enterprise support. [Kevin Laude]
Pass the -H or --github-host argument with a GitHub Enterprise hostname Pass the -H or --github-host argument with a GitHub Enterprise hostname
@@ -468,9 +861,13 @@ Other
0.2.0 (2014-09-22) 0.2.0 (2014-09-22)
------------------ ------------------
- Release 0.2.0. [Jose Diaz-Gonzalez]
- Add support for retrieving repositories. Closes #1. [Jose Diaz- - Add support for retrieving repositories. Closes #1. [Jose Diaz-
Gonzalez] Gonzalez]
- Fix PEP8 violations. [Jose Diaz-Gonzalez] - Fix PEP8 violations. [Jose Diaz-Gonzalez]
- Merge pull request #2 from johnyf/master. [Jose Diaz-Gonzalez]
add authorization to header only if specified by user
- Add authorization to header only if specified by user. [Ioannis - Add authorization to header only if specified by user. [Ioannis
Filippidis] Filippidis]
- Fill out readme more. [Jose Diaz-Gonzalez] - Fill out readme more. [Jose Diaz-Gonzalez]

View File

@@ -1 +1 @@
__version__ = '0.36.0' __version__ = '0.37.0'

View File

@@ -19,30 +19,14 @@ import subprocess
import sys import sys
import time import time
import platform import platform
PY2 = False from urllib.parse import urlparse
try: from urllib.parse import quote as urlquote
# python 3 from urllib.parse import urlencode
from urllib.parse import urlparse from urllib.error import HTTPError, URLError
from urllib.parse import quote as urlquote from urllib.request import urlopen
from urllib.parse import urlencode from urllib.request import Request
from urllib.error import HTTPError, URLError from urllib.request import HTTPRedirectHandler
from urllib.request import urlopen from urllib.request import build_opener
from urllib.request import Request
from urllib.request import HTTPRedirectHandler
from urllib.request import build_opener
from subprocess import SubprocessError
except ImportError:
# python 2
PY2 = True
from subprocess import CalledProcessError as SubprocessError
from urlparse import urlparse
from urllib import quote as urlquote
from urllib import urlencode
from urllib2 import HTTPError, URLError
from urllib2 import urlopen
from urllib2 import Request
from urllib2 import HTTPRedirectHandler
from urllib2 import build_opener
try: try:
from . import __version__ from . import __version__
@@ -278,6 +262,10 @@ def parse_args():
action='store_true', action='store_true',
dest='include_starred_gists', dest='include_starred_gists',
help='include starred gists in backup [*]') help='include starred gists in backup [*]')
parser.add_argument('--skip-archived',
action='store_true',
dest='skip_archived',
help='skip project if it is archived')
parser.add_argument('--skip-existing', parser.add_argument('--skip-existing',
action='store_true', action='store_true',
dest='skip_existing', dest='skip_existing',
@@ -362,10 +350,9 @@ def get_auth(args, encode=True, for_git_cli=False):
'-s', args.osx_keychain_item_name, '-s', args.osx_keychain_item_name,
'-a', args.osx_keychain_item_account, '-a', args.osx_keychain_item_account,
'-w'], stderr=devnull).strip()) '-w'], stderr=devnull).strip())
if not PY2: token = token.decode('utf-8')
token = token.decode('utf-8')
auth = token + ':' + 'x-oauth-basic' auth = token + ':' + 'x-oauth-basic'
except SubprocessError: except subprocess.SubprocessError:
log_error('No password item matching the provided name and account could be found in the osx keychain.') log_error('No password item matching the provided name and account could be found in the osx keychain.')
elif args.osx_keychain_item_account: elif args.osx_keychain_item_account:
log_error('You must specify both name and account fields for osx keychain password items') log_error('You must specify both name and account fields for osx keychain password items')
@@ -549,8 +536,7 @@ def _construct_request(per_page, page, query_args, template, auth, as_app=None):
if not as_app: if not as_app:
request.add_header('Authorization', 'Basic '.encode('ascii') + auth) request.add_header('Authorization', 'Basic '.encode('ascii') + auth)
else: else:
if not PY2: auth = auth.encode('ascii')
auth = auth.encode('ascii')
request.add_header('Authorization', 'token '.encode('ascii') + auth) request.add_header('Authorization', 'token '.encode('ascii') + auth)
request.add_header('Accept', 'application/vnd.github.machine-man-preview+json') request.add_header('Accept', 'application/vnd.github.machine-man-preview+json')
log_info('Requesting {}?{}'.format(template, querystring)) log_info('Requesting {}?{}'.format(template, querystring))
@@ -608,11 +594,7 @@ class S3HTTPRedirectHandler(HTTPRedirectHandler):
so we should remove said header on redirect. so we should remove said header on redirect.
""" """
def redirect_request(self, req, fp, code, msg, headers, newurl): def redirect_request(self, req, fp, code, msg, headers, newurl):
if PY2: request = super(S3HTTPRedirectHandler, self).redirect_request(req, fp, code, msg, headers, newurl)
# HTTPRedirectHandler is an old style class
request = HTTPRedirectHandler.redirect_request(self, req, fp, code, msg, headers, newurl)
else:
request = super(S3HTTPRedirectHandler, self).redirect_request(req, fp, code, msg, headers, newurl)
del request.headers['Authorization'] del request.headers['Authorization']
return request return request
@@ -742,6 +724,8 @@ def filter_repositories(args, unfiltered_repositories):
repositories = [r for r in repositories if r.get('language') and r.get('language').lower() in languages] # noqa repositories = [r for r in repositories if r.get('language') and r.get('language').lower() in languages] # noqa
if name_regex: if name_regex:
repositories = [r for r in repositories if name_regex.match(r['name'])] repositories = [r for r in repositories if name_regex.match(r['name'])]
if args.skip_archived:
repositories = [r for r in repositories if not r.get('archived')]
return repositories return repositories

View File

@@ -1,24 +1,10 @@
#!/usr/bin/env python #!/usr/bin/env python
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
import os import os
from setuptools import setup
from github_backup import __version__ from github_backup import __version__
try:
from setuptools import setup
setup # workaround for pyflakes issue #13
except ImportError:
from distutils.core import setup
# Hack to prevent stupid TypeError: 'NoneType' object is not callable error on
# exit of python setup.py test # in multiprocessing/util.py _exit_function when
# running python setup.py test (see
# http://www.eby-sarna.com/pipermail/peak/2010-May/003357.html)
try:
import multiprocessing
multiprocessing
except ImportError:
pass
def open_file(fname): def open_file(fname):
return open(os.path.join(os.path.dirname(__file__), fname)) return open(os.path.join(os.path.dirname(__file__), fname))
@@ -37,9 +23,10 @@ setup(
'Development Status :: 5 - Production/Stable', 'Development Status :: 5 - Production/Stable',
'Topic :: System :: Archiving :: Backup', 'Topic :: System :: Archiving :: Backup',
'License :: OSI Approved :: MIT License', 'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
], ],
description='backup a github user or organization', description='backup a github user or organization',
long_description=open_file('README.rst').read(), long_description=open_file('README.rst').read(),