let's at least spdx and explain a bit more

This commit is contained in:
Jeff Epler 2022-12-26 07:50:35 -06:00
parent 273ef452c0
commit 613fad59a7
No known key found for this signature in database
GPG key ID: D5BF15AB975AB4DE
3 changed files with 43 additions and 1 deletions

1
README
View file

@ -1 +0,0 @@
# mirror repositories from github by user or organization

40
README.md Normal file
View file

@ -0,0 +1,40 @@
<!--
SPDX-FileCopyrightText: 2021 Jeff Epler
SPDX-License-Identifier: GPL-3.0-only
-->
# Mirror all of a user or org's repos to the local computer
Usage:
* mirrorhub.py \[-d directory\] \[-u|-o\] name
* mirrorhub.py \[-d directory\] update
* mirrorhub.py \[-d directory\] local-repos
* mirrorhub.py \[-d directory\] remote-repos
## Notes
Directly uses the github credentials of the `hub` program, so install & log in
first
Nothing is done for wikis, issue & pull request discussions, etc. It's just the code (though the mirror does include pull request branches)
## Would be nice!
I created this and made it work minimally for my own needs. If it's useful to
you, that's great. I'm not likely to work to directly address issues but will
try to thoughtfully consider pull requests.
Here are some ideas for future directions:
* update in parallel
* skip updating repos based on github's reported last update time
* Correct dependencies in a requirements.txt
* pip-installable
* optionally mirror only original repos / selected repos by some criteria
* private repos support
* enterprise github support
* other git hosting support such as gitlab
* preserving non-git information such as PR discussions, wikis, etc
* tooling like pre-commit, black, code scanning, etc., to elevate quality

View file

@ -1,4 +1,7 @@
#!/usr/bin/env python3
# SPDX-FileCopyrightText: 2021 Jeff Epler
# SPDX-License-Identifier: GPL-3.0-only
import functools
import itertools
import os