{"action":"created","comment":{"url":"https://api.github.com/repos/RIKSOF/node-review-ninja/pulls/comments/61679009","id":61679009,"diff_hunk":"@@ -208,5 +208,55 @@ github.getContent = function( u, path, commit_id, callback ) {\n   });\n };\n \n+\n+/**\n+ * Function gets all the comments on a pull request.\n+ *\n+ * @param {string} u            URL of the pull request.\n+ * @param {function} callback   Callback function once response is received.\n+ *\n+ * @returns {undefined}\n+ */\n+github.getComments = function GithubGetComments( u, callback ) {\n+  // Our logger for logging to file and console\n+  var logger = require( __dirname + '/../services/Logger' );\n+  var url = require('url');\n+  var decoded = url.parse( u );\n+  var values = decoded.path.split( '/' );\n+  var page = 1;\n+  var perPage = 100;\n+  var allComments = [];\n+  \n+  // Function for making requests for comments.\n+  var getCommentsForPage = function GithubGetCommentsPage( ) {\n+    github.api.pullRequests.getComments({\n+      user: values[1],\n+      repo: values[2],\n+      number: values[4],\n+      page: page,\n+      per_page: perPage\n+    }, function( err, res ) {\n+      \n+      if ( err ) {\n+        logger.error( err );\n+      } else {\n+        var temp = eval( res );","path":"services/GitHub.js","position":36,"original_position":36,"commit_id":"722ea51490e6f0629c08857027cbcc19ff74e8a9","original_commit_id":"722ea51490e6f0629c08857027cbcc19ff74e8a9","user":{"login":"mkhurramali","id":1565155,"avatar_url":"https://avatars.githubusercontent.com/u/1565155?v=3","gravatar_id":"","url":"https://api.github.com/users/mkhurramali","html_url":"https://github.com/mkhurramali","followers_url":"https://api.github.com/users/mkhurramali/followers","following_url":"https://api.github.com/users/mkhurramali/following{/other_user}","gists_url":"https://api.github.com/users/mkhurramali/gists{/gist_id}","starred_url":"https://api.github.com/users/mkhurramali/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkhurramali/subscriptions","organizations_url":"https://api.github.com/users/mkhurramali/orgs","repos_url":"https://api.github.com/users/mkhurramali/repos","events_url":"https://api.github.com/users/mkhurramali/events{/privacy}","received_events_url":"https://api.github.com/users/mkhurramali/received_events","type":"User","site_admin":false},"body":"eval can be harmful.\n```javascript\n        var temp = eval( res );\n```","created_at":"2016-05-01T03:50:14Z","updated_at":"2016-05-01T03:50:14Z","html_url":"https://github.com/RIKSOF/node-review-ninja/pull/6#discussion_r61679009","pull_request_url":"https://api.github.com/repos/RIKSOF/node-review-ninja/pulls/6","_links":{"self":{"href":"https://api.github.com/repos/RIKSOF/node-review-ninja/pulls/comments/61679009"},"html":{"href":"https://github.com/RIKSOF/node-review-ninja/pull/6#discussion_r61679009"},"pull_request":{"href":"https://api.github.com/repos/RIKSOF/node-review-ninja/pulls/6"}}},"pull_request":{"url":"https://api.github.com/repos/RIKSOF/node-review-ninja/pulls/6","id":68369730,"html_url":"https://github.com/RIKSOF/node-review-ninja/pull/6","diff_url":"https://github.com/RIKSOF/node-review-ninja/pull/6.diff","patch_url":"https://github.com/RIKSOF/node-review-ninja/pull/6.patch","issue_url":"https://api.github.com/repos/RIKSOF/node-review-ninja/issues/6","number":6,"state":"open","locked":false,"title":"Feaure/swift","user":{"login":"mkhurramali","id":1565155,"avatar_url":"https://avatars.githubusercontent.com/u/1565155?v=3","gravatar_id":"","url":"https://api.github.com/users/mkhurramali","html_url":"https://github.com/mkhurramali","followers_url":"https://api.github.com/users/mkhurramali/followers","following_url":"https://api.github.com/users/mkhurramali/following{/other_user}","gists_url":"https://api.github.com/users/mkhurramali/gists{/gist_id}","starred_url":"https://api.github.com/users/mkhurramali/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkhurramali/subscriptions","organizations_url":"https://api.github.com/users/mkhurramali/orgs","repos_url":"https://api.github.com/users/mkhurramali/repos","events_url":"https://api.github.com/users/mkhurramali/events{/privacy}","received_events_url":"https://api.github.com/users/mkhurramali/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-04-29T13:17:02Z","updated_at":"2016-05-01T03:50:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8cca9ff1d08c902450cdb14575c37794371293c0","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/RIKSOF/node-review-ninja/pulls/6/commits","review_comments_url":"https://api.github.com/repos/RIKSOF/node-review-ninja/pulls/6/comments","review_comment_url":"https://api.github.com/repos/RIKSOF/node-review-ninja/pulls/comments{/number}","comments_url":"https://api.github.com/repos/RIKSOF/node-review-ninja/issues/6/comments","statuses_url":"https://api.github.com/repos/RIKSOF/node-review-ninja/statuses/722ea51490e6f0629c08857027cbcc19ff74e8a9","head":{"label":"RIKSOF:feaure/swift","ref":"feaure/swift","sha":"722ea51490e6f0629c08857027cbcc19ff74e8a9","user":{"login":"RIKSOF","id":1582310,"avatar_url":"https://avatars.githubusercontent.com/u/1582310?v=3","gravatar_id":"","url":"https://api.github.com/users/RIKSOF","html_url":"https://github.com/RIKSOF","followers_url":"https://api.github.com/users/RIKSOF/followers","following_url":"https://api.github.com/users/RIKSOF/following{/other_user}","gists_url":"https://api.github.com/users/RIKSOF/gists{/gist_id}","starred_url":"https://api.github.com/users/RIKSOF/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RIKSOF/subscriptions","organizations_url":"https://api.github.com/users/RIKSOF/orgs","repos_url":"https://api.github.com/users/RIKSOF/repos","events_url":"https://api.github.com/users/RIKSOF/events{/privacy}","received_events_url":"https://api.github.com/users/RIKSOF/received_events","type":"Organization","site_admin":false},"repo":{"id":56207570,"name":"node-review-ninja","full_name":"RIKSOF/node-review-ninja","owner":{"login":"RIKSOF","id":1582310,"avatar_url":"https://avatars.githubusercontent.com/u/1582310?v=3","gravatar_id":"","url":"https://api.github.com/users/RIKSOF","html_url":"https://github.com/RIKSOF","followers_url":"https://api.github.com/users/RIKSOF/followers","following_url":"https://api.github.com/users/RIKSOF/following{/other_user}","gists_url":"https://api.github.com/users/RIKSOF/gists{/gist_id}","starred_url":"https://api.github.com/users/RIKSOF/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RIKSOF/subscriptions","organizations_url":"https://api.github.com/users/RIKSOF/orgs","repos_url":"https://api.github.com/users/RIKSOF/repos","events_url":"https://api.github.com/users/RIKSOF/events{/privacy}","received_events_url":"https://api.github.com/users/RIKSOF/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/RIKSOF/node-review-ninja","description":"Review pull requests. Integrates with GitHub, Slack and Trello.","fork":false,"url":"https://api.github.com/repos/RIKSOF/node-review-ninja","forks_url":"https://api.github.com/repos/RIKSOF/node-review-ninja/forks","keys_url":"https://api.github.com/repos/RIKSOF/node-review-ninja/keys{/key_id}","collaborators_url":"https://api.github.com/repos/RIKSOF/node-review-ninja/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/RIKSOF/node-review-ninja/teams","hooks_url":"https://api.github.com/repos/RIKSOF/node-review-ninja/hooks","issue_events_url":"https://api.github.com/repos/RIKSOF/node-review-ninja/issues/events{/number}","events_url":"https://api.github.com/repos/RIKSOF/node-review-ninja/events","assignees_url":"https://api.github.com/repos/RIKSOF/node-review-ninja/assignees{/user}","branches_url":"https://api.github.com/repos/RIKSOF/node-review-ninja/branches{/branch}","tags_url":"https://api.github.com/repos/RIKSOF/node-review-ninja/tags","blobs_url":"https://api.github.com/repos/RIKSOF/node-review-ninja/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/RIKSOF/node-review-ninja/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/RIKSOF/node-review-ninja/git/refs{/sha}","trees_url":"https://api.github.com/repos/RIKSOF/node-review-ninja/git/trees{/sha}","statuses_url":"https://api.github.com/repos/RIKSOF/node-review-ninja/statuses/{sha}","languages_url":"https://api.github.com/repos/RIKSOF/node-review-ninja/languages","stargazers_url":"https://api.github.com/repos/RIKSOF/node-review-ninja/stargazers","contributors_url":"https://api.github.com/repos/RIKSOF/node-review-ninja/contributors","subscribers_url":"https://api.github.com/repos/RIKSOF/node-review-ninja/subscribers","subscription_url":"https://api.github.com/repos/RIKSOF/node-review-ninja/subscription","commits_url":"https://api.github.com/repos/RIKSOF/node-review-ninja/commits{/sha}","git_commits_url":"https://api.github.com/repos/RIKSOF/node-review-ninja/git/commits{/sha}","comments_url":"https://api.github.com/repos/RIKSOF/node-review-ninja/comments{/number}","issue_comment_url":"https://api.github.com/repos/RIKSOF/node-review-ninja/issues/comments{/number}","contents_url":"https://api.github.com/repos/RIKSOF/node-review-ninja/contents/{+path}","compare_url":"https://api.github.com/repos/RIKSOF/node-review-ninja/compare/{base}...{head}","merges_url":"https://api.github.com/repos/RIKSOF/node-review-ninja/merges","archive_url":"https://api.github.com/repos/RIKSOF/node-review-ninja/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/RIKSOF/node-review-ninja/downloads","issues_url":"https://api.github.com/repos/RIKSOF/node-review-ninja/issues{/number}","pulls_url":"https://api.github.com/repos/RIKSOF/node-review-ninja/pulls{/number}","milestones_url":"https://api.github.com/repos/RIKSOF/node-review-ninja/milestones{/number}","notifications_url":"https://api.github.com/repos/RIKSOF/node-review-ninja/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/RIKSOF/node-review-ninja/labels{/name}","releases_url":"https://api.github.com/repos/RIKSOF/node-review-ninja/releases{/id}","deployments_url":"https://api.github.com/repos/RIKSOF/node-review-ninja/deployments","created_at":"2016-04-14T04:38:02Z","updated_at":"2016-04-14T05:11:51Z","pushed_at":"2016-05-01T03:48:33Z","git_url":"git://github.com/RIKSOF/node-review-ninja.git","ssh_url":"git@github.com:RIKSOF/node-review-ninja.git","clone_url":"https://github.com/RIKSOF/node-review-ninja.git","svn_url":"https://github.com/RIKSOF/node-review-ninja","homepage":null,"size":4687,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"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":"RIKSOF:master","ref":"master","sha":"53459da8c21aef64943d188423fa058cb67ddc49","user":{"login":"RIKSOF","id":1582310,"avatar_url":"https://avatars.githubusercontent.com/u/1582310?v=3","gravatar_id":"","url":"https://api.github.com/users/RIKSOF","html_url":"https://github.com/RIKSOF","followers_url":"https://api.github.com/users/RIKSOF/followers","following_url":"https://api.github.com/users/RIKSOF/following{/other_user}","gists_url":"https://api.github.com/users/RIKSOF/gists{/gist_id}","starred_url":"https://api.github.com/users/RIKSOF/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RIKSOF/subscriptions","organizations_url":"https://api.github.com/users/RIKSOF/orgs","repos_url":"https://api.github.com/users/RIKSOF/repos","events_url":"https://api.github.com/users/RIKSOF/events{/privacy}","received_events_url":"https://api.github.com/users/RIKSOF/received_events","type":"Organization","site_admin":false},"repo":{"id":56207570,"name":"node-review-ninja","full_name":"RIKSOF/node-review-ninja","owner":{"login":"RIKSOF","id":1582310,"avatar_url":"https://avatars.githubusercontent.com/u/1582310?v=3","gravatar_id":"","url":"https://api.github.com/users/RIKSOF","html_url":"https://github.com/RIKSOF","followers_url":"https://api.github.com/users/RIKSOF/followers","following_url":"https://api.github.com/users/RIKSOF/following{/other_user}","gists_url":"https://api.github.com/users/RIKSOF/gists{/gist_id}","starred_url":"https://api.github.com/users/RIKSOF/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RIKSOF/subscriptions","organizations_url":"https://api.github.com/users/RIKSOF/orgs","repos_url":"https://api.github.com/users/RIKSOF/repos","events_url":"https://api.github.com/users/RIKSOF/events{/privacy}","received_events_url":"https://api.github.com/users/RIKSOF/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/RIKSOF/node-review-ninja","description":"Review pull requests. Integrates with GitHub, Slack and Trello.","fork":false,"url":"https://api.github.com/repos/RIKSOF/node-review-ninja","forks_url":"https://api.github.com/repos/RIKSOF/node-review-ninja/forks","keys_url":"https://api.github.com/repos/RIKSOF/node-review-ninja/keys{/key_id}","collaborators_url":"https://api.github.com/repos/RIKSOF/node-review-ninja/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/RIKSOF/node-review-ninja/teams","hooks_url":"https://api.github.com/repos/RIKSOF/node-review-ninja/hooks","issue_events_url":"https://api.github.com/repos/RIKSOF/node-review-ninja/issues/events{/number}","events_url":"https://api.github.com/repos/RIKSOF/node-review-ninja/events","assignees_url":"https://api.github.com/repos/RIKSOF/node-review-ninja/assignees{/user}","branches_url":"https://api.github.com/repos/RIKSOF/node-review-ninja/branches{/branch}","tags_url":"https://api.github.com/repos/RIKSOF/node-review-ninja/tags","blobs_url":"https://api.github.com/repos/RIKSOF/node-review-ninja/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/RIKSOF/node-review-ninja/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/RIKSOF/node-review-ninja/git/refs{/sha}","trees_url":"https://api.github.com/repos/RIKSOF/node-review-ninja/git/trees{/sha}","statuses_url":"https://api.github.com/repos/RIKSOF/node-review-ninja/statuses/{sha}","languages_url":"https://api.github.com/repos/RIKSOF/node-review-ninja/languages","stargazers_url":"https://api.github.com/repos/RIKSOF/node-review-ninja/stargazers","contributors_url":"https://api.github.com/repos/RIKSOF/node-review-ninja/contributors","subscribers_url":"https://api.github.com/repos/RIKSOF/node-review-ninja/subscribers","subscription_url":"https://api.github.com/repos/RIKSOF/node-review-ninja/subscription","commits_url":"https://api.github.com/repos/RIKSOF/node-review-ninja/commits{/sha}","git_commits_url":"https://api.github.com/repos/RIKSOF/node-review-ninja/git/commits{/sha}","comments_url":"https://api.github.com/repos/RIKSOF/node-review-ninja/comments{/number}","issue_comment_url":"https://api.github.com/repos/RIKSOF/node-review-ninja/issues/comments{/number}","contents_url":"https://api.github.com/repos/RIKSOF/node-review-ninja/contents/{+path}","compare_url":"https://api.github.com/repos/RIKSOF/node-review-ninja/compare/{base}...{head}","merges_url":"https://api.github.com/repos/RIKSOF/node-review-ninja/merges","archive_url":"https://api.github.com/repos/RIKSOF/node-review-ninja/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/RIKSOF/node-review-ninja/downloads","issues_url":"https://api.github.com/repos/RIKSOF/node-review-ninja/issues{/number}","pulls_url":"https://api.github.com/repos/RIKSOF/node-review-ninja/pulls{/number}","milestones_url":"https://api.github.com/repos/RIKSOF/node-review-ninja/milestones{/number}","notifications_url":"https://api.github.com/repos/RIKSOF/node-review-ninja/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/RIKSOF/node-review-ninja/labels{/name}","releases_url":"https://api.github.com/repos/RIKSOF/node-review-ninja/releases{/id}","deployments_url":"https://api.github.com/repos/RIKSOF/node-review-ninja/deployments","created_at":"2016-04-14T04:38:02Z","updated_at":"2016-04-14T05:11:51Z","pushed_at":"2016-05-01T03:48:33Z","git_url":"git://github.com/RIKSOF/node-review-ninja.git","ssh_url":"git@github.com:RIKSOF/node-review-ninja.git","clone_url":"https://github.com/RIKSOF/node-review-ninja.git","svn_url":"https://github.com/RIKSOF/node-review-ninja","homepage":null,"size":4687,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/RIKSOF/node-review-ninja/pulls/6"},"html":{"href":"https://github.com/RIKSOF/node-review-ninja/pull/6"},"issue":{"href":"https://api.github.com/repos/RIKSOF/node-review-ninja/issues/6"},"comments":{"href":"https://api.github.com/repos/RIKSOF/node-review-ninja/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/RIKSOF/node-review-ninja/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/RIKSOF/node-review-ninja/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/RIKSOF/node-review-ninja/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/RIKSOF/node-review-ninja/statuses/722ea51490e6f0629c08857027cbcc19ff74e8a9"}}}}