Skip to content

Fix -R flag to allow backups of repositories not owned by user #418

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

KJ7LNW
Copy link

@KJ7LNW KJ7LNW commented Jul 20, 2025

Previously, using -R flag would show zero issues/PRs for repositories not owned by the primary user due to incorrect pagination parameters being added to single repository API calls.

Changes:

  • Remove pagination parameters for single repository requests
  • Support owner/repo format in -R flag (e.g., -R owner/repo-name)
  • Skip filtering when specific repository is requested
  • Fix URL construction for requests without query parameters

Impact:
This enables backing up any repository, not just those owned by the primary user specified in -u flag. Before this fix, attempting to backup repositories from other owners would result in zero issues/PRs being retrieved.

Eric Wheeler added 2 commits July 19, 2025 17:17
Only insert development path into sys.path when running from a git checkout
(when ../.git exists). This makes the script more robust by only using the
development tree when available and falling back to installed package otherwise.
Previously, using -R flag would show zero issues/PRs for repositories
not owned by the primary user due to incorrect pagination parameters
being added to single repository API calls.

- Remove pagination parameters for single repository requests
- Support owner/repo format in -R flag (e.g., -R owner/repo-name)
- Skip filtering when specific repository is requested
- Fix URL construction for requests without query parameters

This enables backing up any repository, not just those owned by the
primary user specified in -u flag.
Comment on lines 7 to 15

# If we are running from a git-checkout, we can run against the development
# tree without installing.
if os.path.exists(os.path.join(os.path.dirname(__file__), "..", ".git")):
sys.path.insert(
0, os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
)


Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mind removing this?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure, removed

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

^ that was me, btw

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants