{"action":"created","comment":{"url":"https://api.github.com/repos/Nirvanchik/nirvana-bot/pulls/comments/201840520","pull_request_review_id":136423538,"id":201840520,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwMTg0MDUyMA==","diff_hunk":"@@ -73,6 +83,34 @@\n         return (Set<String>) optionToCollection(option, withDQuotes, separator, set);\n     }\n \n+    /**\n+     * Returns integer value in given {@link Properties} object or default value if it's not found.\n+     *\n+     * @param props {@link Properties} object, properties must be loaded beforehand.\n+     * @param name the name of property to get\n+     * @param def default value\n+     * @param notifyNotFound write error to log if this property not found\n+     * @return property value (converted to int) or default value\n+     */\n+    public static int validateIntegerSetting(Properties props, String name, int def,\n+            boolean notifyNotFound) {\n+        try {\n+            if (!props.containsKey(name)) {\n+                if (notifyNotFound) {\n+                    sLog.info(\"settings: value of {} not found in settings, use default: {}\",\n+                            name, def);\n+                }\n+                return def;\n+            }\n+            String str = props.getProperty(name);\n+            return Integer.parseInt(str);","path":"src/main/java/org/wikipedia/nirvana/BotUtils.java","position":51,"original_position":51,"commit_id":"42df51a2e33e98909aad20f9b0251fcd7c53142c","original_commit_id":"42df51a2e33e98909aad20f9b0251fcd7c53142c","user":{"login":"Nirvanchik","id":13875458,"node_id":"MDQ6VXNlcjEzODc1NDU4","avatar_url":"https://avatars2.githubusercontent.com/u/13875458?v=4","gravatar_id":"","url":"https://api.github.com/users/Nirvanchik","html_url":"https://github.com/Nirvanchik","followers_url":"https://api.github.com/users/Nirvanchik/followers","following_url":"https://api.github.com/users/Nirvanchik/following{/other_user}","gists_url":"https://api.github.com/users/Nirvanchik/gists{/gist_id}","starred_url":"https://api.github.com/users/Nirvanchik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nirvanchik/subscriptions","organizations_url":"https://api.github.com/users/Nirvanchik/orgs","repos_url":"https://api.github.com/users/Nirvanchik/repos","events_url":"https://api.github.com/users/Nirvanchik/events{/privacy}","received_events_url":"https://api.github.com/users/Nirvanchik/received_events","type":"User","site_admin":false},"body":"Посмотрел. В данном случае, оставил бы как есть.\r\nЧто за кеш, я не очень понял, можешь пояснить?\r\nНо я понял что принцип такой: если тебе нужен int, то parseInt(), а если Integer, то valueOf()","created_at":"2018-07-11T21:11:28Z","updated_at":"2018-07-11T21:11:28Z","html_url":"https://github.com/Nirvanchik/nirvana-bot/pull/21#discussion_r201840520","pull_request_url":"https://api.github.com/repos/Nirvanchik/nirvana-bot/pulls/21","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/Nirvanchik/nirvana-bot/pulls/comments/201840520"},"html":{"href":"https://github.com/Nirvanchik/nirvana-bot/pull/21#discussion_r201840520"},"pull_request":{"href":"https://api.github.com/repos/Nirvanchik/nirvana-bot/pulls/21"}},"in_reply_to_id":201336572},"pull_request":{"url":"https://api.github.com/repos/Nirvanchik/nirvana-bot/pulls/21","id":199865878,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk5ODY1ODc4","html_url":"https://github.com/Nirvanchik/nirvana-bot/pull/21","diff_url":"https://github.com/Nirvanchik/nirvana-bot/pull/21.diff","patch_url":"https://github.com/Nirvanchik/nirvana-bot/pull/21.patch","issue_url":"https://api.github.com/repos/Nirvanchik/nirvana-bot/issues/21","number":21,"state":"closed","locked":false,"title":" #20 Move validateIntegerSetting() method to BotUtils, write tests.","user":{"login":"Nirvanchik","id":13875458,"node_id":"MDQ6VXNlcjEzODc1NDU4","avatar_url":"https://avatars2.githubusercontent.com/u/13875458?v=4","gravatar_id":"","url":"https://api.github.com/users/Nirvanchik","html_url":"https://github.com/Nirvanchik","followers_url":"https://api.github.com/users/Nirvanchik/followers","following_url":"https://api.github.com/users/Nirvanchik/following{/other_user}","gists_url":"https://api.github.com/users/Nirvanchik/gists{/gist_id}","starred_url":"https://api.github.com/users/Nirvanchik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nirvanchik/subscriptions","organizations_url":"https://api.github.com/users/Nirvanchik/orgs","repos_url":"https://api.github.com/users/Nirvanchik/repos","events_url":"https://api.github.com/users/Nirvanchik/events{/privacy}","received_events_url":"https://api.github.com/users/Nirvanchik/received_events","type":"User","site_admin":false},"body":"Небольшой рефакторинг.","created_at":"2018-07-06T23:22:45Z","updated_at":"2018-07-11T21:11:28Z","closed_at":"2018-07-10T13:15:46Z","merged_at":"2018-07-10T13:15:46Z","merge_commit_sha":"db5c6e78d67e91815e7731215f72622f280a595e","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Nirvanchik/nirvana-bot/pulls/21/commits","review_comments_url":"https://api.github.com/repos/Nirvanchik/nirvana-bot/pulls/21/comments","review_comment_url":"https://api.github.com/repos/Nirvanchik/nirvana-bot/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Nirvanchik/nirvana-bot/issues/21/comments","statuses_url":"https://api.github.com/repos/Nirvanchik/nirvana-bot/statuses/42df51a2e33e98909aad20f9b0251fcd7c53142c","head":{"label":"Nirvanchik:work/20/1","ref":"work/20/1","sha":"42df51a2e33e98909aad20f9b0251fcd7c53142c","user":{"login":"Nirvanchik","id":13875458,"node_id":"MDQ6VXNlcjEzODc1NDU4","avatar_url":"https://avatars2.githubusercontent.com/u/13875458?v=4","gravatar_id":"","url":"https://api.github.com/users/Nirvanchik","html_url":"https://github.com/Nirvanchik","followers_url":"https://api.github.com/users/Nirvanchik/followers","following_url":"https://api.github.com/users/Nirvanchik/following{/other_user}","gists_url":"https://api.github.com/users/Nirvanchik/gists{/gist_id}","starred_url":"https://api.github.com/users/Nirvanchik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nirvanchik/subscriptions","organizations_url":"https://api.github.com/users/Nirvanchik/orgs","repos_url":"https://api.github.com/users/Nirvanchik/repos","events_url":"https://api.github.com/users/Nirvanchik/events{/privacy}","received_events_url":"https://api.github.com/users/Nirvanchik/received_events","type":"User","site_admin":false},"repo":{"id":41056497,"node_id":"MDEwOlJlcG9zaXRvcnk0MTA1NjQ5Nw==","name":"nirvana-bot","full_name":"Nirvanchik/nirvana-bot","owner":{"login":"Nirvanchik","id":13875458,"node_id":"MDQ6VXNlcjEzODc1NDU4","avatar_url":"https://avatars2.githubusercontent.com/u/13875458?v=4","gravatar_id":"","url":"https://api.github.com/users/Nirvanchik","html_url":"https://github.com/Nirvanchik","followers_url":"https://api.github.com/users/Nirvanchik/followers","following_url":"https://api.github.com/users/Nirvanchik/following{/other_user}","gists_url":"https://api.github.com/users/Nirvanchik/gists{/gist_id}","starred_url":"https://api.github.com/users/Nirvanchik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nirvanchik/subscriptions","organizations_url":"https://api.github.com/users/Nirvanchik/orgs","repos_url":"https://api.github.com/users/Nirvanchik/repos","events_url":"https://api.github.com/users/Nirvanchik/events{/privacy}","received_events_url":"https://api.github.com/users/Nirvanchik/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Nirvanchik/nirvana-bot","description":"Russian Wikipedia bot","fork":false,"url":"https://api.github.com/repos/Nirvanchik/nirvana-bot","forks_url":"https://api.github.com/repos/Nirvanchik/nirvana-bot/forks","keys_url":"https://api.github.com/repos/Nirvanchik/nirvana-bot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Nirvanchik/nirvana-bot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Nirvanchik/nirvana-bot/teams","hooks_url":"https://api.github.com/repos/Nirvanchik/nirvana-bot/hooks","issue_events_url":"https://api.github.com/repos/Nirvanchik/nirvana-bot/issues/events{/number}","events_url":"https://api.github.com/repos/Nirvanchik/nirvana-bot/events","assignees_url":"https://api.github.com/repos/Nirvanchik/nirvana-bot/assignees{/user}","branches_url":"https://api.github.com/repos/Nirvanchik/nirvana-bot/branches{/branch}","tags_url":"https://api.github.com/repos/Nirvanchik/nirvana-bot/tags","blobs_url":"https://api.github.com/repos/Nirvanchik/nirvana-bot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Nirvanchik/nirvana-bot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Nirvanchik/nirvana-bot/git/refs{/sha}","trees_url":"https://api.github.com/repos/Nirvanchik/nirvana-bot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Nirvanchik/nirvana-bot/statuses/{sha}","languages_url":"https://api.github.com/repos/Nirvanchik/nirvana-bot/languages","stargazers_url":"https://api.github.com/repos/Nirvanchik/nirvana-bot/stargazers","contributors_url":"https://api.github.com/repos/Nirvanchik/nirvana-bot/contributors","subscribers_url":"https://api.github.com/repos/Nirvanchik/nirvana-bot/subscribers","subscription_url":"https://api.github.com/repos/Nirvanchik/nirvana-bot/subscription","commits_url":"https://api.github.com/repos/Nirvanchik/nirvana-bot/commits{/sha}","git_commits_url":"https://api.github.com/repos/Nirvanchik/nirvana-bot/git/commits{/sha}","comments_url":"https://api.github.com/repos/Nirvanchik/nirvana-bot/comments{/number}","issue_comment_url":"https://api.github.com/repos/Nirvanchik/nirvana-bot/issues/comments{/number}","contents_url":"https://api.github.com/repos/Nirvanchik/nirvana-bot/contents/{+path}","compare_url":"https://api.github.com/repos/Nirvanchik/nirvana-bot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Nirvanchik/nirvana-bot/merges","archive_url":"https://api.github.com/repos/Nirvanchik/nirvana-bot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Nirvanchik/nirvana-bot/downloads","issues_url":"https://api.github.com/repos/Nirvanchik/nirvana-bot/issues{/number}","pulls_url":"https://api.github.com/repos/Nirvanchik/nirvana-bot/pulls{/number}","milestones_url":"https://api.github.com/repos/Nirvanchik/nirvana-bot/milestones{/number}","notifications_url":"https://api.github.com/repos/Nirvanchik/nirvana-bot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Nirvanchik/nirvana-bot/labels{/name}","releases_url":"https://api.github.com/repos/Nirvanchik/nirvana-bot/releases{/id}","deployments_url":"https://api.github.com/repos/Nirvanchik/nirvana-bot/deployments","created_at":"2015-08-19T19:49:57Z","updated_at":"2018-07-10T13:15:48Z","pushed_at":"2018-07-10T13:15:47Z","git_url":"git://github.com/Nirvanchik/nirvana-bot.git","ssh_url":"git@github.com:Nirvanchik/nirvana-bot.git","clone_url":"https://github.com/Nirvanchik/nirvana-bot.git","svn_url":"https://github.com/Nirvanchik/nirvana-bot","homepage":"","size":12678,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":false,"has_wiki":false,"has_pages":true,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":13,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":13,"watchers":1,"default_branch":"master"}},"base":{"label":"Nirvanchik:master","ref":"master","sha":"0b82a1ea41553e52f838742ade273e02a34f8c0c","user":{"login":"Nirvanchik","id":13875458,"node_id":"MDQ6VXNlcjEzODc1NDU4","avatar_url":"https://avatars2.githubusercontent.com/u/13875458?v=4","gravatar_id":"","url":"https://api.github.com/users/Nirvanchik","html_url":"https://github.com/Nirvanchik","followers_url":"https://api.github.com/users/Nirvanchik/followers","following_url":"https://api.github.com/users/Nirvanchik/following{/other_user}","gists_url":"https://api.github.com/users/Nirvanchik/gists{/gist_id}","starred_url":"https://api.github.com/users/Nirvanchik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nirvanchik/subscriptions","organizations_url":"https://api.github.com/users/Nirvanchik/orgs","repos_url":"https://api.github.com/users/Nirvanchik/repos","events_url":"https://api.github.com/users/Nirvanchik/events{/privacy}","received_events_url":"https://api.github.com/users/Nirvanchik/received_events","type":"User","site_admin":false},"repo":{"id":41056497,"node_id":"MDEwOlJlcG9zaXRvcnk0MTA1NjQ5Nw==","name":"nirvana-bot","full_name":"Nirvanchik/nirvana-bot","owner":{"login":"Nirvanchik","id":13875458,"node_id":"MDQ6VXNlcjEzODc1NDU4","avatar_url":"https://avatars2.githubusercontent.com/u/13875458?v=4","gravatar_id":"","url":"https://api.github.com/users/Nirvanchik","html_url":"https://github.com/Nirvanchik","followers_url":"https://api.github.com/users/Nirvanchik/followers","following_url":"https://api.github.com/users/Nirvanchik/following{/other_user}","gists_url":"https://api.github.com/users/Nirvanchik/gists{/gist_id}","starred_url":"https://api.github.com/users/Nirvanchik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nirvanchik/subscriptions","organizations_url":"https://api.github.com/users/Nirvanchik/orgs","repos_url":"https://api.github.com/users/Nirvanchik/repos","events_url":"https://api.github.com/users/Nirvanchik/events{/privacy}","received_events_url":"https://api.github.com/users/Nirvanchik/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Nirvanchik/nirvana-bot","description":"Russian Wikipedia bot","fork":false,"url":"https://api.github.com/repos/Nirvanchik/nirvana-bot","forks_url":"https://api.github.com/repos/Nirvanchik/nirvana-bot/forks","keys_url":"https://api.github.com/repos/Nirvanchik/nirvana-bot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Nirvanchik/nirvana-bot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Nirvanchik/nirvana-bot/teams","hooks_url":"https://api.github.com/repos/Nirvanchik/nirvana-bot/hooks","issue_events_url":"https://api.github.com/repos/Nirvanchik/nirvana-bot/issues/events{/number}","events_url":"https://api.github.com/repos/Nirvanchik/nirvana-bot/events","assignees_url":"https://api.github.com/repos/Nirvanchik/nirvana-bot/assignees{/user}","branches_url":"https://api.github.com/repos/Nirvanchik/nirvana-bot/branches{/branch}","tags_url":"https://api.github.com/repos/Nirvanchik/nirvana-bot/tags","blobs_url":"https://api.github.com/repos/Nirvanchik/nirvana-bot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Nirvanchik/nirvana-bot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Nirvanchik/nirvana-bot/git/refs{/sha}","trees_url":"https://api.github.com/repos/Nirvanchik/nirvana-bot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Nirvanchik/nirvana-bot/statuses/{sha}","languages_url":"https://api.github.com/repos/Nirvanchik/nirvana-bot/languages","stargazers_url":"https://api.github.com/repos/Nirvanchik/nirvana-bot/stargazers","contributors_url":"https://api.github.com/repos/Nirvanchik/nirvana-bot/contributors","subscribers_url":"https://api.github.com/repos/Nirvanchik/nirvana-bot/subscribers","subscription_url":"https://api.github.com/repos/Nirvanchik/nirvana-bot/subscription","commits_url":"https://api.github.com/repos/Nirvanchik/nirvana-bot/commits{/sha}","git_commits_url":"https://api.github.com/repos/Nirvanchik/nirvana-bot/git/commits{/sha}","comments_url":"https://api.github.com/repos/Nirvanchik/nirvana-bot/comments{/number}","issue_comment_url":"https://api.github.com/repos/Nirvanchik/nirvana-bot/issues/comments{/number}","contents_url":"https://api.github.com/repos/Nirvanchik/nirvana-bot/contents/{+path}","compare_url":"https://api.github.com/repos/Nirvanchik/nirvana-bot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Nirvanchik/nirvana-bot/merges","archive_url":"https://api.github.com/repos/Nirvanchik/nirvana-bot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Nirvanchik/nirvana-bot/downloads","issues_url":"https://api.github.com/repos/Nirvanchik/nirvana-bot/issues{/number}","pulls_url":"https://api.github.com/repos/Nirvanchik/nirvana-bot/pulls{/number}","milestones_url":"https://api.github.com/repos/Nirvanchik/nirvana-bot/milestones{/number}","notifications_url":"https://api.github.com/repos/Nirvanchik/nirvana-bot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Nirvanchik/nirvana-bot/labels{/name}","releases_url":"https://api.github.com/repos/Nirvanchik/nirvana-bot/releases{/id}","deployments_url":"https://api.github.com/repos/Nirvanchik/nirvana-bot/deployments","created_at":"2015-08-19T19:49:57Z","updated_at":"2018-07-10T13:15:48Z","pushed_at":"2018-07-10T13:15:47Z","git_url":"git://github.com/Nirvanchik/nirvana-bot.git","ssh_url":"git@github.com:Nirvanchik/nirvana-bot.git","clone_url":"https://github.com/Nirvanchik/nirvana-bot.git","svn_url":"https://github.com/Nirvanchik/nirvana-bot","homepage":"","size":12678,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":false,"has_wiki":false,"has_pages":true,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":13,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":13,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Nirvanchik/nirvana-bot/pulls/21"},"html":{"href":"https://github.com/Nirvanchik/nirvana-bot/pull/21"},"issue":{"href":"https://api.github.com/repos/Nirvanchik/nirvana-bot/issues/21"},"comments":{"href":"https://api.github.com/repos/Nirvanchik/nirvana-bot/issues/21/comments"},"review_comments":{"href":"https://api.github.com/repos/Nirvanchik/nirvana-bot/pulls/21/comments"},"review_comment":{"href":"https://api.github.com/repos/Nirvanchik/nirvana-bot/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Nirvanchik/nirvana-bot/pulls/21/commits"},"statuses":{"href":"https://api.github.com/repos/Nirvanchik/nirvana-bot/statuses/42df51a2e33e98909aad20f9b0251fcd7c53142c"}},"author_association":"OWNER"}}
{"actor":{"display_login":"Nirvanchik"}}