mirror of
https://github.com/josegonzalez/python-github-backup.git
synced 2025-12-05 16:18:02 +01:00
Compare commits
24 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fcf21f7a2e | ||
|
|
36812a332b | ||
|
|
0e0197149e | ||
|
|
eb545c1c2f | ||
|
|
2e72797984 | ||
|
|
68fe29d1e1 | ||
|
|
3dc3691770 | ||
|
|
5b0608ce14 | ||
|
|
1ce8455860 | ||
|
|
dcb89a5c33 | ||
|
|
b0bfffde1a | ||
|
|
0f3aaa6fc2 | ||
|
|
c39ec9c549 | ||
|
|
e981ce3ff9 | ||
|
|
22d8f8e649 | ||
|
|
aaefac1a66 | ||
|
|
cb66375e1e | ||
|
|
24d7aa83df | ||
|
|
c8c71239c7 | ||
|
|
6ca8030648 | ||
|
|
53f6650f61 | ||
|
|
548a2ec405 | ||
|
|
871d69b99a | ||
|
|
ca3c4fa64b |
308
CHANGES.rst
308
CHANGES.rst
@@ -1,9 +1,315 @@
|
||||
Changelog
|
||||
=========
|
||||
|
||||
0.46.0 (2024-09-11)
|
||||
0.48.0 (2025-01-04)
|
||||
-------------------
|
||||
------------------------
|
||||
- Chore: reformat file to fix lint issues. [Jose Diaz-Gonzalez]
|
||||
- Chore(deps): bump the python-packages group across 1 directory with 4
|
||||
updates. [dependabot[bot]]
|
||||
|
||||
Bumps the python-packages group with 4 updates in the / directory: [charset-normalizer](https://github.com/jawah/charset_normalizer), [click](https://github.com/pallets/click), [keyring](https://github.com/jaraco/keyring) and [urllib3](https://github.com/urllib3/urllib3).
|
||||
|
||||
|
||||
Updates `charset-normalizer` from 3.4.0 to 3.4.1
|
||||
- [Release notes](https://github.com/jawah/charset_normalizer/releases)
|
||||
- [Changelog](https://github.com/jawah/charset_normalizer/blob/master/CHANGELOG.md)
|
||||
- [Commits](https://github.com/jawah/charset_normalizer/compare/3.4.0...3.4.1)
|
||||
|
||||
Updates `click` from 8.1.7 to 8.1.8
|
||||
- [Release notes](https://github.com/pallets/click/releases)
|
||||
- [Changelog](https://github.com/pallets/click/blob/main/CHANGES.rst)
|
||||
- [Commits](https://github.com/pallets/click/compare/8.1.7...8.1.8)
|
||||
|
||||
Updates `keyring` from 25.5.0 to 25.6.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/v25.5.0...v25.6.0)
|
||||
|
||||
Updates `urllib3` from 2.2.3 to 2.3.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.2.3...2.3.0)
|
||||
|
||||
---
|
||||
updated-dependencies:
|
||||
- dependency-name: charset-normalizer
|
||||
dependency-type: direct:production
|
||||
update-type: version-update:semver-patch
|
||||
dependency-group: python-packages
|
||||
- dependency-name: click
|
||||
dependency-type: direct:production
|
||||
update-type: version-update:semver-patch
|
||||
dependency-group: python-packages
|
||||
- dependency-name: keyring
|
||||
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
|
||||
...
|
||||
- Fix typo README.rst: --starred-gists that should be --gists. [Michael
|
||||
D. Adams]
|
||||
- Remove fixed release issue from known blocking errors. [Ethan White]
|
||||
|
||||
The issue with --release producing errors documented in #209 (the linked issue) and #234 appears to have been fixed in #257.
|
||||
|
||||
This change removes the associated warning from the README.
|
||||
- Chore(deps): bump certifi in the python-packages group.
|
||||
[dependabot[bot]]
|
||||
|
||||
Bumps the python-packages group with 1 update: [certifi](https://github.com/certifi/python-certifi).
|
||||
|
||||
|
||||
Updates `certifi` from 2024.8.30 to 2024.12.14
|
||||
- [Commits](https://github.com/certifi/python-certifi/compare/2024.08.30...2024.12.14)
|
||||
|
||||
---
|
||||
updated-dependencies:
|
||||
- dependency-name: certifi
|
||||
dependency-type: direct:production
|
||||
update-type: version-update:semver-minor
|
||||
dependency-group: python-packages
|
||||
...
|
||||
|
||||
|
||||
0.47.0 (2024-12-09)
|
||||
-------------------
|
||||
- Detect empty HTTPS contexts. [John Doe]
|
||||
|
||||
Some users are relying solely on the certifi package to provide their CA certs, as requests does this by default.
|
||||
|
||||
This patch detects this situation and emits a clear warning as well as importing certifi to work around the situation..
|
||||
|
||||
Fixes #162 .
|
||||
- Chore(deps): bump six from 1.16.0 to 1.17.0 in the python-packages
|
||||
group. [dependabot[bot]]
|
||||
|
||||
Bumps the python-packages group with 1 update: [six](https://github.com/benjaminp/six).
|
||||
|
||||
|
||||
Updates `six` from 1.16.0 to 1.17.0
|
||||
- [Changelog](https://github.com/benjaminp/six/blob/main/CHANGES)
|
||||
- [Commits](https://github.com/benjaminp/six/compare/1.16.0...1.17.0)
|
||||
|
||||
---
|
||||
updated-dependencies:
|
||||
- dependency-name: six
|
||||
dependency-type: direct:production
|
||||
update-type: version-update:semver-minor
|
||||
dependency-group: python-packages
|
||||
...
|
||||
- Chore(deps): bump the python-packages group across 1 directory with 20
|
||||
updates. [dependabot[bot]]
|
||||
|
||||
Bumps the python-packages group with 20 updates in the / directory:
|
||||
|
||||
| Package | From | To |
|
||||
| --- | --- | --- |
|
||||
| [black](https://github.com/psf/black) | `24.4.2` | `24.10.0` |
|
||||
| [bleach](https://github.com/mozilla/bleach) | `6.1.0` | `6.2.0` |
|
||||
| [certifi](https://github.com/certifi/python-certifi) | `2024.7.4` | `2024.8.30` |
|
||||
| [charset-normalizer](https://github.com/Ousret/charset_normalizer) | `3.3.2` | `3.4.0` |
|
||||
| [flake8](https://github.com/pycqa/flake8) | `7.1.0` | `7.1.1` |
|
||||
| [idna](https://github.com/kjd/idna) | `3.7` | `3.10` |
|
||||
| [importlib-metadata](https://github.com/python/importlib_metadata) | `7.2.1` | `8.5.0` |
|
||||
| [keyring](https://github.com/jaraco/keyring) | `25.2.1` | `25.5.0` |
|
||||
| [more-itertools](https://github.com/more-itertools/more-itertools) | `10.3.0` | `10.5.0` |
|
||||
| [packaging](https://github.com/pypa/packaging) | `24.1` | `24.2` |
|
||||
| [pkginfo](https://code.launchpad.net/~tseaver/pkginfo/trunk) | `1.11.1` | `1.12.0` |
|
||||
| [platformdirs](https://github.com/tox-dev/platformdirs) | `4.2.2` | `4.3.6` |
|
||||
| [pycodestyle](https://github.com/PyCQA/pycodestyle) | `2.12.0` | `2.12.1` |
|
||||
| [readme-renderer](https://github.com/pypa/readme_renderer) | `43.0` | `44.0` |
|
||||
| [rich](https://github.com/Textualize/rich) | `13.7.1` | `13.9.4` |
|
||||
| [setuptools](https://github.com/pypa/setuptools) | `70.1.1` | `75.6.0` |
|
||||
| [tqdm](https://github.com/tqdm/tqdm) | `4.66.4` | `4.67.1` |
|
||||
| [twine](https://github.com/pypa/twine) | `5.1.0` | `6.0.1` |
|
||||
| [urllib3](https://github.com/urllib3/urllib3) | `2.2.2` | `2.2.3` |
|
||||
| [zipp](https://github.com/jaraco/zipp) | `3.19.2` | `3.21.0` |
|
||||
|
||||
|
||||
|
||||
Updates `black` from 24.4.2 to 24.10.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.4.2...24.10.0)
|
||||
|
||||
Updates `bleach` from 6.1.0 to 6.2.0
|
||||
- [Changelog](https://github.com/mozilla/bleach/blob/main/CHANGES)
|
||||
- [Commits](https://github.com/mozilla/bleach/compare/v6.1.0...v6.2.0)
|
||||
|
||||
Updates `certifi` from 2024.7.4 to 2024.8.30
|
||||
- [Commits](https://github.com/certifi/python-certifi/compare/2024.07.04...2024.08.30)
|
||||
|
||||
Updates `charset-normalizer` from 3.3.2 to 3.4.0
|
||||
- [Release notes](https://github.com/Ousret/charset_normalizer/releases)
|
||||
- [Changelog](https://github.com/jawah/charset_normalizer/blob/master/CHANGELOG.md)
|
||||
- [Commits](https://github.com/Ousret/charset_normalizer/compare/3.3.2...3.4.0)
|
||||
|
||||
Updates `flake8` from 7.1.0 to 7.1.1
|
||||
- [Commits](https://github.com/pycqa/flake8/compare/7.1.0...7.1.1)
|
||||
|
||||
Updates `idna` from 3.7 to 3.10
|
||||
- [Release notes](https://github.com/kjd/idna/releases)
|
||||
- [Changelog](https://github.com/kjd/idna/blob/master/HISTORY.rst)
|
||||
- [Commits](https://github.com/kjd/idna/compare/v3.7...v3.10)
|
||||
|
||||
Updates `importlib-metadata` from 7.2.1 to 8.5.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/v7.2.1...v8.5.0)
|
||||
|
||||
Updates `keyring` from 25.2.1 to 25.5.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/v25.2.1...v25.5.0)
|
||||
|
||||
Updates `more-itertools` from 10.3.0 to 10.5.0
|
||||
- [Release notes](https://github.com/more-itertools/more-itertools/releases)
|
||||
- [Commits](https://github.com/more-itertools/more-itertools/compare/v10.3.0...v10.5.0)
|
||||
|
||||
Updates `packaging` from 24.1 to 24.2
|
||||
- [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/24.1...24.2)
|
||||
|
||||
Updates `pkginfo` from 1.11.1 to 1.12.0
|
||||
|
||||
Updates `platformdirs` from 4.2.2 to 4.3.6
|
||||
- [Release notes](https://github.com/tox-dev/platformdirs/releases)
|
||||
- [Changelog](https://github.com/tox-dev/platformdirs/blob/main/CHANGES.rst)
|
||||
- [Commits](https://github.com/tox-dev/platformdirs/compare/4.2.2...4.3.6)
|
||||
|
||||
Updates `pycodestyle` from 2.12.0 to 2.12.1
|
||||
- [Release notes](https://github.com/PyCQA/pycodestyle/releases)
|
||||
- [Changelog](https://github.com/PyCQA/pycodestyle/blob/main/CHANGES.txt)
|
||||
- [Commits](https://github.com/PyCQA/pycodestyle/compare/2.12.0...2.12.1)
|
||||
|
||||
Updates `readme-renderer` from 43.0 to 44.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/43.0...44.0)
|
||||
|
||||
Updates `rich` from 13.7.1 to 13.9.4
|
||||
- [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.1...v13.9.4)
|
||||
|
||||
Updates `setuptools` from 70.1.1 to 75.6.0
|
||||
- [Release notes](https://github.com/pypa/setuptools/releases)
|
||||
- [Changelog](https://github.com/pypa/setuptools/blob/main/NEWS.rst)
|
||||
- [Commits](https://github.com/pypa/setuptools/compare/v70.1.1...v75.6.0)
|
||||
|
||||
Updates `tqdm` from 4.66.4 to 4.67.1
|
||||
- [Release notes](https://github.com/tqdm/tqdm/releases)
|
||||
- [Commits](https://github.com/tqdm/tqdm/compare/v4.66.4...v4.67.1)
|
||||
|
||||
Updates `twine` from 5.1.0 to 6.0.1
|
||||
- [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/5.1.0...6.0.1)
|
||||
|
||||
Updates `urllib3` from 2.2.2 to 2.2.3
|
||||
- [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.2...2.2.3)
|
||||
|
||||
Updates `zipp` from 3.19.2 to 3.21.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.19.2...v3.21.0)
|
||||
|
||||
---
|
||||
updated-dependencies:
|
||||
- dependency-name: black
|
||||
dependency-type: direct:production
|
||||
update-type: version-update:semver-minor
|
||||
dependency-group: python-packages
|
||||
- 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: flake8
|
||||
dependency-type: direct:production
|
||||
update-type: version-update:semver-patch
|
||||
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: keyring
|
||||
dependency-type: direct:production
|
||||
update-type: version-update:semver-minor
|
||||
dependency-group: python-packages
|
||||
- dependency-name: more-itertools
|
||||
dependency-type: direct:production
|
||||
update-type: version-update:semver-minor
|
||||
dependency-group: python-packages
|
||||
- dependency-name: packaging
|
||||
dependency-type: direct:production
|
||||
update-type: version-update:semver-minor
|
||||
dependency-group: python-packages
|
||||
- dependency-name: pkginfo
|
||||
dependency-type: direct:production
|
||||
update-type: version-update:semver-minor
|
||||
dependency-group: python-packages
|
||||
- dependency-name: platformdirs
|
||||
dependency-type: direct:production
|
||||
update-type: version-update:semver-minor
|
||||
dependency-group: python-packages
|
||||
- dependency-name: pycodestyle
|
||||
dependency-type: direct:production
|
||||
update-type: version-update:semver-patch
|
||||
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: setuptools
|
||||
dependency-type: direct:production
|
||||
update-type: version-update:semver-major
|
||||
dependency-group: python-packages
|
||||
- dependency-name: tqdm
|
||||
dependency-type: direct:production
|
||||
update-type: version-update:semver-minor
|
||||
dependency-group: python-packages
|
||||
- dependency-name: twine
|
||||
dependency-type: direct:production
|
||||
update-type: version-update:semver-major
|
||||
dependency-group: python-packages
|
||||
- dependency-name: urllib3
|
||||
dependency-type: direct:production
|
||||
update-type: version-update:semver-patch
|
||||
dependency-group: python-packages
|
||||
- dependency-name: zipp
|
||||
dependency-type: direct:production
|
||||
update-type: version-update:semver-minor
|
||||
dependency-group: python-packages
|
||||
...
|
||||
- KeyError fix with gists. [John Doe]
|
||||
- Fix punctuation in README. [Jakub Wilk]
|
||||
|
||||
|
||||
0.46.0 (2024-09-11)
|
||||
-------------------
|
||||
|
||||
Fix
|
||||
~~~
|
||||
|
||||
10
README.rst
10
README.rst
@@ -167,7 +167,7 @@ Customise the permissions for your use case, but for a personal account full bac
|
||||
|
||||
**User permissions**: Read access to followers, starring, and watching.
|
||||
|
||||
**Repository permissions**: Read access to code, commit statuses, issues, metadata, pages, pull requests, and repository hooks.
|
||||
**Repository permissions**: Read access to contents, issues, metadata, pull requests, and webhooks.
|
||||
|
||||
|
||||
Prefer SSH
|
||||
@@ -225,7 +225,7 @@ Gotchas / Known-issues
|
||||
All is not everything
|
||||
---------------------
|
||||
|
||||
The ``--all`` argument does not include; cloning private repos (``-P, --private``), cloning forks (``-F, --fork``) cloning starred repositories (``--all-starred``), ``--pull-details``, cloning LFS repositories (``--lfs``), cloning gists (``--starred-gists``) or cloning starred gist repos (``--starred-gists``). See examples for more.
|
||||
The ``--all`` argument does not include: cloning private repos (``-P, --private``), cloning forks (``-F, --fork``), cloning starred repositories (``--all-starred``), ``--pull-details``, cloning LFS repositories (``--lfs``), cloning gists (``--gists``) or cloning starred gist repos (``--starred-gists``). See examples for more.
|
||||
|
||||
Cloning all starred size
|
||||
------------------------
|
||||
@@ -254,12 +254,6 @@ It's therefore recommended to only use the incremental argument if the output/re
|
||||
|
||||
This is due to needing the correct permission for ``--hooks`` on public repos.
|
||||
|
||||
2. **Releases blocking**
|
||||
|
||||
A known ``--releases`` (required for ``--assets``) error will sometimes block the backup.
|
||||
|
||||
If you're backing up a lot of repositories with releases e.g. an organisation or ``--all-starred``. You may need to remove ``--releases`` (and therefore ``--assets``) to complete a backup. Documented in `issue 209 <https://github.com/josegonzalez/python-github-backup/issues/209>`_.
|
||||
|
||||
|
||||
"bare" is actually "mirror"
|
||||
---------------------------
|
||||
|
||||
@@ -1 +1 @@
|
||||
__version__ = "0.46.0"
|
||||
__version__ = "0.48.0"
|
||||
|
||||
@@ -15,15 +15,16 @@ import platform
|
||||
import re
|
||||
import select
|
||||
import socket
|
||||
import ssl
|
||||
import subprocess
|
||||
import sys
|
||||
import time
|
||||
from datetime import datetime
|
||||
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:
|
||||
from . import __version__
|
||||
@@ -36,6 +37,23 @@ FNULL = open(os.devnull, "w")
|
||||
FILE_URI_PREFIX = "file://"
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
https_ctx = ssl.create_default_context()
|
||||
if not https_ctx.get_ca_certs():
|
||||
import warnings
|
||||
|
||||
warnings.warn(
|
||||
"\n\nYOUR DEFAULT CA CERTS ARE EMPTY.\n"
|
||||
+ "PLEASE POPULATE ANY OF:"
|
||||
+ "".join(
|
||||
["\n - " + x for x in ssl.get_default_verify_paths() if type(x) is str]
|
||||
)
|
||||
+ "\n",
|
||||
stacklevel=2,
|
||||
)
|
||||
import certifi
|
||||
|
||||
https_ctx = ssl.create_default_context(cafile=certifi.where())
|
||||
|
||||
|
||||
def logging_subprocess(
|
||||
popenargs, stdout_log_level=logging.DEBUG, stderr_log_level=logging.ERROR, **kwargs
|
||||
@@ -511,7 +529,7 @@ def get_github_host(args):
|
||||
|
||||
|
||||
def read_file_contents(file_uri):
|
||||
return open(file_uri[len(FILE_URI_PREFIX):], "rt").readline().strip()
|
||||
return open(file_uri[len(FILE_URI_PREFIX) :], "rt").readline().strip()
|
||||
|
||||
|
||||
def get_github_repo_url(args, repository):
|
||||
@@ -666,7 +684,7 @@ def _get_response(request, auth, template):
|
||||
while True:
|
||||
should_continue = False
|
||||
try:
|
||||
r = urlopen(request)
|
||||
r = urlopen(request, context=https_ctx)
|
||||
except HTTPError as exc:
|
||||
errors, should_continue = _request_http_error(exc, auth, errors) # noqa
|
||||
r = exc
|
||||
@@ -782,13 +800,15 @@ def download_file(url, path, auth, as_app=False, fine=False):
|
||||
if os.path.exists(path):
|
||||
return
|
||||
|
||||
request = _construct_request(per_page=100,
|
||||
page=1,
|
||||
query_args={},
|
||||
template=url,
|
||||
auth=auth,
|
||||
as_app=as_app,
|
||||
fine=fine)
|
||||
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")
|
||||
opener = build_opener(S3HTTPRedirectHandler)
|
||||
|
||||
@@ -931,11 +951,15 @@ def filter_repositories(args, unfiltered_repositories):
|
||||
if r.get("language") and r.get("language").lower() in languages
|
||||
] # noqa
|
||||
if name_regex:
|
||||
repositories = [r for r in repositories if name_regex.match(r["name"])]
|
||||
repositories = [
|
||||
r for r in repositories if "name" not in r or name_regex.match(r["name"])
|
||||
]
|
||||
if args.skip_archived:
|
||||
repositories = [r for r in repositories if not r.get("archived")]
|
||||
if args.exclude:
|
||||
repositories = [r for r in repositories if r["name"] not in args.exclude]
|
||||
repositories = [
|
||||
r for r in repositories if "name" not in r or r["name"] not in args.exclude
|
||||
]
|
||||
|
||||
return repositories
|
||||
|
||||
@@ -1231,10 +1255,16 @@ def backup_releases(args, repo_cwd, repository, repos_template, include_assets=F
|
||||
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]
|
||||
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)))
|
||||
@@ -1261,7 +1291,7 @@ def backup_releases(args, repo_cwd, repository, repos_template, include_assets=F
|
||||
os.path.join(release_assets_cwd, asset["name"]),
|
||||
get_auth(args, encode=not args.as_app),
|
||||
as_app=args.as_app,
|
||||
fine=True if args.token_fine is not None else False
|
||||
fine=True if args.token_fine is not None else False,
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -1,39 +1,39 @@
|
||||
autopep8==2.3.1
|
||||
black==24.4.2
|
||||
bleach==6.1.0
|
||||
certifi==2024.7.4
|
||||
charset-normalizer==3.3.2
|
||||
click==8.1.7
|
||||
black==24.10.0
|
||||
bleach==6.2.0
|
||||
certifi==2024.12.14
|
||||
charset-normalizer==3.4.1
|
||||
click==8.1.8
|
||||
colorama==0.4.6
|
||||
docutils==0.21.2
|
||||
flake8==7.1.0
|
||||
flake8==7.1.1
|
||||
gitchangelog==3.0.4
|
||||
idna==3.7
|
||||
importlib-metadata==7.2.1
|
||||
idna==3.10
|
||||
importlib-metadata==8.5.0
|
||||
jaraco.classes==3.4.0
|
||||
keyring==25.2.1
|
||||
keyring==25.6.0
|
||||
markdown-it-py==3.0.0
|
||||
mccabe==0.7.0
|
||||
mdurl==0.1.2
|
||||
more-itertools==10.3.0
|
||||
more-itertools==10.5.0
|
||||
mypy-extensions==1.0.0
|
||||
packaging==24.1
|
||||
packaging==24.2
|
||||
pathspec==0.12.1
|
||||
pkginfo==1.11.1
|
||||
platformdirs==4.2.2
|
||||
pycodestyle==2.12.0
|
||||
pkginfo==1.12.0
|
||||
platformdirs==4.3.6
|
||||
pycodestyle==2.12.1
|
||||
pyflakes==3.2.0
|
||||
Pygments==2.18.0
|
||||
readme-renderer==43.0
|
||||
readme-renderer==44.0
|
||||
requests==2.32.3
|
||||
requests-toolbelt==1.0.0
|
||||
restructuredtext-lint==1.4.0
|
||||
rfc3986==2.0.0
|
||||
rich==13.7.1
|
||||
setuptools==70.1.1
|
||||
six==1.16.0
|
||||
tqdm==4.66.4
|
||||
twine==5.1.0
|
||||
urllib3==2.2.2
|
||||
rich==13.9.4
|
||||
setuptools==75.6.0
|
||||
six==1.17.0
|
||||
tqdm==4.67.1
|
||||
twine==6.0.1
|
||||
urllib3==2.3.0
|
||||
webencodings==0.5.1
|
||||
zipp==3.19.2
|
||||
zipp==3.21.0
|
||||
|
||||
Reference in New Issue
Block a user