{"action":"created","comment":{"url":"https://api.github.com/repos/mautic/mautic/pulls/comments/89243934","pull_request_review_id":9791122,"id":89243934,"diff_hunk":"@@ -0,0 +1,200 @@\n+<?php\n+\n+/*\n+ * @copyright   2016 Mautic Contributors. All rights reserved\n+ * @author      Mautic\n+ *\n+ * @link        http://mautic.org\n+ *\n+ * @license     GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html\n+ */\n+\n+namespace Mautic\\CoreBundle\\Controller\\Api;\n+\n+use Mautic\\ApiBundle\\Controller\\CommonApiController;\n+use Mautic\\CoreBundle\\Helper\\InputHelper;\n+use Symfony\\Component\\HttpFoundation\\Response;\n+use Symfony\\Component\\HttpKernel\\Event\\FilterControllerEvent;\n+\n+/**\n+ * Class FileApiController.\n+ */\n+class FileApiController extends CommonApiController\n+{\n+    public function initialize(FilterControllerEvent $event)\n+    {\n+        parent::initialize($event);\n+        $this->entityNameOne   = 'file';\n+        $this->entityNameMulti = 'files';\n+    }\n+\n+    protected $forbiddenExtensions = [\n+        'php',\n+    ];\n+\n+    /**\n+     * Uploads a file.\n+     *\n+     * @return \\Symfony\\Component\\HttpFoundation\\JsonResponse\n+     */\n+    public function createAction($dir)\n+    {\n+        try {\n+            $path = $this->getAbsolutePath($dir, true);\n+        } catch (\\Exception $e) {\n+            return $this->returnError($e->getMessage(), Response::HTTP_NOT_ACCEPTABLE);\n+        }\n+\n+        $response = [$this->entityNameOne => []];\n+        if ($this->request->files) {\n+            foreach ($this->request->files as $file) {\n+                if (!in_array($file->guessExtension(), $this->forbiddenExtensions)) {\n+                    $fileName = md5(uniqid()).'.'.$file->guessExtension();\n+                    $moved    = $file->move($path, $fileName);\n+\n+                    if (substr($dir, 0, 6) === 'images') {\n+                        $response[$this->entityNameOne]['link'] = $this->getMediaUrl().'/'.$fileName;\n+                    }\n+\n+                    $response[$this->entityNameOne]['name'] = $fileName;\n+                } else {\n+                    return $this->returnError('The uploaded file cannot have these exetnsions: '.implode(',', $this->forbiddenExtensions).'.', Response::HTTP_NOT_ACCEPTABLE);\n+                }\n+            }\n+        } else {\n+            return $this->returnError('File was not found in the request.', Response::HTTP_NOT_ACCEPTABLE);\n+        }\n+\n+        $view = $this->view($response);\n+\n+        return $this->handleView($view);\n+    }\n+\n+    /**\n+     * List the files in /media directory.\n+     *\n+     * @return \\Symfony\\Component\\HttpFoundation\\JsonResponse\n+     */\n+    public function listAction($dir)\n+    {\n+        try {\n+            $filePath = $this->getAbsolutePath($dir);\n+        } catch (\\Exception $e) {\n+            return $this->returnError($e->getMessage(), Response::HTTP_NOT_ACCEPTABLE);\n+        }\n+\n+        $fnames = scandir($filePath);\n+\n+        if (is_array($fnames)) {\n+            foreach ($fnames as $key => $name) {\n+                // remove hidden files\n+                if (substr($name, 0, 1) === '.') {\n+                    unset($fnames[$key]);\n+                }\n+            }\n+        } else {\n+            return $this->returnError(ucfirst($dir).' dir is not readable', Response::HTTP_INTERNAL_SERVER_ERROR);\n+        }\n+\n+        $view = $this->view([$this->entityNameMulti => $fnames]);\n+\n+        return $this->handleView($view);\n+    }\n+\n+    /**\n+     * Delete a file from /media directory.\n+     *\n+     * @return \\Symfony\\Component\\HttpFoundation\\JsonResponse\n+     */\n+    public function deleteAction($dir, $file)\n+    {\n+        $response = ['success' => false];\n+\n+        try {\n+            $filePath = $this->getAbsolutePath($dir).'/'.basename($file);\n+        } catch (\\Exception $e) {\n+            return $this->returnError($e->getMessage(), Response::HTTP_NOT_ACCEPTABLE);\n+        }\n+\n+        if (!file_exists($filePath)) {\n+            return $this->returnError('File does not exist', Response::HTTP_NOT_FOUND);\n+        } elseif (!is_writable($filePath)) {\n+            return $this->returnError('File is not writable', Response::HTTP_INTERNAL_SERVER_ERROR);\n+        } else {\n+            unlink($filePath);\n+            $response['success'] = true;\n+        }\n+\n+        $view = $this->view($response);\n+\n+        return $this->handleView($view);\n+    }\n+\n+    /**\n+     * Get the Media directory full file system path.\n+     *\n+     * @param string $dir\n+     * @param bool   $createDir\n+     *\n+     * @return string\n+     */\n+    protected function getAbsolutePath($dir, $createDir = false)\n+    {\n+        $possibleDirs = ['assets', 'images'];\n+        $dir          = InputHelper::alphanum($dir, true, false, ['_', '.']);\n+        $subdir       = trim(InputHelper::alphanum($this->request->get('subdir', ''), true, false, ['\\/']), '/');\n+\n+        // Dots in the dir name are slashes\n+        if (strpos($dir, '.') !== false && !$subdir) {\n+            $dirs = explode('.', $dir);\n+            $dir  = $dirs[0];\n+            unset($dirs[0]);\n+            $subdir = implode('/', $dirs);\n+        }\n+\n+        if (!in_array($dir, $possibleDirs)) {\n+            throw new \\InvalidArgumentException($dir.' not found. Only '.implode(' or ', $possibleDirs).' options are possible.');\n+        }\n+\n+        if ($dir === 'images') {\n+            $absoluteDir = realpath($this->get('mautic.helper.paths')->getSystemPath($dir, true));\n+        } elseif ($dir === 'assets') {\n+            $absoluteDir = realpath($this->get('mautic.helper.core_parameters')->getParameter('upload_dir'));\n+        }\n+\n+        if ($absoluteDir === false) {\n+            throw new \\InvalidArgumentException($dir.' dir does not exist', Response::HTTP_INTERNAL_SERVER_ERROR);\n+        }\n+\n+        if (is_writable($absoluteDir) === false) {\n+            throw new \\InvalidArgumentException($dir.' dir is not writable', Response::HTTP_INTERNAL_SERVER_ERROR);\n+        }\n+\n+        $path = $absoluteDir.'/'.$subdir;\n+\n+        if (!file_exists($path)) {\n+            if ($createDir) {\n+                if (mkdir($path) === false) {\n+                    throw new \\InvalidArgumentException($dir.'/'.$subdir.' subdirectory could not be created.', Response::HTTP_INTERNAL_SERVER_ERROR);\n+                }\n+            } else {\n+                throw new \\InvalidArgumentException($subdir.' doesn\\'t exist in the '.$dir.' dir.');\n+            }\n+        }\n+\n+        return $path;\n+    }\n+\n+    /**\n+     * Get the Media directory full file system path.\n+     *\n+     * @return string\n+     */\n+    protected function getMediaUrl()\n+    {\n+        return $this->request->getScheme().'://'\n+            .$this->request->getHttpHost()\n+            .$this->request->getBasePath().'/'\n+            .$this->factory->getParameter('image_path');","path":"app/bundles/CoreBundle/Controller/Api/FileApiController.php","position":198,"original_position":198,"commit_id":"e32c8be99e05898c1387ac7ed55d141c380f77dd","original_commit_id":"e32c8be99e05898c1387ac7ed55d141c380f77dd","user":{"login":"alanhartless","id":63312,"avatar_url":"https://avatars.githubusercontent.com/u/63312?v=3","gravatar_id":"","url":"https://api.github.com/users/alanhartless","html_url":"https://github.com/alanhartless","followers_url":"https://api.github.com/users/alanhartless/followers","following_url":"https://api.github.com/users/alanhartless/following{/other_user}","gists_url":"https://api.github.com/users/alanhartless/gists{/gist_id}","starred_url":"https://api.github.com/users/alanhartless/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alanhartless/subscriptions","organizations_url":"https://api.github.com/users/alanhartless/orgs","repos_url":"https://api.github.com/users/alanhartless/repos","events_url":"https://api.github.com/users/alanhartless/events{/privacy}","received_events_url":"https://api.github.com/users/alanhartless/received_events","type":"User","site_admin":false},"body":"Let's not use factory","created_at":"2016-11-23T01:15:56Z","updated_at":"2016-11-23T01:15:56Z","html_url":"https://github.com/mautic/mautic/pull/2738#discussion_r89243934","pull_request_url":"https://api.github.com/repos/mautic/mautic/pulls/2738","_links":{"self":{"href":"https://api.github.com/repos/mautic/mautic/pulls/comments/89243934"},"html":{"href":"https://github.com/mautic/mautic/pull/2738#discussion_r89243934"},"pull_request":{"href":"https://api.github.com/repos/mautic/mautic/pulls/2738"}}},"pull_request":{"url":"https://api.github.com/repos/mautic/mautic/pulls/2738","id":89171963,"html_url":"https://github.com/mautic/mautic/pull/2738","diff_url":"https://github.com/mautic/mautic/pull/2738.diff","patch_url":"https://github.com/mautic/mautic/pull/2738.patch","issue_url":"https://api.github.com/repos/mautic/mautic/issues/2738","number":2738,"state":"open","locked":false,"title":"Feature api writes","user":{"login":"escopecz","id":1235442,"avatar_url":"https://avatars.githubusercontent.com/u/1235442?v=3","gravatar_id":"","url":"https://api.github.com/users/escopecz","html_url":"https://github.com/escopecz","followers_url":"https://api.github.com/users/escopecz/followers","following_url":"https://api.github.com/users/escopecz/following{/other_user}","gists_url":"https://api.github.com/users/escopecz/gists{/gist_id}","starred_url":"https://api.github.com/users/escopecz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/escopecz/subscriptions","organizations_url":"https://api.github.com/users/escopecz/orgs","repos_url":"https://api.github.com/users/escopecz/repos","events_url":"https://api.github.com/users/escopecz/events{/privacy}","received_events_url":"https://api.github.com/users/escopecz/received_events","type":"User","site_admin":false},"body":"| Q | A |\r\n| --- | --- |\r\n| Bug fix? | N |\r\n| New feature? | Y |\r\n| Related user documentation PR URL | / |\r\n| Related developer documentation PR URL | https://github.com/mautic/developer-documentation/pull/31 |\r\n| Related API Library PR URL | https://github.com/mautic/api-library/pull/66 |\r\n| Issues addressed (#s or URLs) | https://github.com/mautic/mautic/issues/2472, https://github.com/mautic/mautic/issues/1651, https://github.com/mautic/mautic/pull/1588, https://github.com/mautic/mautic/issues/2490, https://github.com/mautic/mautic/issues/2565, https://github.com/mautic/mautic/issues/1092, https://github.com/mautic/mautic/issues/301, https://github.com/mautic/mautic/issues/770 |\r\n| BC breaks? | N |\r\n| Deprecations? | N |\r\n#### Description:\r\n\r\nThis is a big Mautic API update. It adds write access points to most entities which didn't have them yet and adds a bunch of new API endpoints which were missing.\r\n##### New API endpoints are:\r\n- [x] Asset CRUD\r\n- [x] Campaign CRUD\r\n  - [x] Campaign Events CRUD\r\n- [x] Category CRUD\r\n- [x] Company CRUD\r\n  - [x] Add Contact to Campaign\r\n  - [x] Remove Contact from Campaign\r\n- [x] Contact - already was implemented\r\n  - [x] DNC CRD\r\n  - [x] Contact history R\r\n  - [x] Contact notes CRUD\r\n- [x] Contact/Company custom fields\r\n- [x] Dynamic Content CRUD\r\n- [x] Email CRUD\r\n  - [x] Dynamic content CRD\r\n  - [x] Segments CRD\r\n  - [x] Send a segment email\r\n  - [x] Send an email to contact\r\n- [x] File CRUD [needs docs]\r\n- [x] Form CRUD\r\n  - [x] Form Actions CRUD\r\n  - [x] Form Fields CRUD\r\n- [x] Notification CRUD\r\n- [x] Page CRUD\r\n- [x] Point Actions CRUD\r\n  - [x] Point Action types R\r\n  - [x] Add Contact Points\r\n  - [x] Subtract Contact Points\r\n- [x] Point Triggers CRUD\r\n  - [x] Point Triggers Actions CRUD\r\n- [x] Roles CRUD\r\n- [x] Segment CRUD\r\n- [x] SMS CRUD\r\n- [x] Stage CRUD\r\n  - [x] Add Contact to Stage\r\n  - [x] Remove Contact from Stage\r\n- [x] Stats - all stats table data available for fetch, ordering, filtering R\r\n- [x] Users CRUD\r\n\r\n#### Steps to test this PR:\r\n1. Run the API Library unit tests: https://github.com/escopecz/api-library/tree/write-endpoints#unit-tests\r\n","created_at":"2016-10-13T10:06:38Z","updated_at":"2016-11-23T01:27:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1e23a0b95fb2be08b814c68656a4fc7577f45784","assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/mautic/mautic/milestones/21","html_url":"https://github.com/mautic/mautic/milestones/2.3","labels_url":"https://api.github.com/repos/mautic/mautic/milestones/21/labels","id":2034542,"number":21,"title":"2.3","description":"","creator":{"login":"alanhartless","id":63312,"avatar_url":"https://avatars.githubusercontent.com/u/63312?v=3","gravatar_id":"","url":"https://api.github.com/users/alanhartless","html_url":"https://github.com/alanhartless","followers_url":"https://api.github.com/users/alanhartless/followers","following_url":"https://api.github.com/users/alanhartless/following{/other_user}","gists_url":"https://api.github.com/users/alanhartless/gists{/gist_id}","starred_url":"https://api.github.com/users/alanhartless/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alanhartless/subscriptions","organizations_url":"https://api.github.com/users/alanhartless/orgs","repos_url":"https://api.github.com/users/alanhartless/repos","events_url":"https://api.github.com/users/alanhartless/events{/privacy}","received_events_url":"https://api.github.com/users/alanhartless/received_events","type":"User","site_admin":false},"open_issues":35,"closed_issues":34,"state":"open","created_at":"2016-09-28T11:59:00Z","updated_at":"2016-11-22T23:31:47Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/mautic/mautic/pulls/2738/commits","review_comments_url":"https://api.github.com/repos/mautic/mautic/pulls/2738/comments","review_comment_url":"https://api.github.com/repos/mautic/mautic/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mautic/mautic/issues/2738/comments","statuses_url":"https://api.github.com/repos/mautic/mautic/statuses/e32c8be99e05898c1387ac7ed55d141c380f77dd","head":{"label":"escopecz:feature-api-writes","ref":"feature-api-writes","sha":"e32c8be99e05898c1387ac7ed55d141c380f77dd","user":{"login":"escopecz","id":1235442,"avatar_url":"https://avatars.githubusercontent.com/u/1235442?v=3","gravatar_id":"","url":"https://api.github.com/users/escopecz","html_url":"https://github.com/escopecz","followers_url":"https://api.github.com/users/escopecz/followers","following_url":"https://api.github.com/users/escopecz/following{/other_user}","gists_url":"https://api.github.com/users/escopecz/gists{/gist_id}","starred_url":"https://api.github.com/users/escopecz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/escopecz/subscriptions","organizations_url":"https://api.github.com/users/escopecz/orgs","repos_url":"https://api.github.com/users/escopecz/repos","events_url":"https://api.github.com/users/escopecz/events{/privacy}","received_events_url":"https://api.github.com/users/escopecz/received_events","type":"User","site_admin":false},"repo":{"id":31202004,"name":"mautic","full_name":"escopecz/mautic","owner":{"login":"escopecz","id":1235442,"avatar_url":"https://avatars.githubusercontent.com/u/1235442?v=3","gravatar_id":"","url":"https://api.github.com/users/escopecz","html_url":"https://github.com/escopecz","followers_url":"https://api.github.com/users/escopecz/followers","following_url":"https://api.github.com/users/escopecz/following{/other_user}","gists_url":"https://api.github.com/users/escopecz/gists{/gist_id}","starred_url":"https://api.github.com/users/escopecz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/escopecz/subscriptions","organizations_url":"https://api.github.com/users/escopecz/orgs","repos_url":"https://api.github.com/users/escopecz/repos","events_url":"https://api.github.com/users/escopecz/events{/privacy}","received_events_url":"https://api.github.com/users/escopecz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/escopecz/mautic","description":"Mautic: Open Source Marketing Automation Software.","fork":true,"url":"https://api.github.com/repos/escopecz/mautic","forks_url":"https://api.github.com/repos/escopecz/mautic/forks","keys_url":"https://api.github.com/repos/escopecz/mautic/keys{/key_id}","collaborators_url":"https://api.github.com/repos/escopecz/mautic/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/escopecz/mautic/teams","hooks_url":"https://api.github.com/repos/escopecz/mautic/hooks","issue_events_url":"https://api.github.com/repos/escopecz/mautic/issues/events{/number}","events_url":"https://api.github.com/repos/escopecz/mautic/events","assignees_url":"https://api.github.com/repos/escopecz/mautic/assignees{/user}","branches_url":"https://api.github.com/repos/escopecz/mautic/branches{/branch}","tags_url":"https://api.github.com/repos/escopecz/mautic/tags","blobs_url":"https://api.github.com/repos/escopecz/mautic/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/escopecz/mautic/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/escopecz/mautic/git/refs{/sha}","trees_url":"https://api.github.com/repos/escopecz/mautic/git/trees{/sha}","statuses_url":"https://api.github.com/repos/escopecz/mautic/statuses/{sha}","languages_url":"https://api.github.com/repos/escopecz/mautic/languages","stargazers_url":"https://api.github.com/repos/escopecz/mautic/stargazers","contributors_url":"https://api.github.com/repos/escopecz/mautic/contributors","subscribers_url":"https://api.github.com/repos/escopecz/mautic/subscribers","subscription_url":"https://api.github.com/repos/escopecz/mautic/subscription","commits_url":"https://api.github.com/repos/escopecz/mautic/commits{/sha}","git_commits_url":"https://api.github.com/repos/escopecz/mautic/git/commits{/sha}","comments_url":"https://api.github.com/repos/escopecz/mautic/comments{/number}","issue_comment_url":"https://api.github.com/repos/escopecz/mautic/issues/comments{/number}","contents_url":"https://api.github.com/repos/escopecz/mautic/contents/{+path}","compare_url":"https://api.github.com/repos/escopecz/mautic/compare/{base}...{head}","merges_url":"https://api.github.com/repos/escopecz/mautic/merges","archive_url":"https://api.github.com/repos/escopecz/mautic/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/escopecz/mautic/downloads","issues_url":"https://api.github.com/repos/escopecz/mautic/issues{/number}","pulls_url":"https://api.github.com/repos/escopecz/mautic/pulls{/number}","milestones_url":"https://api.github.com/repos/escopecz/mautic/milestones{/number}","notifications_url":"https://api.github.com/repos/escopecz/mautic/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/escopecz/mautic/labels{/name}","releases_url":"https://api.github.com/repos/escopecz/mautic/releases{/id}","deployments_url":"https://api.github.com/repos/escopecz/mautic/deployments","created_at":"2015-02-23T09:52:24Z","updated_at":"2015-03-09T14:56:38Z","pushed_at":"2016-11-22T17:34:39Z","git_url":"git://github.com/escopecz/mautic.git","ssh_url":"git@github.com:escopecz/mautic.git","clone_url":"https://github.com/escopecz/mautic.git","svn_url":"https://github.com/escopecz/mautic","homepage":"http://mautic.org","size":62287,"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":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"mautic:staging","ref":"staging","sha":"2d916a533c8bc37a0032da0db24e4073db3aa7f3","user":{"login":"mautic","id":5257677,"avatar_url":"https://avatars.githubusercontent.com/u/5257677?v=3","gravatar_id":"","url":"https://api.github.com/users/mautic","html_url":"https://github.com/mautic","followers_url":"https://api.github.com/users/mautic/followers","following_url":"https://api.github.com/users/mautic/following{/other_user}","gists_url":"https://api.github.com/users/mautic/gists{/gist_id}","starred_url":"https://api.github.com/users/mautic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mautic/subscriptions","organizations_url":"https://api.github.com/users/mautic/orgs","repos_url":"https://api.github.com/users/mautic/repos","events_url":"https://api.github.com/users/mautic/events{/privacy}","received_events_url":"https://api.github.com/users/mautic/received_events","type":"Organization","site_admin":false},"repo":{"id":12204147,"name":"mautic","full_name":"mautic/mautic","owner":{"login":"mautic","id":5257677,"avatar_url":"https://avatars.githubusercontent.com/u/5257677?v=3","gravatar_id":"","url":"https://api.github.com/users/mautic","html_url":"https://github.com/mautic","followers_url":"https://api.github.com/users/mautic/followers","following_url":"https://api.github.com/users/mautic/following{/other_user}","gists_url":"https://api.github.com/users/mautic/gists{/gist_id}","starred_url":"https://api.github.com/users/mautic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mautic/subscriptions","organizations_url":"https://api.github.com/users/mautic/orgs","repos_url":"https://api.github.com/users/mautic/repos","events_url":"https://api.github.com/users/mautic/events{/privacy}","received_events_url":"https://api.github.com/users/mautic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mautic/mautic","description":"Mautic: Open Source Marketing Automation Software.","fork":false,"url":"https://api.github.com/repos/mautic/mautic","forks_url":"https://api.github.com/repos/mautic/mautic/forks","keys_url":"https://api.github.com/repos/mautic/mautic/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mautic/mautic/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mautic/mautic/teams","hooks_url":"https://api.github.com/repos/mautic/mautic/hooks","issue_events_url":"https://api.github.com/repos/mautic/mautic/issues/events{/number}","events_url":"https://api.github.com/repos/mautic/mautic/events","assignees_url":"https://api.github.com/repos/mautic/mautic/assignees{/user}","branches_url":"https://api.github.com/repos/mautic/mautic/branches{/branch}","tags_url":"https://api.github.com/repos/mautic/mautic/tags","blobs_url":"https://api.github.com/repos/mautic/mautic/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mautic/mautic/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mautic/mautic/git/refs{/sha}","trees_url":"https://api.github.com/repos/mautic/mautic/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mautic/mautic/statuses/{sha}","languages_url":"https://api.github.com/repos/mautic/mautic/languages","stargazers_url":"https://api.github.com/repos/mautic/mautic/stargazers","contributors_url":"https://api.github.com/repos/mautic/mautic/contributors","subscribers_url":"https://api.github.com/repos/mautic/mautic/subscribers","subscription_url":"https://api.github.com/repos/mautic/mautic/subscription","commits_url":"https://api.github.com/repos/mautic/mautic/commits{/sha}","git_commits_url":"https://api.github.com/repos/mautic/mautic/git/commits{/sha}","comments_url":"https://api.github.com/repos/mautic/mautic/comments{/number}","issue_comment_url":"https://api.github.com/repos/mautic/mautic/issues/comments{/number}","contents_url":"https://api.github.com/repos/mautic/mautic/contents/{+path}","compare_url":"https://api.github.com/repos/mautic/mautic/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mautic/mautic/merges","archive_url":"https://api.github.com/repos/mautic/mautic/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mautic/mautic/downloads","issues_url":"https://api.github.com/repos/mautic/mautic/issues{/number}","pulls_url":"https://api.github.com/repos/mautic/mautic/pulls{/number}","milestones_url":"https://api.github.com/repos/mautic/mautic/milestones{/number}","notifications_url":"https://api.github.com/repos/mautic/mautic/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mautic/mautic/labels{/name}","releases_url":"https://api.github.com/repos/mautic/mautic/releases{/id}","deployments_url":"https://api.github.com/repos/mautic/mautic/deployments","created_at":"2013-08-19T00:36:28Z","updated_at":"2016-11-22T01:53:16Z","pushed_at":"2016-11-23T01:05:48Z","git_url":"git://github.com/mautic/mautic.git","ssh_url":"git@github.com:mautic/mautic.git","clone_url":"https://github.com/mautic/mautic.git","svn_url":"https://github.com/mautic/mautic","homepage":"https://www.mautic.org","size":71452,"stargazers_count":1157,"watchers_count":1157,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":411,"mirror_url":null,"open_issues_count":606,"forks":411,"open_issues":606,"watchers":1157,"default_branch":"staging"}},"_links":{"self":{"href":"https://api.github.com/repos/mautic/mautic/pulls/2738"},"html":{"href":"https://github.com/mautic/mautic/pull/2738"},"issue":{"href":"https://api.github.com/repos/mautic/mautic/issues/2738"},"comments":{"href":"https://api.github.com/repos/mautic/mautic/issues/2738/comments"},"review_comments":{"href":"https://api.github.com/repos/mautic/mautic/pulls/2738/comments"},"review_comment":{"href":"https://api.github.com/repos/mautic/mautic/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mautic/mautic/pulls/2738/commits"},"statuses":{"href":"https://api.github.com/repos/mautic/mautic/statuses/e32c8be99e05898c1387ac7ed55d141c380f77dd"}}}}
{"actor":{"display_login":"alanhartless"}}