{"action":"created","comment":{"url":"https://api.github.com/repos/FiviumAustralia/OpenEyes/pulls/comments/134922637","pull_request_review_id":58271999,"id":134922637,"diff_hunk":"@@ -0,0 +1,71 @@\n+<?php\n+\n+class m170823_064156_cera_ethnic_groups extends OEMigration\n+{\n+\tpublic function safeUp()\n+\t{\n+        /**\n+         * @var $ethnicity EthnicGroup\n+         * @var $patient Patient\n+         */\n+\t    // Save all ethnic groups so the original values can be versioned.\n+        $ethnicGroups = EthnicGroup::model()->findAll();\n+        foreach ($ethnicGroups as $ethnicity) {\n+            $ethnicity->save();","path":"protected/migrations/m170823_064156_cera_ethnic_groups.php","position":14,"original_position":14,"commit_id":"221c67413fb600c8e204e0ce3f71242c8ef6b114","original_commit_id":"221c67413fb600c8e204e0ce3f71242c8ef6b114","user":{"login":"marshl","id":6118864,"avatar_url":"https://avatars2.githubusercontent.com/u/6118864?v=4","gravatar_id":"","url":"https://api.github.com/users/marshl","html_url":"https://github.com/marshl","followers_url":"https://api.github.com/users/marshl/followers","following_url":"https://api.github.com/users/marshl/following{/other_user}","gists_url":"https://api.github.com/users/marshl/gists{/gist_id}","starred_url":"https://api.github.com/users/marshl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marshl/subscriptions","organizations_url":"https://api.github.com/users/marshl/orgs","repos_url":"https://api.github.com/users/marshl/repos","events_url":"https://api.github.com/users/marshl/events{/privacy}","received_events_url":"https://api.github.com/users/marshl/received_events","type":"User","site_admin":false},"body":"It sounds like you might want to throw an exception if this fails","created_at":"2017-08-24T04:04:58Z","updated_at":"2017-08-24T04:08:48Z","html_url":"https://github.com/FiviumAustralia/OpenEyes/pull/129#discussion_r134922637","pull_request_url":"https://api.github.com/repos/FiviumAustralia/OpenEyes/pulls/129","_links":{"self":{"href":"https://api.github.com/repos/FiviumAustralia/OpenEyes/pulls/comments/134922637"},"html":{"href":"https://github.com/FiviumAustralia/OpenEyes/pull/129#discussion_r134922637"},"pull_request":{"href":"https://api.github.com/repos/FiviumAustralia/OpenEyes/pulls/129"}}},"pull_request":{"url":"https://api.github.com/repos/FiviumAustralia/OpenEyes/pulls/129","id":137364415,"html_url":"https://github.com/FiviumAustralia/OpenEyes/pull/129","diff_url":"https://github.com/FiviumAustralia/OpenEyes/pull/129.diff","patch_url":"https://github.com/FiviumAustralia/OpenEyes/pull/129.patch","issue_url":"https://api.github.com/repos/FiviumAustralia/OpenEyes/issues/129","number":129,"state":"open","locked":false,"title":"Added migration to change the ethnicity in the ethnicity list to the same list used by CERA's REDCap database.","user":{"login":"apigram","id":4961334,"avatar_url":"https://avatars0.githubusercontent.com/u/4961334?v=4","gravatar_id":"","url":"https://api.github.com/users/apigram","html_url":"https://github.com/apigram","followers_url":"https://api.github.com/users/apigram/followers","following_url":"https://api.github.com/users/apigram/following{/other_user}","gists_url":"https://api.github.com/users/apigram/gists{/gist_id}","starred_url":"https://api.github.com/users/apigram/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apigram/subscriptions","organizations_url":"https://api.github.com/users/apigram/orgs","repos_url":"https://api.github.com/users/apigram/repos","events_url":"https://api.github.com/users/apigram/events{/privacy}","received_events_url":"https://api.github.com/users/apigram/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-08-24T03:55:19Z","updated_at":"2017-08-24T04:08:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"07e753728681d6cf50b4d5ae020a6d83c18f3703","assignee":{"login":"apigram","id":4961334,"avatar_url":"https://avatars0.githubusercontent.com/u/4961334?v=4","gravatar_id":"","url":"https://api.github.com/users/apigram","html_url":"https://github.com/apigram","followers_url":"https://api.github.com/users/apigram/followers","following_url":"https://api.github.com/users/apigram/following{/other_user}","gists_url":"https://api.github.com/users/apigram/gists{/gist_id}","starred_url":"https://api.github.com/users/apigram/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apigram/subscriptions","organizations_url":"https://api.github.com/users/apigram/orgs","repos_url":"https://api.github.com/users/apigram/repos","events_url":"https://api.github.com/users/apigram/events{/privacy}","received_events_url":"https://api.github.com/users/apigram/received_events","type":"User","site_admin":false},"assignees":[{"login":"apigram","id":4961334,"avatar_url":"https://avatars0.githubusercontent.com/u/4961334?v=4","gravatar_id":"","url":"https://api.github.com/users/apigram","html_url":"https://github.com/apigram","followers_url":"https://api.github.com/users/apigram/followers","following_url":"https://api.github.com/users/apigram/following{/other_user}","gists_url":"https://api.github.com/users/apigram/gists{/gist_id}","starred_url":"https://api.github.com/users/apigram/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apigram/subscriptions","organizations_url":"https://api.github.com/users/apigram/orgs","repos_url":"https://api.github.com/users/apigram/repos","events_url":"https://api.github.com/users/apigram/events{/privacy}","received_events_url":"https://api.github.com/users/apigram/received_events","type":"User","site_admin":false}],"requested_reviewers":[{"login":"Vegemash","id":2470379,"avatar_url":"https://avatars1.githubusercontent.com/u/2470379?v=4","gravatar_id":"","url":"https://api.github.com/users/Vegemash","html_url":"https://github.com/Vegemash","followers_url":"https://api.github.com/users/Vegemash/followers","following_url":"https://api.github.com/users/Vegemash/following{/other_user}","gists_url":"https://api.github.com/users/Vegemash/gists{/gist_id}","starred_url":"https://api.github.com/users/Vegemash/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vegemash/subscriptions","organizations_url":"https://api.github.com/users/Vegemash/orgs","repos_url":"https://api.github.com/users/Vegemash/repos","events_url":"https://api.github.com/users/Vegemash/events{/privacy}","received_events_url":"https://api.github.com/users/Vegemash/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/FiviumAustralia/OpenEyes/pulls/129/commits","review_comments_url":"https://api.github.com/repos/FiviumAustralia/OpenEyes/pulls/129/comments","review_comment_url":"https://api.github.com/repos/FiviumAustralia/OpenEyes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/FiviumAustralia/OpenEyes/issues/129/comments","statuses_url":"https://api.github.com/repos/FiviumAustralia/OpenEyes/statuses/221c67413fb600c8e204e0ce3f71242c8ef6b114","head":{"label":"FiviumAustralia:wip/ethnicity-list","ref":"wip/ethnicity-list","sha":"221c67413fb600c8e204e0ce3f71242c8ef6b114","user":{"login":"FiviumAustralia","id":16315051,"avatar_url":"https://avatars3.githubusercontent.com/u/16315051?v=4","gravatar_id":"","url":"https://api.github.com/users/FiviumAustralia","html_url":"https://github.com/FiviumAustralia","followers_url":"https://api.github.com/users/FiviumAustralia/followers","following_url":"https://api.github.com/users/FiviumAustralia/following{/other_user}","gists_url":"https://api.github.com/users/FiviumAustralia/gists{/gist_id}","starred_url":"https://api.github.com/users/FiviumAustralia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FiviumAustralia/subscriptions","organizations_url":"https://api.github.com/users/FiviumAustralia/orgs","repos_url":"https://api.github.com/users/FiviumAustralia/repos","events_url":"https://api.github.com/users/FiviumAustralia/events{/privacy}","received_events_url":"https://api.github.com/users/FiviumAustralia/received_events","type":"Organization","site_admin":false},"repo":{"id":80492322,"name":"OpenEyes","full_name":"FiviumAustralia/OpenEyes","owner":{"login":"FiviumAustralia","id":16315051,"avatar_url":"https://avatars3.githubusercontent.com/u/16315051?v=4","gravatar_id":"","url":"https://api.github.com/users/FiviumAustralia","html_url":"https://github.com/FiviumAustralia","followers_url":"https://api.github.com/users/FiviumAustralia/followers","following_url":"https://api.github.com/users/FiviumAustralia/following{/other_user}","gists_url":"https://api.github.com/users/FiviumAustralia/gists{/gist_id}","starred_url":"https://api.github.com/users/FiviumAustralia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FiviumAustralia/subscriptions","organizations_url":"https://api.github.com/users/FiviumAustralia/orgs","repos_url":"https://api.github.com/users/FiviumAustralia/repos","events_url":"https://api.github.com/users/FiviumAustralia/events{/privacy}","received_events_url":"https://api.github.com/users/FiviumAustralia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/FiviumAustralia/OpenEyes","description":"An Open Source electronic patient record system","fork":true,"url":"https://api.github.com/repos/FiviumAustralia/OpenEyes","forks_url":"https://api.github.com/repos/FiviumAustralia/OpenEyes/forks","keys_url":"https://api.github.com/repos/FiviumAustralia/OpenEyes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/FiviumAustralia/OpenEyes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/FiviumAustralia/OpenEyes/teams","hooks_url":"https://api.github.com/repos/FiviumAustralia/OpenEyes/hooks","issue_events_url":"https://api.github.com/repos/FiviumAustralia/OpenEyes/issues/events{/number}","events_url":"https://api.github.com/repos/FiviumAustralia/OpenEyes/events","assignees_url":"https://api.github.com/repos/FiviumAustralia/OpenEyes/assignees{/user}","branches_url":"https://api.github.com/repos/FiviumAustralia/OpenEyes/branches{/branch}","tags_url":"https://api.github.com/repos/FiviumAustralia/OpenEyes/tags","blobs_url":"https://api.github.com/repos/FiviumAustralia/OpenEyes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/FiviumAustralia/OpenEyes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/FiviumAustralia/OpenEyes/git/refs{/sha}","trees_url":"https://api.github.com/repos/FiviumAustralia/OpenEyes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/FiviumAustralia/OpenEyes/statuses/{sha}","languages_url":"https://api.github.com/repos/FiviumAustralia/OpenEyes/languages","stargazers_url":"https://api.github.com/repos/FiviumAustralia/OpenEyes/stargazers","contributors_url":"https://api.github.com/repos/FiviumAustralia/OpenEyes/contributors","subscribers_url":"https://api.github.com/repos/FiviumAustralia/OpenEyes/subscribers","subscription_url":"https://api.github.com/repos/FiviumAustralia/OpenEyes/subscription","commits_url":"https://api.github.com/repos/FiviumAustralia/OpenEyes/commits{/sha}","git_commits_url":"https://api.github.com/repos/FiviumAustralia/OpenEyes/git/commits{/sha}","comments_url":"https://api.github.com/repos/FiviumAustralia/OpenEyes/comments{/number}","issue_comment_url":"https://api.github.com/repos/FiviumAustralia/OpenEyes/issues/comments{/number}","contents_url":"https://api.github.com/repos/FiviumAustralia/OpenEyes/contents/{+path}","compare_url":"https://api.github.com/repos/FiviumAustralia/OpenEyes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/FiviumAustralia/OpenEyes/merges","archive_url":"https://api.github.com/repos/FiviumAustralia/OpenEyes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/FiviumAustralia/OpenEyes/downloads","issues_url":"https://api.github.com/repos/FiviumAustralia/OpenEyes/issues{/number}","pulls_url":"https://api.github.com/repos/FiviumAustralia/OpenEyes/pulls{/number}","milestones_url":"https://api.github.com/repos/FiviumAustralia/OpenEyes/milestones{/number}","notifications_url":"https://api.github.com/repos/FiviumAustralia/OpenEyes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/FiviumAustralia/OpenEyes/labels{/name}","releases_url":"https://api.github.com/repos/FiviumAustralia/OpenEyes/releases{/id}","deployments_url":"https://api.github.com/repos/FiviumAustralia/OpenEyes/deployments","created_at":"2017-01-31T04:53:16Z","updated_at":"2017-06-14T00:24:27Z","pushed_at":"2017-08-24T03:55:19Z","git_url":"git://github.com/FiviumAustralia/OpenEyes.git","ssh_url":"git@github.com:FiviumAustralia/OpenEyes.git","clone_url":"https://github.com/FiviumAustralia/OpenEyes.git","svn_url":"https://github.com/FiviumAustralia/OpenEyes","homepage":"http://www.openeyes.org.uk/","size":88006,"stargazers_count":1,"watchers_count":1,"language":"PHP","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":1,"forks":4,"open_issues":1,"watchers":1,"default_branch":"master"}},"base":{"label":"FiviumAustralia:feature/cera","ref":"feature/cera","sha":"9b9811210ebf00c71b68e5ddf44b603adee76e0f","user":{"login":"FiviumAustralia","id":16315051,"avatar_url":"https://avatars3.githubusercontent.com/u/16315051?v=4","gravatar_id":"","url":"https://api.github.com/users/FiviumAustralia","html_url":"https://github.com/FiviumAustralia","followers_url":"https://api.github.com/users/FiviumAustralia/followers","following_url":"https://api.github.com/users/FiviumAustralia/following{/other_user}","gists_url":"https://api.github.com/users/FiviumAustralia/gists{/gist_id}","starred_url":"https://api.github.com/users/FiviumAustralia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FiviumAustralia/subscriptions","organizations_url":"https://api.github.com/users/FiviumAustralia/orgs","repos_url":"https://api.github.com/users/FiviumAustralia/repos","events_url":"https://api.github.com/users/FiviumAustralia/events{/privacy}","received_events_url":"https://api.github.com/users/FiviumAustralia/received_events","type":"Organization","site_admin":false},"repo":{"id":80492322,"name":"OpenEyes","full_name":"FiviumAustralia/OpenEyes","owner":{"login":"FiviumAustralia","id":16315051,"avatar_url":"https://avatars3.githubusercontent.com/u/16315051?v=4","gravatar_id":"","url":"https://api.github.com/users/FiviumAustralia","html_url":"https://github.com/FiviumAustralia","followers_url":"https://api.github.com/users/FiviumAustralia/followers","following_url":"https://api.github.com/users/FiviumAustralia/following{/other_user}","gists_url":"https://api.github.com/users/FiviumAustralia/gists{/gist_id}","starred_url":"https://api.github.com/users/FiviumAustralia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FiviumAustralia/subscriptions","organizations_url":"https://api.github.com/users/FiviumAustralia/orgs","repos_url":"https://api.github.com/users/FiviumAustralia/repos","events_url":"https://api.github.com/users/FiviumAustralia/events{/privacy}","received_events_url":"https://api.github.com/users/FiviumAustralia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/FiviumAustralia/OpenEyes","description":"An Open Source electronic patient record system","fork":true,"url":"https://api.github.com/repos/FiviumAustralia/OpenEyes","forks_url":"https://api.github.com/repos/FiviumAustralia/OpenEyes/forks","keys_url":"https://api.github.com/repos/FiviumAustralia/OpenEyes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/FiviumAustralia/OpenEyes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/FiviumAustralia/OpenEyes/teams","hooks_url":"https://api.github.com/repos/FiviumAustralia/OpenEyes/hooks","issue_events_url":"https://api.github.com/repos/FiviumAustralia/OpenEyes/issues/events{/number}","events_url":"https://api.github.com/repos/FiviumAustralia/OpenEyes/events","assignees_url":"https://api.github.com/repos/FiviumAustralia/OpenEyes/assignees{/user}","branches_url":"https://api.github.com/repos/FiviumAustralia/OpenEyes/branches{/branch}","tags_url":"https://api.github.com/repos/FiviumAustralia/OpenEyes/tags","blobs_url":"https://api.github.com/repos/FiviumAustralia/OpenEyes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/FiviumAustralia/OpenEyes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/FiviumAustralia/OpenEyes/git/refs{/sha}","trees_url":"https://api.github.com/repos/FiviumAustralia/OpenEyes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/FiviumAustralia/OpenEyes/statuses/{sha}","languages_url":"https://api.github.com/repos/FiviumAustralia/OpenEyes/languages","stargazers_url":"https://api.github.com/repos/FiviumAustralia/OpenEyes/stargazers","contributors_url":"https://api.github.com/repos/FiviumAustralia/OpenEyes/contributors","subscribers_url":"https://api.github.com/repos/FiviumAustralia/OpenEyes/subscribers","subscription_url":"https://api.github.com/repos/FiviumAustralia/OpenEyes/subscription","commits_url":"https://api.github.com/repos/FiviumAustralia/OpenEyes/commits{/sha}","git_commits_url":"https://api.github.com/repos/FiviumAustralia/OpenEyes/git/commits{/sha}","comments_url":"https://api.github.com/repos/FiviumAustralia/OpenEyes/comments{/number}","issue_comment_url":"https://api.github.com/repos/FiviumAustralia/OpenEyes/issues/comments{/number}","contents_url":"https://api.github.com/repos/FiviumAustralia/OpenEyes/contents/{+path}","compare_url":"https://api.github.com/repos/FiviumAustralia/OpenEyes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/FiviumAustralia/OpenEyes/merges","archive_url":"https://api.github.com/repos/FiviumAustralia/OpenEyes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/FiviumAustralia/OpenEyes/downloads","issues_url":"https://api.github.com/repos/FiviumAustralia/OpenEyes/issues{/number}","pulls_url":"https://api.github.com/repos/FiviumAustralia/OpenEyes/pulls{/number}","milestones_url":"https://api.github.com/repos/FiviumAustralia/OpenEyes/milestones{/number}","notifications_url":"https://api.github.com/repos/FiviumAustralia/OpenEyes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/FiviumAustralia/OpenEyes/labels{/name}","releases_url":"https://api.github.com/repos/FiviumAustralia/OpenEyes/releases{/id}","deployments_url":"https://api.github.com/repos/FiviumAustralia/OpenEyes/deployments","created_at":"2017-01-31T04:53:16Z","updated_at":"2017-06-14T00:24:27Z","pushed_at":"2017-08-24T03:55:19Z","git_url":"git://github.com/FiviumAustralia/OpenEyes.git","ssh_url":"git@github.com:FiviumAustralia/OpenEyes.git","clone_url":"https://github.com/FiviumAustralia/OpenEyes.git","svn_url":"https://github.com/FiviumAustralia/OpenEyes","homepage":"http://www.openeyes.org.uk/","size":88006,"stargazers_count":1,"watchers_count":1,"language":"PHP","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":1,"forks":4,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/FiviumAustralia/OpenEyes/pulls/129"},"html":{"href":"https://github.com/FiviumAustralia/OpenEyes/pull/129"},"issue":{"href":"https://api.github.com/repos/FiviumAustralia/OpenEyes/issues/129"},"comments":{"href":"https://api.github.com/repos/FiviumAustralia/OpenEyes/issues/129/comments"},"review_comments":{"href":"https://api.github.com/repos/FiviumAustralia/OpenEyes/pulls/129/comments"},"review_comment":{"href":"https://api.github.com/repos/FiviumAustralia/OpenEyes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/FiviumAustralia/OpenEyes/pulls/129/commits"},"statuses":{"href":"https://api.github.com/repos/FiviumAustralia/OpenEyes/statuses/221c67413fb600c8e204e0ce3f71242c8ef6b114"}}}}
{"actor":{"display_login":"marshl"}}