Auto Sync Github Forked Repos
As a Github heavy user, when I saw an interested repos, I would fork them to my “secret” organization to read/use in future. However, when checked them later, most of the time (99%), the repos have already out of synced. There are three options I normally choose:
- delete the forked repo and re-fork;
- manually merge to the latest commit;
- use the PR and switch the source and destination (ref).
Although those three options works like a “charm” in a small amount of repos, it’s more like chores when maintaining hundreds forked repos.
Based on the above idea, I wrote a js script to do the job. But this script is only a solution my problems:
- Only works on forked repos in a Github Org.
- Forked repos should never be modified.
- User Github personal token to access.
- Not support private repos.
If your needs also match the aboves, then simple fork my script, and modify the