{"action":"created","comment":{"url":"https://api.github.com/repos/projectcalico/libcalico-go/pulls/comments/89411754","pull_request_review_id":9957523,"id":89411754,"diff_hunk":"@@ -30,14 +32,35 @@ import (\n var validate *validator.Validate\n \n var (\n-\tnameRegex          = regexp.MustCompile(\"^[a-zA-Z0-9_.-]+$\")\n+\tnameRegex          = regexp.MustCompile(\"^[a-zA-Z0-9_.-]{1,128}$\")\n \tinterfaceRegex     = regexp.MustCompile(\"^[a-zA-Z0-9_-]{1,15}$\")\n-\tlabelRegex         = regexp.MustCompile(\"^[a-zA-Z_./-][a-zA-Z0-9_./-]*$\")\n+\tlabelRegex         = regexp.MustCompile(\"^[a-zA-Z_./-][a-zA-Z0-9_./-]{0,127}$\")","path":"lib/validator/validator.go","position":17,"original_position":17,"commit_id":"7da7532905024efe7504ea1ac821a0c68c0d52b2","original_commit_id":"7da7532905024efe7504ea1ac821a0c68c0d52b2","user":{"login":"robbrockbank","id":3227729,"avatar_url":"https://avatars.githubusercontent.com/u/3227729?v=3","gravatar_id":"","url":"https://api.github.com/users/robbrockbank","html_url":"https://github.com/robbrockbank","followers_url":"https://api.github.com/users/robbrockbank/followers","following_url":"https://api.github.com/users/robbrockbank/following{/other_user}","gists_url":"https://api.github.com/users/robbrockbank/gists{/gist_id}","starred_url":"https://api.github.com/users/robbrockbank/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robbrockbank/subscriptions","organizations_url":"https://api.github.com/users/robbrockbank/orgs","repos_url":"https://api.github.com/users/robbrockbank/repos","events_url":"https://api.github.com/users/robbrockbank/events{/privacy}","received_events_url":"https://api.github.com/users/robbrockbank/received_events","type":"User","site_admin":false},"body":"Nope the label regex has an initial char [a-zA-Z_./-] followed by 0-127 [a-zA-Z0-9_./-]\r\n\r\nBasically, the first char cannot be a number - the 0,127 applies to the second character","created_at":"2016-11-23T22:51:13Z","updated_at":"2016-11-23T22:51:13Z","html_url":"https://github.com/projectcalico/libcalico-go/pull/272#discussion_r89411754","pull_request_url":"https://api.github.com/repos/projectcalico/libcalico-go/pulls/272","_links":{"self":{"href":"https://api.github.com/repos/projectcalico/libcalico-go/pulls/comments/89411754"},"html":{"href":"https://github.com/projectcalico/libcalico-go/pull/272#discussion_r89411754"},"pull_request":{"href":"https://api.github.com/repos/projectcalico/libcalico-go/pulls/272"}}},"pull_request":{"url":"https://api.github.com/repos/projectcalico/libcalico-go/pulls/272","id":95076068,"html_url":"https://github.com/projectcalico/libcalico-go/pull/272","diff_url":"https://github.com/projectcalico/libcalico-go/pull/272.diff","patch_url":"https://github.com/projectcalico/libcalico-go/pull/272.patch","issue_url":"https://api.github.com/repos/projectcalico/libcalico-go/issues/272","number":272,"state":"open","locked":false,"title":"Lots of data validation fixes","user":{"login":"robbrockbank","id":3227729,"avatar_url":"https://avatars.githubusercontent.com/u/3227729?v=3","gravatar_id":"","url":"https://api.github.com/users/robbrockbank","html_url":"https://github.com/robbrockbank","followers_url":"https://api.github.com/users/robbrockbank/followers","following_url":"https://api.github.com/users/robbrockbank/following{/other_user}","gists_url":"https://api.github.com/users/robbrockbank/gists{/gist_id}","starred_url":"https://api.github.com/users/robbrockbank/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robbrockbank/subscriptions","organizations_url":"https://api.github.com/users/robbrockbank/orgs","repos_url":"https://api.github.com/users/robbrockbank/repos","events_url":"https://api.github.com/users/robbrockbank/events{/privacy}","received_events_url":"https://api.github.com/users/robbrockbank/received_events","type":"User","site_admin":false},"body":"Fixes #222\r\n\r\nThis also provides more information to the user, and allows the validation tag to be used to return a useful message to the user (which before we could not)","created_at":"2016-11-23T20:41:02Z","updated_at":"2016-11-23T22:51:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0aef81984e469a5b07fe89a0444c93a711723a17","assignee":{"login":"gunjan5","id":5966968,"avatar_url":"https://avatars.githubusercontent.com/u/5966968?v=3","gravatar_id":"","url":"https://api.github.com/users/gunjan5","html_url":"https://github.com/gunjan5","followers_url":"https://api.github.com/users/gunjan5/followers","following_url":"https://api.github.com/users/gunjan5/following{/other_user}","gists_url":"https://api.github.com/users/gunjan5/gists{/gist_id}","starred_url":"https://api.github.com/users/gunjan5/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gunjan5/subscriptions","organizations_url":"https://api.github.com/users/gunjan5/orgs","repos_url":"https://api.github.com/users/gunjan5/repos","events_url":"https://api.github.com/users/gunjan5/events{/privacy}","received_events_url":"https://api.github.com/users/gunjan5/received_events","type":"User","site_admin":false},"assignees":[{"login":"gunjan5","id":5966968,"avatar_url":"https://avatars.githubusercontent.com/u/5966968?v=3","gravatar_id":"","url":"https://api.github.com/users/gunjan5","html_url":"https://github.com/gunjan5","followers_url":"https://api.github.com/users/gunjan5/followers","following_url":"https://api.github.com/users/gunjan5/following{/other_user}","gists_url":"https://api.github.com/users/gunjan5/gists{/gist_id}","starred_url":"https://api.github.com/users/gunjan5/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gunjan5/subscriptions","organizations_url":"https://api.github.com/users/gunjan5/orgs","repos_url":"https://api.github.com/users/gunjan5/repos","events_url":"https://api.github.com/users/gunjan5/events{/privacy}","received_events_url":"https://api.github.com/users/gunjan5/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/projectcalico/libcalico-go/pulls/272/commits","review_comments_url":"https://api.github.com/repos/projectcalico/libcalico-go/pulls/272/comments","review_comment_url":"https://api.github.com/repos/projectcalico/libcalico-go/pulls/comments{/number}","comments_url":"https://api.github.com/repos/projectcalico/libcalico-go/issues/272/comments","statuses_url":"https://api.github.com/repos/projectcalico/libcalico-go/statuses/7da7532905024efe7504ea1ac821a0c68c0d52b2","head":{"label":"robbrockbank:validation-improvements","ref":"validation-improvements","sha":"7da7532905024efe7504ea1ac821a0c68c0d52b2","user":{"login":"robbrockbank","id":3227729,"avatar_url":"https://avatars.githubusercontent.com/u/3227729?v=3","gravatar_id":"","url":"https://api.github.com/users/robbrockbank","html_url":"https://github.com/robbrockbank","followers_url":"https://api.github.com/users/robbrockbank/followers","following_url":"https://api.github.com/users/robbrockbank/following{/other_user}","gists_url":"https://api.github.com/users/robbrockbank/gists{/gist_id}","starred_url":"https://api.github.com/users/robbrockbank/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robbrockbank/subscriptions","organizations_url":"https://api.github.com/users/robbrockbank/orgs","repos_url":"https://api.github.com/users/robbrockbank/repos","events_url":"https://api.github.com/users/robbrockbank/events{/privacy}","received_events_url":"https://api.github.com/users/robbrockbank/received_events","type":"User","site_admin":false},"repo":{"id":63622166,"name":"libcalico-go","full_name":"robbrockbank/libcalico-go","owner":{"login":"robbrockbank","id":3227729,"avatar_url":"https://avatars.githubusercontent.com/u/3227729?v=3","gravatar_id":"","url":"https://api.github.com/users/robbrockbank","html_url":"https://github.com/robbrockbank","followers_url":"https://api.github.com/users/robbrockbank/followers","following_url":"https://api.github.com/users/robbrockbank/following{/other_user}","gists_url":"https://api.github.com/users/robbrockbank/gists{/gist_id}","starred_url":"https://api.github.com/users/robbrockbank/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robbrockbank/subscriptions","organizations_url":"https://api.github.com/users/robbrockbank/orgs","repos_url":"https://api.github.com/users/robbrockbank/repos","events_url":"https://api.github.com/users/robbrockbank/events{/privacy}","received_events_url":"https://api.github.com/users/robbrockbank/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/robbrockbank/libcalico-go","description":"Golang Calico library functions:  https://www.projectcalico.org","fork":true,"url":"https://api.github.com/repos/robbrockbank/libcalico-go","forks_url":"https://api.github.com/repos/robbrockbank/libcalico-go/forks","keys_url":"https://api.github.com/repos/robbrockbank/libcalico-go/keys{/key_id}","collaborators_url":"https://api.github.com/repos/robbrockbank/libcalico-go/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/robbrockbank/libcalico-go/teams","hooks_url":"https://api.github.com/repos/robbrockbank/libcalico-go/hooks","issue_events_url":"https://api.github.com/repos/robbrockbank/libcalico-go/issues/events{/number}","events_url":"https://api.github.com/repos/robbrockbank/libcalico-go/events","assignees_url":"https://api.github.com/repos/robbrockbank/libcalico-go/assignees{/user}","branches_url":"https://api.github.com/repos/robbrockbank/libcalico-go/branches{/branch}","tags_url":"https://api.github.com/repos/robbrockbank/libcalico-go/tags","blobs_url":"https://api.github.com/repos/robbrockbank/libcalico-go/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/robbrockbank/libcalico-go/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/robbrockbank/libcalico-go/git/refs{/sha}","trees_url":"https://api.github.com/repos/robbrockbank/libcalico-go/git/trees{/sha}","statuses_url":"https://api.github.com/repos/robbrockbank/libcalico-go/statuses/{sha}","languages_url":"https://api.github.com/repos/robbrockbank/libcalico-go/languages","stargazers_url":"https://api.github.com/repos/robbrockbank/libcalico-go/stargazers","contributors_url":"https://api.github.com/repos/robbrockbank/libcalico-go/contributors","subscribers_url":"https://api.github.com/repos/robbrockbank/libcalico-go/subscribers","subscription_url":"https://api.github.com/repos/robbrockbank/libcalico-go/subscription","commits_url":"https://api.github.com/repos/robbrockbank/libcalico-go/commits{/sha}","git_commits_url":"https://api.github.com/repos/robbrockbank/libcalico-go/git/commits{/sha}","comments_url":"https://api.github.com/repos/robbrockbank/libcalico-go/comments{/number}","issue_comment_url":"https://api.github.com/repos/robbrockbank/libcalico-go/issues/comments{/number}","contents_url":"https://api.github.com/repos/robbrockbank/libcalico-go/contents/{+path}","compare_url":"https://api.github.com/repos/robbrockbank/libcalico-go/compare/{base}...{head}","merges_url":"https://api.github.com/repos/robbrockbank/libcalico-go/merges","archive_url":"https://api.github.com/repos/robbrockbank/libcalico-go/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/robbrockbank/libcalico-go/downloads","issues_url":"https://api.github.com/repos/robbrockbank/libcalico-go/issues{/number}","pulls_url":"https://api.github.com/repos/robbrockbank/libcalico-go/pulls{/number}","milestones_url":"https://api.github.com/repos/robbrockbank/libcalico-go/milestones{/number}","notifications_url":"https://api.github.com/repos/robbrockbank/libcalico-go/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/robbrockbank/libcalico-go/labels{/name}","releases_url":"https://api.github.com/repos/robbrockbank/libcalico-go/releases{/id}","deployments_url":"https://api.github.com/repos/robbrockbank/libcalico-go/deployments","created_at":"2016-07-18T17:12:42Z","updated_at":"2016-07-18T17:12:43Z","pushed_at":"2016-11-23T20:40:52Z","git_url":"git://github.com/robbrockbank/libcalico-go.git","ssh_url":"git@github.com:robbrockbank/libcalico-go.git","clone_url":"https://github.com/robbrockbank/libcalico-go.git","svn_url":"https://github.com/robbrockbank/libcalico-go","homepage":null,"size":1367,"stargazers_count":0,"watchers_count":0,"language":"Go","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":"projectcalico:master","ref":"master","sha":"17066baebc79e39764f9c5f8cfaca53a6687b1ae","user":{"login":"projectcalico","id":12304728,"avatar_url":"https://avatars.githubusercontent.com/u/12304728?v=3","gravatar_id":"","url":"https://api.github.com/users/projectcalico","html_url":"https://github.com/projectcalico","followers_url":"https://api.github.com/users/projectcalico/followers","following_url":"https://api.github.com/users/projectcalico/following{/other_user}","gists_url":"https://api.github.com/users/projectcalico/gists{/gist_id}","starred_url":"https://api.github.com/users/projectcalico/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/projectcalico/subscriptions","organizations_url":"https://api.github.com/users/projectcalico/orgs","repos_url":"https://api.github.com/users/projectcalico/repos","events_url":"https://api.github.com/users/projectcalico/events{/privacy}","received_events_url":"https://api.github.com/users/projectcalico/received_events","type":"Organization","site_admin":false},"repo":{"id":63438319,"name":"libcalico-go","full_name":"projectcalico/libcalico-go","owner":{"login":"projectcalico","id":12304728,"avatar_url":"https://avatars.githubusercontent.com/u/12304728?v=3","gravatar_id":"","url":"https://api.github.com/users/projectcalico","html_url":"https://github.com/projectcalico","followers_url":"https://api.github.com/users/projectcalico/followers","following_url":"https://api.github.com/users/projectcalico/following{/other_user}","gists_url":"https://api.github.com/users/projectcalico/gists{/gist_id}","starred_url":"https://api.github.com/users/projectcalico/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/projectcalico/subscriptions","organizations_url":"https://api.github.com/users/projectcalico/orgs","repos_url":"https://api.github.com/users/projectcalico/repos","events_url":"https://api.github.com/users/projectcalico/events{/privacy}","received_events_url":"https://api.github.com/users/projectcalico/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/projectcalico/libcalico-go","description":"Golang Calico library functions:  https://www.projectcalico.org","fork":false,"url":"https://api.github.com/repos/projectcalico/libcalico-go","forks_url":"https://api.github.com/repos/projectcalico/libcalico-go/forks","keys_url":"https://api.github.com/repos/projectcalico/libcalico-go/keys{/key_id}","collaborators_url":"https://api.github.com/repos/projectcalico/libcalico-go/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/projectcalico/libcalico-go/teams","hooks_url":"https://api.github.com/repos/projectcalico/libcalico-go/hooks","issue_events_url":"https://api.github.com/repos/projectcalico/libcalico-go/issues/events{/number}","events_url":"https://api.github.com/repos/projectcalico/libcalico-go/events","assignees_url":"https://api.github.com/repos/projectcalico/libcalico-go/assignees{/user}","branches_url":"https://api.github.com/repos/projectcalico/libcalico-go/branches{/branch}","tags_url":"https://api.github.com/repos/projectcalico/libcalico-go/tags","blobs_url":"https://api.github.com/repos/projectcalico/libcalico-go/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/projectcalico/libcalico-go/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/projectcalico/libcalico-go/git/refs{/sha}","trees_url":"https://api.github.com/repos/projectcalico/libcalico-go/git/trees{/sha}","statuses_url":"https://api.github.com/repos/projectcalico/libcalico-go/statuses/{sha}","languages_url":"https://api.github.com/repos/projectcalico/libcalico-go/languages","stargazers_url":"https://api.github.com/repos/projectcalico/libcalico-go/stargazers","contributors_url":"https://api.github.com/repos/projectcalico/libcalico-go/contributors","subscribers_url":"https://api.github.com/repos/projectcalico/libcalico-go/subscribers","subscription_url":"https://api.github.com/repos/projectcalico/libcalico-go/subscription","commits_url":"https://api.github.com/repos/projectcalico/libcalico-go/commits{/sha}","git_commits_url":"https://api.github.com/repos/projectcalico/libcalico-go/git/commits{/sha}","comments_url":"https://api.github.com/repos/projectcalico/libcalico-go/comments{/number}","issue_comment_url":"https://api.github.com/repos/projectcalico/libcalico-go/issues/comments{/number}","contents_url":"https://api.github.com/repos/projectcalico/libcalico-go/contents/{+path}","compare_url":"https://api.github.com/repos/projectcalico/libcalico-go/compare/{base}...{head}","merges_url":"https://api.github.com/repos/projectcalico/libcalico-go/merges","archive_url":"https://api.github.com/repos/projectcalico/libcalico-go/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/projectcalico/libcalico-go/downloads","issues_url":"https://api.github.com/repos/projectcalico/libcalico-go/issues{/number}","pulls_url":"https://api.github.com/repos/projectcalico/libcalico-go/pulls{/number}","milestones_url":"https://api.github.com/repos/projectcalico/libcalico-go/milestones{/number}","notifications_url":"https://api.github.com/repos/projectcalico/libcalico-go/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/projectcalico/libcalico-go/labels{/name}","releases_url":"https://api.github.com/repos/projectcalico/libcalico-go/releases{/id}","deployments_url":"https://api.github.com/repos/projectcalico/libcalico-go/deployments","created_at":"2016-07-15T17:09:40Z","updated_at":"2016-11-13T06:25:00Z","pushed_at":"2016-11-23T20:41:02Z","git_url":"git://github.com/projectcalico/libcalico-go.git","ssh_url":"git@github.com:projectcalico/libcalico-go.git","clone_url":"https://github.com/projectcalico/libcalico-go.git","svn_url":"https://github.com/projectcalico/libcalico-go","homepage":null,"size":1689,"stargazers_count":14,"watchers_count":14,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":17,"mirror_url":null,"open_issues_count":28,"forks":17,"open_issues":28,"watchers":14,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/projectcalico/libcalico-go/pulls/272"},"html":{"href":"https://github.com/projectcalico/libcalico-go/pull/272"},"issue":{"href":"https://api.github.com/repos/projectcalico/libcalico-go/issues/272"},"comments":{"href":"https://api.github.com/repos/projectcalico/libcalico-go/issues/272/comments"},"review_comments":{"href":"https://api.github.com/repos/projectcalico/libcalico-go/pulls/272/comments"},"review_comment":{"href":"https://api.github.com/repos/projectcalico/libcalico-go/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/projectcalico/libcalico-go/pulls/272/commits"},"statuses":{"href":"https://api.github.com/repos/projectcalico/libcalico-go/statuses/7da7532905024efe7504ea1ac821a0c68c0d52b2"}}}}
{"actor":{"display_login":"robbrockbank"}}