{"action":"created","comment":{"url":"https://api.github.com/repos/Elgg/Elgg/pulls/comments/59208105","id":59208105,"diff_hunk":"@@ -0,0 +1,404 @@\n+<?php\n+\n+namespace Elgg;\n+\n+use Elgg\\Filesystem\\MimeTypeDetector;\n+use Elgg\\Http\\Request;\n+use ElggEntity;\n+use ElggFile;\n+use ElggIcon;\n+use InvalidParameterException;\n+use Symfony\\Component\\HttpFoundation\\File\\UploadedFile;\n+\n+/**\n+ * WARNING: API IN FLUX. DO NOT USE DIRECTLY.\n+ *\n+ * Use the elgg_* versions instead.\n+ *\n+ * @access private\n+ * @since 2.2\n+ */\n+class EntityIconService {\n+\n+\t/**\n+\t * @var Config\n+\t */\n+\tprivate $config;\n+\n+\t/**\n+\t * @var PluginHooksService\n+\t */\n+\tprivate $hooks;\n+\n+\t/**\n+\t * @var Request\n+\t */\n+\tprivate $request;\n+\n+\t/**\n+\t * @var Logger\n+\t */\n+\tprivate $logger;\n+\n+\t/**\n+\t * Constructor\n+\t *\n+\t * @param Config             $config  Config\n+\t * @param PluginHooksService $hooks   Hook registration service\n+\t * @param Request            $request Http request\n+\t * @param Logger             $logger  Logger\n+\t */\n+\tpublic function __construct(Config $config, PluginHooksService $hooks, Request $request, Logger $logger) {\n+\t\t$this->config = $config;\n+\t\t$this->hooks = $hooks;\n+\t\t$this->request = $request;\n+\t\t$this->logger = $logger;\n+\t}\n+\n+\t/**\n+\t * Saves icons using an uploaded file as the source.\n+\t *\n+\t * @param ElggEntity $entity     Entity to own the icons\n+\t * @param string     $input_name Form input name\n+\t * @param string     $type       The name of the icon. e.g., 'icon', 'cover_photo'\n+\t * @param array      $coords     An array of cropping coordinates x1, y1, x2, y2\n+\t * @return bool\n+\t */\n+\tpublic function saveIconFromUploadedFile(ElggEntity $entity, $input_name, $type = 'icon', array $coords = array()) {\n+\t\t$files = $this->request->files;\n+\t\tif (!$files->has($input_name)) {\n+\t\t\treturn false;\n+\t\t}\n+\n+\t\t$input = $files->get($input_name);\n+\t\tif (!$input instanceof UploadedFile || !$input->isValid()) {\n+\t\t\treturn false;\n+\t\t}\n+\n+\t\t$tmp_filename = time() . $input->getClientOriginalName();\n+\t\t$tmp = new ElggFile();\n+\t\t$tmp->owner_guid = $entity->guid;\n+\t\t$tmp->setFilename(\"tmp/$tmp_filename\");\n+\t\t$tmp->open('write');\n+\t\t$tmp->close();\n+\t\tcopy($input->getPathname(), $tmp->getFilenameOnFilestore());\n+\n+\t\t$tmp->mimetype = (new MimeTypeDetector())->getType($tmp_filename, $input->getClientMimeType());\n+\t\t$tmp->simpletype = elgg_get_file_simple_type($tmp->mimetype);\n+\n+\t\t$result = $this->saveIcon($entity, $tmp, $type, $coords);\n+\n+\t\t$tmp->delete();\n+\n+\t\treturn $result;\n+\t}\n+\n+\t/**\n+\t * Saves icons using a local file as the source.\n+\t *\n+\t * @param ElggEntity $entity   Entity to own the icons\n+\t * @param string     $filename The full path to the local file\n+\t * @param string     $type     The name of the icon. e.g., 'icon', 'cover_photo'\n+\t * @param array      $coords   An array of cropping coordinates x1, y1, x2, y2\n+\t * @return bool\n+\t * @throws InvalidParameterException\n+\t */\n+\tpublic function saveIconFromLocalFile(ElggEntity $entity, $filename, $type = 'icon', array $coords = array()) {\n+\t\tif (!file_exists($filename) || !is_readable($filename)) {\n+\t\t\tthrow new InvalidParameterException(__METHOD__ . \" expects a readable local file. $filename is not readable\");\n+\t\t}\n+\n+\t\t$tmp_filename = time() . pathinfo($filename, PATHINFO_BASENAME);\n+\t\t$tmp = new ElggFile();\n+\t\t$tmp->owner_guid = $entity->guid;\n+\t\t$tmp->setFilename(\"tmp/$tmp_filename\");\n+\t\t$tmp->open('write');\n+\t\t$tmp->close();\n+\t\tcopy($filename, $tmp->getFilenameOnFilestore());\n+\n+\t\t$tmp->mimetype = (new MimeTypeDetector())->getType($tmp->getFilenameOnFilestore());\n+\t\t$tmp->simpletype = elgg_get_file_simple_type($tmp->mimetype);\n+\n+\t\t$result = $this->saveIcon($entity, $tmp, $type, $coords, false);\n+\n+\t\t$tmp->delete();\n+\n+\t\treturn $result;\n+\t}\n+\n+\t/**\n+\t * Saves icons using a file located in the data store as the source.\n+\t *\n+\t * @param ElggEntity $entity Entity to own the icons\n+\t * @param string     $file   An ElggFile instance\n+\t * @param string     $type   The name of the icon. e.g., 'icon', 'cover_photo'\n+\t * @param array      $coords An array of cropping coordinates x1, y1, x2, y2\n+\t * @return bool\n+\t * @throws InvalidParameterException\n+\t */\n+\tpublic function saveIconFromElggFile(ElggEntity $entity, ElggFile $file, $type = 'icon', array $coords = array()) {\n+\t\tif (!$file->exists()) {\n+\t\t\tthrow new InvalidParameterException(__METHOD__ . ' expects an instance of ElggFile with an existing file on filestore');\n+\t\t}\n+\n+\t\t$tmp_filename = time() . pathinfo($file->getFilenameOnFilestore(), PATHINFO_BASENAME);\n+\t\t$tmp = new ElggFile();\n+\t\t$tmp->owner_guid = $entity->guid;\n+\t\t$tmp->setFilename(\"tmp/$tmp_filename\");\n+\t\t$tmp->open('write');\n+\t\t$tmp->close();\n+\t\tcopy($file->getFilenameOnFilestore(), $tmp->getFilenameOnFilestore());\n+\n+\t\t$tmp->mimetype = (new MimeTypeDetector())->getType($tmp->getFilenameOnFilestore(), $file->getMimeType());\n+\t\t$tmp->simpletype = elgg_get_file_simple_type($tmp->mimetype);\n+\n+\t\t$result = $this->saveIcon($entity, $tmp, $type, $coords, false);\n+\n+\t\t$tmp->delete();\n+\n+\t\treturn $result;\n+\t}\n+\n+\t/**\n+\t * Saves icons using a created temporary file\n+\t *\n+\t * @param ElggEntity $entity        Temporary ElggFile instance\n+\t * @param string     $file          Temporary ElggFile instance\n+\t * @param string     $type          The name of the icon. e.g., 'icon', 'cover_photo'\n+\t * @param array      $coords        An array of cropping coordinates x1, y1, x2, y2\n+\t * @param bool       $keep_uploaded Keep uploaded file under /icons/$type/_uploaded.jpg\n+\t * @return bool\n+\t */\n+\tpublic function saveIcon(ElggEntity $entity, ElggFile $file, $type = 'icon', array $coords = array(), $keep_uploaded = true) {\n+\n+\t\t// @todo: trigger a hook to allow plugins to manipulate source file\n+\t\t// e.g. extract video frame from uploaded video or rotate the image\n+\n+\t\t// @todo: validate file type - should we bail if file is not image?\n+\t\tif (!$file->exists()) {\n+\t\t\t$this->logger->error('Source file passed to ' . __METHOD__ . ' can not be resolved to a valid image');\n+\t\t\treturn false;\n+\t\t}\n+\n+\t\t$entity_type = $entity->getType();\n+\t\t$entity_subtype = $entity->getSubtype();\n+\n+\t\t$x1 = (int) elgg_extract('x1', $coords);\n+\t\t$y1 = (int) elgg_extract('y1', $coords);\n+\t\t$x2 = (int) elgg_extract('x2', $coords);\n+\t\t$y2 = (int) elgg_extract('y2', $coords);\n+\n+\t\t$this->deleteIcon($entity, $type);\n+\n+\t\t$success = function() use ($entity, $type, $x1, $y1, $x2, $y2) {","path":"engine/classes/Elgg/EntityIconService.php","position":193,"original_position":193,"commit_id":"cad4a4c171fb0d7cc6ae0b4454d7e9a007373fbb","original_commit_id":"cad4a4c171fb0d7cc6ae0b4454d7e9a007373fbb","user":{"login":"mrclay","id":170687,"avatar_url":"https://avatars.githubusercontent.com/u/170687?v=3","gravatar_id":"","url":"https://api.github.com/users/mrclay","html_url":"https://github.com/mrclay","followers_url":"https://api.github.com/users/mrclay/followers","following_url":"https://api.github.com/users/mrclay/following{/other_user}","gists_url":"https://api.github.com/users/mrclay/gists{/gist_id}","starred_url":"https://api.github.com/users/mrclay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrclay/subscriptions","organizations_url":"https://api.github.com/users/mrclay/orgs","repos_url":"https://api.github.com/users/mrclay/repos","events_url":"https://api.github.com/users/mrclay/events{/privacy}","received_events_url":"https://api.github.com/users/mrclay/received_events","type":"User","site_admin":false},"body":"I think it would be clearer to have these inline.","created_at":"2016-04-11T13:59:19Z","updated_at":"2016-04-11T13:59:19Z","html_url":"https://github.com/Elgg/Elgg/pull/9655#discussion_r59208105","pull_request_url":"https://api.github.com/repos/Elgg/Elgg/pulls/9655","_links":{"self":{"href":"https://api.github.com/repos/Elgg/Elgg/pulls/comments/59208105"},"html":{"href":"https://github.com/Elgg/Elgg/pull/9655#discussion_r59208105"},"pull_request":{"href":"https://api.github.com/repos/Elgg/Elgg/pulls/9655"}}},"pull_request":{"url":"https://api.github.com/repos/Elgg/Elgg/pulls/9655","id":65973919,"html_url":"https://github.com/Elgg/Elgg/pull/9655","diff_url":"https://github.com/Elgg/Elgg/pull/9655.diff","patch_url":"https://github.com/Elgg/Elgg/pull/9655.patch","issue_url":"https://api.github.com/repos/Elgg/Elgg/issues/9655","number":9655,"state":"open","locked":false,"title":"Icon service","user":{"login":"hypeJunction","id":1202761,"avatar_url":"https://avatars.githubusercontent.com/u/1202761?v=3","gravatar_id":"","url":"https://api.github.com/users/hypeJunction","html_url":"https://github.com/hypeJunction","followers_url":"https://api.github.com/users/hypeJunction/followers","following_url":"https://api.github.com/users/hypeJunction/following{/other_user}","gists_url":"https://api.github.com/users/hypeJunction/gists{/gist_id}","starred_url":"https://api.github.com/users/hypeJunction/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hypeJunction/subscriptions","organizations_url":"https://api.github.com/users/hypeJunction/orgs","repos_url":"https://api.github.com/users/hypeJunction/repos","events_url":"https://api.github.com/users/hypeJunction/events{/privacy}","received_events_url":"https://api.github.com/users/hypeJunction/received_events","type":"User","site_admin":false},"body":"Adds a number of methods to handle entity icons in a unified manner.\r\nAdds PHPUnit tests.\r\n\r\nRefs #6152 \r\n\r\n- [ ] Update groups plugin to use new service\r\n- [ ] Implement a global listener to touch entity icons when ``access_id`` is changed\r\n- [ ] Implement a global listener to move entity icons when ``owner_guid`` changes\r\n- [ ] Add `embed-icon` handler and update the `embed` plugin","created_at":"2016-04-11T10:51:15Z","updated_at":"2016-04-11T13:59:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"71b747a4c1ef77e795596a35434fc848e2e8e179","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Elgg/Elgg/pulls/9655/commits","review_comments_url":"https://api.github.com/repos/Elgg/Elgg/pulls/9655/comments","review_comment_url":"https://api.github.com/repos/Elgg/Elgg/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Elgg/Elgg/issues/9655/comments","statuses_url":"https://api.github.com/repos/Elgg/Elgg/statuses/cad4a4c171fb0d7cc6ae0b4454d7e9a007373fbb","head":{"label":"hypeJunction:icon-service","ref":"icon-service","sha":"cad4a4c171fb0d7cc6ae0b4454d7e9a007373fbb","user":{"login":"hypeJunction","id":1202761,"avatar_url":"https://avatars.githubusercontent.com/u/1202761?v=3","gravatar_id":"","url":"https://api.github.com/users/hypeJunction","html_url":"https://github.com/hypeJunction","followers_url":"https://api.github.com/users/hypeJunction/followers","following_url":"https://api.github.com/users/hypeJunction/following{/other_user}","gists_url":"https://api.github.com/users/hypeJunction/gists{/gist_id}","starred_url":"https://api.github.com/users/hypeJunction/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hypeJunction/subscriptions","organizations_url":"https://api.github.com/users/hypeJunction/orgs","repos_url":"https://api.github.com/users/hypeJunction/repos","events_url":"https://api.github.com/users/hypeJunction/events{/privacy}","received_events_url":"https://api.github.com/users/hypeJunction/received_events","type":"User","site_admin":false},"repo":{"id":2797801,"name":"Elgg","full_name":"hypeJunction/Elgg","owner":{"login":"hypeJunction","id":1202761,"avatar_url":"https://avatars.githubusercontent.com/u/1202761?v=3","gravatar_id":"","url":"https://api.github.com/users/hypeJunction","html_url":"https://github.com/hypeJunction","followers_url":"https://api.github.com/users/hypeJunction/followers","following_url":"https://api.github.com/users/hypeJunction/following{/other_user}","gists_url":"https://api.github.com/users/hypeJunction/gists{/gist_id}","starred_url":"https://api.github.com/users/hypeJunction/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hypeJunction/subscriptions","organizations_url":"https://api.github.com/users/hypeJunction/orgs","repos_url":"https://api.github.com/users/hypeJunction/repos","events_url":"https://api.github.com/users/hypeJunction/events{/privacy}","received_events_url":"https://api.github.com/users/hypeJunction/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hypeJunction/Elgg","description":"A social networking engine","fork":true,"url":"https://api.github.com/repos/hypeJunction/Elgg","forks_url":"https://api.github.com/repos/hypeJunction/Elgg/forks","keys_url":"https://api.github.com/repos/hypeJunction/Elgg/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hypeJunction/Elgg/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hypeJunction/Elgg/teams","hooks_url":"https://api.github.com/repos/hypeJunction/Elgg/hooks","issue_events_url":"https://api.github.com/repos/hypeJunction/Elgg/issues/events{/number}","events_url":"https://api.github.com/repos/hypeJunction/Elgg/events","assignees_url":"https://api.github.com/repos/hypeJunction/Elgg/assignees{/user}","branches_url":"https://api.github.com/repos/hypeJunction/Elgg/branches{/branch}","tags_url":"https://api.github.com/repos/hypeJunction/Elgg/tags","blobs_url":"https://api.github.com/repos/hypeJunction/Elgg/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hypeJunction/Elgg/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hypeJunction/Elgg/git/refs{/sha}","trees_url":"https://api.github.com/repos/hypeJunction/Elgg/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hypeJunction/Elgg/statuses/{sha}","languages_url":"https://api.github.com/repos/hypeJunction/Elgg/languages","stargazers_url":"https://api.github.com/repos/hypeJunction/Elgg/stargazers","contributors_url":"https://api.github.com/repos/hypeJunction/Elgg/contributors","subscribers_url":"https://api.github.com/repos/hypeJunction/Elgg/subscribers","subscription_url":"https://api.github.com/repos/hypeJunction/Elgg/subscription","commits_url":"https://api.github.com/repos/hypeJunction/Elgg/commits{/sha}","git_commits_url":"https://api.github.com/repos/hypeJunction/Elgg/git/commits{/sha}","comments_url":"https://api.github.com/repos/hypeJunction/Elgg/comments{/number}","issue_comment_url":"https://api.github.com/repos/hypeJunction/Elgg/issues/comments{/number}","contents_url":"https://api.github.com/repos/hypeJunction/Elgg/contents/{+path}","compare_url":"https://api.github.com/repos/hypeJunction/Elgg/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hypeJunction/Elgg/merges","archive_url":"https://api.github.com/repos/hypeJunction/Elgg/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hypeJunction/Elgg/downloads","issues_url":"https://api.github.com/repos/hypeJunction/Elgg/issues{/number}","pulls_url":"https://api.github.com/repos/hypeJunction/Elgg/pulls{/number}","milestones_url":"https://api.github.com/repos/hypeJunction/Elgg/milestones{/number}","notifications_url":"https://api.github.com/repos/hypeJunction/Elgg/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hypeJunction/Elgg/labels{/name}","releases_url":"https://api.github.com/repos/hypeJunction/Elgg/releases{/id}","deployments_url":"https://api.github.com/repos/hypeJunction/Elgg/deployments","created_at":"2011-11-17T18:59:58Z","updated_at":"2015-05-09T06:40:26Z","pushed_at":"2016-04-11T13:04:51Z","git_url":"git://github.com/hypeJunction/Elgg.git","ssh_url":"git@github.com:hypeJunction/Elgg.git","clone_url":"https://github.com/hypeJunction/Elgg.git","svn_url":"https://github.com/hypeJunction/Elgg","homepage":"http://elgg.org","size":43994,"stargazers_count":1,"watchers_count":1,"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":1,"default_branch":"master"}},"base":{"label":"Elgg:2.x","ref":"2.x","sha":"9911566a737c5cef5c82c3917062d1c8f9329e6c","user":{"login":"Elgg","id":79167,"avatar_url":"https://avatars.githubusercontent.com/u/79167?v=3","gravatar_id":"","url":"https://api.github.com/users/Elgg","html_url":"https://github.com/Elgg","followers_url":"https://api.github.com/users/Elgg/followers","following_url":"https://api.github.com/users/Elgg/following{/other_user}","gists_url":"https://api.github.com/users/Elgg/gists{/gist_id}","starred_url":"https://api.github.com/users/Elgg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Elgg/subscriptions","organizations_url":"https://api.github.com/users/Elgg/orgs","repos_url":"https://api.github.com/users/Elgg/repos","events_url":"https://api.github.com/users/Elgg/events{/privacy}","received_events_url":"https://api.github.com/users/Elgg/received_events","type":"Organization","site_admin":false},"repo":{"id":299271,"name":"Elgg","full_name":"Elgg/Elgg","owner":{"login":"Elgg","id":79167,"avatar_url":"https://avatars.githubusercontent.com/u/79167?v=3","gravatar_id":"","url":"https://api.github.com/users/Elgg","html_url":"https://github.com/Elgg","followers_url":"https://api.github.com/users/Elgg/followers","following_url":"https://api.github.com/users/Elgg/following{/other_user}","gists_url":"https://api.github.com/users/Elgg/gists{/gist_id}","starred_url":"https://api.github.com/users/Elgg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Elgg/subscriptions","organizations_url":"https://api.github.com/users/Elgg/orgs","repos_url":"https://api.github.com/users/Elgg/repos","events_url":"https://api.github.com/users/Elgg/events{/privacy}","received_events_url":"https://api.github.com/users/Elgg/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Elgg/Elgg","description":"A social networking engine in PHP/MySQL","fork":false,"url":"https://api.github.com/repos/Elgg/Elgg","forks_url":"https://api.github.com/repos/Elgg/Elgg/forks","keys_url":"https://api.github.com/repos/Elgg/Elgg/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Elgg/Elgg/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Elgg/Elgg/teams","hooks_url":"https://api.github.com/repos/Elgg/Elgg/hooks","issue_events_url":"https://api.github.com/repos/Elgg/Elgg/issues/events{/number}","events_url":"https://api.github.com/repos/Elgg/Elgg/events","assignees_url":"https://api.github.com/repos/Elgg/Elgg/assignees{/user}","branches_url":"https://api.github.com/repos/Elgg/Elgg/branches{/branch}","tags_url":"https://api.github.com/repos/Elgg/Elgg/tags","blobs_url":"https://api.github.com/repos/Elgg/Elgg/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Elgg/Elgg/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Elgg/Elgg/git/refs{/sha}","trees_url":"https://api.github.com/repos/Elgg/Elgg/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Elgg/Elgg/statuses/{sha}","languages_url":"https://api.github.com/repos/Elgg/Elgg/languages","stargazers_url":"https://api.github.com/repos/Elgg/Elgg/stargazers","contributors_url":"https://api.github.com/repos/Elgg/Elgg/contributors","subscribers_url":"https://api.github.com/repos/Elgg/Elgg/subscribers","subscription_url":"https://api.github.com/repos/Elgg/Elgg/subscription","commits_url":"https://api.github.com/repos/Elgg/Elgg/commits{/sha}","git_commits_url":"https://api.github.com/repos/Elgg/Elgg/git/commits{/sha}","comments_url":"https://api.github.com/repos/Elgg/Elgg/comments{/number}","issue_comment_url":"https://api.github.com/repos/Elgg/Elgg/issues/comments{/number}","contents_url":"https://api.github.com/repos/Elgg/Elgg/contents/{+path}","compare_url":"https://api.github.com/repos/Elgg/Elgg/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Elgg/Elgg/merges","archive_url":"https://api.github.com/repos/Elgg/Elgg/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Elgg/Elgg/downloads","issues_url":"https://api.github.com/repos/Elgg/Elgg/issues{/number}","pulls_url":"https://api.github.com/repos/Elgg/Elgg/pulls{/number}","milestones_url":"https://api.github.com/repos/Elgg/Elgg/milestones{/number}","notifications_url":"https://api.github.com/repos/Elgg/Elgg/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Elgg/Elgg/labels{/name}","releases_url":"https://api.github.com/repos/Elgg/Elgg/releases{/id}","deployments_url":"https://api.github.com/repos/Elgg/Elgg/deployments","created_at":"2009-09-06T17:10:11Z","updated_at":"2016-04-11T10:50:12Z","pushed_at":"2016-04-11T13:11:27Z","git_url":"git://github.com/Elgg/Elgg.git","ssh_url":"git@github.com:Elgg/Elgg.git","clone_url":"https://github.com/Elgg/Elgg.git","svn_url":"https://github.com/Elgg/Elgg","homepage":"http://elgg.org","size":83627,"stargazers_count":858,"watchers_count":858,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":504,"mirror_url":null,"open_issues_count":822,"forks":504,"open_issues":822,"watchers":858,"default_branch":"2.x"}},"_links":{"self":{"href":"https://api.github.com/repos/Elgg/Elgg/pulls/9655"},"html":{"href":"https://github.com/Elgg/Elgg/pull/9655"},"issue":{"href":"https://api.github.com/repos/Elgg/Elgg/issues/9655"},"comments":{"href":"https://api.github.com/repos/Elgg/Elgg/issues/9655/comments"},"review_comments":{"href":"https://api.github.com/repos/Elgg/Elgg/pulls/9655/comments"},"review_comment":{"href":"https://api.github.com/repos/Elgg/Elgg/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Elgg/Elgg/pulls/9655/commits"},"statuses":{"href":"https://api.github.com/repos/Elgg/Elgg/statuses/cad4a4c171fb0d7cc6ae0b4454d7e9a007373fbb"}}}}