-
Notifications
You must be signed in to change notification settings - Fork 50
How To Keep BSDataAnon's Forks Up To Date #7
Description
So currently things are set up so that the BSDataAnon user manages forks of the data file repos. When a user submits a file, it is committed to a new branch in the appropriate fork, and BSDataAnon issues a pull request back to the main repo.
The next step is how do we then keep BSDataAnon's forks in sync? In other words, when a data file admin accepts and merges in a pull request, BSDataAnon's fork will need to mirror that merge (or otherwise refresh it's fork) so that it matches what's currently in the main repo. This then leaves it ready for future file submissions.
The app can listen out for events in GitHub, so it's a question of what events to listen for and what to do upon receiving an event.
Option one: Make use of the "release" functionality. Once an admin has merged in one or more submissions, and deems the repo ready for release, they, erm, make a release.
- The app is notified that a new release is created
- BSDataAnon deletes it's current fork and recreates it from the new master in the main repo
This is nice because BSDataAnon's forks won't get out of hand with millions of branches. Down side is that when a release is done, any commits/pull requests from the fork will be lost (so no going back to include submissions prior to the release)
Option two: Listen out for pushes on the master branch.
- App is notified that something has been pushed to master
- BSDataAnon replicates that push on it's own fork (or pulls the change from the main repo)
This is nice because we don't loose any old pull requests/commits on the fork, but it could get to a point where the fork as loads of rejected file submissions as separate branches...
My preference would be the first option as it'd be easier to write (keeping the fork in sync with the master in "real time" would be hard to get right I think).
Thoughts (looking at you @amis92)? Further options on how to do this?