Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial refactor of syncer #51

Merged
merged 5 commits into from
May 17, 2015
Merged

Conversation

czechboy0
Copy link
Member

Working on #18, a refactor is necessary first. Working on isolating branches for PRs so that we can eventually sync branches with Bots instead of just PRs.

Simplified the syncer a bunch. Now instead of one god class, we spread the responsibility of each sync case to a different subclass of a SyncPair. One is for a PR without a Bot (creates a bot), one for a Bot without a PR (deletes a bot) and one for a PR with a Bot (syncs, the most complex case). This should scale well to new cases like Branch and a Bot etc. We'll see. This should definitely be easier to read.

Also responsibilities of the syncer were spread across a couple of extension files, like SyncerBotManipulation, SyncerBotNaming (making room for #29), SyncerGitHubUtils and SyncerBotUtils. The main syncer, the HDGitHubXCBotSyncer is down to 240 lines.

@czechboy0 czechboy0 self-assigned this May 17, 2015
@buildasaur
Copy link
Collaborator

Result of integration 1
Integration took 1 minute and 10 seconds.
Perfect build! All 11 tests passed. 👍

czechboy0 pushed a commit that referenced this pull request May 17, 2015
@czechboy0 czechboy0 merged commit 296c84f into master May 17, 2015
@czechboy0 czechboy0 deleted the hd/18/initial_refactor_of_syncer branch May 17, 2015 01:28
@czechboy0 czechboy0 restored the hd/18/initial_refactor_of_syncer branch May 17, 2015 01:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants