杨 垒
2015-Apr-07 11:48 UTC
[CentOS-docs] GSoC - Syncing docs between GitHub and CentOS's git repo
Hi! I am applying for Google Summer of Code 2015 with a project creating a new doc toolchain for CentOS. I plan to use GitHub to store a copy of the documentation, and users can send fork / send PR to this repo. Then a server program monitors this repo and syncs changes between GitHub and CentOS?s own git repo. So the key is to automatically sync repo between GitHub and CentOS. I think there are three steps to do a successful sync. First, the change on GitHub triggers the syncing process. I browsed the GitHub API reference and found that there is an API to retrieve a repo?s info, including its update time. Can we use this info to trigger the syncing process? Or are there any better ways to monitor the status of a GitHub repo? Second, the program gets the commits from GitHub, and merges them into CentOS?s git repo. Third, a notification / update info is sent or displayed. That?s my plan on this auto-sync program. I am glad to get all kinds of advice and comments. Thanks! Lei Yang
kunaal jain
2015-Apr-07 14:21 UTC
[CentOS-docs] GSoC - Syncing docs between GitHub and CentOS's git repo
Hi Lei! We need to have two way mirroring. The push direction that is from CentOS to Github can be done in a synchronous way through post-receive hooks as we have access to CentOS servers. We don't need to depend on Github for that. For the pull direction that is from Github to CentOS, we can configure various webhooks which github provides for various events like new commit or pull request. Our server at CentOS can repond to those webhooks accordingly. :) This way both the repositories can be synced in a near synchronous way. Another alternative is official mirror (https://github.com/mirrors), but they don't accept such request publicly anymore. Through CentOS we can establish a contact with them, maybe they will consider. Regards, Kunal Jain On Tue, Apr 7, 2015 at 5:18 PM, ? ? <yltt1234512 at gmail.com> wrote:> Hi! > > I am applying for Google Summer of Code 2015 with a project creating a new doc toolchain for CentOS. > > I plan to use GitHub to store a copy of the documentation, and users can send fork / send PR to this repo. Then a server program monitors this repo and syncs changes between GitHub and CentOS?s own git repo. So the key is to automatically sync repo between GitHub and CentOS. > > I think there are three steps to do a successful sync. > > First, the change on GitHub triggers the syncing process. I browsed the GitHub API reference and found that there is an API to retrieve a repo?s info, including its update time. Can we use this info to trigger the syncing process? Or are there any better ways to monitor the status of a GitHub repo? > > Second, the program gets the commits from GitHub, and merges them into CentOS?s git repo. > > Third, a notification / update info is sent or displayed. > > That?s my plan on this auto-sync program. I am glad to get all kinds of advice and comments. > > Thanks! > > > > Lei Yang > _______________________________________________ > CentOS-docs mailing list > CentOS-docs at centos.org > http://lists.centos.org/mailman/listinfo/centos-docs
Reasonably Related Threads
- GSoC - Syncing docs between GitHub and CentOS's git repo
- GSoC - Syncing docs between GitHub and CentOS's git repo
- Finished a prototype of GSoC project: Implement a new doc toolchain
- GSoC - Syncing docs between GitHub and CentOS's git repo
- Resources Needed for Doc Toolchain Project [GSoC]