Automate the synchronization of all forked repositories for a GitHub account with their upstream sources using GitHub Actions and Python.
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
Table of Contents
Github-Forks-Sync-Manager provides a GitHub Actions workflow and Python script to automate the process of updating all forked repositories for a specified GitHub account, ensuring they are always in sync with their upstream sources. This is useful for developers and organizations who maintain many forks and want to keep them up-to-date automatically.
To use this workflow in your own repository, follow the steps below.
- A GitHub repository with Actions enabled.
- A GitHub account with forked repositories you want to keep in sync.
- A Personal Access Token with repo access, stored as a secret named
GH_PAT.
- Copy the
workflows/github-forks-sync.ymlfile into your repository's.github/workflows/directory. - Ensure your repository has a
GH_PATsecret (Personal Access Token with repo access). - Commit and push the changes to your repository.
- Go to the "Actions" tab in your repository.
- Select "Sync All Forked Repositories with Upstream".
- Click "Run workflow" and enter the GitHub account username you want to update forks for.
- The workflow will:
- Fetch all forked repositories for the specified account.
- Attempt to update each fork to match its upstream source.
You can also schedule this workflow or trigger it via the API as needed.
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".
Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Distributed under the MIT License. See LICENSE for more information.
LoveDoLove - @LoveDoLove
Project Link: https://github.com/LoveDoLove/Github-Forks-Sync-Manager