{"action":"created","comment":{"url":"https://api.github.com/repos/snapcore/snapd/pulls/comments/74474153","id":74474153,"diff_hunk":"@@ -51,11 +54,19 @@ func (x *cmdCreateUser) Execute(args []string) error {\n \t}\n \n \tcli := Client()\n-\trsp, err := cli.CreateUser(x.Positional.EMail)\n+\trsp, err := cli.CreateUser(x.Positional.EMail, x.Sudoer)\n \tif err != nil {\n \t\treturn err\n \t}\n-\tfmt.Fprintf(Stdout, i18n.G(\"Created user %q\\n\"), rsp.Username)\n+\tif x.Yaml {\n+\t\ty, err := yaml.Marshal(rsp)\n+\t\tif err != nil {\n+\t\t\treturn nil\n+\t\t}\n+\t\tfmt.Fprintf(Stdout, \"%s\\n\", y)","path":"cmd/snap/cmd_create_user.go","position":32,"original_position":32,"commit_id":"d1ed9bc75ea7085b4347329ecfc79e8cdb120842","original_commit_id":"d1ed9bc75ea7085b4347329ecfc79e8cdb120842","user":{"login":"niemeyer","id":378683,"avatar_url":"https://avatars.githubusercontent.com/u/378683?v=3","gravatar_id":"","url":"https://api.github.com/users/niemeyer","html_url":"https://github.com/niemeyer","followers_url":"https://api.github.com/users/niemeyer/followers","following_url":"https://api.github.com/users/niemeyer/following{/other_user}","gists_url":"https://api.github.com/users/niemeyer/gists{/gist_id}","starred_url":"https://api.github.com/users/niemeyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/niemeyer/subscriptions","organizations_url":"https://api.github.com/users/niemeyer/orgs","repos_url":"https://api.github.com/users/niemeyer/repos","events_url":"https://api.github.com/users/niemeyer/events{/privacy}","received_events_url":"https://api.github.com/users/niemeyer/received_events","type":"User","site_admin":false},"body":"```\r\n} else if rsp.SSHKeyCount > 0 {\r\n        fmt.Fprintf(Stdout, i18n.G(\"Created user %q and imported SSH keys.\\n\"), rsp.Username)\r\n} else {\r\n```\r\n\r\nThat's what it means, right?","created_at":"2016-08-11T18:15:45Z","updated_at":"2016-08-11T18:15:45Z","html_url":"https://github.com/snapcore/snapd/pull/1662#discussion_r74474153","pull_request_url":"https://api.github.com/repos/snapcore/snapd/pulls/1662","_links":{"self":{"href":"https://api.github.com/repos/snapcore/snapd/pulls/comments/74474153"},"html":{"href":"https://github.com/snapcore/snapd/pull/1662#discussion_r74474153"},"pull_request":{"href":"https://api.github.com/repos/snapcore/snapd/pulls/1662"}}},"pull_request":{"url":"https://api.github.com/repos/snapcore/snapd/pulls/1662","id":80733975,"html_url":"https://github.com/snapcore/snapd/pull/1662","diff_url":"https://github.com/snapcore/snapd/pull/1662.diff","patch_url":"https://github.com/snapcore/snapd/pull/1662.patch","issue_url":"https://api.github.com/repos/snapcore/snapd/issues/1662","number":1662,"state":"open","locked":false,"title":"client, cmd, daemon, osutil: support --yaml and --sudoer flags for create-user","user":{"login":"mwhudson","id":672022,"avatar_url":"https://avatars.githubusercontent.com/u/672022?v=3","gravatar_id":"","url":"https://api.github.com/users/mwhudson","html_url":"https://github.com/mwhudson","followers_url":"https://api.github.com/users/mwhudson/followers","following_url":"https://api.github.com/users/mwhudson/following{/other_user}","gists_url":"https://api.github.com/users/mwhudson/gists{/gist_id}","starred_url":"https://api.github.com/users/mwhudson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mwhudson/subscriptions","organizations_url":"https://api.github.com/users/mwhudson/orgs","repos_url":"https://api.github.com/users/mwhudson/repos","events_url":"https://api.github.com/users/mwhudson/events{/privacy}","received_events_url":"https://api.github.com/users/mwhudson/received_events","type":"User","site_admin":false},"body":"This adds an option for structured output and another to control whether the added user is a sudoer or not to the create-user command.\r\n\r\nIt's based on #1651 so the diff will get easier to read when that's merged :-) ","created_at":"2016-08-10T04:48:48Z","updated_at":"2016-08-11T18:15:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"690a7e38c4eafa72ce62064abe1062bc858c94d0","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/snapcore/snapd/pulls/1662/commits","review_comments_url":"https://api.github.com/repos/snapcore/snapd/pulls/1662/comments","review_comment_url":"https://api.github.com/repos/snapcore/snapd/pulls/comments{/number}","comments_url":"https://api.github.com/repos/snapcore/snapd/issues/1662/comments","statuses_url":"https://api.github.com/repos/snapcore/snapd/statuses/d1ed9bc75ea7085b4347329ecfc79e8cdb120842","head":{"label":"mwhudson:create-user-yaml-create-user","ref":"create-user-yaml-create-user","sha":"d1ed9bc75ea7085b4347329ecfc79e8cdb120842","user":{"login":"mwhudson","id":672022,"avatar_url":"https://avatars.githubusercontent.com/u/672022?v=3","gravatar_id":"","url":"https://api.github.com/users/mwhudson","html_url":"https://github.com/mwhudson","followers_url":"https://api.github.com/users/mwhudson/followers","following_url":"https://api.github.com/users/mwhudson/following{/other_user}","gists_url":"https://api.github.com/users/mwhudson/gists{/gist_id}","starred_url":"https://api.github.com/users/mwhudson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mwhudson/subscriptions","organizations_url":"https://api.github.com/users/mwhudson/orgs","repos_url":"https://api.github.com/users/mwhudson/repos","events_url":"https://api.github.com/users/mwhudson/events{/privacy}","received_events_url":"https://api.github.com/users/mwhudson/received_events","type":"User","site_admin":false},"repo":{"id":62270049,"name":"snapd","full_name":"mwhudson/snapd","owner":{"login":"mwhudson","id":672022,"avatar_url":"https://avatars.githubusercontent.com/u/672022?v=3","gravatar_id":"","url":"https://api.github.com/users/mwhudson","html_url":"https://github.com/mwhudson","followers_url":"https://api.github.com/users/mwhudson/followers","following_url":"https://api.github.com/users/mwhudson/following{/other_user}","gists_url":"https://api.github.com/users/mwhudson/gists{/gist_id}","starred_url":"https://api.github.com/users/mwhudson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mwhudson/subscriptions","organizations_url":"https://api.github.com/users/mwhudson/orgs","repos_url":"https://api.github.com/users/mwhudson/repos","events_url":"https://api.github.com/users/mwhudson/events{/privacy}","received_events_url":"https://api.github.com/users/mwhudson/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mwhudson/snapd","description":"The snapd and snap tools enable systems to work with .snap files.","fork":true,"url":"https://api.github.com/repos/mwhudson/snapd","forks_url":"https://api.github.com/repos/mwhudson/snapd/forks","keys_url":"https://api.github.com/repos/mwhudson/snapd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mwhudson/snapd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mwhudson/snapd/teams","hooks_url":"https://api.github.com/repos/mwhudson/snapd/hooks","issue_events_url":"https://api.github.com/repos/mwhudson/snapd/issues/events{/number}","events_url":"https://api.github.com/repos/mwhudson/snapd/events","assignees_url":"https://api.github.com/repos/mwhudson/snapd/assignees{/user}","branches_url":"https://api.github.com/repos/mwhudson/snapd/branches{/branch}","tags_url":"https://api.github.com/repos/mwhudson/snapd/tags","blobs_url":"https://api.github.com/repos/mwhudson/snapd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mwhudson/snapd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mwhudson/snapd/git/refs{/sha}","trees_url":"https://api.github.com/repos/mwhudson/snapd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mwhudson/snapd/statuses/{sha}","languages_url":"https://api.github.com/repos/mwhudson/snapd/languages","stargazers_url":"https://api.github.com/repos/mwhudson/snapd/stargazers","contributors_url":"https://api.github.com/repos/mwhudson/snapd/contributors","subscribers_url":"https://api.github.com/repos/mwhudson/snapd/subscribers","subscription_url":"https://api.github.com/repos/mwhudson/snapd/subscription","commits_url":"https://api.github.com/repos/mwhudson/snapd/commits{/sha}","git_commits_url":"https://api.github.com/repos/mwhudson/snapd/git/commits{/sha}","comments_url":"https://api.github.com/repos/mwhudson/snapd/comments{/number}","issue_comment_url":"https://api.github.com/repos/mwhudson/snapd/issues/comments{/number}","contents_url":"https://api.github.com/repos/mwhudson/snapd/contents/{+path}","compare_url":"https://api.github.com/repos/mwhudson/snapd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mwhudson/snapd/merges","archive_url":"https://api.github.com/repos/mwhudson/snapd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mwhudson/snapd/downloads","issues_url":"https://api.github.com/repos/mwhudson/snapd/issues{/number}","pulls_url":"https://api.github.com/repos/mwhudson/snapd/pulls{/number}","milestones_url":"https://api.github.com/repos/mwhudson/snapd/milestones{/number}","notifications_url":"https://api.github.com/repos/mwhudson/snapd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mwhudson/snapd/labels{/name}","releases_url":"https://api.github.com/repos/mwhudson/snapd/releases{/id}","deployments_url":"https://api.github.com/repos/mwhudson/snapd/deployments","created_at":"2016-06-30T01:41:16Z","updated_at":"2016-06-30T01:41:18Z","pushed_at":"2016-08-10T21:26:39Z","git_url":"git://github.com/mwhudson/snapd.git","ssh_url":"git@github.com:mwhudson/snapd.git","clone_url":"https://github.com/mwhudson/snapd.git","svn_url":"https://github.com/mwhudson/snapd","homepage":"","size":33479,"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":"snapcore:master","ref":"master","sha":"c144ba507efd3c74105877e7769321468558ae30","user":{"login":"snapcore","id":19532717,"avatar_url":"https://avatars.githubusercontent.com/u/19532717?v=3","gravatar_id":"","url":"https://api.github.com/users/snapcore","html_url":"https://github.com/snapcore","followers_url":"https://api.github.com/users/snapcore/followers","following_url":"https://api.github.com/users/snapcore/following{/other_user}","gists_url":"https://api.github.com/users/snapcore/gists{/gist_id}","starred_url":"https://api.github.com/users/snapcore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snapcore/subscriptions","organizations_url":"https://api.github.com/users/snapcore/orgs","repos_url":"https://api.github.com/users/snapcore/repos","events_url":"https://api.github.com/users/snapcore/events{/privacy}","received_events_url":"https://api.github.com/users/snapcore/received_events","type":"Organization","site_admin":false},"repo":{"id":44672744,"name":"snapd","full_name":"snapcore/snapd","owner":{"login":"snapcore","id":19532717,"avatar_url":"https://avatars.githubusercontent.com/u/19532717?v=3","gravatar_id":"","url":"https://api.github.com/users/snapcore","html_url":"https://github.com/snapcore","followers_url":"https://api.github.com/users/snapcore/followers","following_url":"https://api.github.com/users/snapcore/following{/other_user}","gists_url":"https://api.github.com/users/snapcore/gists{/gist_id}","starred_url":"https://api.github.com/users/snapcore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snapcore/subscriptions","organizations_url":"https://api.github.com/users/snapcore/orgs","repos_url":"https://api.github.com/users/snapcore/repos","events_url":"https://api.github.com/users/snapcore/events{/privacy}","received_events_url":"https://api.github.com/users/snapcore/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/snapcore/snapd","description":"The snapd and snap tools enable systems to work with .snap files.","fork":false,"url":"https://api.github.com/repos/snapcore/snapd","forks_url":"https://api.github.com/repos/snapcore/snapd/forks","keys_url":"https://api.github.com/repos/snapcore/snapd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/snapcore/snapd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/snapcore/snapd/teams","hooks_url":"https://api.github.com/repos/snapcore/snapd/hooks","issue_events_url":"https://api.github.com/repos/snapcore/snapd/issues/events{/number}","events_url":"https://api.github.com/repos/snapcore/snapd/events","assignees_url":"https://api.github.com/repos/snapcore/snapd/assignees{/user}","branches_url":"https://api.github.com/repos/snapcore/snapd/branches{/branch}","tags_url":"https://api.github.com/repos/snapcore/snapd/tags","blobs_url":"https://api.github.com/repos/snapcore/snapd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/snapcore/snapd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/snapcore/snapd/git/refs{/sha}","trees_url":"https://api.github.com/repos/snapcore/snapd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/snapcore/snapd/statuses/{sha}","languages_url":"https://api.github.com/repos/snapcore/snapd/languages","stargazers_url":"https://api.github.com/repos/snapcore/snapd/stargazers","contributors_url":"https://api.github.com/repos/snapcore/snapd/contributors","subscribers_url":"https://api.github.com/repos/snapcore/snapd/subscribers","subscription_url":"https://api.github.com/repos/snapcore/snapd/subscription","commits_url":"https://api.github.com/repos/snapcore/snapd/commits{/sha}","git_commits_url":"https://api.github.com/repos/snapcore/snapd/git/commits{/sha}","comments_url":"https://api.github.com/repos/snapcore/snapd/comments{/number}","issue_comment_url":"https://api.github.com/repos/snapcore/snapd/issues/comments{/number}","contents_url":"https://api.github.com/repos/snapcore/snapd/contents/{+path}","compare_url":"https://api.github.com/repos/snapcore/snapd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/snapcore/snapd/merges","archive_url":"https://api.github.com/repos/snapcore/snapd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/snapcore/snapd/downloads","issues_url":"https://api.github.com/repos/snapcore/snapd/issues{/number}","pulls_url":"https://api.github.com/repos/snapcore/snapd/pulls{/number}","milestones_url":"https://api.github.com/repos/snapcore/snapd/milestones{/number}","notifications_url":"https://api.github.com/repos/snapcore/snapd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/snapcore/snapd/labels{/name}","releases_url":"https://api.github.com/repos/snapcore/snapd/releases{/id}","deployments_url":"https://api.github.com/repos/snapcore/snapd/deployments","created_at":"2015-10-21T11:51:46Z","updated_at":"2016-08-11T18:02:31Z","pushed_at":"2016-08-11T17:56:14Z","git_url":"git://github.com/snapcore/snapd.git","ssh_url":"git@github.com:snapcore/snapd.git","clone_url":"https://github.com/snapcore/snapd.git","svn_url":"https://github.com/snapcore/snapd","homepage":"","size":35493,"stargazers_count":374,"watchers_count":374,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":87,"mirror_url":null,"open_issues_count":33,"forks":87,"open_issues":33,"watchers":374,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/snapcore/snapd/pulls/1662"},"html":{"href":"https://github.com/snapcore/snapd/pull/1662"},"issue":{"href":"https://api.github.com/repos/snapcore/snapd/issues/1662"},"comments":{"href":"https://api.github.com/repos/snapcore/snapd/issues/1662/comments"},"review_comments":{"href":"https://api.github.com/repos/snapcore/snapd/pulls/1662/comments"},"review_comment":{"href":"https://api.github.com/repos/snapcore/snapd/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/snapcore/snapd/pulls/1662/commits"},"statuses":{"href":"https://api.github.com/repos/snapcore/snapd/statuses/d1ed9bc75ea7085b4347329ecfc79e8cdb120842"}}}}
{"actor":{"display_login":"niemeyer"}}