mirror of
https://github.com/josegonzalez/python-github-backup.git
synced 2025-12-05 16:18:02 +01:00
Compare commits
65 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d835d47c17 | ||
|
|
2cd9061c46 | ||
|
|
0cc50bc4cb | ||
|
|
436e8df0ac | ||
|
|
9812988a4a | ||
|
|
1eccebcb83 | ||
|
|
122eb56aa1 | ||
|
|
a0fdae3314 | ||
|
|
80fa92664c | ||
|
|
7b69394488 | ||
|
|
d1d3d84d95 | ||
|
|
fff2aa4075 | ||
|
|
8eba46d8a7 | ||
|
|
9dc3458dba | ||
|
|
e9d7692123 | ||
|
|
a1ef61f87c | ||
|
|
6b62973997 | ||
|
|
b25af67898 | ||
|
|
0380fb8e35 | ||
|
|
f62fe5e6c9 | ||
|
|
c97598c914 | ||
|
|
c488b0adf9 | ||
|
|
888815c271 | ||
|
|
66e11aa532 | ||
|
|
d1874c0bd9 | ||
|
|
4c07bd1310 | ||
|
|
fd2d398025 | ||
|
|
53d2ceec10 | ||
|
|
421a7ec62b | ||
|
|
ec43649bcd | ||
|
|
e869844dba | ||
|
|
0857a37440 | ||
|
|
585af4c4e3 | ||
|
|
41ec01d5cb | ||
|
|
7dc22358df | ||
|
|
b855bcabf6 | ||
|
|
3c3262ed69 | ||
|
|
42b836f623 | ||
|
|
09f4168db6 | ||
|
|
3e9a4fa0d8 | ||
|
|
ab18e96ea8 | ||
|
|
eb88def888 | ||
|
|
7fe6541291 | ||
|
|
c8b8b270f6 | ||
|
|
a97f15b519 | ||
|
|
500c97c60e | ||
|
|
31a6e52a5e | ||
|
|
4c5187bcff | ||
|
|
2de69beffa | ||
|
|
96592295e1 | ||
|
|
bd65c3d5d6 | ||
|
|
aaf45022cc | ||
|
|
7cdf428e3a | ||
|
|
cfb1f1368b | ||
|
|
4700a26d90 | ||
|
|
f53f7d9b71 | ||
|
|
3b6aa060ba | ||
|
|
76ff7f3b0d | ||
|
|
2615cab114 | ||
|
|
fda71b0467 | ||
|
|
a9f82faa1c | ||
|
|
f17bf19776 | ||
|
|
54c81de3d7 | ||
|
|
f2b4f566a1 | ||
|
|
2724f02b0a |
@@ -1,23 +0,0 @@
|
|||||||
version: 2.1
|
|
||||||
|
|
||||||
orbs:
|
|
||||||
python: circleci/python@0.3.2
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-and-test:
|
|
||||||
executor: python/default
|
|
||||||
steps:
|
|
||||||
- checkout
|
|
||||||
- python/load-cache
|
|
||||||
- run:
|
|
||||||
command: pip install flake8
|
|
||||||
name: Install dependencies
|
|
||||||
- python/save-cache
|
|
||||||
- run:
|
|
||||||
command: flake8 --ignore=E501
|
|
||||||
name: Lint
|
|
||||||
|
|
||||||
workflows:
|
|
||||||
main:
|
|
||||||
jobs:
|
|
||||||
- build-and-test
|
|
||||||
11
.github/dependabot.yml
vendored
Normal file
11
.github/dependabot.yml
vendored
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
version: 2
|
||||||
|
updates:
|
||||||
|
- package-ecosystem: pip
|
||||||
|
directory: "/"
|
||||||
|
schedule:
|
||||||
|
interval: daily
|
||||||
|
time: "13:00"
|
||||||
|
groups:
|
||||||
|
python-packages:
|
||||||
|
patterns:
|
||||||
|
- "*"
|
||||||
1
.github/workflows/automatic-release.yml
vendored
1
.github/workflows/automatic-release.yml
vendored
@@ -21,6 +21,7 @@ jobs:
|
|||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
ssh-key: ${{ secrets.DEPLOY_PRIVATE_KEY }}
|
||||||
- name: Setup Git
|
- name: Setup Git
|
||||||
run: |
|
run: |
|
||||||
git config --local user.email "action@github.com"
|
git config --local user.email "action@github.com"
|
||||||
|
|||||||
75
.github/workflows/docker.yml
vendored
Normal file
75
.github/workflows/docker.yml
vendored
Normal file
@@ -0,0 +1,75 @@
|
|||||||
|
# This workflow uses actions that are not certified by GitHub.
|
||||||
|
# They are provided by a third-party and are governed by
|
||||||
|
# separate terms of service, privacy policy, and support
|
||||||
|
# documentation.
|
||||||
|
|
||||||
|
name: Create and publish a Docker image
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- 'master'
|
||||||
|
- 'main'
|
||||||
|
- 'dev'
|
||||||
|
|
||||||
|
tags:
|
||||||
|
- 'v*'
|
||||||
|
- 'v*.*'
|
||||||
|
- 'v*.*.*'
|
||||||
|
- '*'
|
||||||
|
- '*.*'
|
||||||
|
- '*.*.*'
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- 'main'
|
||||||
|
- 'dev'
|
||||||
|
|
||||||
|
|
||||||
|
env:
|
||||||
|
REGISTRY: ghcr.io
|
||||||
|
IMAGE_NAME: ${{ github.repository }}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-and-push-image:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
packages: write
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v2
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v2
|
||||||
|
|
||||||
|
- name: Log in to the Container registry
|
||||||
|
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
|
||||||
|
with:
|
||||||
|
registry: ${{ env.REGISTRY }}
|
||||||
|
username: ${{ github.actor }}
|
||||||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Extract metadata (tags, labels) for Docker
|
||||||
|
id: meta
|
||||||
|
uses: docker/metadata-action@v4
|
||||||
|
with:
|
||||||
|
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||||
|
tags: |
|
||||||
|
type=semver,pattern={{version}}
|
||||||
|
type=semver,pattern={{major}}.{{minor}}
|
||||||
|
type=semver,pattern={{major}}
|
||||||
|
type=sha
|
||||||
|
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }}
|
||||||
|
|
||||||
|
- name: Build and push Docker image
|
||||||
|
uses: docker/build-push-action@v4
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
push: true
|
||||||
|
platforms: linux/amd64,linux/arm64
|
||||||
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
33
.github/workflows/lint.yml
vendored
Normal file
33
.github/workflows/lint.yml
vendored
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
---
|
||||||
|
name: "lint"
|
||||||
|
|
||||||
|
# yamllint disable-line rule:truthy
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- "*"
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- "main"
|
||||||
|
- "master"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
lint:
|
||||||
|
name: lint
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- name: Setup Python
|
||||||
|
uses: actions/setup-python@v4
|
||||||
|
with:
|
||||||
|
python-version: "3.8"
|
||||||
|
cache: "pip"
|
||||||
|
- run: pip install -r release-requirements.txt && pip install wheel
|
||||||
|
- run: flake8 --ignore=E501,E203,W503
|
||||||
|
- run: black .
|
||||||
|
- run: rst-lint README.rst
|
||||||
|
- run: python setup.py sdist bdist_wheel && twine check dist/*
|
||||||
11
.gitignore
vendored
11
.gitignore
vendored
@@ -18,13 +18,13 @@ pkg
|
|||||||
|
|
||||||
# Debian Files
|
# Debian Files
|
||||||
debian/files
|
debian/files
|
||||||
debian/python-aws-hostname*
|
debian/python-github-backup*
|
||||||
|
|
||||||
# Sphinx build
|
# Sphinx build
|
||||||
doc/_build
|
doc/_build
|
||||||
|
|
||||||
# Generated man page
|
# Generated man page
|
||||||
doc/aws_hostname.1
|
doc/github_backup.1
|
||||||
|
|
||||||
# Annoying macOS files
|
# Annoying macOS files
|
||||||
.DS_Store
|
.DS_Store
|
||||||
@@ -35,3 +35,10 @@ doc/aws_hostname.1
|
|||||||
.atom
|
.atom
|
||||||
|
|
||||||
README
|
README
|
||||||
|
|
||||||
|
# RSA
|
||||||
|
id_rsa
|
||||||
|
id_rsa.pub
|
||||||
|
|
||||||
|
# Virtual env
|
||||||
|
venv
|
||||||
|
|||||||
587
CHANGES.rst
587
CHANGES.rst
@@ -1,9 +1,594 @@
|
|||||||
Changelog
|
Changelog
|
||||||
=========
|
=========
|
||||||
|
|
||||||
0.44.0 (2023-12-09)
|
0.45.1 (2024-03-17)
|
||||||
-------------------
|
-------------------
|
||||||
------------------------
|
------------------------
|
||||||
|
- Remove trailing whitespaces. [dale-primer-e]
|
||||||
|
|
||||||
|
That are triggering flake.
|
||||||
|
- Fix error with as_app flag. [dale-primer-e]
|
||||||
|
- Fix error downloading assets. [dale-primer-e]
|
||||||
|
|
||||||
|
When downloading assets using a fine grained token you will get a "can't
|
||||||
|
concat str to bytes" error. This is due to the fine grained token being
|
||||||
|
concatenated onto bytes in the line:
|
||||||
|
|
||||||
|
`request.add_header("Authorization", "Basic ".encode("ascii") + auth)`
|
||||||
|
|
||||||
|
This is better handled in the function `_construct_request` so I changed
|
||||||
|
the lines that construct the request in `download_file` to use the
|
||||||
|
function `_construct_request` and updated the function signature to
|
||||||
|
reflect that.
|
||||||
|
- Chore(deps): bump the python-packages group with 1 update.
|
||||||
|
[dependabot[bot]]
|
||||||
|
|
||||||
|
Bumps the python-packages group with 1 update: [zipp](https://github.com/jaraco/zipp).
|
||||||
|
|
||||||
|
|
||||||
|
Updates `zipp` from 3.18.0 to 3.18.1
|
||||||
|
- [Release notes](https://github.com/jaraco/zipp/releases)
|
||||||
|
- [Changelog](https://github.com/jaraco/zipp/blob/main/NEWS.rst)
|
||||||
|
- [Commits](https://github.com/jaraco/zipp/compare/v3.18.0...v3.18.1)
|
||||||
|
|
||||||
|
---
|
||||||
|
updated-dependencies:
|
||||||
|
- dependency-name: zipp
|
||||||
|
dependency-type: direct:production
|
||||||
|
update-type: version-update:semver-patch
|
||||||
|
dependency-group: python-packages
|
||||||
|
...
|
||||||
|
- Chore(deps): bump the python-packages group with 1 update.
|
||||||
|
[dependabot[bot]]
|
||||||
|
|
||||||
|
Bumps the python-packages group with 1 update: [zipp](https://github.com/jaraco/zipp).
|
||||||
|
|
||||||
|
|
||||||
|
Updates `zipp` from 3.17.0 to 3.18.0
|
||||||
|
- [Release notes](https://github.com/jaraco/zipp/releases)
|
||||||
|
- [Changelog](https://github.com/jaraco/zipp/blob/main/NEWS.rst)
|
||||||
|
- [Commits](https://github.com/jaraco/zipp/compare/v3.17.0...v3.18.0)
|
||||||
|
|
||||||
|
---
|
||||||
|
updated-dependencies:
|
||||||
|
- dependency-name: zipp
|
||||||
|
dependency-type: direct:production
|
||||||
|
update-type: version-update:semver-minor
|
||||||
|
dependency-group: python-packages
|
||||||
|
...
|
||||||
|
- Chore(deps): bump the python-packages group with 2 updates.
|
||||||
|
[dependabot[bot]]
|
||||||
|
|
||||||
|
Bumps the python-packages group with 2 updates: [importlib-metadata](https://github.com/python/importlib_metadata) and [packaging](https://github.com/pypa/packaging).
|
||||||
|
|
||||||
|
|
||||||
|
Updates `importlib-metadata` from 7.0.1 to 7.0.2
|
||||||
|
- [Release notes](https://github.com/python/importlib_metadata/releases)
|
||||||
|
- [Changelog](https://github.com/python/importlib_metadata/blob/main/NEWS.rst)
|
||||||
|
- [Commits](https://github.com/python/importlib_metadata/compare/v7.0.1...v7.0.2)
|
||||||
|
|
||||||
|
Updates `packaging` from 23.2 to 24.0
|
||||||
|
- [Release notes](https://github.com/pypa/packaging/releases)
|
||||||
|
- [Changelog](https://github.com/pypa/packaging/blob/main/CHANGELOG.rst)
|
||||||
|
- [Commits](https://github.com/pypa/packaging/compare/23.2...24.0)
|
||||||
|
|
||||||
|
---
|
||||||
|
updated-dependencies:
|
||||||
|
- dependency-name: importlib-metadata
|
||||||
|
dependency-type: direct:production
|
||||||
|
update-type: version-update:semver-patch
|
||||||
|
dependency-group: python-packages
|
||||||
|
- dependency-name: packaging
|
||||||
|
dependency-type: direct:production
|
||||||
|
update-type: version-update:semver-major
|
||||||
|
dependency-group: python-packages
|
||||||
|
...
|
||||||
|
- Chore(deps): bump the python-packages group with 2 updates.
|
||||||
|
[dependabot[bot]]
|
||||||
|
|
||||||
|
Bumps the python-packages group with 2 updates: [pkginfo](https://code.launchpad.net/~tseaver/pkginfo/trunk) and [rich](https://github.com/Textualize/rich).
|
||||||
|
|
||||||
|
|
||||||
|
Updates `pkginfo` from 1.9.6 to 1.10.0
|
||||||
|
|
||||||
|
Updates `rich` from 13.7.0 to 13.7.1
|
||||||
|
- [Release notes](https://github.com/Textualize/rich/releases)
|
||||||
|
- [Changelog](https://github.com/Textualize/rich/blob/master/CHANGELOG.md)
|
||||||
|
- [Commits](https://github.com/Textualize/rich/compare/v13.7.0...v13.7.1)
|
||||||
|
|
||||||
|
---
|
||||||
|
updated-dependencies:
|
||||||
|
- dependency-name: pkginfo
|
||||||
|
dependency-type: direct:production
|
||||||
|
update-type: version-update:semver-minor
|
||||||
|
dependency-group: python-packages
|
||||||
|
- dependency-name: rich
|
||||||
|
dependency-type: direct:production
|
||||||
|
update-type: version-update:semver-patch
|
||||||
|
dependency-group: python-packages
|
||||||
|
...
|
||||||
|
- Chore(deps): bump the python-packages group with 1 update.
|
||||||
|
[dependabot[bot]]
|
||||||
|
|
||||||
|
Bumps the python-packages group with 1 update: [keyring](https://github.com/jaraco/keyring).
|
||||||
|
|
||||||
|
|
||||||
|
Updates `keyring` from 24.3.0 to 24.3.1
|
||||||
|
- [Release notes](https://github.com/jaraco/keyring/releases)
|
||||||
|
- [Changelog](https://github.com/jaraco/keyring/blob/main/NEWS.rst)
|
||||||
|
- [Commits](https://github.com/jaraco/keyring/compare/v24.3.0...v24.3.1)
|
||||||
|
|
||||||
|
---
|
||||||
|
updated-dependencies:
|
||||||
|
- dependency-name: keyring
|
||||||
|
dependency-type: direct:production
|
||||||
|
update-type: version-update:semver-patch
|
||||||
|
dependency-group: python-packages
|
||||||
|
...
|
||||||
|
- Chore(deps): bump the python-packages group with 1 update.
|
||||||
|
[dependabot[bot]]
|
||||||
|
|
||||||
|
Bumps the python-packages group with 1 update: [readme-renderer](https://github.com/pypa/readme_renderer).
|
||||||
|
|
||||||
|
|
||||||
|
Updates `readme-renderer` from 42.0 to 43.0
|
||||||
|
- [Release notes](https://github.com/pypa/readme_renderer/releases)
|
||||||
|
- [Changelog](https://github.com/pypa/readme_renderer/blob/main/CHANGES.rst)
|
||||||
|
- [Commits](https://github.com/pypa/readme_renderer/compare/42.0...43.0)
|
||||||
|
|
||||||
|
---
|
||||||
|
updated-dependencies:
|
||||||
|
- dependency-name: readme-renderer
|
||||||
|
dependency-type: direct:production
|
||||||
|
update-type: version-update:semver-major
|
||||||
|
dependency-group: python-packages
|
||||||
|
...
|
||||||
|
- Chore(deps): bump the python-packages group with 1 update.
|
||||||
|
[dependabot[bot]]
|
||||||
|
|
||||||
|
Bumps the python-packages group with 1 update: [urllib3](https://github.com/urllib3/urllib3).
|
||||||
|
|
||||||
|
|
||||||
|
Updates `urllib3` from 2.2.0 to 2.2.1
|
||||||
|
- [Release notes](https://github.com/urllib3/urllib3/releases)
|
||||||
|
- [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst)
|
||||||
|
- [Commits](https://github.com/urllib3/urllib3/compare/2.2.0...2.2.1)
|
||||||
|
|
||||||
|
---
|
||||||
|
updated-dependencies:
|
||||||
|
- dependency-name: urllib3
|
||||||
|
dependency-type: direct:production
|
||||||
|
update-type: version-update:semver-patch
|
||||||
|
dependency-group: python-packages
|
||||||
|
...
|
||||||
|
- Chore(deps): bump the python-packages group with 1 update.
|
||||||
|
[dependabot[bot]]
|
||||||
|
|
||||||
|
Bumps the python-packages group with 1 update: [black](https://github.com/psf/black).
|
||||||
|
|
||||||
|
|
||||||
|
Updates `black` from 24.1.1 to 24.2.0
|
||||||
|
- [Release notes](https://github.com/psf/black/releases)
|
||||||
|
- [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
|
||||||
|
- [Commits](https://github.com/psf/black/compare/24.1.1...24.2.0)
|
||||||
|
|
||||||
|
---
|
||||||
|
updated-dependencies:
|
||||||
|
- dependency-name: black
|
||||||
|
dependency-type: direct:production
|
||||||
|
update-type: version-update:semver-minor
|
||||||
|
dependency-group: python-packages
|
||||||
|
...
|
||||||
|
- Chore(deps): bump the python-packages group with 2 updates.
|
||||||
|
[dependabot[bot]]
|
||||||
|
|
||||||
|
Bumps the python-packages group with 2 updates: [tqdm](https://github.com/tqdm/tqdm) and [twine](https://github.com/pypa/twine).
|
||||||
|
|
||||||
|
|
||||||
|
Updates `tqdm` from 4.66.1 to 4.66.2
|
||||||
|
- [Release notes](https://github.com/tqdm/tqdm/releases)
|
||||||
|
- [Commits](https://github.com/tqdm/tqdm/compare/v4.66.1...v4.66.2)
|
||||||
|
|
||||||
|
Updates `twine` from 4.0.2 to 5.0.0
|
||||||
|
- [Release notes](https://github.com/pypa/twine/releases)
|
||||||
|
- [Changelog](https://github.com/pypa/twine/blob/main/docs/changelog.rst)
|
||||||
|
- [Commits](https://github.com/pypa/twine/compare/4.0.2...5.0.0)
|
||||||
|
|
||||||
|
---
|
||||||
|
updated-dependencies:
|
||||||
|
- dependency-name: tqdm
|
||||||
|
dependency-type: direct:production
|
||||||
|
update-type: version-update:semver-patch
|
||||||
|
dependency-group: python-packages
|
||||||
|
- dependency-name: twine
|
||||||
|
dependency-type: direct:production
|
||||||
|
update-type: version-update:semver-major
|
||||||
|
dependency-group: python-packages
|
||||||
|
...
|
||||||
|
- Chore(deps): bump the python-packages group with 1 update.
|
||||||
|
[dependabot[bot]]
|
||||||
|
|
||||||
|
Bumps the python-packages group with 1 update: [jaraco-classes](https://github.com/jaraco/jaraco.classes).
|
||||||
|
|
||||||
|
|
||||||
|
Updates `jaraco-classes` from 3.3.0 to 3.3.1
|
||||||
|
- [Release notes](https://github.com/jaraco/jaraco.classes/releases)
|
||||||
|
- [Changelog](https://github.com/jaraco/jaraco.classes/blob/main/NEWS.rst)
|
||||||
|
- [Commits](https://github.com/jaraco/jaraco.classes/compare/v3.3.0...v3.3.1)
|
||||||
|
|
||||||
|
---
|
||||||
|
updated-dependencies:
|
||||||
|
- dependency-name: jaraco-classes
|
||||||
|
dependency-type: direct:production
|
||||||
|
update-type: version-update:semver-patch
|
||||||
|
dependency-group: python-packages
|
||||||
|
...
|
||||||
|
- Chore(deps): bump the python-packages group with 1 update.
|
||||||
|
[dependabot[bot]]
|
||||||
|
|
||||||
|
Bumps the python-packages group with 1 update: [certifi](https://github.com/certifi/python-certifi).
|
||||||
|
|
||||||
|
|
||||||
|
Updates `certifi` from 2023.11.17 to 2024.2.2
|
||||||
|
- [Commits](https://github.com/certifi/python-certifi/compare/2023.11.17...2024.02.02)
|
||||||
|
|
||||||
|
---
|
||||||
|
updated-dependencies:
|
||||||
|
- dependency-name: certifi
|
||||||
|
dependency-type: direct:production
|
||||||
|
update-type: version-update:semver-major
|
||||||
|
dependency-group: python-packages
|
||||||
|
...
|
||||||
|
- Chore(deps): bump the python-packages group with 2 updates.
|
||||||
|
[dependabot[bot]]
|
||||||
|
|
||||||
|
Bumps the python-packages group with 2 updates: [platformdirs](https://github.com/platformdirs/platformdirs) and [urllib3](https://github.com/urllib3/urllib3).
|
||||||
|
|
||||||
|
|
||||||
|
Updates `platformdirs` from 4.1.0 to 4.2.0
|
||||||
|
- [Release notes](https://github.com/platformdirs/platformdirs/releases)
|
||||||
|
- [Changelog](https://github.com/platformdirs/platformdirs/blob/main/CHANGES.rst)
|
||||||
|
- [Commits](https://github.com/platformdirs/platformdirs/compare/4.1.0...4.2.0)
|
||||||
|
|
||||||
|
Updates `urllib3` from 2.1.0 to 2.2.0
|
||||||
|
- [Release notes](https://github.com/urllib3/urllib3/releases)
|
||||||
|
- [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst)
|
||||||
|
- [Commits](https://github.com/urllib3/urllib3/compare/2.1.0...2.2.0)
|
||||||
|
|
||||||
|
---
|
||||||
|
updated-dependencies:
|
||||||
|
- dependency-name: platformdirs
|
||||||
|
dependency-type: direct:production
|
||||||
|
update-type: version-update:semver-minor
|
||||||
|
dependency-group: python-packages
|
||||||
|
- dependency-name: urllib3
|
||||||
|
dependency-type: direct:production
|
||||||
|
update-type: version-update:semver-minor
|
||||||
|
dependency-group: python-packages
|
||||||
|
...
|
||||||
|
- Chore(deps): bump the python-packages group with 1 update.
|
||||||
|
[dependabot[bot]]
|
||||||
|
|
||||||
|
Bumps the python-packages group with 1 update: [black](https://github.com/psf/black).
|
||||||
|
|
||||||
|
|
||||||
|
Updates `black` from 24.1.0 to 24.1.1
|
||||||
|
- [Release notes](https://github.com/psf/black/releases)
|
||||||
|
- [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
|
||||||
|
- [Commits](https://github.com/psf/black/compare/24.1.0...24.1.1)
|
||||||
|
|
||||||
|
---
|
||||||
|
updated-dependencies:
|
||||||
|
- dependency-name: black
|
||||||
|
dependency-type: direct:production
|
||||||
|
update-type: version-update:semver-patch
|
||||||
|
dependency-group: python-packages
|
||||||
|
...
|
||||||
|
|
||||||
|
|
||||||
|
0.45.0 (2024-01-29)
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
Fix
|
||||||
|
~~~
|
||||||
|
- Catch 404s for non-existing hooks. Fixes #176. [Moritz Federspiel]
|
||||||
|
- Ensure wheel is installed. [Jose Diaz-Gonzalez]
|
||||||
|
|
||||||
|
Other
|
||||||
|
~~~~~
|
||||||
|
- Fix code style. [BrOleg5]
|
||||||
|
- Add option to skip prerelease versions. [BrOleg5]
|
||||||
|
|
||||||
|
Replace release sorting by tag with release sorting by creation date.
|
||||||
|
- Add option to include certain number of the latest releases. [BrOleg5]
|
||||||
|
- Auto docker build. [8cH9azbsFifZ]
|
||||||
|
- Vs code. [8cH9azbsFifZ]
|
||||||
|
- Chore(deps): bump the python-packages group with 6 updates.
|
||||||
|
[dependabot[bot]]
|
||||||
|
|
||||||
|
Bumps the python-packages group with 6 updates:
|
||||||
|
|
||||||
|
| Package | From | To |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| [black](https://github.com/psf/black) | `23.11.0` | `24.1.0` |
|
||||||
|
| [flake8](https://github.com/pycqa/flake8) | `6.1.0` | `7.0.0` |
|
||||||
|
| [importlib-metadata](https://github.com/python/importlib_metadata) | `7.0.0` | `7.0.1` |
|
||||||
|
| [more-itertools](https://github.com/more-itertools/more-itertools) | `10.1.0` | `10.2.0` |
|
||||||
|
| [pathspec](https://github.com/cpburnz/python-pathspec) | `0.11.2` | `0.12.1` |
|
||||||
|
| [pyflakes](https://github.com/PyCQA/pyflakes) | `3.1.0` | `3.2.0` |
|
||||||
|
|
||||||
|
|
||||||
|
Updates `black` from 23.11.0 to 24.1.0
|
||||||
|
- [Release notes](https://github.com/psf/black/releases)
|
||||||
|
- [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
|
||||||
|
- [Commits](https://github.com/psf/black/compare/23.11.0...24.1.0)
|
||||||
|
|
||||||
|
Updates `flake8` from 6.1.0 to 7.0.0
|
||||||
|
- [Commits](https://github.com/pycqa/flake8/compare/6.1.0...7.0.0)
|
||||||
|
|
||||||
|
Updates `importlib-metadata` from 7.0.0 to 7.0.1
|
||||||
|
- [Release notes](https://github.com/python/importlib_metadata/releases)
|
||||||
|
- [Changelog](https://github.com/python/importlib_metadata/blob/main/NEWS.rst)
|
||||||
|
- [Commits](https://github.com/python/importlib_metadata/compare/v7.0.0...v7.0.1)
|
||||||
|
|
||||||
|
Updates `more-itertools` from 10.1.0 to 10.2.0
|
||||||
|
- [Release notes](https://github.com/more-itertools/more-itertools/releases)
|
||||||
|
- [Commits](https://github.com/more-itertools/more-itertools/compare/v10.1.0...v10.2.0)
|
||||||
|
|
||||||
|
Updates `pathspec` from 0.11.2 to 0.12.1
|
||||||
|
- [Release notes](https://github.com/cpburnz/python-pathspec/releases)
|
||||||
|
- [Changelog](https://github.com/cpburnz/python-pathspec/blob/master/CHANGES.rst)
|
||||||
|
- [Commits](https://github.com/cpburnz/python-pathspec/compare/v0.11.2...v0.12.1)
|
||||||
|
|
||||||
|
Updates `pyflakes` from 3.1.0 to 3.2.0
|
||||||
|
- [Changelog](https://github.com/PyCQA/pyflakes/blob/main/NEWS.rst)
|
||||||
|
- [Commits](https://github.com/PyCQA/pyflakes/compare/3.1.0...3.2.0)
|
||||||
|
|
||||||
|
---
|
||||||
|
updated-dependencies:
|
||||||
|
- dependency-name: black
|
||||||
|
dependency-type: direct:production
|
||||||
|
update-type: version-update:semver-major
|
||||||
|
dependency-group: python-packages
|
||||||
|
- dependency-name: flake8
|
||||||
|
dependency-type: direct:production
|
||||||
|
update-type: version-update:semver-major
|
||||||
|
dependency-group: python-packages
|
||||||
|
- dependency-name: importlib-metadata
|
||||||
|
dependency-type: direct:production
|
||||||
|
update-type: version-update:semver-patch
|
||||||
|
dependency-group: python-packages
|
||||||
|
- dependency-name: more-itertools
|
||||||
|
dependency-type: direct:production
|
||||||
|
update-type: version-update:semver-minor
|
||||||
|
dependency-group: python-packages
|
||||||
|
- dependency-name: pathspec
|
||||||
|
dependency-type: direct:production
|
||||||
|
update-type: version-update:semver-minor
|
||||||
|
dependency-group: python-packages
|
||||||
|
- dependency-name: pyflakes
|
||||||
|
dependency-type: direct:production
|
||||||
|
update-type: version-update:semver-minor
|
||||||
|
dependency-group: python-packages
|
||||||
|
...
|
||||||
|
- Chore(deps): bump the python-packages group with 15 updates.
|
||||||
|
[dependabot[bot]]
|
||||||
|
|
||||||
|
Bumps the python-packages group with 15 updates:
|
||||||
|
|
||||||
|
| Package | From | To |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| [bleach](https://github.com/mozilla/bleach) | `6.0.0` | `6.1.0` |
|
||||||
|
| [certifi](https://github.com/certifi/python-certifi) | `2023.7.22` | `2023.11.17` |
|
||||||
|
| [charset-normalizer](https://github.com/Ousret/charset_normalizer) | `3.1.0` | `3.3.2` |
|
||||||
|
| [idna](https://github.com/kjd/idna) | `3.4` | `3.6` |
|
||||||
|
| [importlib-metadata](https://github.com/python/importlib_metadata) | `6.6.0` | `7.0.0` |
|
||||||
|
| [jaraco-classes](https://github.com/jaraco/jaraco.classes) | `3.2.3` | `3.3.0` |
|
||||||
|
| [keyring](https://github.com/jaraco/keyring) | `23.13.1` | `24.3.0` |
|
||||||
|
| [markdown-it-py](https://github.com/executablebooks/markdown-it-py) | `2.2.0` | `3.0.0` |
|
||||||
|
| [more-itertools](https://github.com/more-itertools/more-itertools) | `9.1.0` | `10.1.0` |
|
||||||
|
| [pygments](https://github.com/pygments/pygments) | `2.15.1` | `2.17.2` |
|
||||||
|
| [readme-renderer](https://github.com/pypa/readme_renderer) | `37.3` | `42.0` |
|
||||||
|
| [rich](https://github.com/Textualize/rich) | `13.3.5` | `13.7.0` |
|
||||||
|
| [tqdm](https://github.com/tqdm/tqdm) | `4.65.0` | `4.66.1` |
|
||||||
|
| [urllib3](https://github.com/urllib3/urllib3) | `2.0.7` | `2.1.0` |
|
||||||
|
| [zipp](https://github.com/jaraco/zipp) | `3.15.0` | `3.17.0` |
|
||||||
|
|
||||||
|
|
||||||
|
Updates `bleach` from 6.0.0 to 6.1.0
|
||||||
|
- [Changelog](https://github.com/mozilla/bleach/blob/main/CHANGES)
|
||||||
|
- [Commits](https://github.com/mozilla/bleach/compare/v6.0.0...v6.1.0)
|
||||||
|
|
||||||
|
Updates `certifi` from 2023.7.22 to 2023.11.17
|
||||||
|
- [Commits](https://github.com/certifi/python-certifi/compare/2023.07.22...2023.11.17)
|
||||||
|
|
||||||
|
Updates `charset-normalizer` from 3.1.0 to 3.3.2
|
||||||
|
- [Release notes](https://github.com/Ousret/charset_normalizer/releases)
|
||||||
|
- [Changelog](https://github.com/Ousret/charset_normalizer/blob/master/CHANGELOG.md)
|
||||||
|
- [Commits](https://github.com/Ousret/charset_normalizer/compare/3.1.0...3.3.2)
|
||||||
|
|
||||||
|
Updates `idna` from 3.4 to 3.6
|
||||||
|
- [Changelog](https://github.com/kjd/idna/blob/master/HISTORY.rst)
|
||||||
|
- [Commits](https://github.com/kjd/idna/compare/v3.4...v3.6)
|
||||||
|
|
||||||
|
Updates `importlib-metadata` from 6.6.0 to 7.0.0
|
||||||
|
- [Release notes](https://github.com/python/importlib_metadata/releases)
|
||||||
|
- [Changelog](https://github.com/python/importlib_metadata/blob/main/NEWS.rst)
|
||||||
|
- [Commits](https://github.com/python/importlib_metadata/compare/v6.6.0...v7.0.0)
|
||||||
|
|
||||||
|
Updates `jaraco-classes` from 3.2.3 to 3.3.0
|
||||||
|
- [Release notes](https://github.com/jaraco/jaraco.classes/releases)
|
||||||
|
- [Changelog](https://github.com/jaraco/jaraco.classes/blob/main/NEWS.rst)
|
||||||
|
- [Commits](https://github.com/jaraco/jaraco.classes/compare/v3.2.3...v3.3.0)
|
||||||
|
|
||||||
|
Updates `keyring` from 23.13.1 to 24.3.0
|
||||||
|
- [Release notes](https://github.com/jaraco/keyring/releases)
|
||||||
|
- [Changelog](https://github.com/jaraco/keyring/blob/main/NEWS.rst)
|
||||||
|
- [Commits](https://github.com/jaraco/keyring/compare/v23.13.1...v24.3.0)
|
||||||
|
|
||||||
|
Updates `markdown-it-py` from 2.2.0 to 3.0.0
|
||||||
|
- [Release notes](https://github.com/executablebooks/markdown-it-py/releases)
|
||||||
|
- [Changelog](https://github.com/executablebooks/markdown-it-py/blob/master/CHANGELOG.md)
|
||||||
|
- [Commits](https://github.com/executablebooks/markdown-it-py/compare/v2.2.0...v3.0.0)
|
||||||
|
|
||||||
|
Updates `more-itertools` from 9.1.0 to 10.1.0
|
||||||
|
- [Release notes](https://github.com/more-itertools/more-itertools/releases)
|
||||||
|
- [Commits](https://github.com/more-itertools/more-itertools/compare/v9.1.0...v10.1.0)
|
||||||
|
|
||||||
|
Updates `pygments` from 2.15.1 to 2.17.2
|
||||||
|
- [Release notes](https://github.com/pygments/pygments/releases)
|
||||||
|
- [Changelog](https://github.com/pygments/pygments/blob/master/CHANGES)
|
||||||
|
- [Commits](https://github.com/pygments/pygments/compare/2.15.1...2.17.2)
|
||||||
|
|
||||||
|
Updates `readme-renderer` from 37.3 to 42.0
|
||||||
|
- [Release notes](https://github.com/pypa/readme_renderer/releases)
|
||||||
|
- [Changelog](https://github.com/pypa/readme_renderer/blob/main/CHANGES.rst)
|
||||||
|
- [Commits](https://github.com/pypa/readme_renderer/compare/37.3...42.0)
|
||||||
|
|
||||||
|
Updates `rich` from 13.3.5 to 13.7.0
|
||||||
|
- [Release notes](https://github.com/Textualize/rich/releases)
|
||||||
|
- [Changelog](https://github.com/Textualize/rich/blob/master/CHANGELOG.md)
|
||||||
|
- [Commits](https://github.com/Textualize/rich/compare/v13.3.5...v13.7.0)
|
||||||
|
|
||||||
|
Updates `tqdm` from 4.65.0 to 4.66.1
|
||||||
|
- [Release notes](https://github.com/tqdm/tqdm/releases)
|
||||||
|
- [Commits](https://github.com/tqdm/tqdm/compare/v4.65.0...v4.66.1)
|
||||||
|
|
||||||
|
Updates `urllib3` from 2.0.7 to 2.1.0
|
||||||
|
- [Release notes](https://github.com/urllib3/urllib3/releases)
|
||||||
|
- [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst)
|
||||||
|
- [Commits](https://github.com/urllib3/urllib3/compare/2.0.7...2.1.0)
|
||||||
|
|
||||||
|
Updates `zipp` from 3.15.0 to 3.17.0
|
||||||
|
- [Release notes](https://github.com/jaraco/zipp/releases)
|
||||||
|
- [Changelog](https://github.com/jaraco/zipp/blob/main/NEWS.rst)
|
||||||
|
- [Commits](https://github.com/jaraco/zipp/compare/v3.15.0...v3.17.0)
|
||||||
|
|
||||||
|
---
|
||||||
|
updated-dependencies:
|
||||||
|
- dependency-name: bleach
|
||||||
|
dependency-type: direct:production
|
||||||
|
update-type: version-update:semver-minor
|
||||||
|
dependency-group: python-packages
|
||||||
|
- dependency-name: certifi
|
||||||
|
dependency-type: direct:production
|
||||||
|
update-type: version-update:semver-minor
|
||||||
|
dependency-group: python-packages
|
||||||
|
- dependency-name: charset-normalizer
|
||||||
|
dependency-type: direct:production
|
||||||
|
update-type: version-update:semver-minor
|
||||||
|
dependency-group: python-packages
|
||||||
|
- dependency-name: idna
|
||||||
|
dependency-type: direct:production
|
||||||
|
update-type: version-update:semver-minor
|
||||||
|
dependency-group: python-packages
|
||||||
|
- dependency-name: importlib-metadata
|
||||||
|
dependency-type: direct:production
|
||||||
|
update-type: version-update:semver-major
|
||||||
|
dependency-group: python-packages
|
||||||
|
- dependency-name: jaraco-classes
|
||||||
|
dependency-type: direct:production
|
||||||
|
update-type: version-update:semver-minor
|
||||||
|
dependency-group: python-packages
|
||||||
|
- dependency-name: keyring
|
||||||
|
dependency-type: direct:production
|
||||||
|
update-type: version-update:semver-major
|
||||||
|
dependency-group: python-packages
|
||||||
|
- dependency-name: markdown-it-py
|
||||||
|
dependency-type: direct:production
|
||||||
|
update-type: version-update:semver-major
|
||||||
|
dependency-group: python-packages
|
||||||
|
- dependency-name: more-itertools
|
||||||
|
dependency-type: direct:production
|
||||||
|
update-type: version-update:semver-major
|
||||||
|
dependency-group: python-packages
|
||||||
|
- dependency-name: pygments
|
||||||
|
dependency-type: direct:production
|
||||||
|
update-type: version-update:semver-minor
|
||||||
|
dependency-group: python-packages
|
||||||
|
- dependency-name: readme-renderer
|
||||||
|
dependency-type: direct:production
|
||||||
|
update-type: version-update:semver-major
|
||||||
|
dependency-group: python-packages
|
||||||
|
- dependency-name: rich
|
||||||
|
dependency-type: direct:production
|
||||||
|
update-type: version-update:semver-minor
|
||||||
|
dependency-group: python-packages
|
||||||
|
- dependency-name: tqdm
|
||||||
|
dependency-type: direct:production
|
||||||
|
update-type: version-update:semver-minor
|
||||||
|
dependency-group: python-packages
|
||||||
|
- dependency-name: urllib3
|
||||||
|
dependency-type: direct:production
|
||||||
|
update-type: version-update:semver-minor
|
||||||
|
dependency-group: python-packages
|
||||||
|
- dependency-name: zipp
|
||||||
|
dependency-type: direct:production
|
||||||
|
update-type: version-update:semver-minor
|
||||||
|
dependency-group: python-packages
|
||||||
|
...
|
||||||
|
- Chore: format python code. [Jose Diaz-Gonzalez]
|
||||||
|
- Chore: format yaml. [Jose Diaz-Gonzalez]
|
||||||
|
- Chore: update gitignore. [Jose Diaz-Gonzalez]
|
||||||
|
- Feat: add dependabot config to repository. [Jose Diaz-Gonzalez]
|
||||||
|
|
||||||
|
|
||||||
|
0.44.1 (2023-12-09)
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
Fix
|
||||||
|
~~~
|
||||||
|
- Use a deploy key to push tags so releases get auto-created. [Jose
|
||||||
|
Diaz-Gonzalez]
|
||||||
|
|
||||||
|
Other
|
||||||
|
~~~~~
|
||||||
|
- Chore(deps): bump certifi from 2023.5.7 to 2023.7.22.
|
||||||
|
[dependabot[bot]]
|
||||||
|
|
||||||
|
Bumps [certifi](https://github.com/certifi/python-certifi) from 2023.5.7 to 2023.7.22.
|
||||||
|
- [Commits](https://github.com/certifi/python-certifi/compare/2023.05.07...2023.07.22)
|
||||||
|
|
||||||
|
---
|
||||||
|
updated-dependencies:
|
||||||
|
- dependency-name: certifi
|
||||||
|
dependency-type: direct:production
|
||||||
|
...
|
||||||
|
- Tests: run lint on pull requests. [Jose Diaz-Gonzalez]
|
||||||
|
- Chore(deps): bump urllib3 from 2.0.2 to 2.0.7. [dependabot[bot]]
|
||||||
|
|
||||||
|
Bumps [urllib3](https://github.com/urllib3/urllib3) from 2.0.2 to 2.0.7.
|
||||||
|
- [Release notes](https://github.com/urllib3/urllib3/releases)
|
||||||
|
- [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst)
|
||||||
|
- [Commits](https://github.com/urllib3/urllib3/compare/2.0.2...2.0.7)
|
||||||
|
|
||||||
|
---
|
||||||
|
updated-dependencies:
|
||||||
|
- dependency-name: urllib3
|
||||||
|
dependency-type: direct:production
|
||||||
|
...
|
||||||
|
- Chore: remove circleci as tests now run in github actions. [Jose Diaz-
|
||||||
|
Gonzalez]
|
||||||
|
- Tests: install correct dependencies and rename job. [Jose Diaz-
|
||||||
|
Gonzalez]
|
||||||
|
- Tests: add lint github action workflow. [Jose Diaz-Gonzalez]
|
||||||
|
- Feat: install autopep8. [Jose Diaz-Gonzalez]
|
||||||
|
- Chore(deps): bump certifi from 2023.5.7 to 2023.7.22.
|
||||||
|
[dependabot[bot]]
|
||||||
|
|
||||||
|
Bumps [certifi](https://github.com/certifi/python-certifi) from 2023.5.7 to 2023.7.22.
|
||||||
|
- [Commits](https://github.com/certifi/python-certifi/compare/2023.05.07...2023.07.22)
|
||||||
|
|
||||||
|
---
|
||||||
|
updated-dependencies:
|
||||||
|
- dependency-name: certifi
|
||||||
|
dependency-type: direct:production
|
||||||
|
...
|
||||||
|
- Chore: reformat file and update flake8. [Jose Diaz-Gonzalez]
|
||||||
|
|
||||||
|
|
||||||
|
0.44.0 (2023-12-09)
|
||||||
|
-------------------
|
||||||
|
|
||||||
Fix
|
Fix
|
||||||
~~~
|
~~~
|
||||||
|
|||||||
@@ -49,7 +49,9 @@ CLI Help output::
|
|||||||
[-P] [-F] [--prefer-ssh] [-v]
|
[-P] [-F] [--prefer-ssh] [-v]
|
||||||
[--keychain-name OSX_KEYCHAIN_ITEM_NAME]
|
[--keychain-name OSX_KEYCHAIN_ITEM_NAME]
|
||||||
[--keychain-account OSX_KEYCHAIN_ITEM_ACCOUNT]
|
[--keychain-account OSX_KEYCHAIN_ITEM_ACCOUNT]
|
||||||
[--releases] [--assets] [--exclude [REPOSITORY [REPOSITORY ...]]
|
[--releases] [--latest-releases NUMBER_OF_LATEST_RELEASES]
|
||||||
|
[--skip-prerelease] [--assets]
|
||||||
|
[--exclude [REPOSITORY [REPOSITORY ...]]
|
||||||
[--throttle-limit THROTTLE_LIMIT] [--throttle-pause THROTTLE_PAUSE]
|
[--throttle-limit THROTTLE_LIMIT] [--throttle-pause THROTTLE_PAUSE]
|
||||||
USER
|
USER
|
||||||
|
|
||||||
@@ -124,6 +126,10 @@ CLI Help output::
|
|||||||
keychain that holds the personal access or OAuth token
|
keychain that holds the personal access or OAuth token
|
||||||
--releases include release information, not including assets or
|
--releases include release information, not including assets or
|
||||||
binaries
|
binaries
|
||||||
|
--latest-releases NUMBER_OF_LATEST_RELEASES
|
||||||
|
include certain number of the latest releases;
|
||||||
|
only applies if including releases
|
||||||
|
--skip-prerelease skip prerelease and draft versions; only applies if including releases
|
||||||
--assets include assets alongside release information; only
|
--assets include assets alongside release information; only
|
||||||
applies if including releases
|
applies if including releases
|
||||||
--exclude [REPOSITORY [REPOSITORY ...]]
|
--exclude [REPOSITORY [REPOSITORY ...]]
|
||||||
|
|||||||
@@ -1,12 +1,8 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
import os, sys, logging
|
import logging
|
||||||
|
import os
|
||||||
logging.basicConfig(
|
import sys
|
||||||
format='%(asctime)s.%(msecs)03d: %(message)s',
|
|
||||||
datefmt='%Y-%m-%dT%H:%M:%S',
|
|
||||||
level=logging.INFO
|
|
||||||
)
|
|
||||||
|
|
||||||
from github_backup.github_backup import (
|
from github_backup.github_backup import (
|
||||||
backup_account,
|
backup_account,
|
||||||
@@ -20,6 +16,12 @@ from github_backup.github_backup import (
|
|||||||
retrieve_repositories,
|
retrieve_repositories,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
logging.basicConfig(
|
||||||
|
format="%(asctime)s.%(msecs)03d: %(message)s",
|
||||||
|
datefmt="%Y-%m-%dT%H:%M:%S",
|
||||||
|
level=logging.INFO,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
args = parse_args()
|
args = parse_args()
|
||||||
@@ -29,7 +31,7 @@ def main():
|
|||||||
|
|
||||||
output_directory = os.path.realpath(args.output_directory)
|
output_directory = os.path.realpath(args.output_directory)
|
||||||
if not os.path.isdir(output_directory):
|
if not os.path.isdir(output_directory):
|
||||||
logger.info('Create output directory {0}'.format(output_directory))
|
logger.info("Create output directory {0}".format(output_directory))
|
||||||
mkdir_p(output_directory)
|
mkdir_p(output_directory)
|
||||||
|
|
||||||
if args.lfs_clone:
|
if args.lfs_clone:
|
||||||
@@ -41,10 +43,10 @@ def main():
|
|||||||
logger.root.setLevel(log_level)
|
logger.root.setLevel(log_level)
|
||||||
|
|
||||||
if not args.as_app:
|
if not args.as_app:
|
||||||
logger.info('Backing up user {0} to {1}'.format(args.user, output_directory))
|
logger.info("Backing up user {0} to {1}".format(args.user, output_directory))
|
||||||
authenticated_user = get_authenticated_user(args)
|
authenticated_user = get_authenticated_user(args)
|
||||||
else:
|
else:
|
||||||
authenticated_user = {'login': None}
|
authenticated_user = {"login": None}
|
||||||
|
|
||||||
repositories = retrieve_repositories(args, authenticated_user)
|
repositories = retrieve_repositories(args, authenticated_user)
|
||||||
repositories = filter_repositories(args, repositories)
|
repositories = filter_repositories(args, repositories)
|
||||||
@@ -52,7 +54,7 @@ def main():
|
|||||||
backup_account(args, output_directory)
|
backup_account(args, output_directory)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == "__main__":
|
||||||
try:
|
try:
|
||||||
main()
|
main()
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
__version__ = "0.44.0"
|
__version__ = "0.45.1"
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
import socket
|
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
import base64
|
import base64
|
||||||
@@ -10,23 +9,21 @@ import codecs
|
|||||||
import errno
|
import errno
|
||||||
import getpass
|
import getpass
|
||||||
import json
|
import json
|
||||||
|
import logging
|
||||||
import os
|
import os
|
||||||
|
import platform
|
||||||
import re
|
import re
|
||||||
import select
|
import select
|
||||||
|
import socket
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
import logging
|
|
||||||
import time
|
import time
|
||||||
import platform
|
|
||||||
from urllib.parse import urlparse
|
|
||||||
from urllib.parse import quote as urlquote
|
|
||||||
from urllib.parse import urlencode
|
|
||||||
from urllib.error import HTTPError, URLError
|
|
||||||
from urllib.request import urlopen
|
|
||||||
from urllib.request import Request
|
|
||||||
from urllib.request import HTTPRedirectHandler
|
|
||||||
from urllib.request import build_opener
|
|
||||||
from http.client import IncompleteRead
|
from http.client import IncompleteRead
|
||||||
|
from urllib.error import HTTPError, URLError
|
||||||
|
from urllib.parse import quote as urlquote
|
||||||
|
from urllib.parse import urlencode, urlparse
|
||||||
|
from urllib.request import HTTPRedirectHandler, Request, build_opener, urlopen
|
||||||
|
from datetime import datetime
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from . import __version__
|
from . import __version__
|
||||||
@@ -41,10 +38,7 @@ logger = logging.getLogger(__name__)
|
|||||||
|
|
||||||
|
|
||||||
def logging_subprocess(
|
def logging_subprocess(
|
||||||
popenargs,
|
popenargs, stdout_log_level=logging.DEBUG, stderr_log_level=logging.ERROR, **kwargs
|
||||||
stdout_log_level=logging.DEBUG,
|
|
||||||
stderr_log_level=logging.ERROR,
|
|
||||||
**kwargs
|
|
||||||
):
|
):
|
||||||
"""
|
"""
|
||||||
Variant of subprocess.call that accepts a logger instead of stdout/stderr,
|
Variant of subprocess.call that accepts a logger instead of stdout/stderr,
|
||||||
@@ -383,6 +377,19 @@ def parse_args(args=None):
|
|||||||
dest="include_releases",
|
dest="include_releases",
|
||||||
help="include release information, not including assets or binaries",
|
help="include release information, not including assets or binaries",
|
||||||
)
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"--latest-releases",
|
||||||
|
type=int,
|
||||||
|
default=0,
|
||||||
|
dest="number_of_latest_releases",
|
||||||
|
help="include certain number of the latest releases; only applies if including releases",
|
||||||
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"--skip-prerelease",
|
||||||
|
action="store_true",
|
||||||
|
dest="skip_prerelease",
|
||||||
|
help="skip prerelease and draft versions; only applies if including releases",
|
||||||
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--assets",
|
"--assets",
|
||||||
action="store_true",
|
action="store_true",
|
||||||
@@ -626,12 +633,12 @@ def retrieve_data_gen(args, template, query_args=None, single_request=False):
|
|||||||
raise Exception(", ".join(errors))
|
raise Exception(", ".join(errors))
|
||||||
|
|
||||||
if len(errors) == 0:
|
if len(errors) == 0:
|
||||||
if type(response) == list:
|
if type(response) is list:
|
||||||
for resp in response:
|
for resp in response:
|
||||||
yield resp
|
yield resp
|
||||||
if len(response) < per_page:
|
if len(response) < per_page:
|
||||||
break
|
break
|
||||||
elif type(response) == dict and single_request:
|
elif type(response) is dict and single_request:
|
||||||
yield response
|
yield response
|
||||||
|
|
||||||
if len(errors) > 0:
|
if len(errors) > 0:
|
||||||
@@ -770,14 +777,19 @@ class S3HTTPRedirectHandler(HTTPRedirectHandler):
|
|||||||
return request
|
return request
|
||||||
|
|
||||||
|
|
||||||
def download_file(url, path, auth):
|
def download_file(url, path, auth, as_app=False, fine=False):
|
||||||
# Skip downloading release assets if they already exist on disk so we don't redownload on every sync
|
# Skip downloading release assets if they already exist on disk so we don't redownload on every sync
|
||||||
if os.path.exists(path):
|
if os.path.exists(path):
|
||||||
return
|
return
|
||||||
|
|
||||||
request = Request(url)
|
request = _construct_request(per_page=100,
|
||||||
|
page=1,
|
||||||
|
query_args={},
|
||||||
|
template=url,
|
||||||
|
auth=auth,
|
||||||
|
as_app=as_app,
|
||||||
|
fine=fine)
|
||||||
request.add_header("Accept", "application/octet-stream")
|
request.add_header("Accept", "application/octet-stream")
|
||||||
request.add_header("Authorization", "Basic ".encode("ascii") + auth)
|
|
||||||
opener = build_opener(S3HTTPRedirectHandler)
|
opener = build_opener(S3HTTPRedirectHandler)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
@@ -1196,8 +1208,11 @@ def backup_hooks(args, repo_cwd, repository, repos_template):
|
|||||||
template = "{0}/{1}/hooks".format(repos_template, repository["full_name"])
|
template = "{0}/{1}/hooks".format(repos_template, repository["full_name"])
|
||||||
try:
|
try:
|
||||||
_backup_data(args, "hooks", template, output_file, hook_cwd)
|
_backup_data(args, "hooks", template, output_file, hook_cwd)
|
||||||
except SystemExit:
|
except Exception as e:
|
||||||
|
if "404" in str(e):
|
||||||
logger.info("Unable to read hooks, skipping")
|
logger.info("Unable to read hooks, skipping")
|
||||||
|
else:
|
||||||
|
raise e
|
||||||
|
|
||||||
|
|
||||||
def backup_releases(args, repo_cwd, repository, repos_template, include_assets=False):
|
def backup_releases(args, repo_cwd, repository, repos_template, include_assets=False):
|
||||||
@@ -1213,8 +1228,18 @@ def backup_releases(args, repo_cwd, repository, repos_template, include_assets=F
|
|||||||
release_template = "{0}/{1}/releases".format(repos_template, repository_fullname)
|
release_template = "{0}/{1}/releases".format(repos_template, repository_fullname)
|
||||||
releases = retrieve_data(args, release_template, query_args=query_args)
|
releases = retrieve_data(args, release_template, query_args=query_args)
|
||||||
|
|
||||||
# for each release, store it
|
if args.skip_prerelease:
|
||||||
|
releases = [r for r in releases if not r["prerelease"] and not r["draft"]]
|
||||||
|
|
||||||
|
if args.number_of_latest_releases and args.number_of_latest_releases < len(releases):
|
||||||
|
releases.sort(key=lambda item: datetime.strptime(item["created_at"], "%Y-%m-%dT%H:%M:%SZ"),
|
||||||
|
reverse=True)
|
||||||
|
releases = releases[:args.number_of_latest_releases]
|
||||||
|
logger.info("Saving the latest {0} releases to disk".format(len(releases)))
|
||||||
|
else:
|
||||||
logger.info("Saving {0} releases to disk".format(len(releases)))
|
logger.info("Saving {0} releases to disk".format(len(releases)))
|
||||||
|
|
||||||
|
# for each release, store it
|
||||||
for release in releases:
|
for release in releases:
|
||||||
release_name = release["tag_name"]
|
release_name = release["tag_name"]
|
||||||
release_name_safe = release_name.replace("/", "__")
|
release_name_safe = release_name.replace("/", "__")
|
||||||
@@ -1235,6 +1260,8 @@ def backup_releases(args, repo_cwd, repository, repos_template, include_assets=F
|
|||||||
asset["url"],
|
asset["url"],
|
||||||
os.path.join(release_assets_cwd, asset["name"]),
|
os.path.join(release_assets_cwd, asset["name"]),
|
||||||
get_auth(args),
|
get_auth(args),
|
||||||
|
as_app=args.as_app,
|
||||||
|
fine=True if args.token_fine is not None else False
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
7
python-github-backup.code-workspace
Executable file
7
python-github-backup.code-workspace
Executable file
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"folders": [
|
||||||
|
{
|
||||||
|
"path": "."
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -1,31 +1,38 @@
|
|||||||
bleach==6.0.0
|
autopep8==2.0.4
|
||||||
certifi==2023.7.22
|
black==24.2.0
|
||||||
charset-normalizer==3.1.0
|
bleach==6.1.0
|
||||||
|
certifi==2024.2.2
|
||||||
|
charset-normalizer==3.3.2
|
||||||
|
click==8.1.7
|
||||||
colorama==0.4.6
|
colorama==0.4.6
|
||||||
docutils==0.20.1
|
docutils==0.20.1
|
||||||
flake8==6.0.0
|
flake8==7.0.0
|
||||||
gitchangelog==3.0.4
|
gitchangelog==3.0.4
|
||||||
idna==3.4
|
idna==3.6
|
||||||
importlib-metadata==6.6.0
|
importlib-metadata==7.0.2
|
||||||
jaraco.classes==3.2.3
|
jaraco.classes==3.3.1
|
||||||
keyring==23.13.1
|
keyring==24.3.1
|
||||||
markdown-it-py==2.2.0
|
markdown-it-py==3.0.0
|
||||||
mccabe==0.7.0
|
mccabe==0.7.0
|
||||||
mdurl==0.1.2
|
mdurl==0.1.2
|
||||||
more-itertools==9.1.0
|
more-itertools==10.2.0
|
||||||
pkginfo==1.9.6
|
mypy-extensions==1.0.0
|
||||||
pycodestyle==2.10.0
|
packaging==24.0
|
||||||
pyflakes==3.0.1
|
pathspec==0.12.1
|
||||||
Pygments==2.15.1
|
pkginfo==1.10.0
|
||||||
readme-renderer==37.3
|
platformdirs==4.2.0
|
||||||
|
pycodestyle==2.11.1
|
||||||
|
pyflakes==3.2.0
|
||||||
|
Pygments==2.17.2
|
||||||
|
readme-renderer==43.0
|
||||||
requests==2.31.0
|
requests==2.31.0
|
||||||
requests-toolbelt==1.0.0
|
requests-toolbelt==1.0.0
|
||||||
restructuredtext-lint==1.4.0
|
restructuredtext-lint==1.4.0
|
||||||
rfc3986==2.0.0
|
rfc3986==2.0.0
|
||||||
rich==13.3.5
|
rich==13.7.1
|
||||||
six==1.16.0
|
six==1.16.0
|
||||||
tqdm==4.65.0
|
tqdm==4.66.2
|
||||||
twine==4.0.2
|
twine==5.0.0
|
||||||
urllib3==2.0.7
|
urllib3==2.2.1
|
||||||
webencodings==0.5.1
|
webencodings==0.5.1
|
||||||
zipp==3.15.0
|
zipp==3.18.1
|
||||||
|
|||||||
Reference in New Issue
Block a user