{"action":"created","comment":{"url":"https://api.github.com/repos/u-demo/Student-Feedback/pulls/comments/229859338","pull_request_review_id":170460481,"id":229859338,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyOTg1OTMzOA==","diff_hunk":"@@ -0,0 +1,121 @@\n+import React from 'react';\n+import ReactDOM from 'react-dom';\n+\n+import FeaturedReview from './components/FeaturedReview.jsx';\n+import ReviewList from './components/ReviewList.jsx';\n+import CourseSummary from './components/CourseSummary.jsx';\n+\n+class App extends React.Component {\n+  constructor(props) {\n+    super(props);\n+    this.state = {\n+      currentCourse: props.courseId,\n+      courseStats: {},\n+      featuredReview: {},\n+      reviews: [],\n+      reviewsFilteredBySearch: [],\n+      reviewsFilteredByRating: [],\n+      currentFilterRating: null,\n+      numOfReviewsToShow: 10,\n+    };\n+\n+    this.filterAndBoldBasedOnSearch = this.filterAndBoldBasedOnSearch.bind(this);\n+    this.filterOnRatingClick = this.filterOnRatingClick.bind(this);\n+    this.addTenReviews = this.addTenReviews.bind(this);\n+  }\n+\n+  componentDidMount() {\n+    this.getReviews(this.state.currentCourse);\n+  }\n+\n+  getReviews(courseId) {\n+    fetch(`${courseId}/reviews`)\n+      .then(rawData => (rawData.text()))\n+      .then((data) => {","path":"client/src/index.jsx","position":34,"original_position":34,"commit_id":"c8d13a7a158752adee13621c2cea79697e1b03d1","original_commit_id":"c8d13a7a158752adee13621c2cea79697e1b03d1","user":{"login":"aburkowsky9","id":38677277,"node_id":"MDQ6VXNlcjM4Njc3Mjc3","avatar_url":"https://avatars3.githubusercontent.com/u/38677277?v=4","gravatar_id":"","url":"https://api.github.com/users/aburkowsky9","html_url":"https://github.com/aburkowsky9","followers_url":"https://api.github.com/users/aburkowsky9/followers","following_url":"https://api.github.com/users/aburkowsky9/following{/other_user}","gists_url":"https://api.github.com/users/aburkowsky9/gists{/gist_id}","starred_url":"https://api.github.com/users/aburkowsky9/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aburkowsky9/subscriptions","organizations_url":"https://api.github.com/users/aburkowsky9/orgs","repos_url":"https://api.github.com/users/aburkowsky9/repos","events_url":"https://api.github.com/users/aburkowsky9/events{/privacy}","received_events_url":"https://api.github.com/users/aburkowsky9/received_events","type":"User","site_admin":false},"body":"You may want to add a catch for errors. An error message from the server does not automatically result in an error from the fetch promise propagation. You have to check the response.ok property then throw an error if it is false.","created_at":"2018-10-31T20:39:41Z","updated_at":"2018-10-31T20:53:58Z","html_url":"https://github.com/u-demo/Student-Feedback/pull/2#discussion_r229859338","pull_request_url":"https://api.github.com/repos/u-demo/Student-Feedback/pulls/2","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/u-demo/Student-Feedback/pulls/comments/229859338"},"html":{"href":"https://github.com/u-demo/Student-Feedback/pull/2#discussion_r229859338"},"pull_request":{"href":"https://api.github.com/repos/u-demo/Student-Feedback/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/u-demo/Student-Feedback/pulls/2","id":227146131,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI3MTQ2MTMx","html_url":"https://github.com/u-demo/Student-Feedback/pull/2","diff_url":"https://github.com/u-demo/Student-Feedback/pull/2.diff","patch_url":"https://github.com/u-demo/Student-Feedback/pull/2.patch","issue_url":"https://api.github.com/repos/u-demo/Student-Feedback/issues/2","number":2,"state":"open","locked":false,"title":"App component","user":{"login":"tarikbellamine","id":40568900,"node_id":"MDQ6VXNlcjQwNTY4OTAw","avatar_url":"https://avatars3.githubusercontent.com/u/40568900?v=4","gravatar_id":"","url":"https://api.github.com/users/tarikbellamine","html_url":"https://github.com/tarikbellamine","followers_url":"https://api.github.com/users/tarikbellamine/followers","following_url":"https://api.github.com/users/tarikbellamine/following{/other_user}","gists_url":"https://api.github.com/users/tarikbellamine/gists{/gist_id}","starred_url":"https://api.github.com/users/tarikbellamine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tarikbellamine/subscriptions","organizations_url":"https://api.github.com/users/tarikbellamine/orgs","repos_url":"https://api.github.com/users/tarikbellamine/repos","events_url":"https://api.github.com/users/tarikbellamine/events{/privacy}","received_events_url":"https://api.github.com/users/tarikbellamine/received_events","type":"User","site_admin":false},"body":"@aburkowsky9  can you please take a look?\r\n\r\nThere's a lot here but I think looking at the server files (index.js and serverModel.js) is a good place to start.\r\n\r\nIf you have time, some general comments on readability of app.jsx would be helpful.\r\n\r\nThanks!","created_at":"2018-10-31T03:15:37Z","updated_at":"2018-10-31T20:53:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"67c7acfb736757469309e6e6d5b6737a0a6dd849","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/u-demo/Student-Feedback/pulls/2/commits","review_comments_url":"https://api.github.com/repos/u-demo/Student-Feedback/pulls/2/comments","review_comment_url":"https://api.github.com/repos/u-demo/Student-Feedback/pulls/comments{/number}","comments_url":"https://api.github.com/repos/u-demo/Student-Feedback/issues/2/comments","statuses_url":"https://api.github.com/repos/u-demo/Student-Feedback/statuses/c8d13a7a158752adee13621c2cea79697e1b03d1","head":{"label":"u-demo:app-component","ref":"app-component","sha":"c8d13a7a158752adee13621c2cea79697e1b03d1","user":{"login":"u-demo","id":44418965,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ0NDE4OTY1","avatar_url":"https://avatars3.githubusercontent.com/u/44418965?v=4","gravatar_id":"","url":"https://api.github.com/users/u-demo","html_url":"https://github.com/u-demo","followers_url":"https://api.github.com/users/u-demo/followers","following_url":"https://api.github.com/users/u-demo/following{/other_user}","gists_url":"https://api.github.com/users/u-demo/gists{/gist_id}","starred_url":"https://api.github.com/users/u-demo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/u-demo/subscriptions","organizations_url":"https://api.github.com/users/u-demo/orgs","repos_url":"https://api.github.com/users/u-demo/repos","events_url":"https://api.github.com/users/u-demo/events{/privacy}","received_events_url":"https://api.github.com/users/u-demo/received_events","type":"Organization","site_admin":false},"repo":{"id":154419980,"node_id":"MDEwOlJlcG9zaXRvcnkxNTQ0MTk5ODA=","name":"Student-Feedback","full_name":"u-demo/Student-Feedback","private":false,"owner":{"login":"u-demo","id":44418965,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ0NDE4OTY1","avatar_url":"https://avatars3.githubusercontent.com/u/44418965?v=4","gravatar_id":"","url":"https://api.github.com/users/u-demo","html_url":"https://github.com/u-demo","followers_url":"https://api.github.com/users/u-demo/followers","following_url":"https://api.github.com/users/u-demo/following{/other_user}","gists_url":"https://api.github.com/users/u-demo/gists{/gist_id}","starred_url":"https://api.github.com/users/u-demo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/u-demo/subscriptions","organizations_url":"https://api.github.com/users/u-demo/orgs","repos_url":"https://api.github.com/users/u-demo/repos","events_url":"https://api.github.com/users/u-demo/events{/privacy}","received_events_url":"https://api.github.com/users/u-demo/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/u-demo/Student-Feedback","description":"Reviews module for Udemy","fork":false,"url":"https://api.github.com/repos/u-demo/Student-Feedback","forks_url":"https://api.github.com/repos/u-demo/Student-Feedback/forks","keys_url":"https://api.github.com/repos/u-demo/Student-Feedback/keys{/key_id}","collaborators_url":"https://api.github.com/repos/u-demo/Student-Feedback/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/u-demo/Student-Feedback/teams","hooks_url":"https://api.github.com/repos/u-demo/Student-Feedback/hooks","issue_events_url":"https://api.github.com/repos/u-demo/Student-Feedback/issues/events{/number}","events_url":"https://api.github.com/repos/u-demo/Student-Feedback/events","assignees_url":"https://api.github.com/repos/u-demo/Student-Feedback/assignees{/user}","branches_url":"https://api.github.com/repos/u-demo/Student-Feedback/branches{/branch}","tags_url":"https://api.github.com/repos/u-demo/Student-Feedback/tags","blobs_url":"https://api.github.com/repos/u-demo/Student-Feedback/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/u-demo/Student-Feedback/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/u-demo/Student-Feedback/git/refs{/sha}","trees_url":"https://api.github.com/repos/u-demo/Student-Feedback/git/trees{/sha}","statuses_url":"https://api.github.com/repos/u-demo/Student-Feedback/statuses/{sha}","languages_url":"https://api.github.com/repos/u-demo/Student-Feedback/languages","stargazers_url":"https://api.github.com/repos/u-demo/Student-Feedback/stargazers","contributors_url":"https://api.github.com/repos/u-demo/Student-Feedback/contributors","subscribers_url":"https://api.github.com/repos/u-demo/Student-Feedback/subscribers","subscription_url":"https://api.github.com/repos/u-demo/Student-Feedback/subscription","commits_url":"https://api.github.com/repos/u-demo/Student-Feedback/commits{/sha}","git_commits_url":"https://api.github.com/repos/u-demo/Student-Feedback/git/commits{/sha}","comments_url":"https://api.github.com/repos/u-demo/Student-Feedback/comments{/number}","issue_comment_url":"https://api.github.com/repos/u-demo/Student-Feedback/issues/comments{/number}","contents_url":"https://api.github.com/repos/u-demo/Student-Feedback/contents/{+path}","compare_url":"https://api.github.com/repos/u-demo/Student-Feedback/compare/{base}...{head}","merges_url":"https://api.github.com/repos/u-demo/Student-Feedback/merges","archive_url":"https://api.github.com/repos/u-demo/Student-Feedback/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/u-demo/Student-Feedback/downloads","issues_url":"https://api.github.com/repos/u-demo/Student-Feedback/issues{/number}","pulls_url":"https://api.github.com/repos/u-demo/Student-Feedback/pulls{/number}","milestones_url":"https://api.github.com/repos/u-demo/Student-Feedback/milestones{/number}","notifications_url":"https://api.github.com/repos/u-demo/Student-Feedback/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/u-demo/Student-Feedback/labels{/name}","releases_url":"https://api.github.com/repos/u-demo/Student-Feedback/releases{/id}","deployments_url":"https://api.github.com/repos/u-demo/Student-Feedback/deployments","created_at":"2018-10-24T01:29:19Z","updated_at":"2018-10-26T02:57:51Z","pushed_at":"2018-10-31T19:45:05Z","git_url":"git://github.com/u-demo/Student-Feedback.git","ssh_url":"git@github.com:u-demo/Student-Feedback.git","clone_url":"https://github.com/u-demo/Student-Feedback.git","svn_url":"https://github.com/u-demo/Student-Feedback","homepage":null,"size":25131,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"u-demo:master","ref":"master","sha":"32976e44961ff1b78e14ff6adfa2c376d5107752","user":{"login":"u-demo","id":44418965,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ0NDE4OTY1","avatar_url":"https://avatars3.githubusercontent.com/u/44418965?v=4","gravatar_id":"","url":"https://api.github.com/users/u-demo","html_url":"https://github.com/u-demo","followers_url":"https://api.github.com/users/u-demo/followers","following_url":"https://api.github.com/users/u-demo/following{/other_user}","gists_url":"https://api.github.com/users/u-demo/gists{/gist_id}","starred_url":"https://api.github.com/users/u-demo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/u-demo/subscriptions","organizations_url":"https://api.github.com/users/u-demo/orgs","repos_url":"https://api.github.com/users/u-demo/repos","events_url":"https://api.github.com/users/u-demo/events{/privacy}","received_events_url":"https://api.github.com/users/u-demo/received_events","type":"Organization","site_admin":false},"repo":{"id":154419980,"node_id":"MDEwOlJlcG9zaXRvcnkxNTQ0MTk5ODA=","name":"Student-Feedback","full_name":"u-demo/Student-Feedback","private":false,"owner":{"login":"u-demo","id":44418965,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ0NDE4OTY1","avatar_url":"https://avatars3.githubusercontent.com/u/44418965?v=4","gravatar_id":"","url":"https://api.github.com/users/u-demo","html_url":"https://github.com/u-demo","followers_url":"https://api.github.com/users/u-demo/followers","following_url":"https://api.github.com/users/u-demo/following{/other_user}","gists_url":"https://api.github.com/users/u-demo/gists{/gist_id}","starred_url":"https://api.github.com/users/u-demo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/u-demo/subscriptions","organizations_url":"https://api.github.com/users/u-demo/orgs","repos_url":"https://api.github.com/users/u-demo/repos","events_url":"https://api.github.com/users/u-demo/events{/privacy}","received_events_url":"https://api.github.com/users/u-demo/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/u-demo/Student-Feedback","description":"Reviews module for Udemy","fork":false,"url":"https://api.github.com/repos/u-demo/Student-Feedback","forks_url":"https://api.github.com/repos/u-demo/Student-Feedback/forks","keys_url":"https://api.github.com/repos/u-demo/Student-Feedback/keys{/key_id}","collaborators_url":"https://api.github.com/repos/u-demo/Student-Feedback/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/u-demo/Student-Feedback/teams","hooks_url":"https://api.github.com/repos/u-demo/Student-Feedback/hooks","issue_events_url":"https://api.github.com/repos/u-demo/Student-Feedback/issues/events{/number}","events_url":"https://api.github.com/repos/u-demo/Student-Feedback/events","assignees_url":"https://api.github.com/repos/u-demo/Student-Feedback/assignees{/user}","branches_url":"https://api.github.com/repos/u-demo/Student-Feedback/branches{/branch}","tags_url":"https://api.github.com/repos/u-demo/Student-Feedback/tags","blobs_url":"https://api.github.com/repos/u-demo/Student-Feedback/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/u-demo/Student-Feedback/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/u-demo/Student-Feedback/git/refs{/sha}","trees_url":"https://api.github.com/repos/u-demo/Student-Feedback/git/trees{/sha}","statuses_url":"https://api.github.com/repos/u-demo/Student-Feedback/statuses/{sha}","languages_url":"https://api.github.com/repos/u-demo/Student-Feedback/languages","stargazers_url":"https://api.github.com/repos/u-demo/Student-Feedback/stargazers","contributors_url":"https://api.github.com/repos/u-demo/Student-Feedback/contributors","subscribers_url":"https://api.github.com/repos/u-demo/Student-Feedback/subscribers","subscription_url":"https://api.github.com/repos/u-demo/Student-Feedback/subscription","commits_url":"https://api.github.com/repos/u-demo/Student-Feedback/commits{/sha}","git_commits_url":"https://api.github.com/repos/u-demo/Student-Feedback/git/commits{/sha}","comments_url":"https://api.github.com/repos/u-demo/Student-Feedback/comments{/number}","issue_comment_url":"https://api.github.com/repos/u-demo/Student-Feedback/issues/comments{/number}","contents_url":"https://api.github.com/repos/u-demo/Student-Feedback/contents/{+path}","compare_url":"https://api.github.com/repos/u-demo/Student-Feedback/compare/{base}...{head}","merges_url":"https://api.github.com/repos/u-demo/Student-Feedback/merges","archive_url":"https://api.github.com/repos/u-demo/Student-Feedback/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/u-demo/Student-Feedback/downloads","issues_url":"https://api.github.com/repos/u-demo/Student-Feedback/issues{/number}","pulls_url":"https://api.github.com/repos/u-demo/Student-Feedback/pulls{/number}","milestones_url":"https://api.github.com/repos/u-demo/Student-Feedback/milestones{/number}","notifications_url":"https://api.github.com/repos/u-demo/Student-Feedback/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/u-demo/Student-Feedback/labels{/name}","releases_url":"https://api.github.com/repos/u-demo/Student-Feedback/releases{/id}","deployments_url":"https://api.github.com/repos/u-demo/Student-Feedback/deployments","created_at":"2018-10-24T01:29:19Z","updated_at":"2018-10-26T02:57:51Z","pushed_at":"2018-10-31T19:45:05Z","git_url":"git://github.com/u-demo/Student-Feedback.git","ssh_url":"git@github.com:u-demo/Student-Feedback.git","clone_url":"https://github.com/u-demo/Student-Feedback.git","svn_url":"https://github.com/u-demo/Student-Feedback","homepage":null,"size":25131,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/u-demo/Student-Feedback/pulls/2"},"html":{"href":"https://github.com/u-demo/Student-Feedback/pull/2"},"issue":{"href":"https://api.github.com/repos/u-demo/Student-Feedback/issues/2"},"comments":{"href":"https://api.github.com/repos/u-demo/Student-Feedback/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/u-demo/Student-Feedback/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/u-demo/Student-Feedback/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/u-demo/Student-Feedback/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/u-demo/Student-Feedback/statuses/c8d13a7a158752adee13621c2cea79697e1b03d1"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"aburkowsky9"}}