mirror of
https://github.com/jaedle/mirror-to-gitea.git
synced 2026-01-14 15:27:53 -05:00
Enhance Organization Mirroring with Improved Reliability and New Options #4
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @arunavo4 on 4/15/2025
Closes:
This PR enhances the organization mirroring functionality in mirror-to-gitea with improved reliability and new options. It addresses issues with fetching organizations and repositories, particularly when dealing with organizations that have specific token policies.
Key Changes
Added New Option:
ONLY_MIRROR_ORGS: When set totrue, only repositories from organizations will be mirrored, skipping personal repositories. This provides better control over what gets mirrored.Improved Organization Fetching:
Enhanced Repository Fetching:
Better Error Handling:
Updated Documentation:
ONLY_MIRROR_ORGSoptionAdded Testing Script:
test-org-mirror.shscript for testing organization mirroring specificallyTesting
The changes have been tested with various GitHub organizations, including those with token lifetime restrictions. The code now properly handles these cases and provides helpful error messages to guide users in resolving issues.
To test these changes:
test-org-mirror.shscript to test organization mirroring specifically