{"action":"created","comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/150457993","pull_request_review_id":76008637,"id":150457993,"diff_hunk":"@@ -0,0 +1,46 @@\n+syntax = \"proto2\";\n+package k8s.io.kubectl.cmd;\n+\n+import \"google/protobuf/descriptor.proto\";\n+\n+message FlagDetail {\n+  required string name = 1;\n+  repeated string value = 2;\n+  required string shorthand = 3;\n+  required string usage = 4;\n+  enum EXT {\n+      NONE = 0;\n+      ISTIME = 1;\n+      ISSTRARRAY = 2;\n+      ISSTRSLICE = 3;\n+  }\n+  optional EXT ext = 5;\n+}\n+\n+extend google.protobuf.FieldOptions {\n+  optional FlagDetail info = 1234;\n+}\n+\n+message Array {\n+    repeated string array = 1;\n+}\n+\n+//Flags Description\n+\n+\n+//This is the flag description for `kubectl version`\n+message VersionFlags {\n+  optional bool client = 2 [ (info) = { name: \"client\" value: \"false\" shorthand: \"c\" usage: \"Client version only (no server required).\"}];","path":"pkg/kubectl/cmd/util/cmdproto/k8s_io_kubectl_cmd/cmd.proto","position":null,"original_position":33,"commit_id":"dd661d678f4e571130f024e76a220bfe23e4430e","original_commit_id":"16b7c8c024344bded541a7d69533dd0eee814044","user":{"login":"shiywang","id":6284003,"avatar_url":"https://avatars3.githubusercontent.com/u/6284003?v=4","gravatar_id":"","url":"https://api.github.com/users/shiywang","html_url":"https://github.com/shiywang","followers_url":"https://api.github.com/users/shiywang/followers","following_url":"https://api.github.com/users/shiywang/following{/other_user}","gists_url":"https://api.github.com/users/shiywang/gists{/gist_id}","starred_url":"https://api.github.com/users/shiywang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shiywang/subscriptions","organizations_url":"https://api.github.com/users/shiywang/orgs","repos_url":"https://api.github.com/users/shiywang/repos","events_url":"https://api.github.com/users/shiywang/events{/privacy}","received_events_url":"https://api.github.com/users/shiywang/received_events","type":"User","site_admin":false},"body":"I can do that for all the scalar value, but default option in protos does not allow you to define a default value for aggregate fields (e.g. no defaults allowed for repeated/map fields or fields whose type is a nested message). wdyt ?","created_at":"2017-11-13T06:51:53Z","updated_at":"2017-11-13T06:51:53Z","html_url":"https://github.com/kubernetes/kubernetes/pull/54782#discussion_r150457993","pull_request_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/54782","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/150457993"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/54782#discussion_r150457993"},"pull_request":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/54782"}},"in_reply_to_id":147749899},"pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/54782","id":149481099,"html_url":"https://github.com/kubernetes/kubernetes/pull/54782","diff_url":"https://github.com/kubernetes/kubernetes/pull/54782.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/54782.patch","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/54782","number":54782,"state":"open","locked":false,"title":"WIP: Create library for parsing commandline flags -> protocol buffer, decouple cobra","user":{"login":"shiywang","id":6284003,"avatar_url":"https://avatars3.githubusercontent.com/u/6284003?v=4","gravatar_id":"","url":"https://api.github.com/users/shiywang","html_url":"https://github.com/shiywang","followers_url":"https://api.github.com/users/shiywang/followers","following_url":"https://api.github.com/users/shiywang/following{/other_user}","gists_url":"https://api.github.com/users/shiywang/gists{/gist_id}","starred_url":"https://api.github.com/users/shiywang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shiywang/subscriptions","organizations_url":"https://api.github.com/users/shiywang/orgs","repos_url":"https://api.github.com/users/shiywang/repos","events_url":"https://api.github.com/users/shiywang/events{/privacy}","received_events_url":"https://api.github.com/users/shiywang/received_events","type":"User","site_admin":false},"body":"Fixes https://github.com/kubernetes/kubectl/issues/94\r\n \r\n/assign @pwittrock \r\nstill need some tests, and I'm not sure if this is what we want, @pwittrock  please leave some comments, also currently the protofile generates by command `protoc --go_out=. ./cmd.proto` manually.\r\n\r\nI also have some other ideas about decoupled cobra, will file an issue later. \r\n\r\nI rewrite the command `version` flag setup in new way(protobuf), you could check the `version.go` file to see if this is decoupled enough.\r\n\r\nalso @kubernetes/sig-cli-feature-requests @kubernetes/sig-cli-maintainers @kubernetes/sig-cli-misc \r\n\r\n```release-note\r\nNONE\r\n```\r\n","created_at":"2017-10-30T10:11:37Z","updated_at":"2017-11-13T06:51:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"41fd7c9d3e9d4b7afca56a6902c9c570b160f7d5","assignee":{"login":"droot","id":172029,"avatar_url":"https://avatars3.githubusercontent.com/u/172029?v=4","gravatar_id":"","url":"https://api.github.com/users/droot","html_url":"https://github.com/droot","followers_url":"https://api.github.com/users/droot/followers","following_url":"https://api.github.com/users/droot/following{/other_user}","gists_url":"https://api.github.com/users/droot/gists{/gist_id}","starred_url":"https://api.github.com/users/droot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/droot/subscriptions","organizations_url":"https://api.github.com/users/droot/orgs","repos_url":"https://api.github.com/users/droot/repos","events_url":"https://api.github.com/users/droot/events{/privacy}","received_events_url":"https://api.github.com/users/droot/received_events","type":"User","site_admin":false},"assignees":[{"login":"droot","id":172029,"avatar_url":"https://avatars3.githubusercontent.com/u/172029?v=4","gravatar_id":"","url":"https://api.github.com/users/droot","html_url":"https://github.com/droot","followers_url":"https://api.github.com/users/droot/followers","following_url":"https://api.github.com/users/droot/following{/other_user}","gists_url":"https://api.github.com/users/droot/gists{/gist_id}","starred_url":"https://api.github.com/users/droot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/droot/subscriptions","organizations_url":"https://api.github.com/users/droot/orgs","repos_url":"https://api.github.com/users/droot/repos","events_url":"https://api.github.com/users/droot/events{/privacy}","received_events_url":"https://api.github.com/users/droot/received_events","type":"User","site_admin":false},{"login":"apelisse","id":1929644,"avatar_url":"https://avatars0.githubusercontent.com/u/1929644?v=4","gravatar_id":"","url":"https://api.github.com/users/apelisse","html_url":"https://github.com/apelisse","followers_url":"https://api.github.com/users/apelisse/followers","following_url":"https://api.github.com/users/apelisse/following{/other_user}","gists_url":"https://api.github.com/users/apelisse/gists{/gist_id}","starred_url":"https://api.github.com/users/apelisse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apelisse/subscriptions","organizations_url":"https://api.github.com/users/apelisse/orgs","repos_url":"https://api.github.com/users/apelisse/repos","events_url":"https://api.github.com/users/apelisse/events{/privacy}","received_events_url":"https://api.github.com/users/apelisse/received_events","type":"User","site_admin":false},{"login":"pwittrock","id":7882754,"avatar_url":"https://avatars0.githubusercontent.com/u/7882754?v=4","gravatar_id":"","url":"https://api.github.com/users/pwittrock","html_url":"https://github.com/pwittrock","followers_url":"https://api.github.com/users/pwittrock/followers","following_url":"https://api.github.com/users/pwittrock/following{/other_user}","gists_url":"https://api.github.com/users/pwittrock/gists{/gist_id}","starred_url":"https://api.github.com/users/pwittrock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pwittrock/subscriptions","organizations_url":"https://api.github.com/users/pwittrock/orgs","repos_url":"https://api.github.com/users/pwittrock/repos","events_url":"https://api.github.com/users/pwittrock/events{/privacy}","received_events_url":"https://api.github.com/users/pwittrock/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/54782/commits","review_comments_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/54782/comments","review_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/54782/comments","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/dd661d678f4e571130f024e76a220bfe23e4430e","head":{"label":"shiywang:proof-of-concept","ref":"proof-of-concept","sha":"dd661d678f4e571130f024e76a220bfe23e4430e","user":{"login":"shiywang","id":6284003,"avatar_url":"https://avatars3.githubusercontent.com/u/6284003?v=4","gravatar_id":"","url":"https://api.github.com/users/shiywang","html_url":"https://github.com/shiywang","followers_url":"https://api.github.com/users/shiywang/followers","following_url":"https://api.github.com/users/shiywang/following{/other_user}","gists_url":"https://api.github.com/users/shiywang/gists{/gist_id}","starred_url":"https://api.github.com/users/shiywang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shiywang/subscriptions","organizations_url":"https://api.github.com/users/shiywang/orgs","repos_url":"https://api.github.com/users/shiywang/repos","events_url":"https://api.github.com/users/shiywang/events{/privacy}","received_events_url":"https://api.github.com/users/shiywang/received_events","type":"User","site_admin":false},"repo":{"id":71549646,"name":"kubernetes","full_name":"shiywang/kubernetes","owner":{"login":"shiywang","id":6284003,"avatar_url":"https://avatars3.githubusercontent.com/u/6284003?v=4","gravatar_id":"","url":"https://api.github.com/users/shiywang","html_url":"https://github.com/shiywang","followers_url":"https://api.github.com/users/shiywang/followers","following_url":"https://api.github.com/users/shiywang/following{/other_user}","gists_url":"https://api.github.com/users/shiywang/gists{/gist_id}","starred_url":"https://api.github.com/users/shiywang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shiywang/subscriptions","organizations_url":"https://api.github.com/users/shiywang/orgs","repos_url":"https://api.github.com/users/shiywang/repos","events_url":"https://api.github.com/users/shiywang/events{/privacy}","received_events_url":"https://api.github.com/users/shiywang/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/shiywang/kubernetes","description":"Production-Grade Container Scheduling and Management","fork":true,"url":"https://api.github.com/repos/shiywang/kubernetes","forks_url":"https://api.github.com/repos/shiywang/kubernetes/forks","keys_url":"https://api.github.com/repos/shiywang/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shiywang/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shiywang/kubernetes/teams","hooks_url":"https://api.github.com/repos/shiywang/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/shiywang/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/shiywang/kubernetes/events","assignees_url":"https://api.github.com/repos/shiywang/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/shiywang/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/shiywang/kubernetes/tags","blobs_url":"https://api.github.com/repos/shiywang/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shiywang/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shiywang/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/shiywang/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shiywang/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/shiywang/kubernetes/languages","stargazers_url":"https://api.github.com/repos/shiywang/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/shiywang/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/shiywang/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/shiywang/kubernetes/subscription","commits_url":"https://api.github.com/repos/shiywang/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/shiywang/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/shiywang/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/shiywang/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/shiywang/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/shiywang/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shiywang/kubernetes/merges","archive_url":"https://api.github.com/repos/shiywang/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shiywang/kubernetes/downloads","issues_url":"https://api.github.com/repos/shiywang/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/shiywang/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/shiywang/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/shiywang/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shiywang/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/shiywang/kubernetes/releases{/id}","deployments_url":"https://api.github.com/repos/shiywang/kubernetes/deployments","created_at":"2016-10-21T09:13:45Z","updated_at":"2017-07-05T10:48:28Z","pushed_at":"2017-11-13T05:49:43Z","git_url":"git://github.com/shiywang/kubernetes.git","ssh_url":"git@github.com:shiywang/kubernetes.git","clone_url":"https://github.com/shiywang/kubernetes.git","svn_url":"https://github.com/shiywang/kubernetes","homepage":"http://kubernetes.io","size":512853,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"kubernetes:master","ref":"master","sha":"e93819049db49694718bc9c96e67050d366c6f63","user":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars2.githubusercontent.com/u/13629408?v=4","gravatar_id":"","url":"https://api.github.com/users/kubernetes","html_url":"https://github.com/kubernetes","followers_url":"https://api.github.com/users/kubernetes/followers","following_url":"https://api.github.com/users/kubernetes/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes/subscriptions","organizations_url":"https://api.github.com/users/kubernetes/orgs","repos_url":"https://api.github.com/users/kubernetes/repos","events_url":"https://api.github.com/users/kubernetes/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes/received_events","type":"Organization","site_admin":false},"repo":{"id":20580498,"name":"kubernetes","full_name":"kubernetes/kubernetes","owner":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars2.githubusercontent.com/u/13629408?v=4","gravatar_id":"","url":"https://api.github.com/users/kubernetes","html_url":"https://github.com/kubernetes","followers_url":"https://api.github.com/users/kubernetes/followers","following_url":"https://api.github.com/users/kubernetes/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes/subscriptions","organizations_url":"https://api.github.com/users/kubernetes/orgs","repos_url":"https://api.github.com/users/kubernetes/repos","events_url":"https://api.github.com/users/kubernetes/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kubernetes/kubernetes","description":"Production-Grade Container Scheduling and Management","fork":false,"url":"https://api.github.com/repos/kubernetes/kubernetes","forks_url":"https://api.github.com/repos/kubernetes/kubernetes/forks","keys_url":"https://api.github.com/repos/kubernetes/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kubernetes/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kubernetes/kubernetes/teams","hooks_url":"https://api.github.com/repos/kubernetes/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/kubernetes/kubernetes/events","assignees_url":"https://api.github.com/repos/kubernetes/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/kubernetes/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/kubernetes/kubernetes/tags","blobs_url":"https://api.github.com/repos/kubernetes/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kubernetes/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kubernetes/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/kubernetes/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/kubernetes/kubernetes/languages","stargazers_url":"https://api.github.com/repos/kubernetes/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/kubernetes/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/kubernetes/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/kubernetes/kubernetes/subscription","commits_url":"https://api.github.com/repos/kubernetes/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/kubernetes/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/kubernetes/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/kubernetes/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kubernetes/kubernetes/merges","archive_url":"https://api.github.com/repos/kubernetes/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kubernetes/kubernetes/downloads","issues_url":"https://api.github.com/repos/kubernetes/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/kubernetes/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/kubernetes/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/kubernetes/kubernetes/releases{/id}","deployments_url":"https://api.github.com/repos/kubernetes/kubernetes/deployments","created_at":"2014-06-06T22:56:04Z","updated_at":"2017-11-13T06:35:19Z","pushed_at":"2017-11-13T06:51:11Z","git_url":"git://github.com/kubernetes/kubernetes.git","ssh_url":"git@github.com:kubernetes/kubernetes.git","clone_url":"https://github.com/kubernetes/kubernetes.git","svn_url":"https://github.com/kubernetes/kubernetes","homepage":"http://kubernetes.io","size":736562,"stargazers_count":28811,"watchers_count":28811,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":10303,"mirror_url":null,"archived":false,"open_issues_count":5514,"forks":10303,"open_issues":5514,"watchers":28811,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/54782"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/54782"},"issue":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/54782"},"comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/54782/comments"},"review_comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/54782/comments"},"review_comment":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/54782/commits"},"statuses":{"href":"https://api.github.com/repos/kubernetes/kubernetes/statuses/dd661d678f4e571130f024e76a220bfe23e4430e"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"shiywang"}}