{"action":"created","comment":{"url":"https://api.github.com/repos/hhru/employer-review/pulls/comments/182705137","pull_request_review_id":113553766,"id":182705137,"diff_hunk":"@@ -0,0 +1,59 @@\n+package ru.hh.school.employerreview;\n+import ru.hh.school.employerreview.review.ReviewType;\n+import java.util.Random;\n+\n+public class GenerateReviewHelper {\n+\n+  public static int PER_PAGE = 1000;\n+\n+  private static Random randomGenerator = new Random();\n+  private static String candidateChars = \" ABCDEFGHIJKL MNOPQRSTUVWXYZ 1234567890 \";\n+  private static int MAX_TEXT_LENGTH = 100;\n+\n+  public static float getEstimate(float mathExpected) {\n+    float estimate = (float) randomGenerator.nextGaussian() + mathExpected;\n+    if (estimate > 5) {\n+      estimate = 5;\n+    }\n+    if (estimate < 0) {\n+      estimate = 0;\n+    }\n+    return estimate;\n+  }\n+\n+  public static ReviewType getReviewType() {\n+    if (randomGenerator.nextBoolean()) {\n+      return ReviewType.EMPLOYEE;\n+    } else {\n+      return ReviewType.INTERVIEWEE;\n+    }\n+  }\n+\n+  public static String getText() {\n+    return generateRandomChars(randomGenerator.nextInt(MAX_TEXT_LENGTH));\n+  }\n+\n+  public static String generateRandomChars(int length) {\n+    StringBuilder sb = new StringBuilder();\n+    Random random = new Random();\n+    for (int i = 0; i < length; i++) {\n+      sb.append(candidateChars.charAt(random.nextInt(candidateChars\n+          .length())));\n+    }\n+\n+    return sb.toString();\n+  }\n+\n+  public static int getReviewCount(float mathExpected, float deviation) {\n+    float reviewCount = randomGenerator.nextFloat() * deviation + mathExpected;\n+    if (reviewCount < 0) {\n+      reviewCount = 0;\n+    }\n+    return (int) reviewCount;\n+  }\n+\n+  public static float getEmployerMeanEstimate() {\n+    return ((float) (randomGenerator.nextInt(45) + 5)) / 10;\n+  }\n+","path":"backend/src/main/java/ru/hh/school/employerreview/GenerateReviewHelper.java","position":58,"original_position":58,"commit_id":"c33d6086c5e2cc6e2c18bc0e43b3940e72148bfd","original_commit_id":"c33d6086c5e2cc6e2c18bc0e43b3940e72148bfd","user":{"login":"akhalikov","id":167376,"avatar_url":"https://avatars3.githubusercontent.com/u/167376?v=4","gravatar_id":"","url":"https://api.github.com/users/akhalikov","html_url":"https://github.com/akhalikov","followers_url":"https://api.github.com/users/akhalikov/followers","following_url":"https://api.github.com/users/akhalikov/following{/other_user}","gists_url":"https://api.github.com/users/akhalikov/gists{/gist_id}","starred_url":"https://api.github.com/users/akhalikov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akhalikov/subscriptions","organizations_url":"https://api.github.com/users/akhalikov/orgs","repos_url":"https://api.github.com/users/akhalikov/repos","events_url":"https://api.github.com/users/akhalikov/events{/privacy}","received_events_url":"https://api.github.com/users/akhalikov/received_events","type":"User","site_admin":false},"body":"Лишняя пустая строка","created_at":"2018-04-19T10:43:47Z","updated_at":"2018-04-19T10:43:47Z","html_url":"https://github.com/hhru/employer-review/pull/27#discussion_r182705137","pull_request_url":"https://api.github.com/repos/hhru/employer-review/pulls/27","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/hhru/employer-review/pulls/comments/182705137"},"html":{"href":"https://github.com/hhru/employer-review/pull/27#discussion_r182705137"},"pull_request":{"href":"https://api.github.com/repos/hhru/employer-review/pulls/27"}}},"pull_request":{"url":"https://api.github.com/repos/hhru/employer-review/pulls/27","id":182585589,"html_url":"https://github.com/hhru/employer-review/pull/27","diff_url":"https://github.com/hhru/employer-review/pull/27.diff","patch_url":"https://github.com/hhru/employer-review/pull/27.patch","issue_url":"https://api.github.com/repos/hhru/employer-review/issues/27","number":27,"state":"open","locked":false,"title":"[backend-27] add review generation url","user":{"login":"colorbash","id":15712656,"avatar_url":"https://avatars3.githubusercontent.com/u/15712656?v=4","gravatar_id":"","url":"https://api.github.com/users/colorbash","html_url":"https://github.com/colorbash","followers_url":"https://api.github.com/users/colorbash/followers","following_url":"https://api.github.com/users/colorbash/following{/other_user}","gists_url":"https://api.github.com/users/colorbash/gists{/gist_id}","starred_url":"https://api.github.com/users/colorbash/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/colorbash/subscriptions","organizations_url":"https://api.github.com/users/colorbash/orgs","repos_url":"https://api.github.com/users/colorbash/repos","events_url":"https://api.github.com/users/colorbash/events{/privacy}","received_events_url":"https://api.github.com/users/colorbash/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-04-18T19:54:52Z","updated_at":"2018-04-19T10:43:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1bec810686e2e0510379456f341dcaf4a7e5ebc0","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/hhru/employer-review/pulls/27/commits","review_comments_url":"https://api.github.com/repos/hhru/employer-review/pulls/27/comments","review_comment_url":"https://api.github.com/repos/hhru/employer-review/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hhru/employer-review/issues/27/comments","statuses_url":"https://api.github.com/repos/hhru/employer-review/statuses/c33d6086c5e2cc6e2c18bc0e43b3940e72148bfd","head":{"label":"hhru:backend-27","ref":"backend-27","sha":"c33d6086c5e2cc6e2c18bc0e43b3940e72148bfd","user":{"login":"hhru","id":152753,"avatar_url":"https://avatars2.githubusercontent.com/u/152753?v=4","gravatar_id":"","url":"https://api.github.com/users/hhru","html_url":"https://github.com/hhru","followers_url":"https://api.github.com/users/hhru/followers","following_url":"https://api.github.com/users/hhru/following{/other_user}","gists_url":"https://api.github.com/users/hhru/gists{/gist_id}","starred_url":"https://api.github.com/users/hhru/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hhru/subscriptions","organizations_url":"https://api.github.com/users/hhru/orgs","repos_url":"https://api.github.com/users/hhru/repos","events_url":"https://api.github.com/users/hhru/events{/privacy}","received_events_url":"https://api.github.com/users/hhru/received_events","type":"Organization","site_admin":false},"repo":{"id":123889493,"name":"employer-review","full_name":"hhru/employer-review","owner":{"login":"hhru","id":152753,"avatar_url":"https://avatars2.githubusercontent.com/u/152753?v=4","gravatar_id":"","url":"https://api.github.com/users/hhru","html_url":"https://github.com/hhru","followers_url":"https://api.github.com/users/hhru/followers","following_url":"https://api.github.com/users/hhru/following{/other_user}","gists_url":"https://api.github.com/users/hhru/gists{/gist_id}","starred_url":"https://api.github.com/users/hhru/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hhru/subscriptions","organizations_url":"https://api.github.com/users/hhru/orgs","repos_url":"https://api.github.com/users/hhru/repos","events_url":"https://api.github.com/users/hhru/events{/privacy}","received_events_url":"https://api.github.com/users/hhru/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hhru/employer-review","description":null,"fork":false,"url":"https://api.github.com/repos/hhru/employer-review","forks_url":"https://api.github.com/repos/hhru/employer-review/forks","keys_url":"https://api.github.com/repos/hhru/employer-review/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hhru/employer-review/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hhru/employer-review/teams","hooks_url":"https://api.github.com/repos/hhru/employer-review/hooks","issue_events_url":"https://api.github.com/repos/hhru/employer-review/issues/events{/number}","events_url":"https://api.github.com/repos/hhru/employer-review/events","assignees_url":"https://api.github.com/repos/hhru/employer-review/assignees{/user}","branches_url":"https://api.github.com/repos/hhru/employer-review/branches{/branch}","tags_url":"https://api.github.com/repos/hhru/employer-review/tags","blobs_url":"https://api.github.com/repos/hhru/employer-review/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hhru/employer-review/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hhru/employer-review/git/refs{/sha}","trees_url":"https://api.github.com/repos/hhru/employer-review/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hhru/employer-review/statuses/{sha}","languages_url":"https://api.github.com/repos/hhru/employer-review/languages","stargazers_url":"https://api.github.com/repos/hhru/employer-review/stargazers","contributors_url":"https://api.github.com/repos/hhru/employer-review/contributors","subscribers_url":"https://api.github.com/repos/hhru/employer-review/subscribers","subscription_url":"https://api.github.com/repos/hhru/employer-review/subscription","commits_url":"https://api.github.com/repos/hhru/employer-review/commits{/sha}","git_commits_url":"https://api.github.com/repos/hhru/employer-review/git/commits{/sha}","comments_url":"https://api.github.com/repos/hhru/employer-review/comments{/number}","issue_comment_url":"https://api.github.com/repos/hhru/employer-review/issues/comments{/number}","contents_url":"https://api.github.com/repos/hhru/employer-review/contents/{+path}","compare_url":"https://api.github.com/repos/hhru/employer-review/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hhru/employer-review/merges","archive_url":"https://api.github.com/repos/hhru/employer-review/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hhru/employer-review/downloads","issues_url":"https://api.github.com/repos/hhru/employer-review/issues{/number}","pulls_url":"https://api.github.com/repos/hhru/employer-review/pulls{/number}","milestones_url":"https://api.github.com/repos/hhru/employer-review/milestones{/number}","notifications_url":"https://api.github.com/repos/hhru/employer-review/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hhru/employer-review/labels{/name}","releases_url":"https://api.github.com/repos/hhru/employer-review/releases{/id}","deployments_url":"https://api.github.com/repos/hhru/employer-review/deployments","created_at":"2018-03-05T08:36:32Z","updated_at":"2018-04-18T09:03:51Z","pushed_at":"2018-04-18T19:54:53Z","git_url":"git://github.com/hhru/employer-review.git","ssh_url":"git@github.com:hhru/employer-review.git","clone_url":"https://github.com/hhru/employer-review.git","svn_url":"https://github.com/hhru/employer-review","homepage":null,"size":1003,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":3,"license":null,"forks":1,"open_issues":3,"watchers":1,"default_branch":"master"}},"base":{"label":"hhru:master","ref":"master","sha":"036c375f7e933008f7270a64c53f6ae8cd9d1032","user":{"login":"hhru","id":152753,"avatar_url":"https://avatars2.githubusercontent.com/u/152753?v=4","gravatar_id":"","url":"https://api.github.com/users/hhru","html_url":"https://github.com/hhru","followers_url":"https://api.github.com/users/hhru/followers","following_url":"https://api.github.com/users/hhru/following{/other_user}","gists_url":"https://api.github.com/users/hhru/gists{/gist_id}","starred_url":"https://api.github.com/users/hhru/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hhru/subscriptions","organizations_url":"https://api.github.com/users/hhru/orgs","repos_url":"https://api.github.com/users/hhru/repos","events_url":"https://api.github.com/users/hhru/events{/privacy}","received_events_url":"https://api.github.com/users/hhru/received_events","type":"Organization","site_admin":false},"repo":{"id":123889493,"name":"employer-review","full_name":"hhru/employer-review","owner":{"login":"hhru","id":152753,"avatar_url":"https://avatars2.githubusercontent.com/u/152753?v=4","gravatar_id":"","url":"https://api.github.com/users/hhru","html_url":"https://github.com/hhru","followers_url":"https://api.github.com/users/hhru/followers","following_url":"https://api.github.com/users/hhru/following{/other_user}","gists_url":"https://api.github.com/users/hhru/gists{/gist_id}","starred_url":"https://api.github.com/users/hhru/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hhru/subscriptions","organizations_url":"https://api.github.com/users/hhru/orgs","repos_url":"https://api.github.com/users/hhru/repos","events_url":"https://api.github.com/users/hhru/events{/privacy}","received_events_url":"https://api.github.com/users/hhru/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hhru/employer-review","description":null,"fork":false,"url":"https://api.github.com/repos/hhru/employer-review","forks_url":"https://api.github.com/repos/hhru/employer-review/forks","keys_url":"https://api.github.com/repos/hhru/employer-review/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hhru/employer-review/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hhru/employer-review/teams","hooks_url":"https://api.github.com/repos/hhru/employer-review/hooks","issue_events_url":"https://api.github.com/repos/hhru/employer-review/issues/events{/number}","events_url":"https://api.github.com/repos/hhru/employer-review/events","assignees_url":"https://api.github.com/repos/hhru/employer-review/assignees{/user}","branches_url":"https://api.github.com/repos/hhru/employer-review/branches{/branch}","tags_url":"https://api.github.com/repos/hhru/employer-review/tags","blobs_url":"https://api.github.com/repos/hhru/employer-review/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hhru/employer-review/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hhru/employer-review/git/refs{/sha}","trees_url":"https://api.github.com/repos/hhru/employer-review/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hhru/employer-review/statuses/{sha}","languages_url":"https://api.github.com/repos/hhru/employer-review/languages","stargazers_url":"https://api.github.com/repos/hhru/employer-review/stargazers","contributors_url":"https://api.github.com/repos/hhru/employer-review/contributors","subscribers_url":"https://api.github.com/repos/hhru/employer-review/subscribers","subscription_url":"https://api.github.com/repos/hhru/employer-review/subscription","commits_url":"https://api.github.com/repos/hhru/employer-review/commits{/sha}","git_commits_url":"https://api.github.com/repos/hhru/employer-review/git/commits{/sha}","comments_url":"https://api.github.com/repos/hhru/employer-review/comments{/number}","issue_comment_url":"https://api.github.com/repos/hhru/employer-review/issues/comments{/number}","contents_url":"https://api.github.com/repos/hhru/employer-review/contents/{+path}","compare_url":"https://api.github.com/repos/hhru/employer-review/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hhru/employer-review/merges","archive_url":"https://api.github.com/repos/hhru/employer-review/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hhru/employer-review/downloads","issues_url":"https://api.github.com/repos/hhru/employer-review/issues{/number}","pulls_url":"https://api.github.com/repos/hhru/employer-review/pulls{/number}","milestones_url":"https://api.github.com/repos/hhru/employer-review/milestones{/number}","notifications_url":"https://api.github.com/repos/hhru/employer-review/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hhru/employer-review/labels{/name}","releases_url":"https://api.github.com/repos/hhru/employer-review/releases{/id}","deployments_url":"https://api.github.com/repos/hhru/employer-review/deployments","created_at":"2018-03-05T08:36:32Z","updated_at":"2018-04-18T09:03:51Z","pushed_at":"2018-04-18T19:54:53Z","git_url":"git://github.com/hhru/employer-review.git","ssh_url":"git@github.com:hhru/employer-review.git","clone_url":"https://github.com/hhru/employer-review.git","svn_url":"https://github.com/hhru/employer-review","homepage":null,"size":1003,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":3,"license":null,"forks":1,"open_issues":3,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hhru/employer-review/pulls/27"},"html":{"href":"https://github.com/hhru/employer-review/pull/27"},"issue":{"href":"https://api.github.com/repos/hhru/employer-review/issues/27"},"comments":{"href":"https://api.github.com/repos/hhru/employer-review/issues/27/comments"},"review_comments":{"href":"https://api.github.com/repos/hhru/employer-review/pulls/27/comments"},"review_comment":{"href":"https://api.github.com/repos/hhru/employer-review/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hhru/employer-review/pulls/27/commits"},"statuses":{"href":"https://api.github.com/repos/hhru/employer-review/statuses/c33d6086c5e2cc6e2c18bc0e43b3940e72148bfd"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"akhalikov"}}