GitHub PullRequestReviewCommentEvent at 2014-09-15 21:09:57
Repository: IsYourProjectUpToDate
Actor: karllindmark
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/karllindmark/IsYourProjectUpToDate/pulls/comments/17568885","id":17568885,"diff_hunk":"@@ -95,23 +96,51 @@ function setupStep1() {\n \n             var status_box = form.find('.status');\n             var github_info = form.find(\"input[name='github-info']\");\n+            var github_info_value = github_info.val();\n             var project_type = form.find(\"select[name='project-type']\").val();\n             var token = form.find('input[name=\"csrfmiddlewaretoken\"]').val();\n \n-            var regex_matches = GITHUB_URL_REGEX.exec(github_info.val());\n-            if (github_info.length === 0 || regex_matches === null || project_type === undefined) {\n+            /*Check for impossible errors*/\n+            if (project_type === undefined){\n+                showError(status_box, \"An impossible error has just occurred, so something is seriously broken<br>\");\n+                return;\n+            }\n+\n+            /* Check for emtpty search field */\n+            if (github_info_value.length === 0){\n+                showProgress(status_box, 'Dude, you have to put something in the search field!<br>');\n+                return;\n+            }\n+\n+            /* Strip away the github url from the search string*/\n+            if(GITHUB_URL_REGEX.exec(github_info_value)){\n+                github_info_value = github_info_value.replace(GITHUB_URL_REGEX, \"\");\n+            }\n+\n+            /* Search for invalid characters*/\n+            else if (! /^[\\w\\/\\.-]+$/.exec(github_info_value)){","path":"static/js/demo.js","position":38,"original_position":38,"commit_id":"905e931139de9b6952bfc53993fd464693a8d13f","original_commit_id":"905e931139de9b6952bfc53993fd464693a8d13f","user":{"login":"karllindmark","id":979152,"avatar_url":"https://avatars.githubusercontent.com/u/979152?v=2","gravatar_id":"7287f7defb41c5d5f0dc651e3904485a","url":"https://api.github.com/users/karllindmark","html_url":"https://github.com/karllindmark","followers_url":"https://api.github.com/users/karllindmark/followers","following_url":"https://api.github.com/users/karllindmark/following{/other_user}","gists_url":"https://api.github.com/users/karllindmark/gists{/gist_id}","starred_url":"https://api.github.com/users/karllindmark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karllindmark/subscriptions","organizations_url":"https://api.github.com/users/karllindmark/orgs","repos_url":"https://api.github.com/users/karllindmark/repos","events_url":"https://api.github.com/users/karllindmark/events{/privacy}","received_events_url":"https://api.github.com/users/karllindmark/received_events","type":"User","site_admin":false},"body":":+1: ","created_at":"2014-09-15T21:09:57Z","updated_at":"2014-09-15T21:09:57Z","html_url":"https://github.com/karllindmark/IsYourProjectUpToDate/pull/10#discussion_r17568885","pull_request_url":"https://api.github.com/repos/karllindmark/IsYourProjectUpToDate/pulls/10","_links":{"self":{"href":"https://api.github.com/repos/karllindmark/IsYourProjectUpToDate/pulls/comments/17568885"},"html":{"href":"https://github.com/karllindmark/IsYourProjectUpToDate/pull/10#discussion_r17568885"},"pull_request":{"href":"https://api.github.com/repos/karllindmark/IsYourProjectUpToDate/pulls/10"}}},"pull_request":{"url":"https://api.github.com/repos/karllindmark/IsYourProjectUpToDate/pulls/10","id":21260092,"html_url":"https://github.com/karllindmark/IsYourProjectUpToDate/pull/10","diff_url":"https://github.com/karllindmark/IsYourProjectUpToDate/pull/10.diff","patch_url":"https://github.com/karllindmark/IsYourProjectUpToDate/pull/10.patch","issue_url":"https://api.github.com/repos/karllindmark/IsYourProjectUpToDate/issues/10","number":10,"state":"open","locked":false,"title":"Improve error handling and error messaging","user":{"login":"wiesom","id":3127561,"avatar_url":"https://avatars.githubusercontent.com/u/3127561?v=2","gravatar_id":"3dc6edfed109a3cad0113820d2c8caab","url":"https://api.github.com/users/wiesom","html_url":"https://github.com/wiesom","followers_url":"https://api.github.com/users/wiesom/followers","following_url":"https://api.github.com/users/wiesom/following{/other_user}","gists_url":"https://api.github.com/users/wiesom/gists{/gist_id}","starred_url":"https://api.github.com/users/wiesom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wiesom/subscriptions","organizations_url":"https://api.github.com/users/wiesom/orgs","repos_url":"https://api.github.com/users/wiesom/repos","events_url":"https://api.github.com/users/wiesom/events{/privacy}","received_events_url":"https://api.github.com/users/wiesom/received_events","type":"User","site_admin":false},"body":"","created_at":"2014-09-15T20:53:49Z","updated_at":"2014-09-15T21:09:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5dc61c9d1495c65223bd25582314644aba91ab0c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/karllindmark/IsYourProjectUpToDate/pulls/10/commits","review_comments_url":"https://api.github.com/repos/karllindmark/IsYourProjectUpToDate/pulls/10/comments","review_comment_url":"https://api.github.com/repos/karllindmark/IsYourProjectUpToDate/pulls/comments/{number}","comments_url":"https://api.github.com/repos/karllindmark/IsYourProjectUpToDate/issues/10/comments","statuses_url":"https://api.github.com/repos/karllindmark/IsYourProjectUpToDate/statuses/905e931139de9b6952bfc53993fd464693a8d13f","head":{"label":"wiesom:dev","ref":"dev","sha":"905e931139de9b6952bfc53993fd464693a8d13f","user":{"login":"wiesom","id":3127561,"avatar_url":"https://avatars.githubusercontent.com/u/3127561?v=2","gravatar_id":"3dc6edfed109a3cad0113820d2c8caab","url":"https://api.github.com/users/wiesom","html_url":"https://github.com/wiesom","followers_url":"https://api.github.com/users/wiesom/followers","following_url":"https://api.github.com/users/wiesom/following{/other_user}","gists_url":"https://api.github.com/users/wiesom/gists{/gist_id}","starred_url":"https://api.github.com/users/wiesom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wiesom/subscriptions","organizations_url":"https://api.github.com/users/wiesom/orgs","repos_url":"https://api.github.com/users/wiesom/repos","events_url":"https://api.github.com/users/wiesom/events{/privacy}","received_events_url":"https://api.github.com/users/wiesom/received_events","type":"User","site_admin":false},"repo":{"id":24066686,"name":"IsYourProjectUpToDate","full_name":"wiesom/IsYourProjectUpToDate","owner":{"login":"wiesom","id":3127561,"avatar_url":"https://avatars.githubusercontent.com/u/3127561?v=2","gravatar_id":"3dc6edfed109a3cad0113820d2c8caab","url":"https://api.github.com/users/wiesom","html_url":"https://github.com/wiesom","followers_url":"https://api.github.com/users/wiesom/followers","following_url":"https://api.github.com/users/wiesom/following{/other_user}","gists_url":"https://api.github.com/users/wiesom/gists{/gist_id}","starred_url":"https://api.github.com/users/wiesom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wiesom/subscriptions","organizations_url":"https://api.github.com/users/wiesom/orgs","repos_url":"https://api.github.com/users/wiesom/repos","events_url":"https://api.github.com/users/wiesom/events{/privacy}","received_events_url":"https://api.github.com/users/wiesom/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/wiesom/IsYourProjectUpToDate","description":"Is your project up to date?","fork":true,"url":"https://api.github.com/repos/wiesom/IsYourProjectUpToDate","forks_url":"https://api.github.com/repos/wiesom/IsYourProjectUpToDate/forks","keys_url":"https://api.github.com/repos/wiesom/IsYourProjectUpToDate/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wiesom/IsYourProjectUpToDate/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wiesom/IsYourProjectUpToDate/teams","hooks_url":"https://api.github.com/repos/wiesom/IsYourProjectUpToDate/hooks","issue_events_url":"https://api.github.com/repos/wiesom/IsYourProjectUpToDate/issues/events{/number}","events_url":"https://api.github.com/repos/wiesom/IsYourProjectUpToDate/events","assignees_url":"https://api.github.com/repos/wiesom/IsYourProjectUpToDate/assignees{/user}","branches_url":"https://api.github.com/repos/wiesom/IsYourProjectUpToDate/branches{/branch}","tags_url":"https://api.github.com/repos/wiesom/IsYourProjectUpToDate/tags","blobs_url":"https://api.github.com/repos/wiesom/IsYourProjectUpToDate/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wiesom/IsYourProjectUpToDate/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wiesom/IsYourProjectUpToDate/git/refs{/sha}","trees_url":"https://api.github.com/repos/wiesom/IsYourProjectUpToDate/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wiesom/IsYourProjectUpToDate/statuses/{sha}","languages_url":"https://api.github.com/repos/wiesom/IsYourProjectUpToDate/languages","stargazers_url":"https://api.github.com/repos/wiesom/IsYourProjectUpToDate/stargazers","contributors_url":"https://api.github.com/repos/wiesom/IsYourProjectUpToDate/contributors","subscribers_url":"https://api.github.com/repos/wiesom/IsYourProjectUpToDate/subscribers","subscription_url":"https://api.github.com/repos/wiesom/IsYourProjectUpToDate/subscription","commits_url":"https://api.github.com/repos/wiesom/IsYourProjectUpToDate/commits{/sha}","git_commits_url":"https://api.github.com/repos/wiesom/IsYourProjectUpToDate/git/commits{/sha}","comments_url":"https://api.github.com/repos/wiesom/IsYourProjectUpToDate/comments{/number}","issue_comment_url":"https://api.github.com/repos/wiesom/IsYourProjectUpToDate/issues/comments/{number}","contents_url":"https://api.github.com/repos/wiesom/IsYourProjectUpToDate/contents/{+path}","compare_url":"https://api.github.com/repos/wiesom/IsYourProjectUpToDate/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wiesom/IsYourProjectUpToDate/merges","archive_url":"https://api.github.com/repos/wiesom/IsYourProjectUpToDate/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wiesom/IsYourProjectUpToDate/downloads","issues_url":"https://api.github.com/repos/wiesom/IsYourProjectUpToDate/issues{/number}","pulls_url":"https://api.github.com/repos/wiesom/IsYourProjectUpToDate/pulls{/number}","milestones_url":"https://api.github.com/repos/wiesom/IsYourProjectUpToDate/milestones{/number}","notifications_url":"https://api.github.com/repos/wiesom/IsYourProjectUpToDate/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wiesom/IsYourProjectUpToDate/labels{/name}","releases_url":"https://api.github.com/repos/wiesom/IsYourProjectUpToDate/releases{/id}","created_at":"2014-09-15T17:50:21Z","updated_at":"2014-09-15T20:52:54Z","pushed_at":"2014-09-15T20:52:53Z","git_url":"git://github.com/wiesom/IsYourProjectUpToDate.git","ssh_url":"git@github.com:wiesom/IsYourProjectUpToDate.git","clone_url":"https://github.com/wiesom/IsYourProjectUpToDate.git","svn_url":"https://github.com/wiesom/IsYourProjectUpToDate","homepage":"http://www.isyourprojectuptodate.com","size":637,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"dev"}},"base":{"label":"karllindmark:dev","ref":"dev","sha":"f57178d73828a55581cdd9c4fe3abfe9c03bbe08","user":{"login":"karllindmark","id":979152,"avatar_url":"https://avatars.githubusercontent.com/u/979152?v=2","gravatar_id":"7287f7defb41c5d5f0dc651e3904485a","url":"https://api.github.com/users/karllindmark","html_url":"https://github.com/karllindmark","followers_url":"https://api.github.com/users/karllindmark/followers","following_url":"https://api.github.com/users/karllindmark/following{/other_user}","gists_url":"https://api.github.com/users/karllindmark/gists{/gist_id}","starred_url":"https://api.github.com/users/karllindmark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karllindmark/subscriptions","organizations_url":"https://api.github.com/users/karllindmark/orgs","repos_url":"https://api.github.com/users/karllindmark/repos","events_url":"https://api.github.com/users/karllindmark/events{/privacy}","received_events_url":"https://api.github.com/users/karllindmark/received_events","type":"User","site_admin":false},"repo":{"id":23532168,"name":"IsYourProjectUpToDate","full_name":"karllindmark/IsYourProjectUpToDate","owner":{"login":"karllindmark","id":979152,"avatar_url":"https://avatars.githubusercontent.com/u/979152?v=2","gravatar_id":"7287f7defb41c5d5f0dc651e3904485a","url":"https://api.github.com/users/karllindmark","html_url":"https://github.com/karllindmark","followers_url":"https://api.github.com/users/karllindmark/followers","following_url":"https://api.github.com/users/karllindmark/following{/other_user}","gists_url":"https://api.github.com/users/karllindmark/gists{/gist_id}","starred_url":"https://api.github.com/users/karllindmark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karllindmark/subscriptions","organizations_url":"https://api.github.com/users/karllindmark/orgs","repos_url":"https://api.github.com/users/karllindmark/repos","events_url":"https://api.github.com/users/karllindmark/events{/privacy}","received_events_url":"https://api.github.com/users/karllindmark/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/karllindmark/IsYourProjectUpToDate","description":"Is your project up to date?","fork":false,"url":"https://api.github.com/repos/karllindmark/IsYourProjectUpToDate","forks_url":"https://api.github.com/repos/karllindmark/IsYourProjectUpToDate/forks","keys_url":"https://api.github.com/repos/karllindmark/IsYourProjectUpToDate/keys{/key_id}","collaborators_url":"https://api.github.com/repos/karllindmark/IsYourProjectUpToDate/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/karllindmark/IsYourProjectUpToDate/teams","hooks_url":"https://api.github.com/repos/karllindmark/IsYourProjectUpToDate/hooks","issue_events_url":"https://api.github.com/repos/karllindmark/IsYourProjectUpToDate/issues/events{/number}","events_url":"https://api.github.com/repos/karllindmark/IsYourProjectUpToDate/events","assignees_url":"https://api.github.com/repos/karllindmark/IsYourProjectUpToDate/assignees{/user}","branches_url":"https://api.github.com/repos/karllindmark/IsYourProjectUpToDate/branches{/branch}","tags_url":"https://api.github.com/repos/karllindmark/IsYourProjectUpToDate/tags","blobs_url":"https://api.github.com/repos/karllindmark/IsYourProjectUpToDate/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/karllindmark/IsYourProjectUpToDate/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/karllindmark/IsYourProjectUpToDate/git/refs{/sha}","trees_url":"https://api.github.com/repos/karllindmark/IsYourProjectUpToDate/git/trees{/sha}","statuses_url":"https://api.github.com/repos/karllindmark/IsYourProjectUpToDate/statuses/{sha}","languages_url":"https://api.github.com/repos/karllindmark/IsYourProjectUpToDate/languages","stargazers_url":"https://api.github.com/repos/karllindmark/IsYourProjectUpToDate/stargazers","contributors_url":"https://api.github.com/repos/karllindmark/IsYourProjectUpToDate/contributors","subscribers_url":"https://api.github.com/repos/karllindmark/IsYourProjectUpToDate/subscribers","subscription_url":"https://api.github.com/repos/karllindmark/IsYourProjectUpToDate/subscription","commits_url":"https://api.github.com/repos/karllindmark/IsYourProjectUpToDate/commits{/sha}","git_commits_url":"https://api.github.com/repos/karllindmark/IsYourProjectUpToDate/git/commits{/sha}","comments_url":"https://api.github.com/repos/karllindmark/IsYourProjectUpToDate/comments{/number}","issue_comment_url":"https://api.github.com/repos/karllindmark/IsYourProjectUpToDate/issues/comments/{number}","contents_url":"https://api.github.com/repos/karllindmark/IsYourProjectUpToDate/contents/{+path}","compare_url":"https://api.github.com/repos/karllindmark/IsYourProjectUpToDate/compare/{base}...{head}","merges_url":"https://api.github.com/repos/karllindmark/IsYourProjectUpToDate/merges","archive_url":"https://api.github.com/repos/karllindmark/IsYourProjectUpToDate/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/karllindmark/IsYourProjectUpToDate/downloads","issues_url":"https://api.github.com/repos/karllindmark/IsYourProjectUpToDate/issues{/number}","pulls_url":"https://api.github.com/repos/karllindmark/IsYourProjectUpToDate/pulls{/number}","milestones_url":"https://api.github.com/repos/karllindmark/IsYourProjectUpToDate/milestones{/number}","notifications_url":"https://api.github.com/repos/karllindmark/IsYourProjectUpToDate/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/karllindmark/IsYourProjectUpToDate/labels{/name}","releases_url":"https://api.github.com/repos/karllindmark/IsYourProjectUpToDate/releases{/id}","created_at":"2014-09-01T05:58:40Z","updated_at":"2014-09-12T23:03:07Z","pushed_at":"2014-09-13T01:41:24Z","git_url":"git://github.com/karllindmark/IsYourProjectUpToDate.git","ssh_url":"git@github.com:karllindmark/IsYourProjectUpToDate.git","clone_url":"https://github.com/karllindmark/IsYourProjectUpToDate.git","svn_url":"https://github.com/karllindmark/IsYourProjectUpToDate","homepage":"http://www.isyourprojectuptodate.com","size":637,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":5,"forks":1,"open_issues":5,"watchers":0,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/karllindmark/IsYourProjectUpToDate/pulls/10"},"html":{"href":"https://github.com/karllindmark/IsYourProjectUpToDate/pull/10"},"issue":{"href":"https://api.github.com/repos/karllindmark/IsYourProjectUpToDate/issues/10"},"comments":{"href":"https://api.github.com/repos/karllindmark/IsYourProjectUpToDate/issues/10/comments"},"review_comments":{"href":"https://api.github.com/repos/karllindmark/IsYourProjectUpToDate/pulls/10/comments"},"review_comment":{"href":"https://api.github.com/repos/karllindmark/IsYourProjectUpToDate/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/karllindmark/IsYourProjectUpToDate/pulls/10/commits"},"statuses":{"href":"https://api.github.com/repos/karllindmark/IsYourProjectUpToDate/statuses/905e931139de9b6952bfc53993fd464693a8d13f"}}}}