{"action":"created","comment":{"url":"https://api.github.com/repos/confluentinc/confluent-cli/pulls/comments/191575665","pull_request_review_id":124174263,"id":191575665,"diff_hunk":"@@ -1433,6 +1489,52 @@ version_command() {\n     fi\n }\n \n+produce_usage() {\n+    cat <<EOF\n+Usage: ${command_name} <topicname> [--value-format avro] [other optional args]\n+\n+Description:\n+    Produce to Kafka topic specified by <topicname>.\n+\n+    Without '--value-format avro', it calls the 'kafka-console-producer' command,\n+    automatically with '--topic <topicname> --broker-list localhost:9092' and passes in <other optional args>.\n+\n+    With '--value-format avro', it calls the 'kafka-avro-console-producer' command,\n+    automatically with '--topic <topicname> --broker-list localhost:9092' and passes in <other optional args>.\n+    This requires an additional argument '--property value.schema=<schema>'\n+\n+Examples:\n+    confluent produce mytopic1\n+\n+    confluent produce mytopic1 --value-format avro --property value.schema='{\"type\":\"record\",\"name\":\"myrecord\",\"fields\":[{\"name\":\"f1\",\"type\":\"string\"}]}'\n+\n+EOF\n+    exit 0","path":"src/oss/confluent.sh","position":null,"original_position":94,"commit_id":"09f1940275b06acde5e117bd28125e705a61c14e","original_commit_id":"554efd74a515b20b30adfdf01c202cf53ca912a3","user":{"login":"ybyzek","id":12448600,"avatar_url":"https://avatars3.githubusercontent.com/u/12448600?v=4","gravatar_id":"","url":"https://api.github.com/users/ybyzek","html_url":"https://github.com/ybyzek","followers_url":"https://api.github.com/users/ybyzek/followers","following_url":"https://api.github.com/users/ybyzek/following{/other_user}","gists_url":"https://api.github.com/users/ybyzek/gists{/gist_id}","starred_url":"https://api.github.com/users/ybyzek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ybyzek/subscriptions","organizations_url":"https://api.github.com/users/ybyzek/orgs","repos_url":"https://api.github.com/users/ybyzek/repos","events_url":"https://api.github.com/users/ybyzek/events{/privacy}","received_events_url":"https://api.github.com/users/ybyzek/received_events","type":"User","site_admin":false},"body":"The usage is printed twice, once intentionally with `help` and once on error if users forgets `topicname`.  So we can't always die in the usage.  The current code exits with the appropriate exit code.","created_at":"2018-05-29T21:11:05Z","updated_at":"2018-05-29T21:11:05Z","html_url":"https://github.com/confluentinc/confluent-cli/pull/91#discussion_r191575665","pull_request_url":"https://api.github.com/repos/confluentinc/confluent-cli/pulls/91","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/confluentinc/confluent-cli/pulls/comments/191575665"},"html":{"href":"https://github.com/confluentinc/confluent-cli/pull/91#discussion_r191575665"},"pull_request":{"href":"https://api.github.com/repos/confluentinc/confluent-cli/pulls/91"}},"in_reply_to_id":191536107},"pull_request":{"url":"https://api.github.com/repos/confluentinc/confluent-cli/pulls/91","id":191195843,"html_url":"https://github.com/confluentinc/confluent-cli/pull/91","diff_url":"https://github.com/confluentinc/confluent-cli/pull/91.diff","patch_url":"https://github.com/confluentinc/confluent-cli/pull/91.patch","issue_url":"https://api.github.com/repos/confluentinc/confluent-cli/issues/91","number":91,"state":"open","locked":false,"title":"[WIP] Wrapper around bin scripts, include Avro","user":{"login":"ybyzek","id":12448600,"avatar_url":"https://avatars3.githubusercontent.com/u/12448600?v=4","gravatar_id":"","url":"https://api.github.com/users/ybyzek","html_url":"https://github.com/ybyzek","followers_url":"https://api.github.com/users/ybyzek/followers","following_url":"https://api.github.com/users/ybyzek/following{/other_user}","gists_url":"https://api.github.com/users/ybyzek/gists{/gist_id}","starred_url":"https://api.github.com/users/ybyzek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ybyzek/subscriptions","organizations_url":"https://api.github.com/users/ybyzek/orgs","repos_url":"https://api.github.com/users/ybyzek/repos","events_url":"https://api.github.com/users/ybyzek/events{/privacy}","received_events_url":"https://api.github.com/users/ybyzek/received_events","type":"User","site_admin":false},"body":"Not Avro:\r\n\r\n```bash\r\nconfluent-cli(consolebin-wrapper) ✗: confluent produce mytopic2                 \r\nThis CLI is intended for development only, not for production\r\nhttps://docs.confluent.io/current/cli/index.html\r\n\r\n>a\r\n>b\r\n>c\r\n>^C%                 \r\n\r\n$ confluent-cli(consolebin-wrapper) ✗: confluent consume mytopic2 --from-beginning\r\nThis CLI is intended for development only, not for production\r\nhttps://docs.confluent.io/current/cli/index.html\r\n\r\na\r\nb\r\nc\r\n^CProcessed a total of 3 messages\r\n```\r\n\r\nAvro:\r\n\r\n```bash\r\nconfluent-cli(consolebin-wrapper) ✗: confluent produce mytopic4 --value-format avro --property value.schema='{\"type\":\"record\",\"name\":\"myrecord\",\"fields\":[{\"name\":\"f1\",\"type\":\"string\"}]}'\r\nThis CLI is intended for development only, not for production\r\nhttps://docs.confluent.io/current/cli/index.html\r\n\r\nnewargs: mytopic4  --property value.schema={\"type\":\"record\",\"name\":\"myrecord\",\"fields\":[{\"name\":\"f1\",\"type\":\"string\"}]}\r\n{\"f1\": \"value1\"}\r\n{\"f1\": \"value1\"}\r\n{\"f1\": \"value1\"}\r\n^C\r\n                                                                                                                                                                         \r\n$ confluent-cli(consolebin-wrapper) ✗: confluent consume mytopic4 --value-format avro --from-beginning\r\nThis CLI is intended for development only, not for production\r\nhttps://docs.confluent.io/current/cli/index.html\r\n\r\n{\"f1\":\"value1\"}\r\n{\"f1\":\"value1\"}\r\n{\"f1\":\"value1\"}\r\n^CProcessed a total of 3 messages\r\n```","created_at":"2018-05-29T16:02:29Z","updated_at":"2018-05-29T21:11:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b14716f52f5d9bc61285d7adb6bf54f9d83804d8","assignee":null,"assignees":[],"requested_reviewers":[{"login":"kkonstantine","id":16238634,"avatar_url":"https://avatars1.githubusercontent.com/u/16238634?v=4","gravatar_id":"","url":"https://api.github.com/users/kkonstantine","html_url":"https://github.com/kkonstantine","followers_url":"https://api.github.com/users/kkonstantine/followers","following_url":"https://api.github.com/users/kkonstantine/following{/other_user}","gists_url":"https://api.github.com/users/kkonstantine/gists{/gist_id}","starred_url":"https://api.github.com/users/kkonstantine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kkonstantine/subscriptions","organizations_url":"https://api.github.com/users/kkonstantine/orgs","repos_url":"https://api.github.com/users/kkonstantine/repos","events_url":"https://api.github.com/users/kkonstantine/events{/privacy}","received_events_url":"https://api.github.com/users/kkonstantine/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/confluentinc/confluent-cli/pulls/91/commits","review_comments_url":"https://api.github.com/repos/confluentinc/confluent-cli/pulls/91/comments","review_comment_url":"https://api.github.com/repos/confluentinc/confluent-cli/pulls/comments{/number}","comments_url":"https://api.github.com/repos/confluentinc/confluent-cli/issues/91/comments","statuses_url":"https://api.github.com/repos/confluentinc/confluent-cli/statuses/09f1940275b06acde5e117bd28125e705a61c14e","head":{"label":"confluentinc:consolebin-wrapper","ref":"consolebin-wrapper","sha":"09f1940275b06acde5e117bd28125e705a61c14e","user":{"login":"confluentinc","id":9439498,"avatar_url":"https://avatars0.githubusercontent.com/u/9439498?v=4","gravatar_id":"","url":"https://api.github.com/users/confluentinc","html_url":"https://github.com/confluentinc","followers_url":"https://api.github.com/users/confluentinc/followers","following_url":"https://api.github.com/users/confluentinc/following{/other_user}","gists_url":"https://api.github.com/users/confluentinc/gists{/gist_id}","starred_url":"https://api.github.com/users/confluentinc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/confluentinc/subscriptions","organizations_url":"https://api.github.com/users/confluentinc/orgs","repos_url":"https://api.github.com/users/confluentinc/repos","events_url":"https://api.github.com/users/confluentinc/events{/privacy}","received_events_url":"https://api.github.com/users/confluentinc/received_events","type":"Organization","site_admin":false},"repo":{"id":89279057,"name":"confluent-cli","full_name":"confluentinc/confluent-cli","owner":{"login":"confluentinc","id":9439498,"avatar_url":"https://avatars0.githubusercontent.com/u/9439498?v=4","gravatar_id":"","url":"https://api.github.com/users/confluentinc","html_url":"https://github.com/confluentinc","followers_url":"https://api.github.com/users/confluentinc/followers","following_url":"https://api.github.com/users/confluentinc/following{/other_user}","gists_url":"https://api.github.com/users/confluentinc/gists{/gist_id}","starred_url":"https://api.github.com/users/confluentinc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/confluentinc/subscriptions","organizations_url":"https://api.github.com/users/confluentinc/orgs","repos_url":"https://api.github.com/users/confluentinc/repos","events_url":"https://api.github.com/users/confluentinc/events{/privacy}","received_events_url":"https://api.github.com/users/confluentinc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/confluentinc/confluent-cli","description":"Confluent Platform CLI","fork":false,"url":"https://api.github.com/repos/confluentinc/confluent-cli","forks_url":"https://api.github.com/repos/confluentinc/confluent-cli/forks","keys_url":"https://api.github.com/repos/confluentinc/confluent-cli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/confluentinc/confluent-cli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/confluentinc/confluent-cli/teams","hooks_url":"https://api.github.com/repos/confluentinc/confluent-cli/hooks","issue_events_url":"https://api.github.com/repos/confluentinc/confluent-cli/issues/events{/number}","events_url":"https://api.github.com/repos/confluentinc/confluent-cli/events","assignees_url":"https://api.github.com/repos/confluentinc/confluent-cli/assignees{/user}","branches_url":"https://api.github.com/repos/confluentinc/confluent-cli/branches{/branch}","tags_url":"https://api.github.com/repos/confluentinc/confluent-cli/tags","blobs_url":"https://api.github.com/repos/confluentinc/confluent-cli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/confluentinc/confluent-cli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/confluentinc/confluent-cli/git/refs{/sha}","trees_url":"https://api.github.com/repos/confluentinc/confluent-cli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/confluentinc/confluent-cli/statuses/{sha}","languages_url":"https://api.github.com/repos/confluentinc/confluent-cli/languages","stargazers_url":"https://api.github.com/repos/confluentinc/confluent-cli/stargazers","contributors_url":"https://api.github.com/repos/confluentinc/confluent-cli/contributors","subscribers_url":"https://api.github.com/repos/confluentinc/confluent-cli/subscribers","subscription_url":"https://api.github.com/repos/confluentinc/confluent-cli/subscription","commits_url":"https://api.github.com/repos/confluentinc/confluent-cli/commits{/sha}","git_commits_url":"https://api.github.com/repos/confluentinc/confluent-cli/git/commits{/sha}","comments_url":"https://api.github.com/repos/confluentinc/confluent-cli/comments{/number}","issue_comment_url":"https://api.github.com/repos/confluentinc/confluent-cli/issues/comments{/number}","contents_url":"https://api.github.com/repos/confluentinc/confluent-cli/contents/{+path}","compare_url":"https://api.github.com/repos/confluentinc/confluent-cli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/confluentinc/confluent-cli/merges","archive_url":"https://api.github.com/repos/confluentinc/confluent-cli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/confluentinc/confluent-cli/downloads","issues_url":"https://api.github.com/repos/confluentinc/confluent-cli/issues{/number}","pulls_url":"https://api.github.com/repos/confluentinc/confluent-cli/pulls{/number}","milestones_url":"https://api.github.com/repos/confluentinc/confluent-cli/milestones{/number}","notifications_url":"https://api.github.com/repos/confluentinc/confluent-cli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/confluentinc/confluent-cli/labels{/name}","releases_url":"https://api.github.com/repos/confluentinc/confluent-cli/releases{/id}","deployments_url":"https://api.github.com/repos/confluentinc/confluent-cli/deployments","created_at":"2017-04-24T19:27:40Z","updated_at":"2018-05-25T11:05:33Z","pushed_at":"2018-05-29T20:27:56Z","git_url":"git://github.com/confluentinc/confluent-cli.git","ssh_url":"git@github.com:confluentinc/confluent-cli.git","clone_url":"https://github.com/confluentinc/confluent-cli.git","svn_url":"https://github.com/confluentinc/confluent-cli","homepage":null,"size":226,"stargazers_count":21,"watchers_count":21,"language":"Shell","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":19,"mirror_url":null,"archived":false,"open_issues_count":32,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":19,"open_issues":32,"watchers":21,"default_branch":"master"}},"base":{"label":"confluentinc:master","ref":"master","sha":"f7ca0f44b0fcfc5e6ef0c72bdc54ef796d1412ba","user":{"login":"confluentinc","id":9439498,"avatar_url":"https://avatars0.githubusercontent.com/u/9439498?v=4","gravatar_id":"","url":"https://api.github.com/users/confluentinc","html_url":"https://github.com/confluentinc","followers_url":"https://api.github.com/users/confluentinc/followers","following_url":"https://api.github.com/users/confluentinc/following{/other_user}","gists_url":"https://api.github.com/users/confluentinc/gists{/gist_id}","starred_url":"https://api.github.com/users/confluentinc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/confluentinc/subscriptions","organizations_url":"https://api.github.com/users/confluentinc/orgs","repos_url":"https://api.github.com/users/confluentinc/repos","events_url":"https://api.github.com/users/confluentinc/events{/privacy}","received_events_url":"https://api.github.com/users/confluentinc/received_events","type":"Organization","site_admin":false},"repo":{"id":89279057,"name":"confluent-cli","full_name":"confluentinc/confluent-cli","owner":{"login":"confluentinc","id":9439498,"avatar_url":"https://avatars0.githubusercontent.com/u/9439498?v=4","gravatar_id":"","url":"https://api.github.com/users/confluentinc","html_url":"https://github.com/confluentinc","followers_url":"https://api.github.com/users/confluentinc/followers","following_url":"https://api.github.com/users/confluentinc/following{/other_user}","gists_url":"https://api.github.com/users/confluentinc/gists{/gist_id}","starred_url":"https://api.github.com/users/confluentinc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/confluentinc/subscriptions","organizations_url":"https://api.github.com/users/confluentinc/orgs","repos_url":"https://api.github.com/users/confluentinc/repos","events_url":"https://api.github.com/users/confluentinc/events{/privacy}","received_events_url":"https://api.github.com/users/confluentinc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/confluentinc/confluent-cli","description":"Confluent Platform CLI","fork":false,"url":"https://api.github.com/repos/confluentinc/confluent-cli","forks_url":"https://api.github.com/repos/confluentinc/confluent-cli/forks","keys_url":"https://api.github.com/repos/confluentinc/confluent-cli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/confluentinc/confluent-cli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/confluentinc/confluent-cli/teams","hooks_url":"https://api.github.com/repos/confluentinc/confluent-cli/hooks","issue_events_url":"https://api.github.com/repos/confluentinc/confluent-cli/issues/events{/number}","events_url":"https://api.github.com/repos/confluentinc/confluent-cli/events","assignees_url":"https://api.github.com/repos/confluentinc/confluent-cli/assignees{/user}","branches_url":"https://api.github.com/repos/confluentinc/confluent-cli/branches{/branch}","tags_url":"https://api.github.com/repos/confluentinc/confluent-cli/tags","blobs_url":"https://api.github.com/repos/confluentinc/confluent-cli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/confluentinc/confluent-cli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/confluentinc/confluent-cli/git/refs{/sha}","trees_url":"https://api.github.com/repos/confluentinc/confluent-cli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/confluentinc/confluent-cli/statuses/{sha}","languages_url":"https://api.github.com/repos/confluentinc/confluent-cli/languages","stargazers_url":"https://api.github.com/repos/confluentinc/confluent-cli/stargazers","contributors_url":"https://api.github.com/repos/confluentinc/confluent-cli/contributors","subscribers_url":"https://api.github.com/repos/confluentinc/confluent-cli/subscribers","subscription_url":"https://api.github.com/repos/confluentinc/confluent-cli/subscription","commits_url":"https://api.github.com/repos/confluentinc/confluent-cli/commits{/sha}","git_commits_url":"https://api.github.com/repos/confluentinc/confluent-cli/git/commits{/sha}","comments_url":"https://api.github.com/repos/confluentinc/confluent-cli/comments{/number}","issue_comment_url":"https://api.github.com/repos/confluentinc/confluent-cli/issues/comments{/number}","contents_url":"https://api.github.com/repos/confluentinc/confluent-cli/contents/{+path}","compare_url":"https://api.github.com/repos/confluentinc/confluent-cli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/confluentinc/confluent-cli/merges","archive_url":"https://api.github.com/repos/confluentinc/confluent-cli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/confluentinc/confluent-cli/downloads","issues_url":"https://api.github.com/repos/confluentinc/confluent-cli/issues{/number}","pulls_url":"https://api.github.com/repos/confluentinc/confluent-cli/pulls{/number}","milestones_url":"https://api.github.com/repos/confluentinc/confluent-cli/milestones{/number}","notifications_url":"https://api.github.com/repos/confluentinc/confluent-cli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/confluentinc/confluent-cli/labels{/name}","releases_url":"https://api.github.com/repos/confluentinc/confluent-cli/releases{/id}","deployments_url":"https://api.github.com/repos/confluentinc/confluent-cli/deployments","created_at":"2017-04-24T19:27:40Z","updated_at":"2018-05-25T11:05:33Z","pushed_at":"2018-05-29T20:27:56Z","git_url":"git://github.com/confluentinc/confluent-cli.git","ssh_url":"git@github.com:confluentinc/confluent-cli.git","clone_url":"https://github.com/confluentinc/confluent-cli.git","svn_url":"https://github.com/confluentinc/confluent-cli","homepage":null,"size":226,"stargazers_count":21,"watchers_count":21,"language":"Shell","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":19,"mirror_url":null,"archived":false,"open_issues_count":32,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":19,"open_issues":32,"watchers":21,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/confluentinc/confluent-cli/pulls/91"},"html":{"href":"https://github.com/confluentinc/confluent-cli/pull/91"},"issue":{"href":"https://api.github.com/repos/confluentinc/confluent-cli/issues/91"},"comments":{"href":"https://api.github.com/repos/confluentinc/confluent-cli/issues/91/comments"},"review_comments":{"href":"https://api.github.com/repos/confluentinc/confluent-cli/pulls/91/comments"},"review_comment":{"href":"https://api.github.com/repos/confluentinc/confluent-cli/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/confluentinc/confluent-cli/pulls/91/commits"},"statuses":{"href":"https://api.github.com/repos/confluentinc/confluent-cli/statuses/09f1940275b06acde5e117bd28125e705a61c14e"}},"author_association":"NONE"}}
{"actor":{"display_login":"ybyzek"}}