Commit Graph

676 Commits

Author SHA1 Message Date
Jose Diaz-Gonzalez
8f9cf7ff89 Merge pull request #459 from Iamrodos/issue-93-starred-gists-warning
fix: warn and skip when --starred-gists used for different user
2025-12-03 23:07:29 -05:00
Rodos
899ab5fdc2 fix: warn and skip when --starred-gists used for different user
GitHub's API only allows retrieving starred gists for the authenticated
user. Previously, using --starred-gists when backing up a different user
would silently return no relevant data.

Now warns and skips the retrieval entirely when the target user differs
from the authenticated user. Uses case-insensitive comparison to match
GitHub's username handling.

Fixes #93
2025-12-04 10:07:43 +11:00
GitHub Action
2a9d86a6bf Release version 0.54.0 0.54.0 2025-12-03 02:17:59 +00:00
Jose Diaz-Gonzalez
4fd3ea9e3c Merge pull request #457 from Iamrodos/readme-updates
docs: update README testing section and add fetch vs pull explanation
2025-12-02 21:15:33 -05:00
Jose Diaz-Gonzalez
041dc013f9 Merge pull request #458 from Iamrodos/fix-logging
fix: send INFO/DEBUG to stdout, WARNING/ERROR to stderr
2025-12-02 21:14:49 -05:00
Rodos
12802103c4 fix: send INFO/DEBUG to stdout, WARNING/ERROR to stderr
Fixes #182
2025-12-01 16:11:11 +11:00
Rodos
bf28b46954 docs: update README testing section and add fetch vs pull explanation 2025-12-01 15:55:00 +11:00
GitHub Action
ff2681e196 Release version 0.53.0 0.53.0 2025-11-30 04:30:48 +00:00
Jose Diaz-Gonzalez
745b05a63f Merge pull request #456 from Iamrodos/fix-case
fix: case-sensitive username filtering causing silent backup failures
2025-11-29 23:30:07 -05:00
Jose Diaz-Gonzalez
83ff0ae1dd Merge pull request #455 from Iamrodos/fix-133
Avoid rewriting unchanged JSON files for labels, milestones, releases…
2025-11-29 23:29:30 -05:00
Rodos
6ad1959d43 fix: case-sensitive username filtering causing silent backup failures
GitHub's API accepts usernames in any case but returns canonical case.
The case-sensitive comparison in filter_repositories() filtered out all
repositories when user-provided case didn't match GitHub's canonical case.

Changed to case-insensitive comparison.

Fixes #198
2025-11-29 21:16:22 +11:00
Rodos
5739ac0745 Avoid rewriting unchanged JSON files for labels, milestones, releases, hooks, followers, and following
This change reduces unnecessary writes when backing up metadata that changes
infrequently. The implementation compares existing file content before writing
and skips the write if the content is identical, preserving file timestamps.

Key changes:
- Added json_dump_if_changed() helper that compares content before writing
- Uses atomic writes (temp file + rename) for all metadata files
- NOT applied to issues/pulls (they use incremental_by_files logic)
- Made log messages consistent and past tense ("Saved" instead of "Saving")
- Added informative logging showing skip counts

Fixes #133
2025-11-29 17:21:14 +11:00
GitHub Action
8b7512c8d8 Release version 0.52.0 0.52.0 2025-11-28 23:39:09 +00:00
Jose Diaz-Gonzalez
995b7ede6c Merge pull request #454 from Iamrodos/http-451
Skip DMCA'd repos which return a 451 response
2025-11-28 18:38:32 -05:00
Rodos
7840528fe2 Skip DMCA'd repos which return a 451 response
Log a warning and the link to the DMCA notice. Continue backing up
other repositories instead of crashing.

