{"action":"opened","number":11,"pull_request":{"url":"https://api.github.com/repos/rosette-proj/rosette-core/pulls/11","id":36058803,"html_url":"https://github.com/rosette-proj/rosette-core/pull/11","diff_url":"https://github.com/rosette-proj/rosette-core/pull/11.diff","patch_url":"https://github.com/rosette-proj/rosette-core/pull/11.patch","issue_url":"https://api.github.com/repos/rosette-proj/rosette-core/issues/11","number":11,"state":"open","locked":false,"title":"Queue to process commits","user":{"login":"camertron","id":575280,"avatar_url":"https://avatars.githubusercontent.com/u/575280?v=3","gravatar_id":"","url":"https://api.github.com/users/camertron","html_url":"https://github.com/camertron","followers_url":"https://api.github.com/users/camertron/followers","following_url":"https://api.github.com/users/camertron/following{/other_user}","gists_url":"https://api.github.com/users/camertron/gists{/gist_id}","starred_url":"https://api.github.com/users/camertron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/camertron/subscriptions","organizations_url":"https://api.github.com/users/camertron/orgs","repos_url":"https://api.github.com/users/camertron/repos","events_url":"https://api.github.com/users/camertron/events{/privacy}","received_events_url":"https://api.github.com/users/camertron/received_events","type":"User","site_admin":false},"body":"This logic will eventually replace the commit cron we have today. The workflow looks something like this:\r\n\r\n1. Engineer pushes commit to github, git after commit hook fires.\r\n2. Commit job is enqueued.\r\n3. Worker dequeues job and processes it.\r\n4. The `CommitConductor` identifies the next stage and enqueues another job.\r\n\r\nHere are the stages:\r\n\r\n1. Fetch git repository\r\n2. Extract English phrases\r\n3. Push English phrases to the translation management system (i.e. Smartling)\r\n4. Pull translations from the TMS (Smartling). Repeat until the commit is 100% translated.\r\n5. Finalize (i.e. delete corresponding Smartling file)\r\n\r\nThe stages are all individual classes with an `accepts` method call at the top that describes which `PhraseStatus`es they can process. The `CommitConductor` looks up the status for a commit, determines the current stage, instantiates the appropriate stage class, and enqueues it as another job. That's basically the core part of this PR. Most everything else is for testing purposes.\r\n\r\n@jdoconnor @seunghyo @zvkemp @11mdlow ","created_at":"2015-05-22T18:51:30Z","updated_at":"2015-05-22T18:51:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":{"login":"zvkemp","id":2286046,"avatar_url":"https://avatars.githubusercontent.com/u/2286046?v=3","gravatar_id":"","url":"https://api.github.com/users/zvkemp","html_url":"https://github.com/zvkemp","followers_url":"https://api.github.com/users/zvkemp/followers","following_url":"https://api.github.com/users/zvkemp/following{/other_user}","gists_url":"https://api.github.com/users/zvkemp/gists{/gist_id}","starred_url":"https://api.github.com/users/zvkemp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zvkemp/subscriptions","organizations_url":"https://api.github.com/users/zvkemp/orgs","repos_url":"https://api.github.com/users/zvkemp/repos","events_url":"https://api.github.com/users/zvkemp/events{/privacy}","received_events_url":"https://api.github.com/users/zvkemp/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/rosette-proj/rosette-core/pulls/11/commits","review_comments_url":"https://api.github.com/repos/rosette-proj/rosette-core/pulls/11/comments","review_comment_url":"https://api.github.com/repos/rosette-proj/rosette-core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rosette-proj/rosette-core/issues/11/comments","statuses_url":"https://api.github.com/repos/rosette-proj/rosette-core/statuses/86209326ab82e8934821f4932ed7c612281a638e","head":{"label":"rosette-proj:commit_queue","ref":"commit_queue","sha":"86209326ab82e8934821f4932ed7c612281a638e","user":{"login":"rosette-proj","id":8634919,"avatar_url":"https://avatars.githubusercontent.com/u/8634919?v=3","gravatar_id":"","url":"https://api.github.com/users/rosette-proj","html_url":"https://github.com/rosette-proj","followers_url":"https://api.github.com/users/rosette-proj/followers","following_url":"https://api.github.com/users/rosette-proj/following{/other_user}","gists_url":"https://api.github.com/users/rosette-proj/gists{/gist_id}","starred_url":"https://api.github.com/users/rosette-proj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rosette-proj/subscriptions","organizations_url":"https://api.github.com/users/rosette-proj/orgs","repos_url":"https://api.github.com/users/rosette-proj/repos","events_url":"https://api.github.com/users/rosette-proj/events{/privacy}","received_events_url":"https://api.github.com/users/rosette-proj/received_events","type":"Organization","site_admin":false},"repo":{"id":22569314,"name":"rosette-core","full_name":"rosette-proj/rosette-core","owner":{"login":"rosette-proj","id":8634919,"avatar_url":"https://avatars.githubusercontent.com/u/8634919?v=3","gravatar_id":"","url":"https://api.github.com/users/rosette-proj","html_url":"https://github.com/rosette-proj","followers_url":"https://api.github.com/users/rosette-proj/followers","following_url":"https://api.github.com/users/rosette-proj/following{/other_user}","gists_url":"https://api.github.com/users/rosette-proj/gists{/gist_id}","starred_url":"https://api.github.com/users/rosette-proj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rosette-proj/subscriptions","organizations_url":"https://api.github.com/users/rosette-proj/orgs","repos_url":"https://api.github.com/users/rosette-proj/repos","events_url":"https://api.github.com/users/rosette-proj/events{/privacy}","received_events_url":"https://api.github.com/users/rosette-proj/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rosette-proj/rosette-core","description":"Core classes for the Rosette internationalization platform.","fork":false,"url":"https://api.github.com/repos/rosette-proj/rosette-core","forks_url":"https://api.github.com/repos/rosette-proj/rosette-core/forks","keys_url":"https://api.github.com/repos/rosette-proj/rosette-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rosette-proj/rosette-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rosette-proj/rosette-core/teams","hooks_url":"https://api.github.com/repos/rosette-proj/rosette-core/hooks","issue_events_url":"https://api.github.com/repos/rosette-proj/rosette-core/issues/events{/number}","events_url":"https://api.github.com/repos/rosette-proj/rosette-core/events","assignees_url":"https://api.github.com/repos/rosette-proj/rosette-core/assignees{/user}","branches_url":"https://api.github.com/repos/rosette-proj/rosette-core/branches{/branch}","tags_url":"https://api.github.com/repos/rosette-proj/rosette-core/tags","blobs_url":"https://api.github.com/repos/rosette-proj/rosette-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rosette-proj/rosette-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rosette-proj/rosette-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/rosette-proj/rosette-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rosette-proj/rosette-core/statuses/{sha}","languages_url":"https://api.github.com/repos/rosette-proj/rosette-core/languages","stargazers_url":"https://api.github.com/repos/rosette-proj/rosette-core/stargazers","contributors_url":"https://api.github.com/repos/rosette-proj/rosette-core/contributors","subscribers_url":"https://api.github.com/repos/rosette-proj/rosette-core/subscribers","subscription_url":"https://api.github.com/repos/rosette-proj/rosette-core/subscription","commits_url":"https://api.github.com/repos/rosette-proj/rosette-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/rosette-proj/rosette-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/rosette-proj/rosette-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/rosette-proj/rosette-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/rosette-proj/rosette-core/contents/{+path}","compare_url":"https://api.github.com/repos/rosette-proj/rosette-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rosette-proj/rosette-core/merges","archive_url":"https://api.github.com/repos/rosette-proj/rosette-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rosette-proj/rosette-core/downloads","issues_url":"https://api.github.com/repos/rosette-proj/rosette-core/issues{/number}","pulls_url":"https://api.github.com/repos/rosette-proj/rosette-core/pulls{/number}","milestones_url":"https://api.github.com/repos/rosette-proj/rosette-core/milestones{/number}","notifications_url":"https://api.github.com/repos/rosette-proj/rosette-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rosette-proj/rosette-core/labels{/name}","releases_url":"https://api.github.com/repos/rosette-proj/rosette-core/releases{/id}","created_at":"2014-08-03T06:18:21Z","updated_at":"2015-03-30T23:47:38Z","pushed_at":"2015-05-22T18:21:31Z","git_url":"git://github.com/rosette-proj/rosette-core.git","ssh_url":"git@github.com:rosette-proj/rosette-core.git","clone_url":"https://github.com/rosette-proj/rosette-core.git","svn_url":"https://github.com/rosette-proj/rosette-core","homepage":null,"size":1232,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"base":{"label":"rosette-proj:tms","ref":"tms","sha":"f6ba76fc864863d4f11c8f12b666762ba7ceab61","user":{"login":"rosette-proj","id":8634919,"avatar_url":"https://avatars.githubusercontent.com/u/8634919?v=3","gravatar_id":"","url":"https://api.github.com/users/rosette-proj","html_url":"https://github.com/rosette-proj","followers_url":"https://api.github.com/users/rosette-proj/followers","following_url":"https://api.github.com/users/rosette-proj/following{/other_user}","gists_url":"https://api.github.com/users/rosette-proj/gists{/gist_id}","starred_url":"https://api.github.com/users/rosette-proj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rosette-proj/subscriptions","organizations_url":"https://api.github.com/users/rosette-proj/orgs","repos_url":"https://api.github.com/users/rosette-proj/repos","events_url":"https://api.github.com/users/rosette-proj/events{/privacy}","received_events_url":"https://api.github.com/users/rosette-proj/received_events","type":"Organization","site_admin":false},"repo":{"id":22569314,"name":"rosette-core","full_name":"rosette-proj/rosette-core","owner":{"login":"rosette-proj","id":8634919,"avatar_url":"https://avatars.githubusercontent.com/u/8634919?v=3","gravatar_id":"","url":"https://api.github.com/users/rosette-proj","html_url":"https://github.com/rosette-proj","followers_url":"https://api.github.com/users/rosette-proj/followers","following_url":"https://api.github.com/users/rosette-proj/following{/other_user}","gists_url":"https://api.github.com/users/rosette-proj/gists{/gist_id}","starred_url":"https://api.github.com/users/rosette-proj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rosette-proj/subscriptions","organizations_url":"https://api.github.com/users/rosette-proj/orgs","repos_url":"https://api.github.com/users/rosette-proj/repos","events_url":"https://api.github.com/users/rosette-proj/events{/privacy}","received_events_url":"https://api.github.com/users/rosette-proj/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rosette-proj/rosette-core","description":"Core classes for the Rosette internationalization platform.","fork":false,"url":"https://api.github.com/repos/rosette-proj/rosette-core","forks_url":"https://api.github.com/repos/rosette-proj/rosette-core/forks","keys_url":"https://api.github.com/repos/rosette-proj/rosette-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rosette-proj/rosette-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rosette-proj/rosette-core/teams","hooks_url":"https://api.github.com/repos/rosette-proj/rosette-core/hooks","issue_events_url":"https://api.github.com/repos/rosette-proj/rosette-core/issues/events{/number}","events_url":"https://api.github.com/repos/rosette-proj/rosette-core/events","assignees_url":"https://api.github.com/repos/rosette-proj/rosette-core/assignees{/user}","branches_url":"https://api.github.com/repos/rosette-proj/rosette-core/branches{/branch}","tags_url":"https://api.github.com/repos/rosette-proj/rosette-core/tags","blobs_url":"https://api.github.com/repos/rosette-proj/rosette-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rosette-proj/rosette-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rosette-proj/rosette-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/rosette-proj/rosette-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rosette-proj/rosette-core/statuses/{sha}","languages_url":"https://api.github.com/repos/rosette-proj/rosette-core/languages","stargazers_url":"https://api.github.com/repos/rosette-proj/rosette-core/stargazers","contributors_url":"https://api.github.com/repos/rosette-proj/rosette-core/contributors","subscribers_url":"https://api.github.com/repos/rosette-proj/rosette-core/subscribers","subscription_url":"https://api.github.com/repos/rosette-proj/rosette-core/subscription","commits_url":"https://api.github.com/repos/rosette-proj/rosette-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/rosette-proj/rosette-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/rosette-proj/rosette-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/rosette-proj/rosette-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/rosette-proj/rosette-core/contents/{+path}","compare_url":"https://api.github.com/repos/rosette-proj/rosette-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rosette-proj/rosette-core/merges","archive_url":"https://api.github.com/repos/rosette-proj/rosette-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rosette-proj/rosette-core/downloads","issues_url":"https://api.github.com/repos/rosette-proj/rosette-core/issues{/number}","pulls_url":"https://api.github.com/repos/rosette-proj/rosette-core/pulls{/number}","milestones_url":"https://api.github.com/repos/rosette-proj/rosette-core/milestones{/number}","notifications_url":"https://api.github.com/repos/rosette-proj/rosette-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rosette-proj/rosette-core/labels{/name}","releases_url":"https://api.github.com/repos/rosette-proj/rosette-core/releases{/id}","created_at":"2014-08-03T06:18:21Z","updated_at":"2015-03-30T23:47:38Z","pushed_at":"2015-05-22T18:21:31Z","git_url":"git://github.com/rosette-proj/rosette-core.git","ssh_url":"git@github.com:rosette-proj/rosette-core.git","clone_url":"https://github.com/rosette-proj/rosette-core.git","svn_url":"https://github.com/rosette-proj/rosette-core","homepage":null,"size":1232,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rosette-proj/rosette-core/pulls/11"},"html":{"href":"https://github.com/rosette-proj/rosette-core/pull/11"},"issue":{"href":"https://api.github.com/repos/rosette-proj/rosette-core/issues/11"},"comments":{"href":"https://api.github.com/repos/rosette-proj/rosette-core/issues/11/comments"},"review_comments":{"href":"https://api.github.com/repos/rosette-proj/rosette-core/pulls/11/comments"},"review_comment":{"href":"https://api.github.com/repos/rosette-proj/rosette-core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rosette-proj/rosette-core/pulls/11/commits"},"statuses":{"href":"https://api.github.com/repos/rosette-proj/rosette-core/statuses/86209326ab82e8934821f4932ed7c612281a638e"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":4,"additions":1483,"deletions":36,"changed_files":34}}