1.8 KiB
1.8 KiB
forgejo-mirror-github
Automated mirroring of GitHub repositories to Forgejo based on certain criteria, like if you have starred the repository.
The script will automatically set the mirror interval to an appropriate value based on the number of days since the last update.
Usage:
set GITHUB_TOKEN=your-github-token
set FORGEJO_TOKEN=your-forgejo-token
node src/main.js -u your-github-username -f https://forgejo.your-domain.com -o <your-forgejo-username / your-forgejo-organization>
Additional options:
Options:
-u, --github-username <string>
-f, --forgejo-url <string>
-o, --forgejo-owner <string>
--lfs Mirror Git LFS files
--wiki Mirror wikis and enable wikis in mirrored repositories. If not enabled, links to
original wiki if it exists.
--actions Enable actions in mirrored repositories
--pull-requests Enable pull requests in mirrored repositories
--issues Enable issues in mirrored repositories. If not enabled, links to original issues.
--unwatch Unwatch newly mirrored repositories
--unwatch-past Unwatch past mirrored repositories. May clobber manual watches. Implies --unwatch
--dry-run Dry run mode - print requests without executing them
--use-auth-token Send Forgejo the auth token for all repos, instead of just private repos
--delete-mirrors Delete mirrors on Forgejo instead of creating new ones. Will leave non-mirror
repositories and repositories that would not have been checked in this operation
untouched.
-h, --help display help for command