GitHub PullRequestReviewCommentEvent at 2014-10-30 04:58:54
Repository: tocc
Actor: aidin36
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/aidin36/tocc/pulls/comments/19587867","id":19587867,"diff_hunk":"@@ -50,9 +50,38 @@ namespace tocccli\n   {\n     if (cmd_arguments.empty() || cmd_arguments.size() != 1)\n     {\n-      throw InvalidParametersError(\"-i or --id takes exactly one argument.\");\n+      throw InvalidParametersError(\"-d or --id takes exactly one argument.\");\n     }\n \n+    /* id must be 7 characters long and all 0-9 or A-M (base-23 digit) */\n+  \n+    std::string id = cmd_arguments[0];\n+    bool valid_id = true;\n+    if (id.size() == 7)\n+    {\n+      for (int i = 0; i < 7; i++)\n+      {\n+        if ((id[i] >= '0' && id[i] <= '9')\n+         || (id[i] >= 'a' && id[i] <= 'm')\n+         || (id[i] >= 'A' && id[i] <= 'M'))\n+        {\n+        }\n+        else\n+        {\n+          valid_id = false;\n+          break;\n+        }\n+      }\n+    }\n+    else\n+    {\n+      valid_id = false;\n+    }\n+    if (! valid_id)\n+    {\n+      throw InvalidParametersError(\"Id must be seven characters, each 0-9 or A-M or a-m.\");","path":"cli/src/selectors/id_selector.cpp","position":34,"original_position":34,"commit_id":"19221bb9befdec37dc6d7f1da51622f1c83fd469","original_commit_id":"19221bb9befdec37dc6d7f1da51622f1c83fd469","user":{"login":"aidin36","id":3810651,"avatar_url":"https://avatars.githubusercontent.com/u/3810651?v=2","gravatar_id":"","url":"https://api.github.com/users/aidin36","html_url":"https://github.com/aidin36","followers_url":"https://api.github.com/users/aidin36/followers","following_url":"https://api.github.com/users/aidin36/following{/other_user}","gists_url":"https://api.github.com/users/aidin36/gists{/gist_id}","starred_url":"https://api.github.com/users/aidin36/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aidin36/subscriptions","organizations_url":"https://api.github.com/users/aidin36/orgs","repos_url":"https://api.github.com/users/aidin36/repos","events_url":"https://api.github.com/users/aidin36/events{/privacy}","received_events_url":"https://api.github.com/users/aidin36/received_events","type":"User","site_admin":false},"body":"I prefer *ID mst be seven characters, and only contains 0-9 and a-m.*","created_at":"2014-10-30T04:58:54Z","updated_at":"2014-10-30T04:58:54Z","html_url":"https://github.com/aidin36/tocc/pull/96#discussion_r19587867","pull_request_url":"https://api.github.com/repos/aidin36/tocc/pulls/96","_links":{"self":{"href":"https://api.github.com/repos/aidin36/tocc/pulls/comments/19587867"},"html":{"href":"https://github.com/aidin36/tocc/pull/96#discussion_r19587867"},"pull_request":{"href":"https://api.github.com/repos/aidin36/tocc/pulls/96"}}},"pull_request":{"url":"https://api.github.com/repos/aidin36/tocc/pulls/96","id":23511624,"html_url":"https://github.com/aidin36/tocc/pull/96","diff_url":"https://github.com/aidin36/tocc/pull/96.diff","patch_url":"https://github.com/aidin36/tocc/pull/96.patch","issue_url":"https://api.github.com/repos/aidin36/tocc/issues/96","number":96,"state":"open","locked":false,"title":"Issue 90","user":{"login":"DThiebaud","id":1722014,"avatar_url":"https://avatars.githubusercontent.com/u/1722014?v=2","gravatar_id":"","url":"https://api.github.com/users/DThiebaud","html_url":"https://github.com/DThiebaud","followers_url":"https://api.github.com/users/DThiebaud/followers","following_url":"https://api.github.com/users/DThiebaud/following{/other_user}","gists_url":"https://api.github.com/users/DThiebaud/gists{/gist_id}","starred_url":"https://api.github.com/users/DThiebaud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DThiebaud/subscriptions","organizations_url":"https://api.github.com/users/DThiebaud/orgs","repos_url":"https://api.github.com/users/DThiebaud/repos","events_url":"https://api.github.com/users/DThiebaud/events{/privacy}","received_events_url":"https://api.github.com/users/DThiebaud/received_events","type":"User","site_admin":false},"body":"","created_at":"2014-10-29T07:03:55Z","updated_at":"2014-10-30T04:58:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7f124470edfe73bd238d4ca9ae319fabbfed5c43","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/aidin36/tocc/pulls/96/commits","review_comments_url":"https://api.github.com/repos/aidin36/tocc/pulls/96/comments","review_comment_url":"https://api.github.com/repos/aidin36/tocc/pulls/comments/{number}","comments_url":"https://api.github.com/repos/aidin36/tocc/issues/96/comments","statuses_url":"https://api.github.com/repos/aidin36/tocc/statuses/19221bb9befdec37dc6d7f1da51622f1c83fd469","head":{"label":"DThiebaud:issue90","ref":"issue90","sha":"19221bb9befdec37dc6d7f1da51622f1c83fd469","user":{"login":"DThiebaud","id":1722014,"avatar_url":"https://avatars.githubusercontent.com/u/1722014?v=2","gravatar_id":"","url":"https://api.github.com/users/DThiebaud","html_url":"https://github.com/DThiebaud","followers_url":"https://api.github.com/users/DThiebaud/followers","following_url":"https://api.github.com/users/DThiebaud/following{/other_user}","gists_url":"https://api.github.com/users/DThiebaud/gists{/gist_id}","starred_url":"https://api.github.com/users/DThiebaud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DThiebaud/subscriptions","organizations_url":"https://api.github.com/users/DThiebaud/orgs","repos_url":"https://api.github.com/users/DThiebaud/repos","events_url":"https://api.github.com/users/DThiebaud/events{/privacy}","received_events_url":"https://api.github.com/users/DThiebaud/received_events","type":"User","site_admin":false},"repo":{"id":25607766,"name":"tocc","full_name":"DThiebaud/tocc","owner":{"login":"DThiebaud","id":1722014,"avatar_url":"https://avatars.githubusercontent.com/u/1722014?v=2","gravatar_id":"","url":"https://api.github.com/users/DThiebaud","html_url":"https://github.com/DThiebaud","followers_url":"https://api.github.com/users/DThiebaud/followers","following_url":"https://api.github.com/users/DThiebaud/following{/other_user}","gists_url":"https://api.github.com/users/DThiebaud/gists{/gist_id}","starred_url":"https://api.github.com/users/DThiebaud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DThiebaud/subscriptions","organizations_url":"https://api.github.com/users/DThiebaud/orgs","repos_url":"https://api.github.com/users/DThiebaud/repos","events_url":"https://api.github.com/users/DThiebaud/events{/privacy}","received_events_url":"https://api.github.com/users/DThiebaud/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/DThiebaud/tocc","description":"A Tool for Obsessive Compulsive Classifiers","fork":true,"url":"https://api.github.com/repos/DThiebaud/tocc","forks_url":"https://api.github.com/repos/DThiebaud/tocc/forks","keys_url":"https://api.github.com/repos/DThiebaud/tocc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DThiebaud/tocc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DThiebaud/tocc/teams","hooks_url":"https://api.github.com/repos/DThiebaud/tocc/hooks","issue_events_url":"https://api.github.com/repos/DThiebaud/tocc/issues/events{/number}","events_url":"https://api.github.com/repos/DThiebaud/tocc/events","assignees_url":"https://api.github.com/repos/DThiebaud/tocc/assignees{/user}","branches_url":"https://api.github.com/repos/DThiebaud/tocc/branches{/branch}","tags_url":"https://api.github.com/repos/DThiebaud/tocc/tags","blobs_url":"https://api.github.com/repos/DThiebaud/tocc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DThiebaud/tocc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DThiebaud/tocc/git/refs{/sha}","trees_url":"https://api.github.com/repos/DThiebaud/tocc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DThiebaud/tocc/statuses/{sha}","languages_url":"https://api.github.com/repos/DThiebaud/tocc/languages","stargazers_url":"https://api.github.com/repos/DThiebaud/tocc/stargazers","contributors_url":"https://api.github.com/repos/DThiebaud/tocc/contributors","subscribers_url":"https://api.github.com/repos/DThiebaud/tocc/subscribers","subscription_url":"https://api.github.com/repos/DThiebaud/tocc/subscription","commits_url":"https://api.github.com/repos/DThiebaud/tocc/commits{/sha}","git_commits_url":"https://api.github.com/repos/DThiebaud/tocc/git/commits{/sha}","comments_url":"https://api.github.com/repos/DThiebaud/tocc/comments{/number}","issue_comment_url":"https://api.github.com/repos/DThiebaud/tocc/issues/comments/{number}","contents_url":"https://api.github.com/repos/DThiebaud/tocc/contents/{+path}","compare_url":"https://api.github.com/repos/DThiebaud/tocc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DThiebaud/tocc/merges","archive_url":"https://api.github.com/repos/DThiebaud/tocc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DThiebaud/tocc/downloads","issues_url":"https://api.github.com/repos/DThiebaud/tocc/issues{/number}","pulls_url":"https://api.github.com/repos/DThiebaud/tocc/pulls{/number}","milestones_url":"https://api.github.com/repos/DThiebaud/tocc/milestones{/number}","notifications_url":"https://api.github.com/repos/DThiebaud/tocc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DThiebaud/tocc/labels{/name}","releases_url":"https://api.github.com/repos/DThiebaud/tocc/releases{/id}","created_at":"2014-10-22T22:35:20Z","updated_at":"2014-10-26T05:55:43Z","pushed_at":"2014-10-29T08:31:17Z","git_url":"git://github.com/DThiebaud/tocc.git","ssh_url":"git@github.com:DThiebaud/tocc.git","clone_url":"https://github.com/DThiebaud/tocc.git","svn_url":"https://github.com/DThiebaud/tocc","homepage":"","size":731,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"aidin36:master","ref":"master","sha":"6dc3cf2c59448fd485eef9919114f58fc5be2a64","user":{"login":"aidin36","id":3810651,"avatar_url":"https://avatars.githubusercontent.com/u/3810651?v=2","gravatar_id":"","url":"https://api.github.com/users/aidin36","html_url":"https://github.com/aidin36","followers_url":"https://api.github.com/users/aidin36/followers","following_url":"https://api.github.com/users/aidin36/following{/other_user}","gists_url":"https://api.github.com/users/aidin36/gists{/gist_id}","starred_url":"https://api.github.com/users/aidin36/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aidin36/subscriptions","organizations_url":"https://api.github.com/users/aidin36/orgs","repos_url":"https://api.github.com/users/aidin36/repos","events_url":"https://api.github.com/users/aidin36/events{/privacy}","received_events_url":"https://api.github.com/users/aidin36/received_events","type":"User","site_admin":false},"repo":{"id":13723880,"name":"tocc","full_name":"aidin36/tocc","owner":{"login":"aidin36","id":3810651,"avatar_url":"https://avatars.githubusercontent.com/u/3810651?v=2","gravatar_id":"","url":"https://api.github.com/users/aidin36","html_url":"https://github.com/aidin36","followers_url":"https://api.github.com/users/aidin36/followers","following_url":"https://api.github.com/users/aidin36/following{/other_user}","gists_url":"https://api.github.com/users/aidin36/gists{/gist_id}","starred_url":"https://api.github.com/users/aidin36/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aidin36/subscriptions","organizations_url":"https://api.github.com/users/aidin36/orgs","repos_url":"https://api.github.com/users/aidin36/repos","events_url":"https://api.github.com/users/aidin36/events{/privacy}","received_events_url":"https://api.github.com/users/aidin36/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/aidin36/tocc","description":"A Tool for Obsessive Compulsive Classifiers","fork":false,"url":"https://api.github.com/repos/aidin36/tocc","forks_url":"https://api.github.com/repos/aidin36/tocc/forks","keys_url":"https://api.github.com/repos/aidin36/tocc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aidin36/tocc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aidin36/tocc/teams","hooks_url":"https://api.github.com/repos/aidin36/tocc/hooks","issue_events_url":"https://api.github.com/repos/aidin36/tocc/issues/events{/number}","events_url":"https://api.github.com/repos/aidin36/tocc/events","assignees_url":"https://api.github.com/repos/aidin36/tocc/assignees{/user}","branches_url":"https://api.github.com/repos/aidin36/tocc/branches{/branch}","tags_url":"https://api.github.com/repos/aidin36/tocc/tags","blobs_url":"https://api.github.com/repos/aidin36/tocc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aidin36/tocc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aidin36/tocc/git/refs{/sha}","trees_url":"https://api.github.com/repos/aidin36/tocc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aidin36/tocc/statuses/{sha}","languages_url":"https://api.github.com/repos/aidin36/tocc/languages","stargazers_url":"https://api.github.com/repos/aidin36/tocc/stargazers","contributors_url":"https://api.github.com/repos/aidin36/tocc/contributors","subscribers_url":"https://api.github.com/repos/aidin36/tocc/subscribers","subscription_url":"https://api.github.com/repos/aidin36/tocc/subscription","commits_url":"https://api.github.com/repos/aidin36/tocc/commits{/sha}","git_commits_url":"https://api.github.com/repos/aidin36/tocc/git/commits{/sha}","comments_url":"https://api.github.com/repos/aidin36/tocc/comments{/number}","issue_comment_url":"https://api.github.com/repos/aidin36/tocc/issues/comments/{number}","contents_url":"https://api.github.com/repos/aidin36/tocc/contents/{+path}","compare_url":"https://api.github.com/repos/aidin36/tocc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aidin36/tocc/merges","archive_url":"https://api.github.com/repos/aidin36/tocc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aidin36/tocc/downloads","issues_url":"https://api.github.com/repos/aidin36/tocc/issues{/number}","pulls_url":"https://api.github.com/repos/aidin36/tocc/pulls{/number}","milestones_url":"https://api.github.com/repos/aidin36/tocc/milestones{/number}","notifications_url":"https://api.github.com/repos/aidin36/tocc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aidin36/tocc/labels{/name}","releases_url":"https://api.github.com/repos/aidin36/tocc/releases{/id}","created_at":"2013-10-20T18:05:05Z","updated_at":"2014-10-25T17:09:37Z","pushed_at":"2014-10-29T03:35:07Z","git_url":"git://github.com/aidin36/tocc.git","ssh_url":"git@github.com:aidin36/tocc.git","clone_url":"https://github.com/aidin36/tocc.git","svn_url":"https://github.com/aidin36/tocc","homepage":"","size":2513,"stargazers_count":19,"watchers_count":19,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":18,"forks":11,"open_issues":18,"watchers":19,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/aidin36/tocc/pulls/96"},"html":{"href":"https://github.com/aidin36/tocc/pull/96"},"issue":{"href":"https://api.github.com/repos/aidin36/tocc/issues/96"},"comments":{"href":"https://api.github.com/repos/aidin36/tocc/issues/96/comments"},"review_comments":{"href":"https://api.github.com/repos/aidin36/tocc/pulls/96/comments"},"review_comment":{"href":"https://api.github.com/repos/aidin36/tocc/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/aidin36/tocc/pulls/96/commits"},"statuses":{"href":"https://api.github.com/repos/aidin36/tocc/statuses/19221bb9befdec37dc6d7f1da51622f1c83fd469"}}}}