{"action":"created","comment":{"url":"https://api.github.com/repos/joomla/jissues/pulls/comments/56846991","id":56846991,"diff_hunk":"@@ -0,0 +1,45 @@\n+<?php\n+/**\n+ * Part of the Joomla Tracker's GitHub Application\n+ *\n+ * @copyright  Copyright (C) 2012 - 2014 Open Source Matters, Inc. All rights reserved.\n+ * @license    http://www.gnu.org/licenses/gpl-2.0.txt GNU General Public License Version 2 or Later\n+ */\n+\n+namespace App\\GitHub;\n+\n+use Joomla\\DI\\Container;\n+use JTracker\\AppInterface;\n+\n+/**\n+ * GitHub app\n+ *\n+ * @since  1.0\n+ */\n+class GitHubApp implements AppInterface\n+{\n+\t/**\n+\t * Loads services for the component into the application's DI Container\n+\t *\n+\t * @param   Container  $container  DI Container to load services into\n+\t *\n+\t * @return  void\n+\t *\n+\t * @since   1.0\n+\t * @throws  \\RuntimeException\n+\t */\n+\tpublic function loadServices(Container $container)\n+\t{\n+\t\t// Register the component routes\n+\t\t$maps = json_decode(file_get_contents(__DIR__ . '/routes.json'), true);\n+\n+\t\tif (!$maps)\n+\t\t{\n+\t\t\tthrow new \\RuntimeException('Invalid router file for the GitHub app.' . $path, 500);","path":"src/App/GitHub/GitHubApp.php","position":38,"original_position":38,"commit_id":"34b22699dfbfff4dbb912839e710a62533332042","original_commit_id":"34b22699dfbfff4dbb912839e710a62533332042","user":{"login":"b2z","id":3051676,"avatar_url":"https://avatars.githubusercontent.com/u/3051676?v=3","gravatar_id":"","url":"https://api.github.com/users/b2z","html_url":"https://github.com/b2z","followers_url":"https://api.github.com/users/b2z/followers","following_url":"https://api.github.com/users/b2z/following{/other_user}","gists_url":"https://api.github.com/users/b2z/gists{/gist_id}","starred_url":"https://api.github.com/users/b2z/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/b2z/subscriptions","organizations_url":"https://api.github.com/users/b2z/orgs","repos_url":"https://api.github.com/users/b2z/repos","events_url":"https://api.github.com/users/b2z/events{/privacy}","received_events_url":"https://api.github.com/users/b2z/received_events","type":"User","site_admin":false},"body":"Oops, how do I missed that :(","created_at":"2016-03-21T15:58:48Z","updated_at":"2016-03-21T15:58:48Z","html_url":"https://github.com/joomla/jissues/pull/761#discussion_r56846991","pull_request_url":"https://api.github.com/repos/joomla/jissues/pulls/761","_links":{"self":{"href":"https://api.github.com/repos/joomla/jissues/pulls/comments/56846991"},"html":{"href":"https://github.com/joomla/jissues/pull/761#discussion_r56846991"},"pull_request":{"href":"https://api.github.com/repos/joomla/jissues/pulls/761"}}},"pull_request":{"url":"https://api.github.com/repos/joomla/jissues/pulls/761","id":63477060,"html_url":"https://github.com/joomla/jissues/pull/761","diff_url":"https://github.com/joomla/jissues/pull/761.diff","patch_url":"https://github.com/joomla/jissues/pull/761.patch","issue_url":"https://api.github.com/repos/joomla/jissues/issues/761","number":761,"state":"open","locked":false,"title":"App services layer","user":{"login":"mbabker","id":368545,"avatar_url":"https://avatars.githubusercontent.com/u/368545?v=3","gravatar_id":"","url":"https://api.github.com/users/mbabker","html_url":"https://github.com/mbabker","followers_url":"https://api.github.com/users/mbabker/followers","following_url":"https://api.github.com/users/mbabker/following{/other_user}","gists_url":"https://api.github.com/users/mbabker/gists{/gist_id}","starred_url":"https://api.github.com/users/mbabker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbabker/subscriptions","organizations_url":"https://api.github.com/users/mbabker/orgs","repos_url":"https://api.github.com/users/mbabker/repos","events_url":"https://api.github.com/users/mbabker/events{/privacy}","received_events_url":"https://api.github.com/users/mbabker/received_events","type":"User","site_admin":false},"body":"#### Summary of Changes\r\n\r\nThis creates an `AppInterface` and base app classes for each of the apps in the overall application.  Compare this to a really simplified version of Symfony bundles.  Long and short it allows each app to load its services into the application structure.  The loading of routes for the router is moved into this layer instead of directly in the application class now.\r\n\r\nThis layer should be used to help be able to create a more service injection based approach to things versus a service locator approach that's used now.  It also sets up a way to be able to set up the command line environment to be able to use the apps' APIs the same way the web app does.\r\n\r\n#### Testing Instructions\r\n\r\nEverything still works.","created_at":"2016-03-19T19:55:57Z","updated_at":"2016-03-21T15:58:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9ad867425055c0be62599183ae2ff9400d0f51bf","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/joomla/jissues/pulls/761/commits","review_comments_url":"https://api.github.com/repos/joomla/jissues/pulls/761/comments","review_comment_url":"https://api.github.com/repos/joomla/jissues/pulls/comments{/number}","comments_url":"https://api.github.com/repos/joomla/jissues/issues/761/comments","statuses_url":"https://api.github.com/repos/joomla/jissues/statuses/34b22699dfbfff4dbb912839e710a62533332042","head":{"label":"joomla:App-Services","ref":"App-Services","sha":"34b22699dfbfff4dbb912839e710a62533332042","user":{"login":"joomla","id":751633,"avatar_url":"https://avatars.githubusercontent.com/u/751633?v=3","gravatar_id":"","url":"https://api.github.com/users/joomla","html_url":"https://github.com/joomla","followers_url":"https://api.github.com/users/joomla/followers","following_url":"https://api.github.com/users/joomla/following{/other_user}","gists_url":"https://api.github.com/users/joomla/gists{/gist_id}","starred_url":"https://api.github.com/users/joomla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joomla/subscriptions","organizations_url":"https://api.github.com/users/joomla/orgs","repos_url":"https://api.github.com/users/joomla/repos","events_url":"https://api.github.com/users/joomla/events{/privacy}","received_events_url":"https://api.github.com/users/joomla/received_events","type":"Organization","site_admin":false},"repo":{"id":6099080,"name":"jissues","full_name":"joomla/jissues","owner":{"login":"joomla","id":751633,"avatar_url":"https://avatars.githubusercontent.com/u/751633?v=3","gravatar_id":"","url":"https://api.github.com/users/joomla","html_url":"https://github.com/joomla","followers_url":"https://api.github.com/users/joomla/followers","following_url":"https://api.github.com/users/joomla/following{/other_user}","gists_url":"https://api.github.com/users/joomla/gists{/gist_id}","starred_url":"https://api.github.com/users/joomla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joomla/subscriptions","organizations_url":"https://api.github.com/users/joomla/orgs","repos_url":"https://api.github.com/users/joomla/repos","events_url":"https://api.github.com/users/joomla/events{/privacy}","received_events_url":"https://api.github.com/users/joomla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/joomla/jissues","description":"Issue Tracking application integrating with GitHub to replace the existing Joomlacode solution.","fork":false,"url":"https://api.github.com/repos/joomla/jissues","forks_url":"https://api.github.com/repos/joomla/jissues/forks","keys_url":"https://api.github.com/repos/joomla/jissues/keys{/key_id}","collaborators_url":"https://api.github.com/repos/joomla/jissues/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/joomla/jissues/teams","hooks_url":"https://api.github.com/repos/joomla/jissues/hooks","issue_events_url":"https://api.github.com/repos/joomla/jissues/issues/events{/number}","events_url":"https://api.github.com/repos/joomla/jissues/events","assignees_url":"https://api.github.com/repos/joomla/jissues/assignees{/user}","branches_url":"https://api.github.com/repos/joomla/jissues/branches{/branch}","tags_url":"https://api.github.com/repos/joomla/jissues/tags","blobs_url":"https://api.github.com/repos/joomla/jissues/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/joomla/jissues/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/joomla/jissues/git/refs{/sha}","trees_url":"https://api.github.com/repos/joomla/jissues/git/trees{/sha}","statuses_url":"https://api.github.com/repos/joomla/jissues/statuses/{sha}","languages_url":"https://api.github.com/repos/joomla/jissues/languages","stargazers_url":"https://api.github.com/repos/joomla/jissues/stargazers","contributors_url":"https://api.github.com/repos/joomla/jissues/contributors","subscribers_url":"https://api.github.com/repos/joomla/jissues/subscribers","subscription_url":"https://api.github.com/repos/joomla/jissues/subscription","commits_url":"https://api.github.com/repos/joomla/jissues/commits{/sha}","git_commits_url":"https://api.github.com/repos/joomla/jissues/git/commits{/sha}","comments_url":"https://api.github.com/repos/joomla/jissues/comments{/number}","issue_comment_url":"https://api.github.com/repos/joomla/jissues/issues/comments{/number}","contents_url":"https://api.github.com/repos/joomla/jissues/contents/{+path}","compare_url":"https://api.github.com/repos/joomla/jissues/compare/{base}...{head}","merges_url":"https://api.github.com/repos/joomla/jissues/merges","archive_url":"https://api.github.com/repos/joomla/jissues/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/joomla/jissues/downloads","issues_url":"https://api.github.com/repos/joomla/jissues/issues{/number}","pulls_url":"https://api.github.com/repos/joomla/jissues/pulls{/number}","milestones_url":"https://api.github.com/repos/joomla/jissues/milestones{/number}","notifications_url":"https://api.github.com/repos/joomla/jissues/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/joomla/jissues/labels{/name}","releases_url":"https://api.github.com/repos/joomla/jissues/releases{/id}","deployments_url":"https://api.github.com/repos/joomla/jissues/deployments","created_at":"2012-10-06T02:12:43Z","updated_at":"2016-03-13T12:16:53Z","pushed_at":"2016-03-21T13:50:11Z","git_url":"git://github.com/joomla/jissues.git","ssh_url":"git@github.com:joomla/jissues.git","clone_url":"https://github.com/joomla/jissues.git","svn_url":"https://github.com/joomla/jissues","homepage":"","size":16867,"stargazers_count":56,"watchers_count":56,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":49,"mirror_url":null,"open_issues_count":39,"forks":49,"open_issues":39,"watchers":56,"default_branch":"master"}},"base":{"label":"joomla:master","ref":"master","sha":"e6a36a6ac3ff5e7d14665c990ff48ccd0fb534b1","user":{"login":"joomla","id":751633,"avatar_url":"https://avatars.githubusercontent.com/u/751633?v=3","gravatar_id":"","url":"https://api.github.com/users/joomla","html_url":"https://github.com/joomla","followers_url":"https://api.github.com/users/joomla/followers","following_url":"https://api.github.com/users/joomla/following{/other_user}","gists_url":"https://api.github.com/users/joomla/gists{/gist_id}","starred_url":"https://api.github.com/users/joomla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joomla/subscriptions","organizations_url":"https://api.github.com/users/joomla/orgs","repos_url":"https://api.github.com/users/joomla/repos","events_url":"https://api.github.com/users/joomla/events{/privacy}","received_events_url":"https://api.github.com/users/joomla/received_events","type":"Organization","site_admin":false},"repo":{"id":6099080,"name":"jissues","full_name":"joomla/jissues","owner":{"login":"joomla","id":751633,"avatar_url":"https://avatars.githubusercontent.com/u/751633?v=3","gravatar_id":"","url":"https://api.github.com/users/joomla","html_url":"https://github.com/joomla","followers_url":"https://api.github.com/users/joomla/followers","following_url":"https://api.github.com/users/joomla/following{/other_user}","gists_url":"https://api.github.com/users/joomla/gists{/gist_id}","starred_url":"https://api.github.com/users/joomla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joomla/subscriptions","organizations_url":"https://api.github.com/users/joomla/orgs","repos_url":"https://api.github.com/users/joomla/repos","events_url":"https://api.github.com/users/joomla/events{/privacy}","received_events_url":"https://api.github.com/users/joomla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/joomla/jissues","description":"Issue Tracking application integrating with GitHub to replace the existing Joomlacode solution.","fork":false,"url":"https://api.github.com/repos/joomla/jissues","forks_url":"https://api.github.com/repos/joomla/jissues/forks","keys_url":"https://api.github.com/repos/joomla/jissues/keys{/key_id}","collaborators_url":"https://api.github.com/repos/joomla/jissues/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/joomla/jissues/teams","hooks_url":"https://api.github.com/repos/joomla/jissues/hooks","issue_events_url":"https://api.github.com/repos/joomla/jissues/issues/events{/number}","events_url":"https://api.github.com/repos/joomla/jissues/events","assignees_url":"https://api.github.com/repos/joomla/jissues/assignees{/user}","branches_url":"https://api.github.com/repos/joomla/jissues/branches{/branch}","tags_url":"https://api.github.com/repos/joomla/jissues/tags","blobs_url":"https://api.github.com/repos/joomla/jissues/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/joomla/jissues/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/joomla/jissues/git/refs{/sha}","trees_url":"https://api.github.com/repos/joomla/jissues/git/trees{/sha}","statuses_url":"https://api.github.com/repos/joomla/jissues/statuses/{sha}","languages_url":"https://api.github.com/repos/joomla/jissues/languages","stargazers_url":"https://api.github.com/repos/joomla/jissues/stargazers","contributors_url":"https://api.github.com/repos/joomla/jissues/contributors","subscribers_url":"https://api.github.com/repos/joomla/jissues/subscribers","subscription_url":"https://api.github.com/repos/joomla/jissues/subscription","commits_url":"https://api.github.com/repos/joomla/jissues/commits{/sha}","git_commits_url":"https://api.github.com/repos/joomla/jissues/git/commits{/sha}","comments_url":"https://api.github.com/repos/joomla/jissues/comments{/number}","issue_comment_url":"https://api.github.com/repos/joomla/jissues/issues/comments{/number}","contents_url":"https://api.github.com/repos/joomla/jissues/contents/{+path}","compare_url":"https://api.github.com/repos/joomla/jissues/compare/{base}...{head}","merges_url":"https://api.github.com/repos/joomla/jissues/merges","archive_url":"https://api.github.com/repos/joomla/jissues/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/joomla/jissues/downloads","issues_url":"https://api.github.com/repos/joomla/jissues/issues{/number}","pulls_url":"https://api.github.com/repos/joomla/jissues/pulls{/number}","milestones_url":"https://api.github.com/repos/joomla/jissues/milestones{/number}","notifications_url":"https://api.github.com/repos/joomla/jissues/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/joomla/jissues/labels{/name}","releases_url":"https://api.github.com/repos/joomla/jissues/releases{/id}","deployments_url":"https://api.github.com/repos/joomla/jissues/deployments","created_at":"2012-10-06T02:12:43Z","updated_at":"2016-03-13T12:16:53Z","pushed_at":"2016-03-21T13:50:11Z","git_url":"git://github.com/joomla/jissues.git","ssh_url":"git@github.com:joomla/jissues.git","clone_url":"https://github.com/joomla/jissues.git","svn_url":"https://github.com/joomla/jissues","homepage":"","size":16867,"stargazers_count":56,"watchers_count":56,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":49,"mirror_url":null,"open_issues_count":39,"forks":49,"open_issues":39,"watchers":56,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/joomla/jissues/pulls/761"},"html":{"href":"https://github.com/joomla/jissues/pull/761"},"issue":{"href":"https://api.github.com/repos/joomla/jissues/issues/761"},"comments":{"href":"https://api.github.com/repos/joomla/jissues/issues/761/comments"},"review_comments":{"href":"https://api.github.com/repos/joomla/jissues/pulls/761/comments"},"review_comment":{"href":"https://api.github.com/repos/joomla/jissues/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/joomla/jissues/pulls/761/commits"},"statuses":{"href":"https://api.github.com/repos/joomla/jissues/statuses/34b22699dfbfff4dbb912839e710a62533332042"}}}}