{"action":"created","comment":{"url":"https://api.github.com/repos/symfony-cmf/resource-rest-bundle/pulls/comments/65724313","id":65724313,"diff_hunk":"@@ -39,11 +46,103 @@ public function __construct(\n         $this->registry = $registry;\n     }\n \n-    public function resourceAction($repositoryName, $path)\n+    public function getResourceAction($repositoryName, $path)\n     {\n         $repository = $this->registry->get($repositoryName);\n         $resource = $repository->get('/'.$path);\n \n+        return $this->createResponse($resource);\n+    }\n+\n+    /**\n+     * There are two different changes that can currently be done on a cmf resource:\n+     *\n+     * - move\n+     * - rename\n+     *\n+     * changing payload properties isn't supported yet.\n+     *\n+     * @param string $repositoryName\n+     * @param string $path\n+     * @param Request $request\n+     *\n+     * @return Response\n+     */\n+    public function patchResourceAction($repositoryName, $path, Request $request)\n+    {\n+        $repository = $this->registry->get($repositoryName);\n+        $this->failOnNotEditable($repository, $repositoryName);\n+\n+        $resourceName = $request->get('node_name');\n+\n+        $targetPath = null;\n+        if ($path !== $path) {\n+            $targetPath = $path;\n+        } elseif ($resourceName !== PathHelper::getLocalNodeName(PathHelper::absolutizePath($path))) {\n+            $targetPath = PathHelper::absolutizePath($repositoryName, PathHelper::getParentPath($path));\n+        }\n+\n+        if (null == $targetPath) {\n+            return $this->badRequestRespons('Move and rename is supported only.');","path":"Controller/ResourceController.php","position":69,"original_position":69,"commit_id":"fcd3f0aae763a6b30211a5e3c1e51fc71508a7c9","original_commit_id":"fcd3f0aae763a6b30211a5e3c1e51fc71508a7c9","user":{"login":"WouterJ","id":749025,"avatar_url":"https://avatars.githubusercontent.com/u/749025?v=3","gravatar_id":"","url":"https://api.github.com/users/WouterJ","html_url":"https://github.com/WouterJ","followers_url":"https://api.github.com/users/WouterJ/followers","following_url":"https://api.github.com/users/WouterJ/following{/other_user}","gists_url":"https://api.github.com/users/WouterJ/gists{/gist_id}","starred_url":"https://api.github.com/users/WouterJ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WouterJ/subscriptions","organizations_url":"https://api.github.com/users/WouterJ/orgs","repos_url":"https://api.github.com/users/WouterJ/repos","events_url":"https://api.github.com/users/WouterJ/events{/privacy}","received_events_url":"https://api.github.com/users/WouterJ/received_events","type":"User","site_admin":false},"body":"typo: `badRequestRespons<b>e</b>`","created_at":"2016-06-03T15:14:00Z","updated_at":"2016-06-03T15:14:00Z","html_url":"https://github.com/symfony-cmf/resource-rest-bundle/pull/31#discussion_r65724313","pull_request_url":"https://api.github.com/repos/symfony-cmf/resource-rest-bundle/pulls/31","_links":{"self":{"href":"https://api.github.com/repos/symfony-cmf/resource-rest-bundle/pulls/comments/65724313"},"html":{"href":"https://github.com/symfony-cmf/resource-rest-bundle/pull/31#discussion_r65724313"},"pull_request":{"href":"https://api.github.com/repos/symfony-cmf/resource-rest-bundle/pulls/31"}}},"pull_request":{"url":"https://api.github.com/repos/symfony-cmf/resource-rest-bundle/pulls/31","id":71131443,"html_url":"https://github.com/symfony-cmf/resource-rest-bundle/pull/31","diff_url":"https://github.com/symfony-cmf/resource-rest-bundle/pull/31.diff","patch_url":"https://github.com/symfony-cmf/resource-rest-bundle/pull/31.patch","issue_url":"https://api.github.com/repos/symfony-cmf/resource-rest-bundle/issues/31","number":31,"state":"open","locked":false,"title":"[WIP] move, rename delete resource of editable repository","user":{"login":"ElectricMaxxx","id":2905834,"avatar_url":"https://avatars.githubusercontent.com/u/2905834?v=3","gravatar_id":"","url":"https://api.github.com/users/ElectricMaxxx","html_url":"https://github.com/ElectricMaxxx","followers_url":"https://api.github.com/users/ElectricMaxxx/followers","following_url":"https://api.github.com/users/ElectricMaxxx/following{/other_user}","gists_url":"https://api.github.com/users/ElectricMaxxx/gists{/gist_id}","starred_url":"https://api.github.com/users/ElectricMaxxx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ElectricMaxxx/subscriptions","organizations_url":"https://api.github.com/users/ElectricMaxxx/orgs","repos_url":"https://api.github.com/users/ElectricMaxxx/repos","events_url":"https://api.github.com/users/ElectricMaxxx/events{/privacy}","received_events_url":"https://api.github.com/users/ElectricMaxxx/received_events","type":"User","site_admin":false},"body":"This i the WIP PR to test an try the EditableRepository interface of both repositories in the component.\r\n","created_at":"2016-05-23T22:32:46Z","updated_at":"2016-06-03T15:14:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ef5c67b6065e248fac72fcb859c0ede9fd230310","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/symfony-cmf/resource-rest-bundle/pulls/31/commits","review_comments_url":"https://api.github.com/repos/symfony-cmf/resource-rest-bundle/pulls/31/comments","review_comment_url":"https://api.github.com/repos/symfony-cmf/resource-rest-bundle/pulls/comments{/number}","comments_url":"https://api.github.com/repos/symfony-cmf/resource-rest-bundle/issues/31/comments","statuses_url":"https://api.github.com/repos/symfony-cmf/resource-rest-bundle/statuses/fcd3f0aae763a6b30211a5e3c1e51fc71508a7c9","head":{"label":"ElectricMaxxx:add_more_rest_methods","ref":"add_more_rest_methods","sha":"fcd3f0aae763a6b30211a5e3c1e51fc71508a7c9","user":{"login":"ElectricMaxxx","id":2905834,"avatar_url":"https://avatars.githubusercontent.com/u/2905834?v=3","gravatar_id":"","url":"https://api.github.com/users/ElectricMaxxx","html_url":"https://github.com/ElectricMaxxx","followers_url":"https://api.github.com/users/ElectricMaxxx/followers","following_url":"https://api.github.com/users/ElectricMaxxx/following{/other_user}","gists_url":"https://api.github.com/users/ElectricMaxxx/gists{/gist_id}","starred_url":"https://api.github.com/users/ElectricMaxxx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ElectricMaxxx/subscriptions","organizations_url":"https://api.github.com/users/ElectricMaxxx/orgs","repos_url":"https://api.github.com/users/ElectricMaxxx/repos","events_url":"https://api.github.com/users/ElectricMaxxx/events{/privacy}","received_events_url":"https://api.github.com/users/ElectricMaxxx/received_events","type":"User","site_admin":false},"repo":{"id":39423422,"name":"ResourceRestBundle","full_name":"ElectricMaxxx/ResourceRestBundle","owner":{"login":"ElectricMaxxx","id":2905834,"avatar_url":"https://avatars.githubusercontent.com/u/2905834?v=3","gravatar_id":"","url":"https://api.github.com/users/ElectricMaxxx","html_url":"https://github.com/ElectricMaxxx","followers_url":"https://api.github.com/users/ElectricMaxxx/followers","following_url":"https://api.github.com/users/ElectricMaxxx/following{/other_user}","gists_url":"https://api.github.com/users/ElectricMaxxx/gists{/gist_id}","starred_url":"https://api.github.com/users/ElectricMaxxx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ElectricMaxxx/subscriptions","organizations_url":"https://api.github.com/users/ElectricMaxxx/orgs","repos_url":"https://api.github.com/users/ElectricMaxxx/repos","events_url":"https://api.github.com/users/ElectricMaxxx/events{/privacy}","received_events_url":"https://api.github.com/users/ElectricMaxxx/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ElectricMaxxx/ResourceRestBundle","description":"REST API for Puli Resources provided through the CmfResourceBundle","fork":true,"url":"https://api.github.com/repos/ElectricMaxxx/ResourceRestBundle","forks_url":"https://api.github.com/repos/ElectricMaxxx/ResourceRestBundle/forks","keys_url":"https://api.github.com/repos/ElectricMaxxx/ResourceRestBundle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ElectricMaxxx/ResourceRestBundle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ElectricMaxxx/ResourceRestBundle/teams","hooks_url":"https://api.github.com/repos/ElectricMaxxx/ResourceRestBundle/hooks","issue_events_url":"https://api.github.com/repos/ElectricMaxxx/ResourceRestBundle/issues/events{/number}","events_url":"https://api.github.com/repos/ElectricMaxxx/ResourceRestBundle/events","assignees_url":"https://api.github.com/repos/ElectricMaxxx/ResourceRestBundle/assignees{/user}","branches_url":"https://api.github.com/repos/ElectricMaxxx/ResourceRestBundle/branches{/branch}","tags_url":"https://api.github.com/repos/ElectricMaxxx/ResourceRestBundle/tags","blobs_url":"https://api.github.com/repos/ElectricMaxxx/ResourceRestBundle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ElectricMaxxx/ResourceRestBundle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ElectricMaxxx/ResourceRestBundle/git/refs{/sha}","trees_url":"https://api.github.com/repos/ElectricMaxxx/ResourceRestBundle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ElectricMaxxx/ResourceRestBundle/statuses/{sha}","languages_url":"https://api.github.com/repos/ElectricMaxxx/ResourceRestBundle/languages","stargazers_url":"https://api.github.com/repos/ElectricMaxxx/ResourceRestBundle/stargazers","contributors_url":"https://api.github.com/repos/ElectricMaxxx/ResourceRestBundle/contributors","subscribers_url":"https://api.github.com/repos/ElectricMaxxx/ResourceRestBundle/subscribers","subscription_url":"https://api.github.com/repos/ElectricMaxxx/ResourceRestBundle/subscription","commits_url":"https://api.github.com/repos/ElectricMaxxx/ResourceRestBundle/commits{/sha}","git_commits_url":"https://api.github.com/repos/ElectricMaxxx/ResourceRestBundle/git/commits{/sha}","comments_url":"https://api.github.com/repos/ElectricMaxxx/ResourceRestBundle/comments{/number}","issue_comment_url":"https://api.github.com/repos/ElectricMaxxx/ResourceRestBundle/issues/comments{/number}","contents_url":"https://api.github.com/repos/ElectricMaxxx/ResourceRestBundle/contents/{+path}","compare_url":"https://api.github.com/repos/ElectricMaxxx/ResourceRestBundle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ElectricMaxxx/ResourceRestBundle/merges","archive_url":"https://api.github.com/repos/ElectricMaxxx/ResourceRestBundle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ElectricMaxxx/ResourceRestBundle/downloads","issues_url":"https://api.github.com/repos/ElectricMaxxx/ResourceRestBundle/issues{/number}","pulls_url":"https://api.github.com/repos/ElectricMaxxx/ResourceRestBundle/pulls{/number}","milestones_url":"https://api.github.com/repos/ElectricMaxxx/ResourceRestBundle/milestones{/number}","notifications_url":"https://api.github.com/repos/ElectricMaxxx/ResourceRestBundle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ElectricMaxxx/ResourceRestBundle/labels{/name}","releases_url":"https://api.github.com/repos/ElectricMaxxx/ResourceRestBundle/releases{/id}","deployments_url":"https://api.github.com/repos/ElectricMaxxx/ResourceRestBundle/deployments","created_at":"2015-07-21T04:12:37Z","updated_at":"2016-05-30T07:36:31Z","pushed_at":"2016-06-03T09:48:57Z","git_url":"git://github.com/ElectricMaxxx/ResourceRestBundle.git","ssh_url":"git@github.com:ElectricMaxxx/ResourceRestBundle.git","clone_url":"https://github.com/ElectricMaxxx/ResourceRestBundle.git","svn_url":"https://github.com/ElectricMaxxx/ResourceRestBundle","homepage":"","size":124,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"symfony-cmf:master","ref":"master","sha":"5abd8000980a81b79a3066054b35099fcba8aa14","user":{"login":"symfony-cmf","id":342045,"avatar_url":"https://avatars.githubusercontent.com/u/342045?v=3","gravatar_id":"","url":"https://api.github.com/users/symfony-cmf","html_url":"https://github.com/symfony-cmf","followers_url":"https://api.github.com/users/symfony-cmf/followers","following_url":"https://api.github.com/users/symfony-cmf/following{/other_user}","gists_url":"https://api.github.com/users/symfony-cmf/gists{/gist_id}","starred_url":"https://api.github.com/users/symfony-cmf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/symfony-cmf/subscriptions","organizations_url":"https://api.github.com/users/symfony-cmf/orgs","repos_url":"https://api.github.com/users/symfony-cmf/repos","events_url":"https://api.github.com/users/symfony-cmf/events{/privacy}","received_events_url":"https://api.github.com/users/symfony-cmf/received_events","type":"Organization","site_admin":false},"repo":{"id":29090266,"name":"resource-rest-bundle","full_name":"symfony-cmf/resource-rest-bundle","owner":{"login":"symfony-cmf","id":342045,"avatar_url":"https://avatars.githubusercontent.com/u/342045?v=3","gravatar_id":"","url":"https://api.github.com/users/symfony-cmf","html_url":"https://github.com/symfony-cmf","followers_url":"https://api.github.com/users/symfony-cmf/followers","following_url":"https://api.github.com/users/symfony-cmf/following{/other_user}","gists_url":"https://api.github.com/users/symfony-cmf/gists{/gist_id}","starred_url":"https://api.github.com/users/symfony-cmf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/symfony-cmf/subscriptions","organizations_url":"https://api.github.com/users/symfony-cmf/orgs","repos_url":"https://api.github.com/users/symfony-cmf/repos","events_url":"https://api.github.com/users/symfony-cmf/events{/privacy}","received_events_url":"https://api.github.com/users/symfony-cmf/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/symfony-cmf/resource-rest-bundle","description":"REST API for Puli Resources provided through the CmfResourceBundle","fork":false,"url":"https://api.github.com/repos/symfony-cmf/resource-rest-bundle","forks_url":"https://api.github.com/repos/symfony-cmf/resource-rest-bundle/forks","keys_url":"https://api.github.com/repos/symfony-cmf/resource-rest-bundle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/symfony-cmf/resource-rest-bundle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/symfony-cmf/resource-rest-bundle/teams","hooks_url":"https://api.github.com/repos/symfony-cmf/resource-rest-bundle/hooks","issue_events_url":"https://api.github.com/repos/symfony-cmf/resource-rest-bundle/issues/events{/number}","events_url":"https://api.github.com/repos/symfony-cmf/resource-rest-bundle/events","assignees_url":"https://api.github.com/repos/symfony-cmf/resource-rest-bundle/assignees{/user}","branches_url":"https://api.github.com/repos/symfony-cmf/resource-rest-bundle/branches{/branch}","tags_url":"https://api.github.com/repos/symfony-cmf/resource-rest-bundle/tags","blobs_url":"https://api.github.com/repos/symfony-cmf/resource-rest-bundle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/symfony-cmf/resource-rest-bundle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/symfony-cmf/resource-rest-bundle/git/refs{/sha}","trees_url":"https://api.github.com/repos/symfony-cmf/resource-rest-bundle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/symfony-cmf/resource-rest-bundle/statuses/{sha}","languages_url":"https://api.github.com/repos/symfony-cmf/resource-rest-bundle/languages","stargazers_url":"https://api.github.com/repos/symfony-cmf/resource-rest-bundle/stargazers","contributors_url":"https://api.github.com/repos/symfony-cmf/resource-rest-bundle/contributors","subscribers_url":"https://api.github.com/repos/symfony-cmf/resource-rest-bundle/subscribers","subscription_url":"https://api.github.com/repos/symfony-cmf/resource-rest-bundle/subscription","commits_url":"https://api.github.com/repos/symfony-cmf/resource-rest-bundle/commits{/sha}","git_commits_url":"https://api.github.com/repos/symfony-cmf/resource-rest-bundle/git/commits{/sha}","comments_url":"https://api.github.com/repos/symfony-cmf/resource-rest-bundle/comments{/number}","issue_comment_url":"https://api.github.com/repos/symfony-cmf/resource-rest-bundle/issues/comments{/number}","contents_url":"https://api.github.com/repos/symfony-cmf/resource-rest-bundle/contents/{+path}","compare_url":"https://api.github.com/repos/symfony-cmf/resource-rest-bundle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/symfony-cmf/resource-rest-bundle/merges","archive_url":"https://api.github.com/repos/symfony-cmf/resource-rest-bundle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/symfony-cmf/resource-rest-bundle/downloads","issues_url":"https://api.github.com/repos/symfony-cmf/resource-rest-bundle/issues{/number}","pulls_url":"https://api.github.com/repos/symfony-cmf/resource-rest-bundle/pulls{/number}","milestones_url":"https://api.github.com/repos/symfony-cmf/resource-rest-bundle/milestones{/number}","notifications_url":"https://api.github.com/repos/symfony-cmf/resource-rest-bundle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/symfony-cmf/resource-rest-bundle/labels{/name}","releases_url":"https://api.github.com/repos/symfony-cmf/resource-rest-bundle/releases{/id}","deployments_url":"https://api.github.com/repos/symfony-cmf/resource-rest-bundle/deployments","created_at":"2015-01-11T12:02:31Z","updated_at":"2016-04-07T08:01:52Z","pushed_at":"2016-06-03T09:48:57Z","git_url":"git://github.com/symfony-cmf/resource-rest-bundle.git","ssh_url":"git@github.com:symfony-cmf/resource-rest-bundle.git","clone_url":"https://github.com/symfony-cmf/resource-rest-bundle.git","svn_url":"https://github.com/symfony-cmf/resource-rest-bundle","homepage":"","size":130,"stargazers_count":5,"watchers_count":5,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":14,"forks":4,"open_issues":14,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/symfony-cmf/resource-rest-bundle/pulls/31"},"html":{"href":"https://github.com/symfony-cmf/resource-rest-bundle/pull/31"},"issue":{"href":"https://api.github.com/repos/symfony-cmf/resource-rest-bundle/issues/31"},"comments":{"href":"https://api.github.com/repos/symfony-cmf/resource-rest-bundle/issues/31/comments"},"review_comments":{"href":"https://api.github.com/repos/symfony-cmf/resource-rest-bundle/pulls/31/comments"},"review_comment":{"href":"https://api.github.com/repos/symfony-cmf/resource-rest-bundle/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/symfony-cmf/resource-rest-bundle/pulls/31/commits"},"statuses":{"href":"https://api.github.com/repos/symfony-cmf/resource-rest-bundle/statuses/fcd3f0aae763a6b30211a5e3c1e51fc71508a7c9"}}}}
{"actor":{"display_login":"WouterJ"}}