GitHub PullRequestReviewCommentEvent at 2014-08-11 12:41:21
Repository: ForumBundle
Actor: ngodfraind
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/ngodfraind/ForumBundle/pulls/comments/16050215","id":16050215,"diff_hunk":"@@ -0,0 +1,107 @@\n+<?php\n+\n+/*\n+ * This file is part of the Claroline Connect package.\n+ *\n+ * (c) Claroline Consortium <consortium@claroline.net>\n+ *\n+ * For the full copyright and license information, please view the LICENSE\n+ * file that was distributed with this source code.\n+ */\n+\n+namespace Claroline\\ForumBundle\\Installation\\Updater;\n+\n+use Symfony\\Component\\DependencyInjection\\ContainerInterface;\n+\n+class Updater030100\n+{\n+    private $container;\n+    private $em;\n+    private $logger;\n+    private $ut;\n+\n+    public function __construct(ContainerInterface $container)\n+    {\n+        $this->container = $container;\n+        $this->em = $container->get('doctrine.orm.entity_manager');\n+        $this->ut = $container->get('claroline.utilities.misc');\n+    }\n+\n+    public function postUpdate()\n+    {        \n+        $this->log('Adding hashname...');\n+        $forums = $this->em->getRepository('ClarolineForumBundle:Forum')->findAll();\n+        $categories = $this->em->getRepository('ClarolineForumBundle:Category')->findAll();\n+        $subjects = $this->em->getRepository('ClarolineForumBundle:Subject')->findAll();\n+        $messages = $this->em->getRepository('ClarolineForumBundle:Message')->findAll();\n+        \n+        $counter = 0;\n+        $this->postUpdateCategory($categories, $counter);\n+        $this->postUpdateSubjects($subjects, $counter);\n+        $this->postUpdateMessage($messages, $counter);\n+        \n+        // foreach ($forums as $forum) {\n+            // $categories = $forum->getCategories();\n+            // $this->log('Adding category hashname...');\n+            // $counter ++;\n+            // $this->testFlush($counter);\n+            // $this->postUpdateCategory($categories, $counter);\n+        // }\n+\n+        $this->em->flush();\n+    }\n+    \n+    private function postUpdateCategory($categories, $counter)\n+    {\n+            $this->log('Adding category hashname...');\n+        foreach ($categories as $cat) {\n+            $subjects = $cat->getSubjects();\n+            $cat->setHashname($this->ut->generateGuid());\n+            // $this->log('Adding subjects hashname...');\n+            $counter ++;\n+            $this->testFlush($counter);\n+            // $this->postUpdateSubjects($subjects, $counter);","path":"Installation/Updater/Updater030100.php","position":63,"original_position":63,"commit_id":"df20113a3405f164107dd95f004f115eafce9076","original_commit_id":"df20113a3405f164107dd95f004f115eafce9076","user":{"login":"ngodfraind","id":1397430,"avatar_url":"https://avatars.githubusercontent.com/u/1397430?v=2","gravatar_id":"5a50f9f7017d2604a6616dcc729b8714","url":"https://api.github.com/users/ngodfraind","html_url":"https://github.com/ngodfraind","followers_url":"https://api.github.com/users/ngodfraind/followers","following_url":"https://api.github.com/users/ngodfraind/following{/other_user}","gists_url":"https://api.github.com/users/ngodfraind/gists{/gist_id}","starred_url":"https://api.github.com/users/ngodfraind/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ngodfraind/subscriptions","organizations_url":"https://api.github.com/users/ngodfraind/orgs","repos_url":"https://api.github.com/users/ngodfraind/repos","events_url":"https://api.github.com/users/ngodfraind/events{/privacy}","received_events_url":"https://api.github.com/users/ngodfraind/received_events","type":"User","site_admin":false},"body":"Pourquoi est-ce commenté ?","created_at":"2014-08-11T12:41:21Z","updated_at":"2014-08-11T12:41:21Z","html_url":"https://github.com/ngodfraind/ForumBundle/pull/1#discussion_r16050215","pull_request_url":"https://api.github.com/repos/ngodfraind/ForumBundle/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/ngodfraind/ForumBundle/pulls/comments/16050215"},"html":{"href":"https://github.com/ngodfraind/ForumBundle/pull/1#discussion_r16050215"},"pull_request":{"href":"https://api.github.com/repos/ngodfraind/ForumBundle/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/ngodfraind/ForumBundle/pulls/1","id":19598131,"html_url":"https://github.com/ngodfraind/ForumBundle/pull/1","diff_url":"https://github.com/ngodfraind/ForumBundle/pull/1.diff","patch_url":"https://github.com/ngodfraind/ForumBundle/pull/1.patch","issue_url":"https://api.github.com/repos/ngodfraind/ForumBundle/issues/1","number":1,"state":"open","title":"Offline","user":{"login":"ngodfraind","id":1397430,"avatar_url":"https://avatars.githubusercontent.com/u/1397430?v=2","gravatar_id":"5a50f9f7017d2604a6616dcc729b8714","url":"https://api.github.com/users/ngodfraind","html_url":"https://github.com/ngodfraind","followers_url":"https://api.github.com/users/ngodfraind/followers","following_url":"https://api.github.com/users/ngodfraind/following{/other_user}","gists_url":"https://api.github.com/users/ngodfraind/gists{/gist_id}","starred_url":"https://api.github.com/users/ngodfraind/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ngodfraind/subscriptions","organizations_url":"https://api.github.com/users/ngodfraind/orgs","repos_url":"https://api.github.com/users/ngodfraind/repos","events_url":"https://api.github.com/users/ngodfraind/events{/privacy}","received_events_url":"https://api.github.com/users/ngodfraind/received_events","type":"User","site_admin":false},"body":"","created_at":"2014-08-11T12:40:18Z","updated_at":"2014-08-11T12:41:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ba314df56e1242890f4a34897a08065d2bc58180","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ngodfraind/ForumBundle/pulls/1/commits","review_comments_url":"https://api.github.com/repos/ngodfraind/ForumBundle/pulls/1/comments","review_comment_url":"https://api.github.com/repos/ngodfraind/ForumBundle/pulls/comments/{number}","comments_url":"https://api.github.com/repos/ngodfraind/ForumBundle/issues/1/comments","statuses_url":"https://api.github.com/repos/ngodfraind/ForumBundle/statuses/df20113a3405f164107dd95f004f115eafce9076","head":{"label":"pyjoe:master","ref":"master","sha":"df20113a3405f164107dd95f004f115eafce9076","user":{"login":"pyjoe","id":5772905,"avatar_url":"https://avatars.githubusercontent.com/u/5772905?v=2","gravatar_id":"358ef15752f42c55d4c51c1cae7f3cea","url":"https://api.github.com/users/pyjoe","html_url":"https://github.com/pyjoe","followers_url":"https://api.github.com/users/pyjoe/followers","following_url":"https://api.github.com/users/pyjoe/following{/other_user}","gists_url":"https://api.github.com/users/pyjoe/gists{/gist_id}","starred_url":"https://api.github.com/users/pyjoe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pyjoe/subscriptions","organizations_url":"https://api.github.com/users/pyjoe/orgs","repos_url":"https://api.github.com/users/pyjoe/repos","events_url":"https://api.github.com/users/pyjoe/events{/privacy}","received_events_url":"https://api.github.com/users/pyjoe/received_events","type":"User","site_admin":false},"repo":{"id":18552430,"name":"ForumBundle","full_name":"pyjoe/ForumBundle","owner":{"login":"pyjoe","id":5772905,"avatar_url":"https://avatars.githubusercontent.com/u/5772905?v=2","gravatar_id":"358ef15752f42c55d4c51c1cae7f3cea","url":"https://api.github.com/users/pyjoe","html_url":"https://github.com/pyjoe","followers_url":"https://api.github.com/users/pyjoe/followers","following_url":"https://api.github.com/users/pyjoe/following{/other_user}","gists_url":"https://api.github.com/users/pyjoe/gists{/gist_id}","starred_url":"https://api.github.com/users/pyjoe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pyjoe/subscriptions","organizations_url":"https://api.github.com/users/pyjoe/orgs","repos_url":"https://api.github.com/users/pyjoe/repos","events_url":"https://api.github.com/users/pyjoe/events{/privacy}","received_events_url":"https://api.github.com/users/pyjoe/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pyjoe/ForumBundle","description":"","fork":true,"url":"https://api.github.com/repos/pyjoe/ForumBundle","forks_url":"https://api.github.com/repos/pyjoe/ForumBundle/forks","keys_url":"https://api.github.com/repos/pyjoe/ForumBundle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pyjoe/ForumBundle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pyjoe/ForumBundle/teams","hooks_url":"https://api.github.com/repos/pyjoe/ForumBundle/hooks","issue_events_url":"https://api.github.com/repos/pyjoe/ForumBundle/issues/events{/number}","events_url":"https://api.github.com/repos/pyjoe/ForumBundle/events","assignees_url":"https://api.github.com/repos/pyjoe/ForumBundle/assignees{/user}","branches_url":"https://api.github.com/repos/pyjoe/ForumBundle/branches{/branch}","tags_url":"https://api.github.com/repos/pyjoe/ForumBundle/tags","blobs_url":"https://api.github.com/repos/pyjoe/ForumBundle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pyjoe/ForumBundle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pyjoe/ForumBundle/git/refs{/sha}","trees_url":"https://api.github.com/repos/pyjoe/ForumBundle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pyjoe/ForumBundle/statuses/{sha}","languages_url":"https://api.github.com/repos/pyjoe/ForumBundle/languages","stargazers_url":"https://api.github.com/repos/pyjoe/ForumBundle/stargazers","contributors_url":"https://api.github.com/repos/pyjoe/ForumBundle/contributors","subscribers_url":"https://api.github.com/repos/pyjoe/ForumBundle/subscribers","subscription_url":"https://api.github.com/repos/pyjoe/ForumBundle/subscription","commits_url":"https://api.github.com/repos/pyjoe/ForumBundle/commits{/sha}","git_commits_url":"https://api.github.com/repos/pyjoe/ForumBundle/git/commits{/sha}","comments_url":"https://api.github.com/repos/pyjoe/ForumBundle/comments{/number}","issue_comment_url":"https://api.github.com/repos/pyjoe/ForumBundle/issues/comments/{number}","contents_url":"https://api.github.com/repos/pyjoe/ForumBundle/contents/{+path}","compare_url":"https://api.github.com/repos/pyjoe/ForumBundle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pyjoe/ForumBundle/merges","archive_url":"https://api.github.com/repos/pyjoe/ForumBundle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pyjoe/ForumBundle/downloads","issues_url":"https://api.github.com/repos/pyjoe/ForumBundle/issues{/number}","pulls_url":"https://api.github.com/repos/pyjoe/ForumBundle/pulls{/number}","milestones_url":"https://api.github.com/repos/pyjoe/ForumBundle/milestones{/number}","notifications_url":"https://api.github.com/repos/pyjoe/ForumBundle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pyjoe/ForumBundle/labels{/name}","releases_url":"https://api.github.com/repos/pyjoe/ForumBundle/releases{/id}","created_at":"2014-04-08T09:24:03Z","updated_at":"2014-07-24T14:40:47Z","pushed_at":"2014-08-01T09:36:47Z","git_url":"git://github.com/pyjoe/ForumBundle.git","ssh_url":"git@github.com:pyjoe/ForumBundle.git","clone_url":"https://github.com/pyjoe/ForumBundle.git","svn_url":"https://github.com/pyjoe/ForumBundle","homepage":null,"size":703,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ngodfraind:offline","ref":"offline","sha":"33493830ed91aa8ed4dda8b96e39f0a916dcd3b8","user":{"login":"ngodfraind","id":1397430,"avatar_url":"https://avatars.githubusercontent.com/u/1397430?v=2","gravatar_id":"5a50f9f7017d2604a6616dcc729b8714","url":"https://api.github.com/users/ngodfraind","html_url":"https://github.com/ngodfraind","followers_url":"https://api.github.com/users/ngodfraind/followers","following_url":"https://api.github.com/users/ngodfraind/following{/other_user}","gists_url":"https://api.github.com/users/ngodfraind/gists{/gist_id}","starred_url":"https://api.github.com/users/ngodfraind/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ngodfraind/subscriptions","organizations_url":"https://api.github.com/users/ngodfraind/orgs","repos_url":"https://api.github.com/users/ngodfraind/repos","events_url":"https://api.github.com/users/ngodfraind/events{/privacy}","received_events_url":"https://api.github.com/users/ngodfraind/received_events","type":"User","site_admin":false},"repo":{"id":21699000,"name":"ForumBundle","full_name":"ngodfraind/ForumBundle","owner":{"login":"ngodfraind","id":1397430,"avatar_url":"https://avatars.githubusercontent.com/u/1397430?v=2","gravatar_id":"5a50f9f7017d2604a6616dcc729b8714","url":"https://api.github.com/users/ngodfraind","html_url":"https://github.com/ngodfraind","followers_url":"https://api.github.com/users/ngodfraind/followers","following_url":"https://api.github.com/users/ngodfraind/following{/other_user}","gists_url":"https://api.github.com/users/ngodfraind/gists{/gist_id}","starred_url":"https://api.github.com/users/ngodfraind/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ngodfraind/subscriptions","organizations_url":"https://api.github.com/users/ngodfraind/orgs","repos_url":"https://api.github.com/users/ngodfraind/repos","events_url":"https://api.github.com/users/ngodfraind/events{/privacy}","received_events_url":"https://api.github.com/users/ngodfraind/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ngodfraind/ForumBundle","description":"","fork":true,"url":"https://api.github.com/repos/ngodfraind/ForumBundle","forks_url":"https://api.github.com/repos/ngodfraind/ForumBundle/forks","keys_url":"https://api.github.com/repos/ngodfraind/ForumBundle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ngodfraind/ForumBundle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ngodfraind/ForumBundle/teams","hooks_url":"https://api.github.com/repos/ngodfraind/ForumBundle/hooks","issue_events_url":"https://api.github.com/repos/ngodfraind/ForumBundle/issues/events{/number}","events_url":"https://api.github.com/repos/ngodfraind/ForumBundle/events","assignees_url":"https://api.github.com/repos/ngodfraind/ForumBundle/assignees{/user}","branches_url":"https://api.github.com/repos/ngodfraind/ForumBundle/branches{/branch}","tags_url":"https://api.github.com/repos/ngodfraind/ForumBundle/tags","blobs_url":"https://api.github.com/repos/ngodfraind/ForumBundle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ngodfraind/ForumBundle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ngodfraind/ForumBundle/git/refs{/sha}","trees_url":"https://api.github.com/repos/ngodfraind/ForumBundle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ngodfraind/ForumBundle/statuses/{sha}","languages_url":"https://api.github.com/repos/ngodfraind/ForumBundle/languages","stargazers_url":"https://api.github.com/repos/ngodfraind/ForumBundle/stargazers","contributors_url":"https://api.github.com/repos/ngodfraind/ForumBundle/contributors","subscribers_url":"https://api.github.com/repos/ngodfraind/ForumBundle/subscribers","subscription_url":"https://api.github.com/repos/ngodfraind/ForumBundle/subscription","commits_url":"https://api.github.com/repos/ngodfraind/ForumBundle/commits{/sha}","git_commits_url":"https://api.github.com/repos/ngodfraind/ForumBundle/git/commits{/sha}","comments_url":"https://api.github.com/repos/ngodfraind/ForumBundle/comments{/number}","issue_comment_url":"https://api.github.com/repos/ngodfraind/ForumBundle/issues/comments/{number}","contents_url":"https://api.github.com/repos/ngodfraind/ForumBundle/contents/{+path}","compare_url":"https://api.github.com/repos/ngodfraind/ForumBundle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ngodfraind/ForumBundle/merges","archive_url":"https://api.github.com/repos/ngodfraind/ForumBundle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ngodfraind/ForumBundle/downloads","issues_url":"https://api.github.com/repos/ngodfraind/ForumBundle/issues{/number}","pulls_url":"https://api.github.com/repos/ngodfraind/ForumBundle/pulls{/number}","milestones_url":"https://api.github.com/repos/ngodfraind/ForumBundle/milestones{/number}","notifications_url":"https://api.github.com/repos/ngodfraind/ForumBundle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ngodfraind/ForumBundle/labels{/name}","releases_url":"https://api.github.com/repos/ngodfraind/ForumBundle/releases{/id}","created_at":"2014-07-10T15:19:51Z","updated_at":"2014-07-10T15:20:38Z","pushed_at":"2014-08-11T12:38:24Z","git_url":"git://github.com/ngodfraind/ForumBundle.git","ssh_url":"git@github.com:ngodfraind/ForumBundle.git","clone_url":"https://github.com/ngodfraind/ForumBundle.git","svn_url":"https://github.com/ngodfraind/ForumBundle","homepage":null,"size":565,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ngodfraind/ForumBundle/pulls/1"},"html":{"href":"https://github.com/ngodfraind/ForumBundle/pull/1"},"issue":{"href":"https://api.github.com/repos/ngodfraind/ForumBundle/issues/1"},"comments":{"href":"https://api.github.com/repos/ngodfraind/ForumBundle/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/ngodfraind/ForumBundle/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/ngodfraind/ForumBundle/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/ngodfraind/ForumBundle/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/ngodfraind/ForumBundle/statuses/df20113a3405f164107dd95f004f115eafce9076"}}}}