Closes #163
2025-11-29 09:52:02 +11:00
Jose Diaz-Gonzalez
6fb0d86977 Merge pull request #453 from josegonzalez/dependabot/pip/python-packages-42260fba7a
chore(deps): bump restructuredtext-lint from 1.4.0 to 2.0.2 in the python-packages group
2025-11-24 15:07:08 -05:00
dependabot[bot]
9f6b401171 chore(deps): bump restructuredtext-lint in the python-packages group
Bumps the python-packages group with 1 update: [restructuredtext-lint](https://github.com/twolfson/restructuredtext-lint).


Updates `restructuredtext-lint` from 1.4.0 to 2.0.2
- [Changelog](https://github.com/twolfson/restructuredtext-lint/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/twolfson/restructuredtext-lint/compare/1.4.0...2.0.2)

---
updated-dependencies:
- dependency-name: restructuredtext-lint
  dependency-version: 2.0.2
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: python-packages
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-24 14:58:52 +00:00
Jose Diaz-Gonzalez
bf638f7aea Merge pull request #452 from josegonzalez/dependabot/github_actions/actions/checkout-6
chore(deps): bump actions/checkout from 5 to 6
2025-11-24 04:42:52 -05:00
dependabot[bot]
c3855a94f1 chore(deps): bump actions/checkout from 5 to 6
Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-24 04:09:25 +00:00
Jose Diaz-Gonzalez
c3f4bfde0d Merge pull request #451 from josegonzalez/dependabot/pip/python-packages-63544ef561
chore(deps): bump the python-packages group with 3 updates
2025-11-18 11:44:02 -05:00
dependabot[bot]
d3edef0622 chore(deps): bump the python-packages group with 3 updates
Bumps the python-packages group with 3 updates: [click](https://github.com/pallets/click), [pytest](https://github.com/pytest-dev/pytest) and [keyring](https://github.com/jaraco/keyring).


Updates `click` from 8.3.0 to 8.3.1
- [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.3.0...8.3.1)

Updates `pytest` from 8.3.3 to 9.0.1
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/8.3.3...9.0.1)

Updates `keyring` from 25.6.0 to 25.7.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.6.0...v25.7.0)

---
updated-dependencies:
- dependency-name: click
  dependency-version: 8.3.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: python-packages
- dependency-name: pytest
  dependency-version: 9.0.1
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: python-packages
- dependency-name: keyring
  dependency-version: 25.7.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: python-packages
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-18 13:24:06 +00:00
GitHub Action
9ef496efad Release version 0.51.3 0.51.3 2025-11-18 06:55:36 +00:00
Jose Diaz-Gonzalez
42bfe6f79d Merge pull request #450 from Iamrodos/test/add-pagination-tests
test: Add pagination tests for cursor and page-based Link headers
2025-11-18 01:54:54 -05:00
Rodos
5af522a348 test: Add pagination tests for cursor and page-based Link headers 2025-11-17 17:14:29 +11:00
Jose Diaz-Gonzalez
6dfba7a783 Merge pull request #449 from 0x2b3bfa0/patch-1
Use cursor based pagination
2025-11-17 00:31:25 -05:00
Helio Machado
7551829677 Use cursor based pagination 2025-11-17 02:09:29 +01:00
GitHub Action
72d35a9b94 Release version 0.51.2 0.51.2 2025-11-16 23:55:36 +00:00
Jose Diaz-Gonzalez
3eae9d78ed Merge pull request #447 from Iamrodos/master
fix: Improve CA certificate detection with fallback chain
2025-11-16 18:54:58 -05:00
Rodos
90ba839c7d fix: Improve CA certificate detection with fallback chain
The previous implementation incorrectly assumed empty get_ca_certs()
meant broken SSL, causing false failures in GitHub Codespaces and other
directory-based cert systems where certificates exist but aren't pre-loaded.
It would then attempt to import certifi as a workaround, but certifi wasn't
listed in requirements.txt, causing the fallback to fail with ImportError
even though the system certificates would have worked fine.

This commit replaces the naive check with a layered fallback approach that
checks multiple certificate sources. First it checks for pre-loaded system
certs (file-based systems). Then it verifies system cert paths exist
(directory-based systems like Ubuntu/Debian/Codespaces). Finally it attempts
to use certifi as an optional fallback only if needed.

This approach eliminates hard dependencies (certifi is now optional), works
in GitHub Codespaces without any setup, and fails gracefully with clear hints
for resolution when SSL is actually broken rather than failing with
ModuleNotFoundError.

Fixes #444
2025-11-16 16:33:10 +11:00
GitHub Action
1ec0820936 Release version 0.51.1 0.51.1 2025-11-16 02:01:39 +00:00
Jose Diaz-Gonzalez
ca463e5cd4 Merge pull request #446 from josegonzalez/dependabot/pip/python-packages-4ff811fbf7
chore(deps): bump certifi from 2025.10.5 to 2025.11.12 in the python-packages group
2025-11-15 21:01:01 -05:00
Jose Diaz-Gonzalez
1750d0eff1 Merge pull request #448 from Iamrodos/fix/attachment-duplicate-downloads
fix: Prevent duplicate attachment downloads (with tests)
2025-11-15 21:00:00 -05:00
Rodos
e4d1c78993 test: Add pytest infrastructure and attachment tests
In making my last fix to attachments, I found it challenging not
having tests to ensure there was no regression.

Added pytest with minimal setup and isolated configuration. Created
a separate test workflow to keep tests isolated from linting.

Tests cover the key elements of the attachment logic:
- URL extraction from issue bodies
- Filename extraction from different URL types
- Filename collision resolution
- Manifest duplicate prevention
2025-11-14 10:28:30 +11:00
Rodos
7a9455db88 fix: Prevent duplicate attachment downloads
Fixes bug where attachments were downloaded multiple times with
incremented filenames (file.mov, file_1.mov, file_2.mov) when
running backups without --skip-existing flag.

I should not have used the --skip-existing flag for attachments,
it did not do what I thought it did.

The correct approach is to always use the manifest to guide what
has already been downloaded and what now needs to be done.
2025-11-14 10:28:30 +11:00
dependabot[bot]
a98ff7f23d chore(deps): bump certifi in the python-packages group
Bumps the python-packages group with 1 update: [certifi](https://github.com/certifi/python-certifi).


Updates `certifi` from 2025.10.5 to 2025.11.12
- [Commits](https://github.com/certifi/python-certifi/compare/2025.10.05...2025.11.12)

---
updated-dependencies:
- dependency-name: certifi
  dependency-version: 2025.11.12
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: python-packages
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-12 13:11:06 +00:00
Jose Diaz-Gonzalez
7b78f06a68 Merge pull request #445 from josegonzalez/dependabot/pip/python-packages-499fb03faa
chore(deps): bump black from 25.9.0 to 25.11.0 in the python-packages group
2025-11-10 12:45:25 -05:00
dependabot[bot]
56db3ff0e8 chore(deps): bump black in the python-packages group
Bumps the python-packages group with 1 update: [black](https://github.com/psf/black).


Updates `black` from 25.9.0 to 25.11.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/25.9.0...25.11.0)

---
updated-dependencies:
- dependency-name: black
  dependency-version: 25.11.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: python-packages
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-10 13:59:47 +00:00
Jose Diaz-Gonzalez
5c9c20f6ee Merge pull request #443 from josegonzalez/dependabot/pip/python-packages-7fb8ba35da
chore(deps): bump docutils from 0.22.2 to 0.22.3 in the python-packages group
2025-11-07 15:56:55 -05:00
dependabot[bot]
c8c585cbb5 chore(deps): bump docutils in the python-packages group
Bumps the python-packages group with 1 update: [docutils](https://github.com/rtfd/recommonmark).


Updates `docutils` from 0.22.2 to 0.22.3
- [Changelog](https://github.com/readthedocs/recommonmark/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rtfd/recommonmark/commits)

---
updated-dependencies:
- dependency-name: docutils
  dependency-version: 0.22.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: python-packages
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-06 13:09:51 +00:00
GitHub Action
e7880bb056 Release version 0.51.0 0.51.0 2025-11-06 02:11:08 +00:00
Jose Diaz-Gonzalez
18e3bd574a Merge pull request #439 from Iamrodos/master
feat: Add attachment download support for issues and pull requests
2025-11-05 21:10:03 -05:00
Rodos
1ed3d66777 refactor: Add atomic writes for attachment files and manifests 2025-11-06 12:42:57 +11:00
Rodos
a194fa48ce feat: Add attachment download support for issues and pull requests
Adds new --attachments flag that downloads user-uploaded files from
issue and PR bodies and comments. Key features:

- Determines attachment URLs
- Tracks downloads in manifest.json with metadata
- Supports --skip-existing to avoid re-downloading
- Handles filename collisions with counter suffix
- Smart retry logic for transient vs permanent failures
- Uses Content-Disposition for correct file extensions
2025-11-06 12:42:57 +11:00
Jose Diaz-Gonzalez
8f859be355 Merge pull request #441 from Iamrodos/feat/python-version-requirements-clean
chore: Enforce Python 3.8+ requirement and add multi-version CI testing
2025-11-05 20:25:47 -05:00
rodos
80e00d31d9 Merge branch 'master' into feat/python-version-requirements-clean 2025-11-06 10:01:22 +11:00
Jose Diaz-Gonzalez
32202656ba Merge pull request #442 from Iamrodos/feat/drop-python-3.8-3.9-support
chore: Drop support for Python 3.8 and 3.9 (EOL)
2025-11-05 17:45:40 -05:00
Rodos
875e31819a feat: Drop support for Python 3.8 and 3.9 (EOL)
Both Python 3.8 and 3.9 have reached end-of-life:
- Python 3.8: EOL October 7, 2024
- Python 3.9: EOL October 31, 2025

Changes:
- Add python_requires=">=3.10" to setup.py
- Remove Python 3.8 and 3.9 from classifiers
- Add Python 3.13 and 3.14 to classifiers
- Update README to document Python 3.10+ requirement
2025-11-04 13:53:41 +11:00
Rodos
73dc75ab95 fix: Remove Python 3.8 and 3.9 from CI matrix
3.8 and 3.9 are failing because the pinned dependencies don't support them:
- autopep8==2.3.2 needs Python 3.9+
- bleach==6.3.0 needs Python 3.10+

Both are EOL now anyway (3.8 in Oct 2024, 3.9 in Oct 2025).

Just fixing CI to test 3.10-3.14 for now. Will do a separate PR to formally
drop 3.8/3.9 support with python_requires and README updates.
2025-11-04 13:30:42 +11:00
Rodos
cd23dd1a16 feat: Enforce Python 3.8+ requirement and add multi-version CI testing
- Add python_requires=">=3.8" to setup.py to enforce minimum version at install time
- Update README to explicitly document Python 3.8+ requirement
- Add CI matrix to test lint/build on Python 3.8-3.14 (7 versions)
- Aligns with actual usage patterns (~99% of downloads on Python 3.8+)
- Prevents future PRs from inadvertently using incompatible syntax

This change protects users by preventing installation on unsupported Python
versions and ensures contributors can see version requirements clearly.
2025-11-04 10:47:13 +11:00
Jose Diaz-Gonzalez
d244de1952 Merge pull request #438 from josegonzalez/dependabot/pip/python-packages-7355fe9fde
chore(deps): bump bleach from 6.2.0 to 6.3.0 in the python-packages group
2025-10-28 16:51:18 -04:00