{"action":"created","comment":{"url":"https://api.github.com/repos/moip/jcurtain/pulls/comments/148159962","pull_request_review_id":73359514,"id":148159962,"diff_hunk":"@@ -129,8 +129,17 @@ private int getFeaturePercentage(String feature) {\n         return (featurePercentage == null ? 0 : Integer.parseInt(featurePercentage));\n     }\n \n-    private boolean isFeatureOpen(String feature) {\n-        return randomPercentage() <= getFeaturePercentage(feature);\n+    private boolean isFeatureOpen(String feature,String user) {\n+        Jedis jedis = jedisPool.getResource();\n+        Boolean isFeatureOpen = randomPercentage() <= getFeaturePercentage(feature);\n+        Boolean isFixedUser = Boolean.valueOf(jedis.get(\"feature:\" + feature + \":isFixedUser\"));\n+        Long totalUsers = jedis.scard(\"feature:\"+feature+\"users\");\n+        Long permittedTotalUsers = jedis.scard(\"feature:\"+feature+\"amount\");","path":"src/main/java/br/com/moip/jcurtain/JCurtain.java","position":47,"original_position":47,"commit_id":"dd752606e69b9e63b71caa4f6484fd95037a4ca5","original_commit_id":"dd752606e69b9e63b71caa4f6484fd95037a4ca5","user":{"login":"ecolabardini","id":3411338,"avatar_url":"https://avatars3.githubusercontent.com/u/3411338?v=4","gravatar_id":"","url":"https://api.github.com/users/ecolabardini","html_url":"https://github.com/ecolabardini","followers_url":"https://api.github.com/users/ecolabardini/followers","following_url":"https://api.github.com/users/ecolabardini/following{/other_user}","gists_url":"https://api.github.com/users/ecolabardini/gists{/gist_id}","starred_url":"https://api.github.com/users/ecolabardini/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ecolabardini/subscriptions","organizations_url":"https://api.github.com/users/ecolabardini/orgs","repos_url":"https://api.github.com/users/ecolabardini/repos","events_url":"https://api.github.com/users/ecolabardini/events{/privacy}","received_events_url":"https://api.github.com/users/ecolabardini/received_events","type":"User","site_admin":false},"body":"You're missing the colon here too. Besides that, you should probably use `get` instead of `scard`.","created_at":"2017-11-01T00:20:50Z","updated_at":"2017-11-01T00:27:09Z","html_url":"https://github.com/moip/jcurtain/pull/4#discussion_r148159962","pull_request_url":"https://api.github.com/repos/moip/jcurtain/pulls/4","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/moip/jcurtain/pulls/comments/148159962"},"html":{"href":"https://github.com/moip/jcurtain/pull/4#discussion_r148159962"},"pull_request":{"href":"https://api.github.com/repos/moip/jcurtain/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/moip/jcurtain/pulls/4","id":149086860,"html_url":"https://github.com/moip/jcurtain/pull/4","diff_url":"https://github.com/moip/jcurtain/pull/4.diff","patch_url":"https://github.com/moip/jcurtain/pull/4.patch","issue_url":"https://api.github.com/repos/moip/jcurtain/issues/4","number":4,"state":"open","locked":false,"title":"Issue #3 -> Persist random users chosen by the percentage model","user":{"login":"rcleps","id":6749986,"avatar_url":"https://avatars0.githubusercontent.com/u/6749986?v=4","gravatar_id":"","url":"https://api.github.com/users/rcleps","html_url":"https://github.com/rcleps","followers_url":"https://api.github.com/users/rcleps/followers","following_url":"https://api.github.com/users/rcleps/following{/other_user}","gists_url":"https://api.github.com/users/rcleps/gists{/gist_id}","starred_url":"https://api.github.com/users/rcleps/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rcleps/subscriptions","organizations_url":"https://api.github.com/users/rcleps/orgs","repos_url":"https://api.github.com/users/rcleps/repos","events_url":"https://api.github.com/users/rcleps/events{/privacy}","received_events_url":"https://api.github.com/users/rcleps/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-10-27T02:20:52Z","updated_at":"2017-11-01T00:27:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"613b469d3e30ce76d362fbdc6fbbda77d6cb7bbe","assignee":{"login":"rcleps","id":6749986,"avatar_url":"https://avatars0.githubusercontent.com/u/6749986?v=4","gravatar_id":"","url":"https://api.github.com/users/rcleps","html_url":"https://github.com/rcleps","followers_url":"https://api.github.com/users/rcleps/followers","following_url":"https://api.github.com/users/rcleps/following{/other_user}","gists_url":"https://api.github.com/users/rcleps/gists{/gist_id}","starred_url":"https://api.github.com/users/rcleps/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rcleps/subscriptions","organizations_url":"https://api.github.com/users/rcleps/orgs","repos_url":"https://api.github.com/users/rcleps/repos","events_url":"https://api.github.com/users/rcleps/events{/privacy}","received_events_url":"https://api.github.com/users/rcleps/received_events","type":"User","site_admin":false},"assignees":[{"login":"rcleps","id":6749986,"avatar_url":"https://avatars0.githubusercontent.com/u/6749986?v=4","gravatar_id":"","url":"https://api.github.com/users/rcleps","html_url":"https://github.com/rcleps","followers_url":"https://api.github.com/users/rcleps/followers","following_url":"https://api.github.com/users/rcleps/following{/other_user}","gists_url":"https://api.github.com/users/rcleps/gists{/gist_id}","starred_url":"https://api.github.com/users/rcleps/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rcleps/subscriptions","organizations_url":"https://api.github.com/users/rcleps/orgs","repos_url":"https://api.github.com/users/rcleps/repos","events_url":"https://api.github.com/users/rcleps/events{/privacy}","received_events_url":"https://api.github.com/users/rcleps/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/moip/jcurtain/pulls/4/commits","review_comments_url":"https://api.github.com/repos/moip/jcurtain/pulls/4/comments","review_comment_url":"https://api.github.com/repos/moip/jcurtain/pulls/comments{/number}","comments_url":"https://api.github.com/repos/moip/jcurtain/issues/4/comments","statuses_url":"https://api.github.com/repos/moip/jcurtain/statuses/dd752606e69b9e63b71caa4f6484fd95037a4ca5","head":{"label":"rcleps:master","ref":"master","sha":"dd752606e69b9e63b71caa4f6484fd95037a4ca5","user":{"login":"rcleps","id":6749986,"avatar_url":"https://avatars0.githubusercontent.com/u/6749986?v=4","gravatar_id":"","url":"https://api.github.com/users/rcleps","html_url":"https://github.com/rcleps","followers_url":"https://api.github.com/users/rcleps/followers","following_url":"https://api.github.com/users/rcleps/following{/other_user}","gists_url":"https://api.github.com/users/rcleps/gists{/gist_id}","starred_url":"https://api.github.com/users/rcleps/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rcleps/subscriptions","organizations_url":"https://api.github.com/users/rcleps/orgs","repos_url":"https://api.github.com/users/rcleps/repos","events_url":"https://api.github.com/users/rcleps/events{/privacy}","received_events_url":"https://api.github.com/users/rcleps/received_events","type":"User","site_admin":false},"repo":{"id":108472273,"name":"jcurtain","full_name":"rcleps/jcurtain","owner":{"login":"rcleps","id":6749986,"avatar_url":"https://avatars0.githubusercontent.com/u/6749986?v=4","gravatar_id":"","url":"https://api.github.com/users/rcleps","html_url":"https://github.com/rcleps","followers_url":"https://api.github.com/users/rcleps/followers","following_url":"https://api.github.com/users/rcleps/following{/other_user}","gists_url":"https://api.github.com/users/rcleps/gists{/gist_id}","starred_url":"https://api.github.com/users/rcleps/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rcleps/subscriptions","organizations_url":"https://api.github.com/users/rcleps/orgs","repos_url":"https://api.github.com/users/rcleps/repos","events_url":"https://api.github.com/users/rcleps/events{/privacy}","received_events_url":"https://api.github.com/users/rcleps/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rcleps/jcurtain","description":"Open the curtain and see if your feature is enabled","fork":true,"url":"https://api.github.com/repos/rcleps/jcurtain","forks_url":"https://api.github.com/repos/rcleps/jcurtain/forks","keys_url":"https://api.github.com/repos/rcleps/jcurtain/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rcleps/jcurtain/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rcleps/jcurtain/teams","hooks_url":"https://api.github.com/repos/rcleps/jcurtain/hooks","issue_events_url":"https://api.github.com/repos/rcleps/jcurtain/issues/events{/number}","events_url":"https://api.github.com/repos/rcleps/jcurtain/events","assignees_url":"https://api.github.com/repos/rcleps/jcurtain/assignees{/user}","branches_url":"https://api.github.com/repos/rcleps/jcurtain/branches{/branch}","tags_url":"https://api.github.com/repos/rcleps/jcurtain/tags","blobs_url":"https://api.github.com/repos/rcleps/jcurtain/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rcleps/jcurtain/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rcleps/jcurtain/git/refs{/sha}","trees_url":"https://api.github.com/repos/rcleps/jcurtain/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rcleps/jcurtain/statuses/{sha}","languages_url":"https://api.github.com/repos/rcleps/jcurtain/languages","stargazers_url":"https://api.github.com/repos/rcleps/jcurtain/stargazers","contributors_url":"https://api.github.com/repos/rcleps/jcurtain/contributors","subscribers_url":"https://api.github.com/repos/rcleps/jcurtain/subscribers","subscription_url":"https://api.github.com/repos/rcleps/jcurtain/subscription","commits_url":"https://api.github.com/repos/rcleps/jcurtain/commits{/sha}","git_commits_url":"https://api.github.com/repos/rcleps/jcurtain/git/commits{/sha}","comments_url":"https://api.github.com/repos/rcleps/jcurtain/comments{/number}","issue_comment_url":"https://api.github.com/repos/rcleps/jcurtain/issues/comments{/number}","contents_url":"https://api.github.com/repos/rcleps/jcurtain/contents/{+path}","compare_url":"https://api.github.com/repos/rcleps/jcurtain/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rcleps/jcurtain/merges","archive_url":"https://api.github.com/repos/rcleps/jcurtain/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rcleps/jcurtain/downloads","issues_url":"https://api.github.com/repos/rcleps/jcurtain/issues{/number}","pulls_url":"https://api.github.com/repos/rcleps/jcurtain/pulls{/number}","milestones_url":"https://api.github.com/repos/rcleps/jcurtain/milestones{/number}","notifications_url":"https://api.github.com/repos/rcleps/jcurtain/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rcleps/jcurtain/labels{/name}","releases_url":"https://api.github.com/repos/rcleps/jcurtain/releases{/id}","deployments_url":"https://api.github.com/repos/rcleps/jcurtain/deployments","created_at":"2017-10-26T22:28:25Z","updated_at":"2017-10-26T22:28:27Z","pushed_at":"2017-10-28T19:00:08Z","git_url":"git://github.com/rcleps/jcurtain.git","ssh_url":"git@github.com:rcleps/jcurtain.git","clone_url":"https://github.com/rcleps/jcurtain.git","svn_url":"https://github.com/rcleps/jcurtain","homepage":"","size":85,"stargazers_count":0,"watchers_count":0,"language":"Java","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,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"moip:master","ref":"master","sha":"fc8b75473e32e754fd12e2bed132c05cb9625cb7","user":{"login":"moip","id":5281980,"avatar_url":"https://avatars0.githubusercontent.com/u/5281980?v=4","gravatar_id":"","url":"https://api.github.com/users/moip","html_url":"https://github.com/moip","followers_url":"https://api.github.com/users/moip/followers","following_url":"https://api.github.com/users/moip/following{/other_user}","gists_url":"https://api.github.com/users/moip/gists{/gist_id}","starred_url":"https://api.github.com/users/moip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moip/subscriptions","organizations_url":"https://api.github.com/users/moip/orgs","repos_url":"https://api.github.com/users/moip/repos","events_url":"https://api.github.com/users/moip/events{/privacy}","received_events_url":"https://api.github.com/users/moip/received_events","type":"Organization","site_admin":false},"repo":{"id":58562421,"name":"jcurtain","full_name":"moip/jcurtain","owner":{"login":"moip","id":5281980,"avatar_url":"https://avatars0.githubusercontent.com/u/5281980?v=4","gravatar_id":"","url":"https://api.github.com/users/moip","html_url":"https://github.com/moip","followers_url":"https://api.github.com/users/moip/followers","following_url":"https://api.github.com/users/moip/following{/other_user}","gists_url":"https://api.github.com/users/moip/gists{/gist_id}","starred_url":"https://api.github.com/users/moip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moip/subscriptions","organizations_url":"https://api.github.com/users/moip/orgs","repos_url":"https://api.github.com/users/moip/repos","events_url":"https://api.github.com/users/moip/events{/privacy}","received_events_url":"https://api.github.com/users/moip/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/moip/jcurtain","description":"Open the curtain and see if your feature is enabled","fork":false,"url":"https://api.github.com/repos/moip/jcurtain","forks_url":"https://api.github.com/repos/moip/jcurtain/forks","keys_url":"https://api.github.com/repos/moip/jcurtain/keys{/key_id}","collaborators_url":"https://api.github.com/repos/moip/jcurtain/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/moip/jcurtain/teams","hooks_url":"https://api.github.com/repos/moip/jcurtain/hooks","issue_events_url":"https://api.github.com/repos/moip/jcurtain/issues/events{/number}","events_url":"https://api.github.com/repos/moip/jcurtain/events","assignees_url":"https://api.github.com/repos/moip/jcurtain/assignees{/user}","branches_url":"https://api.github.com/repos/moip/jcurtain/branches{/branch}","tags_url":"https://api.github.com/repos/moip/jcurtain/tags","blobs_url":"https://api.github.com/repos/moip/jcurtain/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/moip/jcurtain/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/moip/jcurtain/git/refs{/sha}","trees_url":"https://api.github.com/repos/moip/jcurtain/git/trees{/sha}","statuses_url":"https://api.github.com/repos/moip/jcurtain/statuses/{sha}","languages_url":"https://api.github.com/repos/moip/jcurtain/languages","stargazers_url":"https://api.github.com/repos/moip/jcurtain/stargazers","contributors_url":"https://api.github.com/repos/moip/jcurtain/contributors","subscribers_url":"https://api.github.com/repos/moip/jcurtain/subscribers","subscription_url":"https://api.github.com/repos/moip/jcurtain/subscription","commits_url":"https://api.github.com/repos/moip/jcurtain/commits{/sha}","git_commits_url":"https://api.github.com/repos/moip/jcurtain/git/commits{/sha}","comments_url":"https://api.github.com/repos/moip/jcurtain/comments{/number}","issue_comment_url":"https://api.github.com/repos/moip/jcurtain/issues/comments{/number}","contents_url":"https://api.github.com/repos/moip/jcurtain/contents/{+path}","compare_url":"https://api.github.com/repos/moip/jcurtain/compare/{base}...{head}","merges_url":"https://api.github.com/repos/moip/jcurtain/merges","archive_url":"https://api.github.com/repos/moip/jcurtain/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/moip/jcurtain/downloads","issues_url":"https://api.github.com/repos/moip/jcurtain/issues{/number}","pulls_url":"https://api.github.com/repos/moip/jcurtain/pulls{/number}","milestones_url":"https://api.github.com/repos/moip/jcurtain/milestones{/number}","notifications_url":"https://api.github.com/repos/moip/jcurtain/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/moip/jcurtain/labels{/name}","releases_url":"https://api.github.com/repos/moip/jcurtain/releases{/id}","deployments_url":"https://api.github.com/repos/moip/jcurtain/deployments","created_at":"2016-05-11T16:34:32Z","updated_at":"2017-10-06T04:28:04Z","pushed_at":"2017-10-28T19:00:10Z","git_url":"git://github.com/moip/jcurtain.git","ssh_url":"git@github.com:moip/jcurtain.git","clone_url":"https://github.com/moip/jcurtain.git","svn_url":"https://github.com/moip/jcurtain","homepage":"","size":82,"stargazers_count":8,"watchers_count":8,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":3,"forks":3,"open_issues":3,"watchers":8,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/moip/jcurtain/pulls/4"},"html":{"href":"https://github.com/moip/jcurtain/pull/4"},"issue":{"href":"https://api.github.com/repos/moip/jcurtain/issues/4"},"comments":{"href":"https://api.github.com/repos/moip/jcurtain/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/moip/jcurtain/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/moip/jcurtain/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/moip/jcurtain/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/moip/jcurtain/statuses/dd752606e69b9e63b71caa4f6484fd95037a4ca5"}},"author_association":"NONE"}}
{"actor":{"display_login":"ecolabardini"}}