{"action":"created","comment":{"url":"https://api.github.com/repos/txtdirect/txtdirect/pulls/comments/229029822","pull_request_review_id":169431910,"id":229029822,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyOTAyOTgyMg==","diff_hunk":"@@ -15,7 +17,16 @@ var dockerRegexs = map[string]string{\n \n var DockerRegex = regexp.MustCompile(\"^\\\\/v2\\\\/(.*\\\\/(tags|manifests|blobs)\\\\/.*|_catalog$)\")\n \n-func generateDockerv2URI(path string, rec record) (string, int) {\n+func redirectDockerv2(w http.ResponseWriter, r *http.Request, rec record) error {\n+\tpath := r.URL.Path\n+\tv2Regex, err := regexp.Compile(dockerRegexs[\"v2\"])\n+\tif err != nil {\n+\t\tpanic(err)\n+\t}\n+\tif v2Regex.Match([]byte(path)) {","path":"dockerv2.go","position":26,"original_position":25,"commit_id":"f52aacc3596ff3948ea8cedc5a32edc95412dd76","original_commit_id":"f52aacc3596ff3948ea8cedc5a32edc95412dd76","user":{"login":"stp-ip","id":3768412,"node_id":"MDQ6VXNlcjM3Njg0MTI=","avatar_url":"https://avatars2.githubusercontent.com/u/3768412?v=4","gravatar_id":"","url":"https://api.github.com/users/stp-ip","html_url":"https://github.com/stp-ip","followers_url":"https://api.github.com/users/stp-ip/followers","following_url":"https://api.github.com/users/stp-ip/following{/other_user}","gists_url":"https://api.github.com/users/stp-ip/gists{/gist_id}","starred_url":"https://api.github.com/users/stp-ip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stp-ip/subscriptions","organizations_url":"https://api.github.com/users/stp-ip/orgs","repos_url":"https://api.github.com/users/stp-ip/repos","events_url":"https://api.github.com/users/stp-ip/events{/privacy}","received_events_url":"https://api.github.com/users/stp-ip/received_events","type":"User","site_admin":false},"body":"The v2Regex matches all docker specific regexes and therefore returns StatusOK for all requests. Breaking the other redirects.","created_at":"2018-10-29T17:41:45Z","updated_at":"2018-10-29T17:41:45Z","html_url":"https://github.com/txtdirect/txtdirect/pull/102#discussion_r229029822","pull_request_url":"https://api.github.com/repos/txtdirect/txtdirect/pulls/102","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/txtdirect/txtdirect/pulls/comments/229029822"},"html":{"href":"https://github.com/txtdirect/txtdirect/pull/102#discussion_r229029822"},"pull_request":{"href":"https://api.github.com/repos/txtdirect/txtdirect/pulls/102"}}},"pull_request":{"url":"https://api.github.com/repos/txtdirect/txtdirect/pulls/102","id":214598369,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE0NTk4MzY5","html_url":"https://github.com/txtdirect/txtdirect/pull/102","diff_url":"https://github.com/txtdirect/txtdirect/pull/102.diff","patch_url":"https://github.com/txtdirect/txtdirect/pull/102.patch","issue_url":"https://api.github.com/repos/txtdirect/txtdirect/issues/102","number":102,"state":"open","locked":false,"title":"PoC version of docker vanity urls","user":{"login":"erbesharat","id":7544732,"node_id":"MDQ6VXNlcjc1NDQ3MzI=","avatar_url":"https://avatars2.githubusercontent.com/u/7544732?v=4","gravatar_id":"","url":"https://api.github.com/users/erbesharat","html_url":"https://github.com/erbesharat","followers_url":"https://api.github.com/users/erbesharat/followers","following_url":"https://api.github.com/users/erbesharat/following{/other_user}","gists_url":"https://api.github.com/users/erbesharat/gists{/gist_id}","starred_url":"https://api.github.com/users/erbesharat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erbesharat/subscriptions","organizations_url":"https://api.github.com/users/erbesharat/orgs","repos_url":"https://api.github.com/users/erbesharat/repos","events_url":"https://api.github.com/users/erbesharat/events{/privacy}","received_events_url":"https://api.github.com/users/erbesharat/received_events","type":"User","site_admin":false},"body":"**What this PR does / why we need it**:\r\nIt defines a new type called ``dockerv2`` that handles docker vanity URLs redirection.\r\n\r\n**Which issue this PR fixes**:\r\nfixes #14 \r\n\r\n\r\n**Special notes for your reviewer**:\r\nIt's jsut a PoC version and needs more work and discussion.\r\n","created_at":"2018-09-11T11:19:51Z","updated_at":"2018-10-29T17:41:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"22da6988df1103d61eea847b47ca27ef5d029f3c","assignee":null,"assignees":[],"requested_reviewers":[{"login":"alarsyo","id":15170378,"node_id":"MDQ6VXNlcjE1MTcwMzc4","avatar_url":"https://avatars2.githubusercontent.com/u/15170378?v=4","gravatar_id":"","url":"https://api.github.com/users/alarsyo","html_url":"https://github.com/alarsyo","followers_url":"https://api.github.com/users/alarsyo/followers","following_url":"https://api.github.com/users/alarsyo/following{/other_user}","gists_url":"https://api.github.com/users/alarsyo/gists{/gist_id}","starred_url":"https://api.github.com/users/alarsyo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alarsyo/subscriptions","organizations_url":"https://api.github.com/users/alarsyo/orgs","repos_url":"https://api.github.com/users/alarsyo/repos","events_url":"https://api.github.com/users/alarsyo/events{/privacy}","received_events_url":"https://api.github.com/users/alarsyo/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/txtdirect/txtdirect/pulls/102/commits","review_comments_url":"https://api.github.com/repos/txtdirect/txtdirect/pulls/102/comments","review_comment_url":"https://api.github.com/repos/txtdirect/txtdirect/pulls/comments{/number}","comments_url":"https://api.github.com/repos/txtdirect/txtdirect/issues/102/comments","statuses_url":"https://api.github.com/repos/txtdirect/txtdirect/statuses/f52aacc3596ff3948ea8cedc5a32edc95412dd76","head":{"label":"erbesharat:implement/vanity-urls","ref":"implement/vanity-urls","sha":"f52aacc3596ff3948ea8cedc5a32edc95412dd76","user":{"login":"erbesharat","id":7544732,"node_id":"MDQ6VXNlcjc1NDQ3MzI=","avatar_url":"https://avatars2.githubusercontent.com/u/7544732?v=4","gravatar_id":"","url":"https://api.github.com/users/erbesharat","html_url":"https://github.com/erbesharat","followers_url":"https://api.github.com/users/erbesharat/followers","following_url":"https://api.github.com/users/erbesharat/following{/other_user}","gists_url":"https://api.github.com/users/erbesharat/gists{/gist_id}","starred_url":"https://api.github.com/users/erbesharat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erbesharat/subscriptions","organizations_url":"https://api.github.com/users/erbesharat/orgs","repos_url":"https://api.github.com/users/erbesharat/repos","events_url":"https://api.github.com/users/erbesharat/events{/privacy}","received_events_url":"https://api.github.com/users/erbesharat/received_events","type":"User","site_admin":false},"repo":{"id":116850137,"node_id":"MDEwOlJlcG9zaXRvcnkxMTY4NTAxMzc=","name":"txtdirect","full_name":"erbesharat/txtdirect","private":false,"owner":{"login":"erbesharat","id":7544732,"node_id":"MDQ6VXNlcjc1NDQ3MzI=","avatar_url":"https://avatars2.githubusercontent.com/u/7544732?v=4","gravatar_id":"","url":"https://api.github.com/users/erbesharat","html_url":"https://github.com/erbesharat","followers_url":"https://api.github.com/users/erbesharat/followers","following_url":"https://api.github.com/users/erbesharat/following{/other_user}","gists_url":"https://api.github.com/users/erbesharat/gists{/gist_id}","starred_url":"https://api.github.com/users/erbesharat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erbesharat/subscriptions","organizations_url":"https://api.github.com/users/erbesharat/orgs","repos_url":"https://api.github.com/users/erbesharat/repos","events_url":"https://api.github.com/users/erbesharat/events{/privacy}","received_events_url":"https://api.github.com/users/erbesharat/received_events","type":"User","site_admin":false},"html_url":"https://github.com/erbesharat/txtdirect","description":"DNS TXT-record based redirects","fork":true,"url":"https://api.github.com/repos/erbesharat/txtdirect","forks_url":"https://api.github.com/repos/erbesharat/txtdirect/forks","keys_url":"https://api.github.com/repos/erbesharat/txtdirect/keys{/key_id}","collaborators_url":"https://api.github.com/repos/erbesharat/txtdirect/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/erbesharat/txtdirect/teams","hooks_url":"https://api.github.com/repos/erbesharat/txtdirect/hooks","issue_events_url":"https://api.github.com/repos/erbesharat/txtdirect/issues/events{/number}","events_url":"https://api.github.com/repos/erbesharat/txtdirect/events","assignees_url":"https://api.github.com/repos/erbesharat/txtdirect/assignees{/user}","branches_url":"https://api.github.com/repos/erbesharat/txtdirect/branches{/branch}","tags_url":"https://api.github.com/repos/erbesharat/txtdirect/tags","blobs_url":"https://api.github.com/repos/erbesharat/txtdirect/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/erbesharat/txtdirect/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/erbesharat/txtdirect/git/refs{/sha}","trees_url":"https://api.github.com/repos/erbesharat/txtdirect/git/trees{/sha}","statuses_url":"https://api.github.com/repos/erbesharat/txtdirect/statuses/{sha}","languages_url":"https://api.github.com/repos/erbesharat/txtdirect/languages","stargazers_url":"https://api.github.com/repos/erbesharat/txtdirect/stargazers","contributors_url":"https://api.github.com/repos/erbesharat/txtdirect/contributors","subscribers_url":"https://api.github.com/repos/erbesharat/txtdirect/subscribers","subscription_url":"https://api.github.com/repos/erbesharat/txtdirect/subscription","commits_url":"https://api.github.com/repos/erbesharat/txtdirect/commits{/sha}","git_commits_url":"https://api.github.com/repos/erbesharat/txtdirect/git/commits{/sha}","comments_url":"https://api.github.com/repos/erbesharat/txtdirect/comments{/number}","issue_comment_url":"https://api.github.com/repos/erbesharat/txtdirect/issues/comments{/number}","contents_url":"https://api.github.com/repos/erbesharat/txtdirect/contents/{+path}","compare_url":"https://api.github.com/repos/erbesharat/txtdirect/compare/{base}...{head}","merges_url":"https://api.github.com/repos/erbesharat/txtdirect/merges","archive_url":"https://api.github.com/repos/erbesharat/txtdirect/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/erbesharat/txtdirect/downloads","issues_url":"https://api.github.com/repos/erbesharat/txtdirect/issues{/number}","pulls_url":"https://api.github.com/repos/erbesharat/txtdirect/pulls{/number}","milestones_url":"https://api.github.com/repos/erbesharat/txtdirect/milestones{/number}","notifications_url":"https://api.github.com/repos/erbesharat/txtdirect/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/erbesharat/txtdirect/labels{/name}","releases_url":"https://api.github.com/repos/erbesharat/txtdirect/releases{/id}","deployments_url":"https://api.github.com/repos/erbesharat/txtdirect/deployments","created_at":"2018-01-09T17:48:08Z","updated_at":"2018-10-19T13:41:46Z","pushed_at":"2018-10-29T17:16:54Z","git_url":"git://github.com/erbesharat/txtdirect.git","ssh_url":"git@github.com:erbesharat/txtdirect.git","clone_url":"https://github.com/erbesharat/txtdirect.git","svn_url":"https://github.com/erbesharat/txtdirect","homepage":"https://about.txtdirect.org","size":232,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"txtdirect:master","ref":"master","sha":"c4c51451388911b726b5835f3462c18133adbcbf","user":{"login":"txtdirect","id":29709653,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI5NzA5NjUz","avatar_url":"https://avatars1.githubusercontent.com/u/29709653?v=4","gravatar_id":"","url":"https://api.github.com/users/txtdirect","html_url":"https://github.com/txtdirect","followers_url":"https://api.github.com/users/txtdirect/followers","following_url":"https://api.github.com/users/txtdirect/following{/other_user}","gists_url":"https://api.github.com/users/txtdirect/gists{/gist_id}","starred_url":"https://api.github.com/users/txtdirect/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/txtdirect/subscriptions","organizations_url":"https://api.github.com/users/txtdirect/orgs","repos_url":"https://api.github.com/users/txtdirect/repos","events_url":"https://api.github.com/users/txtdirect/events{/privacy}","received_events_url":"https://api.github.com/users/txtdirect/received_events","type":"Organization","site_admin":false},"repo":{"id":100856271,"node_id":"MDEwOlJlcG9zaXRvcnkxMDA4NTYyNzE=","name":"txtdirect","full_name":"txtdirect/txtdirect","private":false,"owner":{"login":"txtdirect","id":29709653,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI5NzA5NjUz","avatar_url":"https://avatars1.githubusercontent.com/u/29709653?v=4","gravatar_id":"","url":"https://api.github.com/users/txtdirect","html_url":"https://github.com/txtdirect","followers_url":"https://api.github.com/users/txtdirect/followers","following_url":"https://api.github.com/users/txtdirect/following{/other_user}","gists_url":"https://api.github.com/users/txtdirect/gists{/gist_id}","starred_url":"https://api.github.com/users/txtdirect/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/txtdirect/subscriptions","organizations_url":"https://api.github.com/users/txtdirect/orgs","repos_url":"https://api.github.com/users/txtdirect/repos","events_url":"https://api.github.com/users/txtdirect/events{/privacy}","received_events_url":"https://api.github.com/users/txtdirect/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/txtdirect/txtdirect","description":"DNS TXT-record based redirects","fork":false,"url":"https://api.github.com/repos/txtdirect/txtdirect","forks_url":"https://api.github.com/repos/txtdirect/txtdirect/forks","keys_url":"https://api.github.com/repos/txtdirect/txtdirect/keys{/key_id}","collaborators_url":"https://api.github.com/repos/txtdirect/txtdirect/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/txtdirect/txtdirect/teams","hooks_url":"https://api.github.com/repos/txtdirect/txtdirect/hooks","issue_events_url":"https://api.github.com/repos/txtdirect/txtdirect/issues/events{/number}","events_url":"https://api.github.com/repos/txtdirect/txtdirect/events","assignees_url":"https://api.github.com/repos/txtdirect/txtdirect/assignees{/user}","branches_url":"https://api.github.com/repos/txtdirect/txtdirect/branches{/branch}","tags_url":"https://api.github.com/repos/txtdirect/txtdirect/tags","blobs_url":"https://api.github.com/repos/txtdirect/txtdirect/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/txtdirect/txtdirect/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/txtdirect/txtdirect/git/refs{/sha}","trees_url":"https://api.github.com/repos/txtdirect/txtdirect/git/trees{/sha}","statuses_url":"https://api.github.com/repos/txtdirect/txtdirect/statuses/{sha}","languages_url":"https://api.github.com/repos/txtdirect/txtdirect/languages","stargazers_url":"https://api.github.com/repos/txtdirect/txtdirect/stargazers","contributors_url":"https://api.github.com/repos/txtdirect/txtdirect/contributors","subscribers_url":"https://api.github.com/repos/txtdirect/txtdirect/subscribers","subscription_url":"https://api.github.com/repos/txtdirect/txtdirect/subscription","commits_url":"https://api.github.com/repos/txtdirect/txtdirect/commits{/sha}","git_commits_url":"https://api.github.com/repos/txtdirect/txtdirect/git/commits{/sha}","comments_url":"https://api.github.com/repos/txtdirect/txtdirect/comments{/number}","issue_comment_url":"https://api.github.com/repos/txtdirect/txtdirect/issues/comments{/number}","contents_url":"https://api.github.com/repos/txtdirect/txtdirect/contents/{+path}","compare_url":"https://api.github.com/repos/txtdirect/txtdirect/compare/{base}...{head}","merges_url":"https://api.github.com/repos/txtdirect/txtdirect/merges","archive_url":"https://api.github.com/repos/txtdirect/txtdirect/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/txtdirect/txtdirect/downloads","issues_url":"https://api.github.com/repos/txtdirect/txtdirect/issues{/number}","pulls_url":"https://api.github.com/repos/txtdirect/txtdirect/pulls{/number}","milestones_url":"https://api.github.com/repos/txtdirect/txtdirect/milestones{/number}","notifications_url":"https://api.github.com/repos/txtdirect/txtdirect/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/txtdirect/txtdirect/labels{/name}","releases_url":"https://api.github.com/repos/txtdirect/txtdirect/releases{/id}","deployments_url":"https://api.github.com/repos/txtdirect/txtdirect/deployments","created_at":"2017-08-20T11:13:30Z","updated_at":"2018-10-29T15:59:05Z","pushed_at":"2018-10-29T17:16:56Z","git_url":"git://github.com/txtdirect/txtdirect.git","ssh_url":"git@github.com:txtdirect/txtdirect.git","clone_url":"https://github.com/txtdirect/txtdirect.git","svn_url":"https://github.com/txtdirect/txtdirect","homepage":"https://about.txtdirect.org","size":214,"stargazers_count":16,"watchers_count":16,"language":"Go","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":16,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":4,"open_issues":16,"watchers":16,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/txtdirect/txtdirect/pulls/102"},"html":{"href":"https://github.com/txtdirect/txtdirect/pull/102"},"issue":{"href":"https://api.github.com/repos/txtdirect/txtdirect/issues/102"},"comments":{"href":"https://api.github.com/repos/txtdirect/txtdirect/issues/102/comments"},"review_comments":{"href":"https://api.github.com/repos/txtdirect/txtdirect/pulls/102/comments"},"review_comment":{"href":"https://api.github.com/repos/txtdirect/txtdirect/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/txtdirect/txtdirect/pulls/102/commits"},"statuses":{"href":"https://api.github.com/repos/txtdirect/txtdirect/statuses/f52aacc3596ff3948ea8cedc5a32edc95412dd76"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"stp-ip"}}