{"action":"created","comment":{"url":"https://api.github.com/repos/ironhack-labs/lab-javascript-all-times-movies/pulls/comments/222042392","pull_request_review_id":160835620,"id":222042392,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMjA0MjM5Mg==","diff_hunk":"@@ -1,20 +1,61 @@\n /* eslint no-restricted-globals: 'off' */\n // Turn duration of the movies from hours to minutes \n-\n+function turnHoursToMinutes (duration) {\n+    var duration2=duration.split(\" \");\n+    var durationTotal=0;\n+    \n+    if (duration2.length===1) {\n+    durationTotal+=parseInt(duration2[0]);\n+    return durationTotal;\n+    } else {\n+    var durationHour=parseInt(duration2[0]);\n+    var durationMin=parseInt(duration2[1]);\n+    var durationTotal=(durationHour*60)+durationMin;\n+    }\n+    return durationTotal;\n+  }\n \n // Get the average of all rates with 2 decimals \n-\n+// Don't understand the tips \"Maybe you want to \"reduce\" the data to a single value\"\n+function ratesAverage (array) {\n+    var calculAverage = 0;\n+    var average = array.map(function (movie) {\n+        calculAverage +=parseFloat(movie.rate);\n+    });\n+    return calculAverage / array.length;\n+}\n \n // Get the average of Drama Movies\n-\n+function dramaMoviesRate (array) {\n+    var dramaMovies = array.filter(function(movie) {\n+        return movie.genre.includes(\"Drama\");\n+    });\n+    return ratesAverage(dramaMovies);\n+}\n \n // Order by time duration, in growing order\n-\n+function orderByDuration (array) {\n+    var order = array.sort(function (a, b) {\n+        if (a.duration !== b.duration) {\n+            return a.duration - b.duration;\n+        }\n+    });\n+    return order;\n+}","path":"starter_code/src/movies.js","position":48,"original_position":48,"commit_id":"ab22f98a9b08dabc270a0a687f1387e483b59b2e","original_commit_id":"ab22f98a9b08dabc270a0a687f1387e483b59b2e","user":{"login":"ta-webpt-par","id":43618249,"node_id":"MDQ6VXNlcjQzNjE4MjQ5","avatar_url":"https://avatars1.githubusercontent.com/u/43618249?v=4","gravatar_id":"","url":"https://api.github.com/users/ta-webpt-par","html_url":"https://github.com/ta-webpt-par","followers_url":"https://api.github.com/users/ta-webpt-par/followers","following_url":"https://api.github.com/users/ta-webpt-par/following{/other_user}","gists_url":"https://api.github.com/users/ta-webpt-par/gists{/gist_id}","starred_url":"https://api.github.com/users/ta-webpt-par/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ta-webpt-par/subscriptions","organizations_url":"https://api.github.com/users/ta-webpt-par/orgs","repos_url":"https://api.github.com/users/ta-webpt-par/repos","events_url":"https://api.github.com/users/ta-webpt-par/events{/privacy}","received_events_url":"https://api.github.com/users/ta-webpt-par/received_events","type":"User","site_admin":false},"body":"You need to be able to order the movies alphabetically by their title if they have the same duration.","created_at":"2018-10-02T17:29:04Z","updated_at":"2018-10-02T17:33:18Z","html_url":"https://github.com/ironhack-labs/lab-javascript-all-times-movies/pull/291#discussion_r222042392","pull_request_url":"https://api.github.com/repos/ironhack-labs/lab-javascript-all-times-movies/pulls/291","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/ironhack-labs/lab-javascript-all-times-movies/pulls/comments/222042392"},"html":{"href":"https://github.com/ironhack-labs/lab-javascript-all-times-movies/pull/291#discussion_r222042392"},"pull_request":{"href":"https://api.github.com/repos/ironhack-labs/lab-javascript-all-times-movies/pulls/291"}}},"pull_request":{"url":"https://api.github.com/repos/ironhack-labs/lab-javascript-all-times-movies/pulls/291","id":219772632,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE5NzcyNjMy","html_url":"https://github.com/ironhack-labs/lab-javascript-all-times-movies/pull/291","diff_url":"https://github.com/ironhack-labs/lab-javascript-all-times-movies/pull/291.diff","patch_url":"https://github.com/ironhack-labs/lab-javascript-all-times-movies/pull/291.patch","issue_url":"https://api.github.com/repos/ironhack-labs/lab-javascript-all-times-movies/issues/291","number":291,"state":"open","locked":false,"title":"[PAR-PT] Elodie","user":{"login":"EloK6","id":15072992,"node_id":"MDQ6VXNlcjE1MDcyOTky","avatar_url":"https://avatars2.githubusercontent.com/u/15072992?v=4","gravatar_id":"","url":"https://api.github.com/users/EloK6","html_url":"https://github.com/EloK6","followers_url":"https://api.github.com/users/EloK6/followers","following_url":"https://api.github.com/users/EloK6/following{/other_user}","gists_url":"https://api.github.com/users/EloK6/gists{/gist_id}","starred_url":"https://api.github.com/users/EloK6/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EloK6/subscriptions","organizations_url":"https://api.github.com/users/EloK6/orgs","repos_url":"https://api.github.com/users/EloK6/repos","events_url":"https://api.github.com/users/EloK6/events{/privacy}","received_events_url":"https://api.github.com/users/EloK6/received_events","type":"User","site_admin":false},"body":"WIP\r\n@ta-webpt-par ","created_at":"2018-10-02T16:47:09Z","updated_at":"2018-10-02T17:33:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ffd673384559ee83b5e4ab48b1cff6ddfcd54cb3","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ironhack-labs/lab-javascript-all-times-movies/pulls/291/commits","review_comments_url":"https://api.github.com/repos/ironhack-labs/lab-javascript-all-times-movies/pulls/291/comments","review_comment_url":"https://api.github.com/repos/ironhack-labs/lab-javascript-all-times-movies/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ironhack-labs/lab-javascript-all-times-movies/issues/291/comments","statuses_url":"https://api.github.com/repos/ironhack-labs/lab-javascript-all-times-movies/statuses/ab22f98a9b08dabc270a0a687f1387e483b59b2e","head":{"label":"EloK6:master","ref":"master","sha":"ab22f98a9b08dabc270a0a687f1387e483b59b2e","user":{"login":"EloK6","id":15072992,"node_id":"MDQ6VXNlcjE1MDcyOTky","avatar_url":"https://avatars2.githubusercontent.com/u/15072992?v=4","gravatar_id":"","url":"https://api.github.com/users/EloK6","html_url":"https://github.com/EloK6","followers_url":"https://api.github.com/users/EloK6/followers","following_url":"https://api.github.com/users/EloK6/following{/other_user}","gists_url":"https://api.github.com/users/EloK6/gists{/gist_id}","starred_url":"https://api.github.com/users/EloK6/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EloK6/subscriptions","organizations_url":"https://api.github.com/users/EloK6/orgs","repos_url":"https://api.github.com/users/EloK6/repos","events_url":"https://api.github.com/users/EloK6/events{/privacy}","received_events_url":"https://api.github.com/users/EloK6/received_events","type":"User","site_admin":false},"repo":{"id":150857193,"node_id":"MDEwOlJlcG9zaXRvcnkxNTA4NTcxOTM=","name":"lab-javascript-all-times-movies","full_name":"EloK6/lab-javascript-all-times-movies","private":false,"owner":{"login":"EloK6","id":15072992,"node_id":"MDQ6VXNlcjE1MDcyOTky","avatar_url":"https://avatars2.githubusercontent.com/u/15072992?v=4","gravatar_id":"","url":"https://api.github.com/users/EloK6","html_url":"https://github.com/EloK6","followers_url":"https://api.github.com/users/EloK6/followers","following_url":"https://api.github.com/users/EloK6/following{/other_user}","gists_url":"https://api.github.com/users/EloK6/gists{/gist_id}","starred_url":"https://api.github.com/users/EloK6/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EloK6/subscriptions","organizations_url":"https://api.github.com/users/EloK6/orgs","repos_url":"https://api.github.com/users/EloK6/repos","events_url":"https://api.github.com/users/EloK6/events{/privacy}","received_events_url":"https://api.github.com/users/EloK6/received_events","type":"User","site_admin":false},"html_url":"https://github.com/EloK6/lab-javascript-all-times-movies","description":null,"fork":true,"url":"https://api.github.com/repos/EloK6/lab-javascript-all-times-movies","forks_url":"https://api.github.com/repos/EloK6/lab-javascript-all-times-movies/forks","keys_url":"https://api.github.com/repos/EloK6/lab-javascript-all-times-movies/keys{/key_id}","collaborators_url":"https://api.github.com/repos/EloK6/lab-javascript-all-times-movies/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/EloK6/lab-javascript-all-times-movies/teams","hooks_url":"https://api.github.com/repos/EloK6/lab-javascript-all-times-movies/hooks","issue_events_url":"https://api.github.com/repos/EloK6/lab-javascript-all-times-movies/issues/events{/number}","events_url":"https://api.github.com/repos/EloK6/lab-javascript-all-times-movies/events","assignees_url":"https://api.github.com/repos/EloK6/lab-javascript-all-times-movies/assignees{/user}","branches_url":"https://api.github.com/repos/EloK6/lab-javascript-all-times-movies/branches{/branch}","tags_url":"https://api.github.com/repos/EloK6/lab-javascript-all-times-movies/tags","blobs_url":"https://api.github.com/repos/EloK6/lab-javascript-all-times-movies/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/EloK6/lab-javascript-all-times-movies/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/EloK6/lab-javascript-all-times-movies/git/refs{/sha}","trees_url":"https://api.github.com/repos/EloK6/lab-javascript-all-times-movies/git/trees{/sha}","statuses_url":"https://api.github.com/repos/EloK6/lab-javascript-all-times-movies/statuses/{sha}","languages_url":"https://api.github.com/repos/EloK6/lab-javascript-all-times-movies/languages","stargazers_url":"https://api.github.com/repos/EloK6/lab-javascript-all-times-movies/stargazers","contributors_url":"https://api.github.com/repos/EloK6/lab-javascript-all-times-movies/contributors","subscribers_url":"https://api.github.com/repos/EloK6/lab-javascript-all-times-movies/subscribers","subscription_url":"https://api.github.com/repos/EloK6/lab-javascript-all-times-movies/subscription","commits_url":"https://api.github.com/repos/EloK6/lab-javascript-all-times-movies/commits{/sha}","git_commits_url":"https://api.github.com/repos/EloK6/lab-javascript-all-times-movies/git/commits{/sha}","comments_url":"https://api.github.com/repos/EloK6/lab-javascript-all-times-movies/comments{/number}","issue_comment_url":"https://api.github.com/repos/EloK6/lab-javascript-all-times-movies/issues/comments{/number}","contents_url":"https://api.github.com/repos/EloK6/lab-javascript-all-times-movies/contents/{+path}","compare_url":"https://api.github.com/repos/EloK6/lab-javascript-all-times-movies/compare/{base}...{head}","merges_url":"https://api.github.com/repos/EloK6/lab-javascript-all-times-movies/merges","archive_url":"https://api.github.com/repos/EloK6/lab-javascript-all-times-movies/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/EloK6/lab-javascript-all-times-movies/downloads","issues_url":"https://api.github.com/repos/EloK6/lab-javascript-all-times-movies/issues{/number}","pulls_url":"https://api.github.com/repos/EloK6/lab-javascript-all-times-movies/pulls{/number}","milestones_url":"https://api.github.com/repos/EloK6/lab-javascript-all-times-movies/milestones{/number}","notifications_url":"https://api.github.com/repos/EloK6/lab-javascript-all-times-movies/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/EloK6/lab-javascript-all-times-movies/labels{/name}","releases_url":"https://api.github.com/repos/EloK6/lab-javascript-all-times-movies/releases{/id}","deployments_url":"https://api.github.com/repos/EloK6/lab-javascript-all-times-movies/deployments","created_at":"2018-09-29T11:21:47Z","updated_at":"2018-10-02T16:45:17Z","pushed_at":"2018-10-02T16:45:15Z","git_url":"git://github.com/EloK6/lab-javascript-all-times-movies.git","ssh_url":"git@github.com:EloK6/lab-javascript-all-times-movies.git","clone_url":"https://github.com/EloK6/lab-javascript-all-times-movies.git","svn_url":"https://github.com/EloK6/lab-javascript-all-times-movies","homepage":null,"size":73,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ironhack-labs:master","ref":"master","sha":"d33cf440cd52c94334dc8c23de54701c3533f22d","user":{"login":"ironhack-labs","id":25032046,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI1MDMyMDQ2","avatar_url":"https://avatars3.githubusercontent.com/u/25032046?v=4","gravatar_id":"","url":"https://api.github.com/users/ironhack-labs","html_url":"https://github.com/ironhack-labs","followers_url":"https://api.github.com/users/ironhack-labs/followers","following_url":"https://api.github.com/users/ironhack-labs/following{/other_user}","gists_url":"https://api.github.com/users/ironhack-labs/gists{/gist_id}","starred_url":"https://api.github.com/users/ironhack-labs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ironhack-labs/subscriptions","organizations_url":"https://api.github.com/users/ironhack-labs/orgs","repos_url":"https://api.github.com/users/ironhack-labs/repos","events_url":"https://api.github.com/users/ironhack-labs/events{/privacy}","received_events_url":"https://api.github.com/users/ironhack-labs/received_events","type":"Organization","site_admin":false},"repo":{"id":109278494,"node_id":"MDEwOlJlcG9zaXRvcnkxMDkyNzg0OTQ=","name":"lab-javascript-all-times-movies","full_name":"ironhack-labs/lab-javascript-all-times-movies","private":false,"owner":{"login":"ironhack-labs","id":25032046,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI1MDMyMDQ2","avatar_url":"https://avatars3.githubusercontent.com/u/25032046?v=4","gravatar_id":"","url":"https://api.github.com/users/ironhack-labs","html_url":"https://github.com/ironhack-labs","followers_url":"https://api.github.com/users/ironhack-labs/followers","following_url":"https://api.github.com/users/ironhack-labs/following{/other_user}","gists_url":"https://api.github.com/users/ironhack-labs/gists{/gist_id}","starred_url":"https://api.github.com/users/ironhack-labs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ironhack-labs/subscriptions","organizations_url":"https://api.github.com/users/ironhack-labs/orgs","repos_url":"https://api.github.com/users/ironhack-labs/repos","events_url":"https://api.github.com/users/ironhack-labs/events{/privacy}","received_events_url":"https://api.github.com/users/ironhack-labs/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/ironhack-labs/lab-javascript-all-times-movies","description":null,"fork":false,"url":"https://api.github.com/repos/ironhack-labs/lab-javascript-all-times-movies","forks_url":"https://api.github.com/repos/ironhack-labs/lab-javascript-all-times-movies/forks","keys_url":"https://api.github.com/repos/ironhack-labs/lab-javascript-all-times-movies/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ironhack-labs/lab-javascript-all-times-movies/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ironhack-labs/lab-javascript-all-times-movies/teams","hooks_url":"https://api.github.com/repos/ironhack-labs/lab-javascript-all-times-movies/hooks","issue_events_url":"https://api.github.com/repos/ironhack-labs/lab-javascript-all-times-movies/issues/events{/number}","events_url":"https://api.github.com/repos/ironhack-labs/lab-javascript-all-times-movies/events","assignees_url":"https://api.github.com/repos/ironhack-labs/lab-javascript-all-times-movies/assignees{/user}","branches_url":"https://api.github.com/repos/ironhack-labs/lab-javascript-all-times-movies/branches{/branch}","tags_url":"https://api.github.com/repos/ironhack-labs/lab-javascript-all-times-movies/tags","blobs_url":"https://api.github.com/repos/ironhack-labs/lab-javascript-all-times-movies/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ironhack-labs/lab-javascript-all-times-movies/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ironhack-labs/lab-javascript-all-times-movies/git/refs{/sha}","trees_url":"https://api.github.com/repos/ironhack-labs/lab-javascript-all-times-movies/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ironhack-labs/lab-javascript-all-times-movies/statuses/{sha}","languages_url":"https://api.github.com/repos/ironhack-labs/lab-javascript-all-times-movies/languages","stargazers_url":"https://api.github.com/repos/ironhack-labs/lab-javascript-all-times-movies/stargazers","contributors_url":"https://api.github.com/repos/ironhack-labs/lab-javascript-all-times-movies/contributors","subscribers_url":"https://api.github.com/repos/ironhack-labs/lab-javascript-all-times-movies/subscribers","subscription_url":"https://api.github.com/repos/ironhack-labs/lab-javascript-all-times-movies/subscription","commits_url":"https://api.github.com/repos/ironhack-labs/lab-javascript-all-times-movies/commits{/sha}","git_commits_url":"https://api.github.com/repos/ironhack-labs/lab-javascript-all-times-movies/git/commits{/sha}","comments_url":"https://api.github.com/repos/ironhack-labs/lab-javascript-all-times-movies/comments{/number}","issue_comment_url":"https://api.github.com/repos/ironhack-labs/lab-javascript-all-times-movies/issues/comments{/number}","contents_url":"https://api.github.com/repos/ironhack-labs/lab-javascript-all-times-movies/contents/{+path}","compare_url":"https://api.github.com/repos/ironhack-labs/lab-javascript-all-times-movies/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ironhack-labs/lab-javascript-all-times-movies/merges","archive_url":"https://api.github.com/repos/ironhack-labs/lab-javascript-all-times-movies/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ironhack-labs/lab-javascript-all-times-movies/downloads","issues_url":"https://api.github.com/repos/ironhack-labs/lab-javascript-all-times-movies/issues{/number}","pulls_url":"https://api.github.com/repos/ironhack-labs/lab-javascript-all-times-movies/pulls{/number}","milestones_url":"https://api.github.com/repos/ironhack-labs/lab-javascript-all-times-movies/milestones{/number}","notifications_url":"https://api.github.com/repos/ironhack-labs/lab-javascript-all-times-movies/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ironhack-labs/lab-javascript-all-times-movies/labels{/name}","releases_url":"https://api.github.com/repos/ironhack-labs/lab-javascript-all-times-movies/releases{/id}","deployments_url":"https://api.github.com/repos/ironhack-labs/lab-javascript-all-times-movies/deployments","created_at":"2017-11-02T14:52:19Z","updated_at":"2018-09-21T04:35:03Z","pushed_at":"2018-10-02T16:47:10Z","git_url":"git://github.com/ironhack-labs/lab-javascript-all-times-movies.git","ssh_url":"git@github.com:ironhack-labs/lab-javascript-all-times-movies.git","clone_url":"https://github.com/ironhack-labs/lab-javascript-all-times-movies.git","svn_url":"https://github.com/ironhack-labs/lab-javascript-all-times-movies","homepage":null,"size":73,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":510,"mirror_url":null,"archived":false,"open_issues_count":53,"license":null,"forks":510,"open_issues":53,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ironhack-labs/lab-javascript-all-times-movies/pulls/291"},"html":{"href":"https://github.com/ironhack-labs/lab-javascript-all-times-movies/pull/291"},"issue":{"href":"https://api.github.com/repos/ironhack-labs/lab-javascript-all-times-movies/issues/291"},"comments":{"href":"https://api.github.com/repos/ironhack-labs/lab-javascript-all-times-movies/issues/291/comments"},"review_comments":{"href":"https://api.github.com/repos/ironhack-labs/lab-javascript-all-times-movies/pulls/291/comments"},"review_comment":{"href":"https://api.github.com/repos/ironhack-labs/lab-javascript-all-times-movies/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ironhack-labs/lab-javascript-all-times-movies/pulls/291/commits"},"statuses":{"href":"https://api.github.com/repos/ironhack-labs/lab-javascript-all-times-movies/statuses/ab22f98a9b08dabc270a0a687f1387e483b59b2e"}},"author_association":"NONE"}}
{"actor":{"display_login":"ta-webpt-par"}}