{"action":"created","comment":{"url":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard/pulls/comments/125835389","pull_request_review_id":48261308,"id":125835389,"diff_hunk":"@@ -1,19 +1,25 @@\n import React from 'react';\n import PropTypes from 'prop-types';\n+import _round from 'lodash/round';\n import './Number.scss';\n \n+const getRounded = decimal => _round(decimal, 2);\n+const getChange = (current, previous) => (previous === 0 ? previous : (current - previous) / previous * 100); // eslint-disable-line no-mixed-operators","path":"src/widgets/Number/components/Number.js","position":7,"original_position":7,"commit_id":"d960018604a6c3576f506d05e664904bb721368c","original_commit_id":"d960018604a6c3576f506d05e664904bb721368c","user":{"login":"milenvoutchev","id":8949578,"avatar_url":"https://avatars2.githubusercontent.com/u/8949578?v=3","gravatar_id":"","url":"https://api.github.com/users/milenvoutchev","html_url":"https://github.com/milenvoutchev","followers_url":"https://api.github.com/users/milenvoutchev/followers","following_url":"https://api.github.com/users/milenvoutchev/following{/other_user}","gists_url":"https://api.github.com/users/milenvoutchev/gists{/gist_id}","starred_url":"https://api.github.com/users/milenvoutchev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/milenvoutchev/subscriptions","organizations_url":"https://api.github.com/users/milenvoutchev/orgs","repos_url":"https://api.github.com/users/milenvoutchev/repos","events_url":"https://api.github.com/users/milenvoutchev/events{/privacy}","received_events_url":"https://api.github.com/users/milenvoutchev/received_events","type":"User","site_admin":false},"body":"Well, if previous is zero it's kind of hard to calculate change, as there is not base value. Everything multiplied by zero... you know :)","created_at":"2017-07-06T08:08:31Z","updated_at":"2017-07-06T08:08:31Z","html_url":"https://github.com/rocket-internet-berlin/RocketDashboard/pull/41#discussion_r125835389","pull_request_url":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard/pulls/41","_links":{"self":{"href":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard/pulls/comments/125835389"},"html":{"href":"https://github.com/rocket-internet-berlin/RocketDashboard/pull/41#discussion_r125835389"},"pull_request":{"href":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard/pulls/41"}}},"pull_request":{"url":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard/pulls/41","id":128982254,"html_url":"https://github.com/rocket-internet-berlin/RocketDashboard/pull/41","diff_url":"https://github.com/rocket-internet-berlin/RocketDashboard/pull/41.diff","patch_url":"https://github.com/rocket-internet-berlin/RocketDashboard/pull/41.patch","issue_url":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard/issues/41","number":41,"state":"open","locked":false,"title":"change compare/previous to percentage","user":{"login":"milenvoutchev","id":8949578,"avatar_url":"https://avatars2.githubusercontent.com/u/8949578?v=3","gravatar_id":"","url":"https://api.github.com/users/milenvoutchev","html_url":"https://github.com/milenvoutchev","followers_url":"https://api.github.com/users/milenvoutchev/followers","following_url":"https://api.github.com/users/milenvoutchev/following{/other_user}","gists_url":"https://api.github.com/users/milenvoutchev/gists{/gist_id}","starred_url":"https://api.github.com/users/milenvoutchev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/milenvoutchev/subscriptions","organizations_url":"https://api.github.com/users/milenvoutchev/orgs","repos_url":"https://api.github.com/users/milenvoutchev/repos","events_url":"https://api.github.com/users/milenvoutchev/events{/privacy}","received_events_url":"https://api.github.com/users/milenvoutchev/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-07-05T14:50:30Z","updated_at":"2017-07-06T08:08:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7be4b9bb6c77d99eaa5e3b3e67076b3184046e00","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard/pulls/41/commits","review_comments_url":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard/pulls/41/comments","review_comment_url":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard/issues/41/comments","statuses_url":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard/statuses/d960018604a6c3576f506d05e664904bb721368c","head":{"label":"rocket-internet-berlin:mv/compare-percent","ref":"mv/compare-percent","sha":"d960018604a6c3576f506d05e664904bb721368c","user":{"login":"rocket-internet-berlin","id":3800314,"avatar_url":"https://avatars1.githubusercontent.com/u/3800314?v=3","gravatar_id":"","url":"https://api.github.com/users/rocket-internet-berlin","html_url":"https://github.com/rocket-internet-berlin","followers_url":"https://api.github.com/users/rocket-internet-berlin/followers","following_url":"https://api.github.com/users/rocket-internet-berlin/following{/other_user}","gists_url":"https://api.github.com/users/rocket-internet-berlin/gists{/gist_id}","starred_url":"https://api.github.com/users/rocket-internet-berlin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rocket-internet-berlin/subscriptions","organizations_url":"https://api.github.com/users/rocket-internet-berlin/orgs","repos_url":"https://api.github.com/users/rocket-internet-berlin/repos","events_url":"https://api.github.com/users/rocket-internet-berlin/events{/privacy}","received_events_url":"https://api.github.com/users/rocket-internet-berlin/received_events","type":"Organization","site_admin":false},"repo":{"id":90288963,"name":"RocketDashboard","full_name":"rocket-internet-berlin/RocketDashboard","owner":{"login":"rocket-internet-berlin","id":3800314,"avatar_url":"https://avatars1.githubusercontent.com/u/3800314?v=3","gravatar_id":"","url":"https://api.github.com/users/rocket-internet-berlin","html_url":"https://github.com/rocket-internet-berlin","followers_url":"https://api.github.com/users/rocket-internet-berlin/followers","following_url":"https://api.github.com/users/rocket-internet-berlin/following{/other_user}","gists_url":"https://api.github.com/users/rocket-internet-berlin/gists{/gist_id}","starred_url":"https://api.github.com/users/rocket-internet-berlin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rocket-internet-berlin/subscriptions","organizations_url":"https://api.github.com/users/rocket-internet-berlin/orgs","repos_url":"https://api.github.com/users/rocket-internet-berlin/repos","events_url":"https://api.github.com/users/rocket-internet-berlin/events{/privacy}","received_events_url":"https://api.github.com/users/rocket-internet-berlin/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rocket-internet-berlin/RocketDashboard","description":"RocketDashboard","fork":false,"url":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard","forks_url":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard/forks","keys_url":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard/teams","hooks_url":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard/hooks","issue_events_url":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard/issues/events{/number}","events_url":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard/events","assignees_url":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard/assignees{/user}","branches_url":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard/branches{/branch}","tags_url":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard/tags","blobs_url":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard/git/refs{/sha}","trees_url":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard/statuses/{sha}","languages_url":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard/languages","stargazers_url":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard/stargazers","contributors_url":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard/contributors","subscribers_url":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard/subscribers","subscription_url":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard/subscription","commits_url":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard/commits{/sha}","git_commits_url":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard/git/commits{/sha}","comments_url":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard/comments{/number}","issue_comment_url":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard/issues/comments{/number}","contents_url":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard/contents/{+path}","compare_url":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard/merges","archive_url":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard/downloads","issues_url":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard/issues{/number}","pulls_url":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard/pulls{/number}","milestones_url":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard/milestones{/number}","notifications_url":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard/labels{/name}","releases_url":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard/releases{/id}","deployments_url":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard/deployments","created_at":"2017-05-04T17:08:11Z","updated_at":"2017-06-15T12:53:28Z","pushed_at":"2017-07-05T16:22:19Z","git_url":"git://github.com/rocket-internet-berlin/RocketDashboard.git","ssh_url":"git@github.com:rocket-internet-berlin/RocketDashboard.git","clone_url":"https://github.com/rocket-internet-berlin/RocketDashboard.git","svn_url":"https://github.com/rocket-internet-berlin/RocketDashboard","homepage":"https://www.rocket-internet.de","size":370,"stargazers_count":3,"watchers_count":3,"language":"JavaScript","has_issues":true,"has_projects":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":3,"default_branch":"master"}},"base":{"label":"rocket-internet-berlin:master","ref":"master","sha":"b19c07279b45ad28dba5c719ec454e305ced6eb7","user":{"login":"rocket-internet-berlin","id":3800314,"avatar_url":"https://avatars1.githubusercontent.com/u/3800314?v=3","gravatar_id":"","url":"https://api.github.com/users/rocket-internet-berlin","html_url":"https://github.com/rocket-internet-berlin","followers_url":"https://api.github.com/users/rocket-internet-berlin/followers","following_url":"https://api.github.com/users/rocket-internet-berlin/following{/other_user}","gists_url":"https://api.github.com/users/rocket-internet-berlin/gists{/gist_id}","starred_url":"https://api.github.com/users/rocket-internet-berlin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rocket-internet-berlin/subscriptions","organizations_url":"https://api.github.com/users/rocket-internet-berlin/orgs","repos_url":"https://api.github.com/users/rocket-internet-berlin/repos","events_url":"https://api.github.com/users/rocket-internet-berlin/events{/privacy}","received_events_url":"https://api.github.com/users/rocket-internet-berlin/received_events","type":"Organization","site_admin":false},"repo":{"id":90288963,"name":"RocketDashboard","full_name":"rocket-internet-berlin/RocketDashboard","owner":{"login":"rocket-internet-berlin","id":3800314,"avatar_url":"https://avatars1.githubusercontent.com/u/3800314?v=3","gravatar_id":"","url":"https://api.github.com/users/rocket-internet-berlin","html_url":"https://github.com/rocket-internet-berlin","followers_url":"https://api.github.com/users/rocket-internet-berlin/followers","following_url":"https://api.github.com/users/rocket-internet-berlin/following{/other_user}","gists_url":"https://api.github.com/users/rocket-internet-berlin/gists{/gist_id}","starred_url":"https://api.github.com/users/rocket-internet-berlin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rocket-internet-berlin/subscriptions","organizations_url":"https://api.github.com/users/rocket-internet-berlin/orgs","repos_url":"https://api.github.com/users/rocket-internet-berlin/repos","events_url":"https://api.github.com/users/rocket-internet-berlin/events{/privacy}","received_events_url":"https://api.github.com/users/rocket-internet-berlin/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rocket-internet-berlin/RocketDashboard","description":"RocketDashboard","fork":false,"url":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard","forks_url":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard/forks","keys_url":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard/teams","hooks_url":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard/hooks","issue_events_url":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard/issues/events{/number}","events_url":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard/events","assignees_url":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard/assignees{/user}","branches_url":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard/branches{/branch}","tags_url":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard/tags","blobs_url":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard/git/refs{/sha}","trees_url":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard/statuses/{sha}","languages_url":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard/languages","stargazers_url":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard/stargazers","contributors_url":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard/contributors","subscribers_url":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard/subscribers","subscription_url":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard/subscription","commits_url":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard/commits{/sha}","git_commits_url":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard/git/commits{/sha}","comments_url":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard/comments{/number}","issue_comment_url":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard/issues/comments{/number}","contents_url":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard/contents/{+path}","compare_url":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard/merges","archive_url":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard/downloads","issues_url":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard/issues{/number}","pulls_url":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard/pulls{/number}","milestones_url":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard/milestones{/number}","notifications_url":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard/labels{/name}","releases_url":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard/releases{/id}","deployments_url":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard/deployments","created_at":"2017-05-04T17:08:11Z","updated_at":"2017-06-15T12:53:28Z","pushed_at":"2017-07-05T16:22:19Z","git_url":"git://github.com/rocket-internet-berlin/RocketDashboard.git","ssh_url":"git@github.com:rocket-internet-berlin/RocketDashboard.git","clone_url":"https://github.com/rocket-internet-berlin/RocketDashboard.git","svn_url":"https://github.com/rocket-internet-berlin/RocketDashboard","homepage":"https://www.rocket-internet.de","size":370,"stargazers_count":3,"watchers_count":3,"language":"JavaScript","has_issues":true,"has_projects":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":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard/pulls/41"},"html":{"href":"https://github.com/rocket-internet-berlin/RocketDashboard/pull/41"},"issue":{"href":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard/issues/41"},"comments":{"href":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard/issues/41/comments"},"review_comments":{"href":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard/pulls/41/comments"},"review_comment":{"href":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard/pulls/41/commits"},"statuses":{"href":"https://api.github.com/repos/rocket-internet-berlin/RocketDashboard/statuses/d960018604a6c3576f506d05e664904bb721368c"}}}}
{"actor":{"display_login":"milenvoutchev"}}