{"action":"created","comment":{"url":"https://api.github.com/repos/tempo-project/tempo/pulls/comments/30177319","id":30177319,"diff_hunk":"@@ -15,19 +15,48 @@\n use Symfony\\Component\\HttpFoundation\\Response;\n use Tempo\\Bundle\\AppBundle\\Form\\Type\\ProviderFormType;\n use Tempo\\Bundle\\AppBundle\\Model\\Project;\n+use Tempo\\Bundle\\AppBundle\\Model\\ProjectProvider;\n use Tempo\\Bundle\\AppBundle\\TempoAppEvents;\n use Tempo\\Bundle\\AppBundle\\Event\\ActivityProviderEvent;\n \n class ProviderController extends Controller\n {\n-    public function listAction($slug)\n+    public function listAction(Project $project)\n     {\n+        $providers = array();\n+\n+        foreach ($project->getProviders() as $provider) {\n+            $providers[$provider->getName()] = $provider;\n+        }\n+\n         return $this->render('TempoAppBundle:Provider:list.html.twig', array(\n-            'slug' => $slug,\n+            'project' => $project,\n+            'project_activated' => $providers,\n             'providers' => $this->get('tempo.activity.provider_registry')->getProviders()\n         ));\n     }\n \n+    public function stateAction(Request $request, Project $project, $provider)\n+    {\n+        $state = $request->get('state');\n+        $provider = $this->getProvider($provider);\n+\n+        $projectProvider = new ProjectProvider();\n+        $projectProvider\n+            ->setName($provider->getCanonicalName())\n+            ->setProject($project);\n+\n+        if ('on' === $state) {\n+            $projectProvider->setState(ProjectProvider::STATE_ACTIVE);","path":"src/Tempo/Bundle/AppBundle/Controller/ProviderController.php","position":38,"original_position":38,"commit_id":"1704e2ae43e0c7ce136830470d5c66701986abfb","original_commit_id":"1704e2ae43e0c7ce136830470d5c66701986abfb","user":{"login":"amenophis","id":2158235,"avatar_url":"https://avatars.githubusercontent.com/u/2158235?v=3","gravatar_id":"","url":"https://api.github.com/users/amenophis","html_url":"https://github.com/amenophis","followers_url":"https://api.github.com/users/amenophis/followers","following_url":"https://api.github.com/users/amenophis/following{/other_user}","gists_url":"https://api.github.com/users/amenophis/gists{/gist_id}","starred_url":"https://api.github.com/users/amenophis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amenophis/subscriptions","organizations_url":"https://api.github.com/users/amenophis/orgs","repos_url":"https://api.github.com/users/amenophis/repos","events_url":"https://api.github.com/users/amenophis/events{/privacy}","received_events_url":"https://api.github.com/users/amenophis/received_events","type":"User","site_admin":false},"body":"```ProjectProviderInterface``` ?","created_at":"2015-05-12T20:36:36Z","updated_at":"2015-05-12T20:36:36Z","html_url":"https://github.com/tempo-project/tempo/pull/93#discussion_r30177319","pull_request_url":"https://api.github.com/repos/tempo-project/tempo/pulls/93","_links":{"self":{"href":"https://api.github.com/repos/tempo-project/tempo/pulls/comments/30177319"},"html":{"href":"https://github.com/tempo-project/tempo/pull/93#discussion_r30177319"},"pull_request":{"href":"https://api.github.com/repos/tempo-project/tempo/pulls/93"}}},"pull_request":{"url":"https://api.github.com/repos/tempo-project/tempo/pulls/93","id":35267306,"html_url":"https://github.com/tempo-project/tempo/pull/93","diff_url":"https://github.com/tempo-project/tempo/pull/93.diff","patch_url":"https://github.com/tempo-project/tempo/pull/93.patch","issue_url":"https://api.github.com/repos/tempo-project/tempo/issues/93","number":93,"state":"open","locked":false,"title":"Active/unactive project provider","user":{"login":"Shine-neko","id":884441,"avatar_url":"https://avatars.githubusercontent.com/u/884441?v=3","gravatar_id":"","url":"https://api.github.com/users/Shine-neko","html_url":"https://github.com/Shine-neko","followers_url":"https://api.github.com/users/Shine-neko/followers","following_url":"https://api.github.com/users/Shine-neko/following{/other_user}","gists_url":"https://api.github.com/users/Shine-neko/gists{/gist_id}","starred_url":"https://api.github.com/users/Shine-neko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Shine-neko/subscriptions","organizations_url":"https://api.github.com/users/Shine-neko/orgs","repos_url":"https://api.github.com/users/Shine-neko/repos","events_url":"https://api.github.com/users/Shine-neko/events{/privacy}","received_events_url":"https://api.github.com/users/Shine-neko/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-05-12T20:31:02Z","updated_at":"2015-05-12T20:36:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f9952e1e7570851f43b89136d7fbf118727a649d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/tempo-project/tempo/pulls/93/commits","review_comments_url":"https://api.github.com/repos/tempo-project/tempo/pulls/93/comments","review_comment_url":"https://api.github.com/repos/tempo-project/tempo/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tempo-project/tempo/issues/93/comments","statuses_url":"https://api.github.com/repos/tempo-project/tempo/statuses/1704e2ae43e0c7ce136830470d5c66701986abfb","head":{"label":"Shine-neko:state-project-providers","ref":"state-project-providers","sha":"1704e2ae43e0c7ce136830470d5c66701986abfb","user":{"login":"Shine-neko","id":884441,"avatar_url":"https://avatars.githubusercontent.com/u/884441?v=3","gravatar_id":"","url":"https://api.github.com/users/Shine-neko","html_url":"https://github.com/Shine-neko","followers_url":"https://api.github.com/users/Shine-neko/followers","following_url":"https://api.github.com/users/Shine-neko/following{/other_user}","gists_url":"https://api.github.com/users/Shine-neko/gists{/gist_id}","starred_url":"https://api.github.com/users/Shine-neko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Shine-neko/subscriptions","organizations_url":"https://api.github.com/users/Shine-neko/orgs","repos_url":"https://api.github.com/users/Shine-neko/repos","events_url":"https://api.github.com/users/Shine-neko/events{/privacy}","received_events_url":"https://api.github.com/users/Shine-neko/received_events","type":"User","site_admin":false},"repo":{"id":16455190,"name":"tempo","full_name":"Shine-neko/tempo","owner":{"login":"Shine-neko","id":884441,"avatar_url":"https://avatars.githubusercontent.com/u/884441?v=3","gravatar_id":"","url":"https://api.github.com/users/Shine-neko","html_url":"https://github.com/Shine-neko","followers_url":"https://api.github.com/users/Shine-neko/followers","following_url":"https://api.github.com/users/Shine-neko/following{/other_user}","gists_url":"https://api.github.com/users/Shine-neko/gists{/gist_id}","starred_url":"https://api.github.com/users/Shine-neko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Shine-neko/subscriptions","organizations_url":"https://api.github.com/users/Shine-neko/orgs","repos_url":"https://api.github.com/users/Shine-neko/repos","events_url":"https://api.github.com/users/Shine-neko/events{/privacy}","received_events_url":"https://api.github.com/users/Shine-neko/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Shine-neko/tempo","description":"Tempo - Symfony2 Project Management Software","fork":true,"url":"https://api.github.com/repos/Shine-neko/tempo","forks_url":"https://api.github.com/repos/Shine-neko/tempo/forks","keys_url":"https://api.github.com/repos/Shine-neko/tempo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Shine-neko/tempo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Shine-neko/tempo/teams","hooks_url":"https://api.github.com/repos/Shine-neko/tempo/hooks","issue_events_url":"https://api.github.com/repos/Shine-neko/tempo/issues/events{/number}","events_url":"https://api.github.com/repos/Shine-neko/tempo/events","assignees_url":"https://api.github.com/repos/Shine-neko/tempo/assignees{/user}","branches_url":"https://api.github.com/repos/Shine-neko/tempo/branches{/branch}","tags_url":"https://api.github.com/repos/Shine-neko/tempo/tags","blobs_url":"https://api.github.com/repos/Shine-neko/tempo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Shine-neko/tempo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Shine-neko/tempo/git/refs{/sha}","trees_url":"https://api.github.com/repos/Shine-neko/tempo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Shine-neko/tempo/statuses/{sha}","languages_url":"https://api.github.com/repos/Shine-neko/tempo/languages","stargazers_url":"https://api.github.com/repos/Shine-neko/tempo/stargazers","contributors_url":"https://api.github.com/repos/Shine-neko/tempo/contributors","subscribers_url":"https://api.github.com/repos/Shine-neko/tempo/subscribers","subscription_url":"https://api.github.com/repos/Shine-neko/tempo/subscription","commits_url":"https://api.github.com/repos/Shine-neko/tempo/commits{/sha}","git_commits_url":"https://api.github.com/repos/Shine-neko/tempo/git/commits{/sha}","comments_url":"https://api.github.com/repos/Shine-neko/tempo/comments{/number}","issue_comment_url":"https://api.github.com/repos/Shine-neko/tempo/issues/comments{/number}","contents_url":"https://api.github.com/repos/Shine-neko/tempo/contents/{+path}","compare_url":"https://api.github.com/repos/Shine-neko/tempo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Shine-neko/tempo/merges","archive_url":"https://api.github.com/repos/Shine-neko/tempo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Shine-neko/tempo/downloads","issues_url":"https://api.github.com/repos/Shine-neko/tempo/issues{/number}","pulls_url":"https://api.github.com/repos/Shine-neko/tempo/pulls{/number}","milestones_url":"https://api.github.com/repos/Shine-neko/tempo/milestones{/number}","notifications_url":"https://api.github.com/repos/Shine-neko/tempo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Shine-neko/tempo/labels{/name}","releases_url":"https://api.github.com/repos/Shine-neko/tempo/releases{/id}","created_at":"2014-02-02T13:41:31Z","updated_at":"2014-10-23T23:19:57Z","pushed_at":"2015-05-12T20:35:30Z","git_url":"git://github.com/Shine-neko/tempo.git","ssh_url":"git@github.com:Shine-neko/tempo.git","clone_url":"https://github.com/Shine-neko/tempo.git","svn_url":"https://github.com/Shine-neko/tempo","homepage":"http:///tempo.ikimea.com","size":4026,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"tempo-project:master","ref":"master","sha":"54e5eee20fe230a5d68e936155e1157cc140b258","user":{"login":"tempo-project","id":1522102,"avatar_url":"https://avatars.githubusercontent.com/u/1522102?v=3","gravatar_id":"","url":"https://api.github.com/users/tempo-project","html_url":"https://github.com/tempo-project","followers_url":"https://api.github.com/users/tempo-project/followers","following_url":"https://api.github.com/users/tempo-project/following{/other_user}","gists_url":"https://api.github.com/users/tempo-project/gists{/gist_id}","starred_url":"https://api.github.com/users/tempo-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tempo-project/subscriptions","organizations_url":"https://api.github.com/users/tempo-project/orgs","repos_url":"https://api.github.com/users/tempo-project/repos","events_url":"https://api.github.com/users/tempo-project/events{/privacy}","received_events_url":"https://api.github.com/users/tempo-project/received_events","type":"Organization","site_admin":false},"repo":{"id":4233459,"name":"tempo","full_name":"tempo-project/tempo","owner":{"login":"tempo-project","id":1522102,"avatar_url":"https://avatars.githubusercontent.com/u/1522102?v=3","gravatar_id":"","url":"https://api.github.com/users/tempo-project","html_url":"https://github.com/tempo-project","followers_url":"https://api.github.com/users/tempo-project/followers","following_url":"https://api.github.com/users/tempo-project/following{/other_user}","gists_url":"https://api.github.com/users/tempo-project/gists{/gist_id}","starred_url":"https://api.github.com/users/tempo-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tempo-project/subscriptions","organizations_url":"https://api.github.com/users/tempo-project/orgs","repos_url":"https://api.github.com/users/tempo-project/repos","events_url":"https://api.github.com/users/tempo-project/events{/privacy}","received_events_url":"https://api.github.com/users/tempo-project/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/tempo-project/tempo","description":"Tempo - Collect, Analysis and Visualize Data","fork":false,"url":"https://api.github.com/repos/tempo-project/tempo","forks_url":"https://api.github.com/repos/tempo-project/tempo/forks","keys_url":"https://api.github.com/repos/tempo-project/tempo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tempo-project/tempo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tempo-project/tempo/teams","hooks_url":"https://api.github.com/repos/tempo-project/tempo/hooks","issue_events_url":"https://api.github.com/repos/tempo-project/tempo/issues/events{/number}","events_url":"https://api.github.com/repos/tempo-project/tempo/events","assignees_url":"https://api.github.com/repos/tempo-project/tempo/assignees{/user}","branches_url":"https://api.github.com/repos/tempo-project/tempo/branches{/branch}","tags_url":"https://api.github.com/repos/tempo-project/tempo/tags","blobs_url":"https://api.github.com/repos/tempo-project/tempo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tempo-project/tempo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tempo-project/tempo/git/refs{/sha}","trees_url":"https://api.github.com/repos/tempo-project/tempo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tempo-project/tempo/statuses/{sha}","languages_url":"https://api.github.com/repos/tempo-project/tempo/languages","stargazers_url":"https://api.github.com/repos/tempo-project/tempo/stargazers","contributors_url":"https://api.github.com/repos/tempo-project/tempo/contributors","subscribers_url":"https://api.github.com/repos/tempo-project/tempo/subscribers","subscription_url":"https://api.github.com/repos/tempo-project/tempo/subscription","commits_url":"https://api.github.com/repos/tempo-project/tempo/commits{/sha}","git_commits_url":"https://api.github.com/repos/tempo-project/tempo/git/commits{/sha}","comments_url":"https://api.github.com/repos/tempo-project/tempo/comments{/number}","issue_comment_url":"https://api.github.com/repos/tempo-project/tempo/issues/comments{/number}","contents_url":"https://api.github.com/repos/tempo-project/tempo/contents/{+path}","compare_url":"https://api.github.com/repos/tempo-project/tempo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tempo-project/tempo/merges","archive_url":"https://api.github.com/repos/tempo-project/tempo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tempo-project/tempo/downloads","issues_url":"https://api.github.com/repos/tempo-project/tempo/issues{/number}","pulls_url":"https://api.github.com/repos/tempo-project/tempo/pulls{/number}","milestones_url":"https://api.github.com/repos/tempo-project/tempo/milestones{/number}","notifications_url":"https://api.github.com/repos/tempo-project/tempo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tempo-project/tempo/labels{/name}","releases_url":"https://api.github.com/repos/tempo-project/tempo/releases{/id}","created_at":"2012-05-05T11:57:40Z","updated_at":"2015-05-08T14:02:37Z","pushed_at":"2015-05-12T20:35:31Z","git_url":"git://github.com/tempo-project/tempo.git","ssh_url":"git@github.com:tempo-project/tempo.git","clone_url":"https://github.com/tempo-project/tempo.git","svn_url":"https://github.com/tempo-project/tempo","homepage":"http://demo.tempo-project.org","size":5934,"stargazers_count":19,"watchers_count":19,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":3,"forks":7,"open_issues":3,"watchers":19,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tempo-project/tempo/pulls/93"},"html":{"href":"https://github.com/tempo-project/tempo/pull/93"},"issue":{"href":"https://api.github.com/repos/tempo-project/tempo/issues/93"},"comments":{"href":"https://api.github.com/repos/tempo-project/tempo/issues/93/comments"},"review_comments":{"href":"https://api.github.com/repos/tempo-project/tempo/pulls/93/comments"},"review_comment":{"href":"https://api.github.com/repos/tempo-project/tempo/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tempo-project/tempo/pulls/93/commits"},"statuses":{"href":"https://api.github.com/repos/tempo-project/tempo/statuses/1704e2ae43e0c7ce136830470d5c66701986abfb"}}}}