{"action":"created","comment":{"url":"https://api.github.com/repos/openhatch/oh-mainline/pulls/comments/29393826","id":29393826,"diff_hunk":"@@ -0,0 +1,110 @@\n+//Parent API Wrapper for Client\n+var APIWrapper = function(id, link) {\n+\tthis._id = Number(id);\n+\tthis.link = link;\n+};\n+\n+APIWrapper.prototype.toString = function() {\n+\treturn this._id;\n+};\n+\n+//Github Wrapper\n+var GithubWrapper = function(id, link) {\n+\tAPIWrapper.call(this, id, link);\n+\n+\tvar linkArray = link.split(\"/\");\n+\tvar _this = this;\n+\n+\tthis.endpoint = 'https://api.github.com/repos/';\n+\tthis.user = linkArray[3];\n+\tthis.repo = linkArray[4];\n+\tthis.issue = linkArray[6];\n+\n+\tthis.executeAPI = function() {\n+\t\tvar URL = this.endpoint+this.user+\"/\"+this.repo;\n+\t\t$.get(URL, function(data){\n+\t\t\t_this.populateModal(data);\n+\t\t});\n+\t};\n+\n+\tthis.populateModal = function(data) {\n+\t\tconsole.log(data);","path":"mysite/static/js/search/apiWrapper.js","position":31,"original_position":31,"commit_id":"056d3f04d81a86aa38f4a512485a7a77f26924fd","original_commit_id":"056d3f04d81a86aa38f4a512485a7a77f26924fd","user":{"login":"albertyw","id":3151040,"avatar_url":"https://avatars.githubusercontent.com/u/3151040?v=3","gravatar_id":"","url":"https://api.github.com/users/albertyw","html_url":"https://github.com/albertyw","followers_url":"https://api.github.com/users/albertyw/followers","following_url":"https://api.github.com/users/albertyw/following{/other_user}","gists_url":"https://api.github.com/users/albertyw/gists{/gist_id}","starred_url":"https://api.github.com/users/albertyw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/albertyw/subscriptions","organizations_url":"https://api.github.com/users/albertyw/orgs","repos_url":"https://api.github.com/users/albertyw/repos","events_url":"https://api.github.com/users/albertyw/events{/privacy}","received_events_url":"https://api.github.com/users/albertyw/received_events","type":"User","site_admin":false},"body":"extra `console.log`?","created_at":"2015-04-29T23:59:12Z","updated_at":"2015-04-29T23:59:12Z","html_url":"https://github.com/openhatch/oh-mainline/pull/1636#discussion_r29393826","pull_request_url":"https://api.github.com/repos/openhatch/oh-mainline/pulls/1636","_links":{"self":{"href":"https://api.github.com/repos/openhatch/oh-mainline/pulls/comments/29393826"},"html":{"href":"https://github.com/openhatch/oh-mainline/pull/1636#discussion_r29393826"},"pull_request":{"href":"https://api.github.com/repos/openhatch/oh-mainline/pulls/1636"}}},"pull_request":{"url":"https://api.github.com/repos/openhatch/oh-mainline/pulls/1636","id":34111663,"html_url":"https://github.com/openhatch/oh-mainline/pull/1636","diff_url":"https://github.com/openhatch/oh-mainline/pull/1636.diff","patch_url":"https://github.com/openhatch/oh-mainline/pull/1636.patch","issue_url":"https://api.github.com/repos/openhatch/oh-mainline/issues/1636","number":1636,"state":"open","locked":false,"title":"Starting the client-side JS fetching of project data","user":{"login":"chums923","id":2695564,"avatar_url":"https://avatars.githubusercontent.com/u/2695564?v=3","gravatar_id":"","url":"https://api.github.com/users/chums923","html_url":"https://github.com/chums923","followers_url":"https://api.github.com/users/chums923/followers","following_url":"https://api.github.com/users/chums923/following{/other_user}","gists_url":"https://api.github.com/users/chums923/gists{/gist_id}","starred_url":"https://api.github.com/users/chums923/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chums923/subscriptions","organizations_url":"https://api.github.com/users/chums923/orgs","repos_url":"https://api.github.com/users/chums923/repos","events_url":"https://api.github.com/users/chums923/events{/privacy}","received_events_url":"https://api.github.com/users/chums923/received_events","type":"User","site_admin":false},"body":"Hi all\r\n\r\nSo I was a part of some brief discussion about including project data in the search results page. There was some good talk, but I thought things would be a little easier if I just got an MVP out there and we could talk about it. I decided to go with a purely client-side solution because it would require the least amount of tempering with the back-end, but that's definitely a route we can go down if people think it's better.\r\n\r\nTo check this out, search for anything basically. Then find a bug that is being tracked using the Github Issue Tracker. Expand that bug, then look for the \"See project data\" button right under the \"More about this project\" link. Click it to check out a modal that pops up with data gleaned from the Github API. It's pretty basic right now. But I wanted to get some feedback before I:\r\n\r\n   - Added more and cooler data from Github\r\n   - Added other issue trackers besides Github\r\n   - Clean up my code (but it's not unreadable at this point :) )\r\n   - Write tests (pretty trivial anyway)\r\n   - Optimize for API request limits\r\n   - Squash my commits\r\n\r\nHere's a screenshot of one example\r\n\r\n![image](https://cloud.githubusercontent.com/assets/2695564/7334421/f19c6472-eb5f-11e4-9381-ec10198daec5.png)\r\n\r\n\r\nFeel free to email me (chumbleya@gmail.com) if you have any questions/comments. Thanks!\r\n\r\n","created_at":"2015-04-25T19:30:48Z","updated_at":"2015-04-29T23:59:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f8bb6ed3bd5a4d2f0b50b5c1490dfd4917af8b46","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/openhatch/oh-mainline/pulls/1636/commits","review_comments_url":"https://api.github.com/repos/openhatch/oh-mainline/pulls/1636/comments","review_comment_url":"https://api.github.com/repos/openhatch/oh-mainline/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openhatch/oh-mainline/issues/1636/comments","statuses_url":"https://api.github.com/repos/openhatch/oh-mainline/statuses/056d3f04d81a86aa38f4a512485a7a77f26924fd","head":{"label":"chums923:dev","ref":"dev","sha":"056d3f04d81a86aa38f4a512485a7a77f26924fd","user":{"login":"chums923","id":2695564,"avatar_url":"https://avatars.githubusercontent.com/u/2695564?v=3","gravatar_id":"","url":"https://api.github.com/users/chums923","html_url":"https://github.com/chums923","followers_url":"https://api.github.com/users/chums923/followers","following_url":"https://api.github.com/users/chums923/following{/other_user}","gists_url":"https://api.github.com/users/chums923/gists{/gist_id}","starred_url":"https://api.github.com/users/chums923/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chums923/subscriptions","organizations_url":"https://api.github.com/users/chums923/orgs","repos_url":"https://api.github.com/users/chums923/repos","events_url":"https://api.github.com/users/chums923/events{/privacy}","received_events_url":"https://api.github.com/users/chums923/received_events","type":"User","site_admin":false},"repo":{"id":33563698,"name":"oh-mainline","full_name":"chums923/oh-mainline","owner":{"login":"chums923","id":2695564,"avatar_url":"https://avatars.githubusercontent.com/u/2695564?v=3","gravatar_id":"","url":"https://api.github.com/users/chums923","html_url":"https://github.com/chums923","followers_url":"https://api.github.com/users/chums923/followers","following_url":"https://api.github.com/users/chums923/following{/other_user}","gists_url":"https://api.github.com/users/chums923/gists{/gist_id}","starred_url":"https://api.github.com/users/chums923/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chums923/subscriptions","organizations_url":"https://api.github.com/users/chums923/orgs","repos_url":"https://api.github.com/users/chums923/repos","events_url":"https://api.github.com/users/chums923/events{/privacy}","received_events_url":"https://api.github.com/users/chums923/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/chums923/oh-mainline","description":"The code that runs openhatch.org","fork":true,"url":"https://api.github.com/repos/chums923/oh-mainline","forks_url":"https://api.github.com/repos/chums923/oh-mainline/forks","keys_url":"https://api.github.com/repos/chums923/oh-mainline/keys{/key_id}","collaborators_url":"https://api.github.com/repos/chums923/oh-mainline/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/chums923/oh-mainline/teams","hooks_url":"https://api.github.com/repos/chums923/oh-mainline/hooks","issue_events_url":"https://api.github.com/repos/chums923/oh-mainline/issues/events{/number}","events_url":"https://api.github.com/repos/chums923/oh-mainline/events","assignees_url":"https://api.github.com/repos/chums923/oh-mainline/assignees{/user}","branches_url":"https://api.github.com/repos/chums923/oh-mainline/branches{/branch}","tags_url":"https://api.github.com/repos/chums923/oh-mainline/tags","blobs_url":"https://api.github.com/repos/chums923/oh-mainline/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/chums923/oh-mainline/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/chums923/oh-mainline/git/refs{/sha}","trees_url":"https://api.github.com/repos/chums923/oh-mainline/git/trees{/sha}","statuses_url":"https://api.github.com/repos/chums923/oh-mainline/statuses/{sha}","languages_url":"https://api.github.com/repos/chums923/oh-mainline/languages","stargazers_url":"https://api.github.com/repos/chums923/oh-mainline/stargazers","contributors_url":"https://api.github.com/repos/chums923/oh-mainline/contributors","subscribers_url":"https://api.github.com/repos/chums923/oh-mainline/subscribers","subscription_url":"https://api.github.com/repos/chums923/oh-mainline/subscription","commits_url":"https://api.github.com/repos/chums923/oh-mainline/commits{/sha}","git_commits_url":"https://api.github.com/repos/chums923/oh-mainline/git/commits{/sha}","comments_url":"https://api.github.com/repos/chums923/oh-mainline/comments{/number}","issue_comment_url":"https://api.github.com/repos/chums923/oh-mainline/issues/comments{/number}","contents_url":"https://api.github.com/repos/chums923/oh-mainline/contents/{+path}","compare_url":"https://api.github.com/repos/chums923/oh-mainline/compare/{base}...{head}","merges_url":"https://api.github.com/repos/chums923/oh-mainline/merges","archive_url":"https://api.github.com/repos/chums923/oh-mainline/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/chums923/oh-mainline/downloads","issues_url":"https://api.github.com/repos/chums923/oh-mainline/issues{/number}","pulls_url":"https://api.github.com/repos/chums923/oh-mainline/pulls{/number}","milestones_url":"https://api.github.com/repos/chums923/oh-mainline/milestones{/number}","notifications_url":"https://api.github.com/repos/chums923/oh-mainline/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/chums923/oh-mainline/labels{/name}","releases_url":"https://api.github.com/repos/chums923/oh-mainline/releases{/id}","created_at":"2015-04-07T19:28:35Z","updated_at":"2015-04-18T21:58:34Z","pushed_at":"2015-04-25T19:23:25Z","git_url":"git://github.com/chums923/oh-mainline.git","ssh_url":"git@github.com:chums923/oh-mainline.git","clone_url":"https://github.com/chums923/oh-mainline.git","svn_url":"https://github.com/chums923/oh-mainline","homepage":"http://openhatch.org","size":93574,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"openhatch:master","ref":"master","sha":"63fbe1cdd5b775fda86ff44bcfea48c30440128a","user":{"login":"openhatch","id":1191811,"avatar_url":"https://avatars.githubusercontent.com/u/1191811?v=3","gravatar_id":"","url":"https://api.github.com/users/openhatch","html_url":"https://github.com/openhatch","followers_url":"https://api.github.com/users/openhatch/followers","following_url":"https://api.github.com/users/openhatch/following{/other_user}","gists_url":"https://api.github.com/users/openhatch/gists{/gist_id}","starred_url":"https://api.github.com/users/openhatch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openhatch/subscriptions","organizations_url":"https://api.github.com/users/openhatch/orgs","repos_url":"https://api.github.com/users/openhatch/repos","events_url":"https://api.github.com/users/openhatch/events{/privacy}","received_events_url":"https://api.github.com/users/openhatch/received_events","type":"Organization","site_admin":false},"repo":{"id":2776635,"name":"oh-mainline","full_name":"openhatch/oh-mainline","owner":{"login":"openhatch","id":1191811,"avatar_url":"https://avatars.githubusercontent.com/u/1191811?v=3","gravatar_id":"","url":"https://api.github.com/users/openhatch","html_url":"https://github.com/openhatch","followers_url":"https://api.github.com/users/openhatch/followers","following_url":"https://api.github.com/users/openhatch/following{/other_user}","gists_url":"https://api.github.com/users/openhatch/gists{/gist_id}","starred_url":"https://api.github.com/users/openhatch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openhatch/subscriptions","organizations_url":"https://api.github.com/users/openhatch/orgs","repos_url":"https://api.github.com/users/openhatch/repos","events_url":"https://api.github.com/users/openhatch/events{/privacy}","received_events_url":"https://api.github.com/users/openhatch/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openhatch/oh-mainline","description":"The code that runs openhatch.org","fork":false,"url":"https://api.github.com/repos/openhatch/oh-mainline","forks_url":"https://api.github.com/repos/openhatch/oh-mainline/forks","keys_url":"https://api.github.com/repos/openhatch/oh-mainline/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openhatch/oh-mainline/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openhatch/oh-mainline/teams","hooks_url":"https://api.github.com/repos/openhatch/oh-mainline/hooks","issue_events_url":"https://api.github.com/repos/openhatch/oh-mainline/issues/events{/number}","events_url":"https://api.github.com/repos/openhatch/oh-mainline/events","assignees_url":"https://api.github.com/repos/openhatch/oh-mainline/assignees{/user}","branches_url":"https://api.github.com/repos/openhatch/oh-mainline/branches{/branch}","tags_url":"https://api.github.com/repos/openhatch/oh-mainline/tags","blobs_url":"https://api.github.com/repos/openhatch/oh-mainline/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openhatch/oh-mainline/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openhatch/oh-mainline/git/refs{/sha}","trees_url":"https://api.github.com/repos/openhatch/oh-mainline/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openhatch/oh-mainline/statuses/{sha}","languages_url":"https://api.github.com/repos/openhatch/oh-mainline/languages","stargazers_url":"https://api.github.com/repos/openhatch/oh-mainline/stargazers","contributors_url":"https://api.github.com/repos/openhatch/oh-mainline/contributors","subscribers_url":"https://api.github.com/repos/openhatch/oh-mainline/subscribers","subscription_url":"https://api.github.com/repos/openhatch/oh-mainline/subscription","commits_url":"https://api.github.com/repos/openhatch/oh-mainline/commits{/sha}","git_commits_url":"https://api.github.com/repos/openhatch/oh-mainline/git/commits{/sha}","comments_url":"https://api.github.com/repos/openhatch/oh-mainline/comments{/number}","issue_comment_url":"https://api.github.com/repos/openhatch/oh-mainline/issues/comments{/number}","contents_url":"https://api.github.com/repos/openhatch/oh-mainline/contents/{+path}","compare_url":"https://api.github.com/repos/openhatch/oh-mainline/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openhatch/oh-mainline/merges","archive_url":"https://api.github.com/repos/openhatch/oh-mainline/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openhatch/oh-mainline/downloads","issues_url":"https://api.github.com/repos/openhatch/oh-mainline/issues{/number}","pulls_url":"https://api.github.com/repos/openhatch/oh-mainline/pulls{/number}","milestones_url":"https://api.github.com/repos/openhatch/oh-mainline/milestones{/number}","notifications_url":"https://api.github.com/repos/openhatch/oh-mainline/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openhatch/oh-mainline/labels{/name}","releases_url":"https://api.github.com/repos/openhatch/oh-mainline/releases{/id}","created_at":"2011-11-15T00:33:55Z","updated_at":"2015-04-29T06:21:50Z","pushed_at":"2015-04-29T15:27:52Z","git_url":"git://github.com/openhatch/oh-mainline.git","ssh_url":"git@github.com:openhatch/oh-mainline.git","clone_url":"https://github.com/openhatch/oh-mainline.git","svn_url":"https://github.com/openhatch/oh-mainline","homepage":"http://openhatch.org","size":98761,"stargazers_count":124,"watchers_count":124,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":229,"mirror_url":null,"open_issues_count":208,"forks":229,"open_issues":208,"watchers":124,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openhatch/oh-mainline/pulls/1636"},"html":{"href":"https://github.com/openhatch/oh-mainline/pull/1636"},"issue":{"href":"https://api.github.com/repos/openhatch/oh-mainline/issues/1636"},"comments":{"href":"https://api.github.com/repos/openhatch/oh-mainline/issues/1636/comments"},"review_comments":{"href":"https://api.github.com/repos/openhatch/oh-mainline/pulls/1636/comments"},"review_comment":{"href":"https://api.github.com/repos/openhatch/oh-mainline/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openhatch/oh-mainline/pulls/1636/commits"},"statuses":{"href":"https://api.github.com/repos/openhatch/oh-mainline/statuses/056d3f04d81a86aa38f4a512485a7a77f26924fd"}}}}