{"action":"created","comment":{"url":"https://api.github.com/repos/baishancloud/lua-acid/pulls/comments/145021895","pull_request_review_id":69759489,"id":145021895,"diff_hunk":"@@ -0,0 +1,52 @@\n+local _M = {}\n+\n+local INF = math.huge\n+\n+\n+function _M.check_number_range(val, min, max, left_closed, right_closed)\n+    min = min or -INF\n+    max = max or INF\n+\n+    if left_closed == nil then\n+        left_closed = true\n+    end\n+\n+    if right_closed == nil then\n+        right_closed = true\n+    end\n+\n+    val = tonumber(val)\n+    if val == nil then\n+        return false\n+    end\n+\n+    if val < min or val == min and not left_closed then\n+        return false\n+    end\n+\n+    if val > max or val == max and not right_closed then\n+        return false\n+    end\n+\n+    return true\n+end\n+\n+\n+function _M.is_int(val)\n+    if type(val) ~= 'number' or val % 1 ~= 0 then\n+        return false\n+    end\n+\n+    return true\n+end\n+\n+\n+function _M.check_int_range(val, min, max)\n+    if _M.is_int(val) and _M.check_number_range(val, min, max) then","path":"lib/acid/typeutil.lua","position":45,"original_position":45,"commit_id":"bf9ec1fb3705c7d449a95caead1136dc94ece465","original_commit_id":"bf9ec1fb3705c7d449a95caead1136dc94ece465","user":{"login":"liu-s-yuan","id":26135159,"avatar_url":"https://avatars1.githubusercontent.com/u/26135159?v=4","gravatar_id":"","url":"https://api.github.com/users/liu-s-yuan","html_url":"https://github.com/liu-s-yuan","followers_url":"https://api.github.com/users/liu-s-yuan/followers","following_url":"https://api.github.com/users/liu-s-yuan/following{/other_user}","gists_url":"https://api.github.com/users/liu-s-yuan/gists{/gist_id}","starred_url":"https://api.github.com/users/liu-s-yuan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liu-s-yuan/subscriptions","organizations_url":"https://api.github.com/users/liu-s-yuan/orgs","repos_url":"https://api.github.com/users/liu-s-yuan/repos","events_url":"https://api.github.com/users/liu-s-yuan/events{/privacy}","received_events_url":"https://api.github.com/users/liu-s-yuan/received_events","type":"User","site_admin":false},"body":"嗷嗷，好的","created_at":"2017-10-17T03:47:09Z","updated_at":"2017-10-17T03:47:09Z","html_url":"https://github.com/baishancloud/lua-acid/pull/60#discussion_r145021895","pull_request_url":"https://api.github.com/repos/baishancloud/lua-acid/pulls/60","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/baishancloud/lua-acid/pulls/comments/145021895"},"html":{"href":"https://github.com/baishancloud/lua-acid/pull/60#discussion_r145021895"},"pull_request":{"href":"https://api.github.com/repos/baishancloud/lua-acid/pulls/60"}},"in_reply_to_id":145021373},"pull_request":{"url":"https://api.github.com/repos/baishancloud/lua-acid/pulls/60","id":146384897,"html_url":"https://github.com/baishancloud/lua-acid/pull/60","diff_url":"https://github.com/baishancloud/lua-acid/pull/60.diff","patch_url":"https://github.com/baishancloud/lua-acid/pull/60.patch","issue_url":"https://api.github.com/repos/baishancloud/lua-acid/issues/60","number":60,"state":"open","locked":false,"title":"添加了两个类型检查的函数","user":{"login":"liu-s-yuan","id":26135159,"avatar_url":"https://avatars1.githubusercontent.com/u/26135159?v=4","gravatar_id":"","url":"https://api.github.com/users/liu-s-yuan","html_url":"https://github.com/liu-s-yuan","followers_url":"https://api.github.com/users/liu-s-yuan/followers","following_url":"https://api.github.com/users/liu-s-yuan/following{/other_user}","gists_url":"https://api.github.com/users/liu-s-yuan/gists{/gist_id}","starred_url":"https://api.github.com/users/liu-s-yuan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liu-s-yuan/subscriptions","organizations_url":"https://api.github.com/users/liu-s-yuan/orgs","repos_url":"https://api.github.com/users/liu-s-yuan/repos","events_url":"https://api.github.com/users/liu-s-yuan/events{/privacy}","received_events_url":"https://api.github.com/users/liu-s-yuan/received_events","type":"User","site_admin":false},"body":"1.添加检查数字范围的函数\r\n2.添加了检查数字是否为整数的函数","created_at":"2017-10-13T07:02:33Z","updated_at":"2017-10-17T03:47:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c6669b4b9403b63f51b90bb82d9c10ec9f6ddf6d","assignee":null,"assignees":[],"requested_reviewers":[{"login":"myy2829","id":26829930,"avatar_url":"https://avatars0.githubusercontent.com/u/26829930?v=4","gravatar_id":"","url":"https://api.github.com/users/myy2829","html_url":"https://github.com/myy2829","followers_url":"https://api.github.com/users/myy2829/followers","following_url":"https://api.github.com/users/myy2829/following{/other_user}","gists_url":"https://api.github.com/users/myy2829/gists{/gist_id}","starred_url":"https://api.github.com/users/myy2829/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/myy2829/subscriptions","organizations_url":"https://api.github.com/users/myy2829/orgs","repos_url":"https://api.github.com/users/myy2829/repos","events_url":"https://api.github.com/users/myy2829/events{/privacy}","received_events_url":"https://api.github.com/users/myy2829/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/baishancloud/lua-acid/pulls/60/commits","review_comments_url":"https://api.github.com/repos/baishancloud/lua-acid/pulls/60/comments","review_comment_url":"https://api.github.com/repos/baishancloud/lua-acid/pulls/comments{/number}","comments_url":"https://api.github.com/repos/baishancloud/lua-acid/issues/60/comments","statuses_url":"https://api.github.com/repos/baishancloud/lua-acid/statuses/bf9ec1fb3705c7d449a95caead1136dc94ece465","head":{"label":"baishancloud:siyuan.typeutil","ref":"siyuan.typeutil","sha":"bf9ec1fb3705c7d449a95caead1136dc94ece465","user":{"login":"baishancloud","id":22903957,"avatar_url":"https://avatars3.githubusercontent.com/u/22903957?v=4","gravatar_id":"","url":"https://api.github.com/users/baishancloud","html_url":"https://github.com/baishancloud","followers_url":"https://api.github.com/users/baishancloud/followers","following_url":"https://api.github.com/users/baishancloud/following{/other_user}","gists_url":"https://api.github.com/users/baishancloud/gists{/gist_id}","starred_url":"https://api.github.com/users/baishancloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/baishancloud/subscriptions","organizations_url":"https://api.github.com/users/baishancloud/orgs","repos_url":"https://api.github.com/users/baishancloud/repos","events_url":"https://api.github.com/users/baishancloud/events{/privacy}","received_events_url":"https://api.github.com/users/baishancloud/received_events","type":"Organization","site_admin":false},"repo":{"id":83309707,"name":"lua-acid","full_name":"baishancloud/lua-acid","owner":{"login":"baishancloud","id":22903957,"avatar_url":"https://avatars3.githubusercontent.com/u/22903957?v=4","gravatar_id":"","url":"https://api.github.com/users/baishancloud","html_url":"https://github.com/baishancloud","followers_url":"https://api.github.com/users/baishancloud/followers","following_url":"https://api.github.com/users/baishancloud/following{/other_user}","gists_url":"https://api.github.com/users/baishancloud/gists{/gist_id}","starred_url":"https://api.github.com/users/baishancloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/baishancloud/subscriptions","organizations_url":"https://api.github.com/users/baishancloud/orgs","repos_url":"https://api.github.com/users/baishancloud/repos","events_url":"https://api.github.com/users/baishancloud/events{/privacy}","received_events_url":"https://api.github.com/users/baishancloud/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/baishancloud/lua-acid","description":"A collection of lua util functions","fork":false,"url":"https://api.github.com/repos/baishancloud/lua-acid","forks_url":"https://api.github.com/repos/baishancloud/lua-acid/forks","keys_url":"https://api.github.com/repos/baishancloud/lua-acid/keys{/key_id}","collaborators_url":"https://api.github.com/repos/baishancloud/lua-acid/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/baishancloud/lua-acid/teams","hooks_url":"https://api.github.com/repos/baishancloud/lua-acid/hooks","issue_events_url":"https://api.github.com/repos/baishancloud/lua-acid/issues/events{/number}","events_url":"https://api.github.com/repos/baishancloud/lua-acid/events","assignees_url":"https://api.github.com/repos/baishancloud/lua-acid/assignees{/user}","branches_url":"https://api.github.com/repos/baishancloud/lua-acid/branches{/branch}","tags_url":"https://api.github.com/repos/baishancloud/lua-acid/tags","blobs_url":"https://api.github.com/repos/baishancloud/lua-acid/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/baishancloud/lua-acid/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/baishancloud/lua-acid/git/refs{/sha}","trees_url":"https://api.github.com/repos/baishancloud/lua-acid/git/trees{/sha}","statuses_url":"https://api.github.com/repos/baishancloud/lua-acid/statuses/{sha}","languages_url":"https://api.github.com/repos/baishancloud/lua-acid/languages","stargazers_url":"https://api.github.com/repos/baishancloud/lua-acid/stargazers","contributors_url":"https://api.github.com/repos/baishancloud/lua-acid/contributors","subscribers_url":"https://api.github.com/repos/baishancloud/lua-acid/subscribers","subscription_url":"https://api.github.com/repos/baishancloud/lua-acid/subscription","commits_url":"https://api.github.com/repos/baishancloud/lua-acid/commits{/sha}","git_commits_url":"https://api.github.com/repos/baishancloud/lua-acid/git/commits{/sha}","comments_url":"https://api.github.com/repos/baishancloud/lua-acid/comments{/number}","issue_comment_url":"https://api.github.com/repos/baishancloud/lua-acid/issues/comments{/number}","contents_url":"https://api.github.com/repos/baishancloud/lua-acid/contents/{+path}","compare_url":"https://api.github.com/repos/baishancloud/lua-acid/compare/{base}...{head}","merges_url":"https://api.github.com/repos/baishancloud/lua-acid/merges","archive_url":"https://api.github.com/repos/baishancloud/lua-acid/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/baishancloud/lua-acid/downloads","issues_url":"https://api.github.com/repos/baishancloud/lua-acid/issues{/number}","pulls_url":"https://api.github.com/repos/baishancloud/lua-acid/pulls{/number}","milestones_url":"https://api.github.com/repos/baishancloud/lua-acid/milestones{/number}","notifications_url":"https://api.github.com/repos/baishancloud/lua-acid/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/baishancloud/lua-acid/labels{/name}","releases_url":"https://api.github.com/repos/baishancloud/lua-acid/releases{/id}","deployments_url":"https://api.github.com/repos/baishancloud/lua-acid/deployments","created_at":"2017-02-27T12:49:27Z","updated_at":"2017-10-14T20:22:03Z","pushed_at":"2017-10-16T09:14:14Z","git_url":"git://github.com/baishancloud/lua-acid.git","ssh_url":"git@github.com:baishancloud/lua-acid.git","clone_url":"https://github.com/baishancloud/lua-acid.git","svn_url":"https://github.com/baishancloud/lua-acid","homepage":null,"size":259,"stargazers_count":3,"watchers_count":3,"language":"Lua","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":13,"forks":2,"open_issues":13,"watchers":3,"default_branch":"master"}},"base":{"label":"baishancloud:master","ref":"master","sha":"abb617709296593e36906b327427f9bdfd45f21a","user":{"login":"baishancloud","id":22903957,"avatar_url":"https://avatars3.githubusercontent.com/u/22903957?v=4","gravatar_id":"","url":"https://api.github.com/users/baishancloud","html_url":"https://github.com/baishancloud","followers_url":"https://api.github.com/users/baishancloud/followers","following_url":"https://api.github.com/users/baishancloud/following{/other_user}","gists_url":"https://api.github.com/users/baishancloud/gists{/gist_id}","starred_url":"https://api.github.com/users/baishancloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/baishancloud/subscriptions","organizations_url":"https://api.github.com/users/baishancloud/orgs","repos_url":"https://api.github.com/users/baishancloud/repos","events_url":"https://api.github.com/users/baishancloud/events{/privacy}","received_events_url":"https://api.github.com/users/baishancloud/received_events","type":"Organization","site_admin":false},"repo":{"id":83309707,"name":"lua-acid","full_name":"baishancloud/lua-acid","owner":{"login":"baishancloud","id":22903957,"avatar_url":"https://avatars3.githubusercontent.com/u/22903957?v=4","gravatar_id":"","url":"https://api.github.com/users/baishancloud","html_url":"https://github.com/baishancloud","followers_url":"https://api.github.com/users/baishancloud/followers","following_url":"https://api.github.com/users/baishancloud/following{/other_user}","gists_url":"https://api.github.com/users/baishancloud/gists{/gist_id}","starred_url":"https://api.github.com/users/baishancloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/baishancloud/subscriptions","organizations_url":"https://api.github.com/users/baishancloud/orgs","repos_url":"https://api.github.com/users/baishancloud/repos","events_url":"https://api.github.com/users/baishancloud/events{/privacy}","received_events_url":"https://api.github.com/users/baishancloud/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/baishancloud/lua-acid","description":"A collection of lua util functions","fork":false,"url":"https://api.github.com/repos/baishancloud/lua-acid","forks_url":"https://api.github.com/repos/baishancloud/lua-acid/forks","keys_url":"https://api.github.com/repos/baishancloud/lua-acid/keys{/key_id}","collaborators_url":"https://api.github.com/repos/baishancloud/lua-acid/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/baishancloud/lua-acid/teams","hooks_url":"https://api.github.com/repos/baishancloud/lua-acid/hooks","issue_events_url":"https://api.github.com/repos/baishancloud/lua-acid/issues/events{/number}","events_url":"https://api.github.com/repos/baishancloud/lua-acid/events","assignees_url":"https://api.github.com/repos/baishancloud/lua-acid/assignees{/user}","branches_url":"https://api.github.com/repos/baishancloud/lua-acid/branches{/branch}","tags_url":"https://api.github.com/repos/baishancloud/lua-acid/tags","blobs_url":"https://api.github.com/repos/baishancloud/lua-acid/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/baishancloud/lua-acid/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/baishancloud/lua-acid/git/refs{/sha}","trees_url":"https://api.github.com/repos/baishancloud/lua-acid/git/trees{/sha}","statuses_url":"https://api.github.com/repos/baishancloud/lua-acid/statuses/{sha}","languages_url":"https://api.github.com/repos/baishancloud/lua-acid/languages","stargazers_url":"https://api.github.com/repos/baishancloud/lua-acid/stargazers","contributors_url":"https://api.github.com/repos/baishancloud/lua-acid/contributors","subscribers_url":"https://api.github.com/repos/baishancloud/lua-acid/subscribers","subscription_url":"https://api.github.com/repos/baishancloud/lua-acid/subscription","commits_url":"https://api.github.com/repos/baishancloud/lua-acid/commits{/sha}","git_commits_url":"https://api.github.com/repos/baishancloud/lua-acid/git/commits{/sha}","comments_url":"https://api.github.com/repos/baishancloud/lua-acid/comments{/number}","issue_comment_url":"https://api.github.com/repos/baishancloud/lua-acid/issues/comments{/number}","contents_url":"https://api.github.com/repos/baishancloud/lua-acid/contents/{+path}","compare_url":"https://api.github.com/repos/baishancloud/lua-acid/compare/{base}...{head}","merges_url":"https://api.github.com/repos/baishancloud/lua-acid/merges","archive_url":"https://api.github.com/repos/baishancloud/lua-acid/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/baishancloud/lua-acid/downloads","issues_url":"https://api.github.com/repos/baishancloud/lua-acid/issues{/number}","pulls_url":"https://api.github.com/repos/baishancloud/lua-acid/pulls{/number}","milestones_url":"https://api.github.com/repos/baishancloud/lua-acid/milestones{/number}","notifications_url":"https://api.github.com/repos/baishancloud/lua-acid/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/baishancloud/lua-acid/labels{/name}","releases_url":"https://api.github.com/repos/baishancloud/lua-acid/releases{/id}","deployments_url":"https://api.github.com/repos/baishancloud/lua-acid/deployments","created_at":"2017-02-27T12:49:27Z","updated_at":"2017-10-14T20:22:03Z","pushed_at":"2017-10-16T09:14:14Z","git_url":"git://github.com/baishancloud/lua-acid.git","ssh_url":"git@github.com:baishancloud/lua-acid.git","clone_url":"https://github.com/baishancloud/lua-acid.git","svn_url":"https://github.com/baishancloud/lua-acid","homepage":null,"size":259,"stargazers_count":3,"watchers_count":3,"language":"Lua","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":13,"forks":2,"open_issues":13,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/baishancloud/lua-acid/pulls/60"},"html":{"href":"https://github.com/baishancloud/lua-acid/pull/60"},"issue":{"href":"https://api.github.com/repos/baishancloud/lua-acid/issues/60"},"comments":{"href":"https://api.github.com/repos/baishancloud/lua-acid/issues/60/comments"},"review_comments":{"href":"https://api.github.com/repos/baishancloud/lua-acid/pulls/60/comments"},"review_comment":{"href":"https://api.github.com/repos/baishancloud/lua-acid/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/baishancloud/lua-acid/pulls/60/commits"},"statuses":{"href":"https://api.github.com/repos/baishancloud/lua-acid/statuses/bf9ec1fb3705c7d449a95caead1136dc94ece465"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"liu-s-yuan"}}