{"action":"created","comment":{"url":"https://api.github.com/repos/giantswarm/cli/pulls/comments/47258450","id":47258450,"diff_hunk":"@@ -169,6 +169,8 @@ func cmdOrganizationAddMember(organization, user string) {\n \t\t\tQuitf(\"User '%s' is already a member of organization '%s'.\\n\", user, organization)\n \t\t} else if clientgo.IsUserNotFound(err) {\n \t\t\tQuitf(\"User '%s' does not exist.\\n\", user)\n+\t\t} else if clientgo.IsForbidden(err) {\n+\t\t\tQuitf(\"The organization '%s' does not exist or you are not a member of it. Please double-check the name.\\n\", organization)","path":"org.go","position":22,"original_position":22,"commit_id":"6d758ee3d3fd3bf9ee4140207da276b08e6142bb","original_commit_id":"6d758ee3d3fd3bf9ee4140207da276b08e6142bb","user":{"login":"ewoutp","id":4750892,"avatar_url":"https://avatars.githubusercontent.com/u/4750892?v=3","gravatar_id":"","url":"https://api.github.com/users/ewoutp","html_url":"https://github.com/ewoutp","followers_url":"https://api.github.com/users/ewoutp/followers","following_url":"https://api.github.com/users/ewoutp/following{/other_user}","gists_url":"https://api.github.com/users/ewoutp/gists{/gist_id}","starred_url":"https://api.github.com/users/ewoutp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ewoutp/subscriptions","organizations_url":"https://api.github.com/users/ewoutp/orgs","repos_url":"https://api.github.com/users/ewoutp/repos","events_url":"https://api.github.com/users/ewoutp/events{/privacy}","received_events_url":"https://api.github.com/users/ewoutp/received_events","type":"User","site_admin":false},"body":"This text is currently correct, but I can imagine that we'll add more fine grained access control in the future.\r\nShould we prepare for that with a text like \"...or you have not been granted access to it...\"","created_at":"2015-12-10T17:44:55Z","updated_at":"2015-12-10T17:44:55Z","html_url":"https://github.com/giantswarm/cli/pull/529#discussion_r47258450","pull_request_url":"https://api.github.com/repos/giantswarm/cli/pulls/529","_links":{"self":{"href":"https://api.github.com/repos/giantswarm/cli/pulls/comments/47258450"},"html":{"href":"https://github.com/giantswarm/cli/pull/529#discussion_r47258450"},"pull_request":{"href":"https://api.github.com/repos/giantswarm/cli/pulls/529"}}},"pull_request":{"url":"https://api.github.com/repos/giantswarm/cli/pulls/529","id":53290298,"html_url":"https://github.com/giantswarm/cli/pull/529","diff_url":"https://github.com/giantswarm/cli/pull/529.diff","patch_url":"https://github.com/giantswarm/cli/pull/529.patch","issue_url":"https://api.github.com/repos/giantswarm/cli/issues/529","number":529,"state":"open","locked":false,"title":"Handle 'swarm org add-user' where user has no access to the org","user":{"login":"marians","id":273727,"avatar_url":"https://avatars.githubusercontent.com/u/273727?v=3","gravatar_id":"","url":"https://api.github.com/users/marians","html_url":"https://github.com/marians","followers_url":"https://api.github.com/users/marians/followers","following_url":"https://api.github.com/users/marians/following{/other_user}","gists_url":"https://api.github.com/users/marians/gists{/gist_id}","starred_url":"https://api.github.com/users/marians/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marians/subscriptions","organizations_url":"https://api.github.com/users/marians/orgs","repos_url":"https://api.github.com/users/marians/repos","events_url":"https://api.github.com/users/marians/events{/privacy}","received_events_url":"https://api.github.com/users/marians/received_events","type":"User","site_admin":false},"body":"Fixes #349\n\nExample:\n\n```\n$ swarm org add-user org blahblah\nThe organization 'org' does not exist or you are not a member of it. Please double-check the name.\n```\n\nAlso contains a little cleanup of the examples in the help:\n\n```\nManage organizations\n\nUsage: \n  swarm org [flags]\n\nDocs:\n  https://docs.giantswarm.io/reference/cli/org/\n\nExamples:\n  swarm create <organization>                 Create new organization\n  swarm delete <organization>                 Delete the given organization\n  swarm show <organization>                   Print the members of the given organization\n  swarm add-user <organization> <username>    Add the given user to the given organization\n  swarm remove-user <organization> <username> Remove the given user from the given organization\n\nFlags:\n  -l, --list[=false]: List all organizations of which the current user is a member\n  -y, --yes[=false]: Assume yes on all confirmations\n\nGlobal Flags:\n      --api-endpoint=\"https://api.giantswarm.io/v1\": The API endpoint to talk to\n      --config-dir=\"\": Change the default configuration directory\n      --debug[=false]: Log debug output or not\n      --env=\"marian/dev\": Which environment to use. Format: 'organization/environment'\n  -q, --quiet[=false]: Suppress output\n  -v, --verbose[=false]: Verbose output\n```","created_at":"2015-12-10T17:30:10Z","updated_at":"2015-12-10T17:44:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"333e49cd8de9346a62e9d73d9081f6c2738ed829","assignee":{"login":"marians","id":273727,"avatar_url":"https://avatars.githubusercontent.com/u/273727?v=3","gravatar_id":"","url":"https://api.github.com/users/marians","html_url":"https://github.com/marians","followers_url":"https://api.github.com/users/marians/followers","following_url":"https://api.github.com/users/marians/following{/other_user}","gists_url":"https://api.github.com/users/marians/gists{/gist_id}","starred_url":"https://api.github.com/users/marians/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marians/subscriptions","organizations_url":"https://api.github.com/users/marians/orgs","repos_url":"https://api.github.com/users/marians/repos","events_url":"https://api.github.com/users/marians/events{/privacy}","received_events_url":"https://api.github.com/users/marians/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/giantswarm/cli/pulls/529/commits","review_comments_url":"https://api.github.com/repos/giantswarm/cli/pulls/529/comments","review_comment_url":"https://api.github.com/repos/giantswarm/cli/pulls/comments{/number}","comments_url":"https://api.github.com/repos/giantswarm/cli/issues/529/comments","statuses_url":"https://api.github.com/repos/giantswarm/cli/statuses/6d758ee3d3fd3bf9ee4140207da276b08e6142bb","head":{"label":"giantswarm:fix-349","ref":"fix-349","sha":"6d758ee3d3fd3bf9ee4140207da276b08e6142bb","user":{"login":"giantswarm","id":7556340,"avatar_url":"https://avatars.githubusercontent.com/u/7556340?v=3","gravatar_id":"","url":"https://api.github.com/users/giantswarm","html_url":"https://github.com/giantswarm","followers_url":"https://api.github.com/users/giantswarm/followers","following_url":"https://api.github.com/users/giantswarm/following{/other_user}","gists_url":"https://api.github.com/users/giantswarm/gists{/gist_id}","starred_url":"https://api.github.com/users/giantswarm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/giantswarm/subscriptions","organizations_url":"https://api.github.com/users/giantswarm/orgs","repos_url":"https://api.github.com/users/giantswarm/repos","events_url":"https://api.github.com/users/giantswarm/events{/privacy}","received_events_url":"https://api.github.com/users/giantswarm/received_events","type":"Organization","site_admin":false},"repo":{"id":30184261,"name":"cli","full_name":"giantswarm/cli","owner":{"login":"giantswarm","id":7556340,"avatar_url":"https://avatars.githubusercontent.com/u/7556340?v=3","gravatar_id":"","url":"https://api.github.com/users/giantswarm","html_url":"https://github.com/giantswarm","followers_url":"https://api.github.com/users/giantswarm/followers","following_url":"https://api.github.com/users/giantswarm/following{/other_user}","gists_url":"https://api.github.com/users/giantswarm/gists{/gist_id}","starred_url":"https://api.github.com/users/giantswarm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/giantswarm/subscriptions","organizations_url":"https://api.github.com/users/giantswarm/orgs","repos_url":"https://api.github.com/users/giantswarm/repos","events_url":"https://api.github.com/users/giantswarm/events{/privacy}","received_events_url":"https://api.github.com/users/giantswarm/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/giantswarm/cli","description":"A command line tool for Giant Swarm","fork":false,"url":"https://api.github.com/repos/giantswarm/cli","forks_url":"https://api.github.com/repos/giantswarm/cli/forks","keys_url":"https://api.github.com/repos/giantswarm/cli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/giantswarm/cli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/giantswarm/cli/teams","hooks_url":"https://api.github.com/repos/giantswarm/cli/hooks","issue_events_url":"https://api.github.com/repos/giantswarm/cli/issues/events{/number}","events_url":"https://api.github.com/repos/giantswarm/cli/events","assignees_url":"https://api.github.com/repos/giantswarm/cli/assignees{/user}","branches_url":"https://api.github.com/repos/giantswarm/cli/branches{/branch}","tags_url":"https://api.github.com/repos/giantswarm/cli/tags","blobs_url":"https://api.github.com/repos/giantswarm/cli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/giantswarm/cli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/giantswarm/cli/git/refs{/sha}","trees_url":"https://api.github.com/repos/giantswarm/cli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/giantswarm/cli/statuses/{sha}","languages_url":"https://api.github.com/repos/giantswarm/cli/languages","stargazers_url":"https://api.github.com/repos/giantswarm/cli/stargazers","contributors_url":"https://api.github.com/repos/giantswarm/cli/contributors","subscribers_url":"https://api.github.com/repos/giantswarm/cli/subscribers","subscription_url":"https://api.github.com/repos/giantswarm/cli/subscription","commits_url":"https://api.github.com/repos/giantswarm/cli/commits{/sha}","git_commits_url":"https://api.github.com/repos/giantswarm/cli/git/commits{/sha}","comments_url":"https://api.github.com/repos/giantswarm/cli/comments{/number}","issue_comment_url":"https://api.github.com/repos/giantswarm/cli/issues/comments{/number}","contents_url":"https://api.github.com/repos/giantswarm/cli/contents/{+path}","compare_url":"https://api.github.com/repos/giantswarm/cli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/giantswarm/cli/merges","archive_url":"https://api.github.com/repos/giantswarm/cli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/giantswarm/cli/downloads","issues_url":"https://api.github.com/repos/giantswarm/cli/issues{/number}","pulls_url":"https://api.github.com/repos/giantswarm/cli/pulls{/number}","milestones_url":"https://api.github.com/repos/giantswarm/cli/milestones{/number}","notifications_url":"https://api.github.com/repos/giantswarm/cli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/giantswarm/cli/labels{/name}","releases_url":"https://api.github.com/repos/giantswarm/cli/releases{/id}","created_at":"2015-02-02T11:35:56Z","updated_at":"2015-10-30T18:17:16Z","pushed_at":"2015-12-10T17:42:52Z","git_url":"git://github.com/giantswarm/cli.git","ssh_url":"git@github.com:giantswarm/cli.git","clone_url":"https://github.com/giantswarm/cli.git","svn_url":"https://github.com/giantswarm/cli","homepage":null,"size":908,"stargazers_count":11,"watchers_count":11,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":106,"forks":0,"open_issues":106,"watchers":11,"default_branch":"master"}},"base":{"label":"giantswarm:master","ref":"master","sha":"dca532c322888278d5d01fba68bfe66de75a26ae","user":{"login":"giantswarm","id":7556340,"avatar_url":"https://avatars.githubusercontent.com/u/7556340?v=3","gravatar_id":"","url":"https://api.github.com/users/giantswarm","html_url":"https://github.com/giantswarm","followers_url":"https://api.github.com/users/giantswarm/followers","following_url":"https://api.github.com/users/giantswarm/following{/other_user}","gists_url":"https://api.github.com/users/giantswarm/gists{/gist_id}","starred_url":"https://api.github.com/users/giantswarm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/giantswarm/subscriptions","organizations_url":"https://api.github.com/users/giantswarm/orgs","repos_url":"https://api.github.com/users/giantswarm/repos","events_url":"https://api.github.com/users/giantswarm/events{/privacy}","received_events_url":"https://api.github.com/users/giantswarm/received_events","type":"Organization","site_admin":false},"repo":{"id":30184261,"name":"cli","full_name":"giantswarm/cli","owner":{"login":"giantswarm","id":7556340,"avatar_url":"https://avatars.githubusercontent.com/u/7556340?v=3","gravatar_id":"","url":"https://api.github.com/users/giantswarm","html_url":"https://github.com/giantswarm","followers_url":"https://api.github.com/users/giantswarm/followers","following_url":"https://api.github.com/users/giantswarm/following{/other_user}","gists_url":"https://api.github.com/users/giantswarm/gists{/gist_id}","starred_url":"https://api.github.com/users/giantswarm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/giantswarm/subscriptions","organizations_url":"https://api.github.com/users/giantswarm/orgs","repos_url":"https://api.github.com/users/giantswarm/repos","events_url":"https://api.github.com/users/giantswarm/events{/privacy}","received_events_url":"https://api.github.com/users/giantswarm/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/giantswarm/cli","description":"A command line tool for Giant Swarm","fork":false,"url":"https://api.github.com/repos/giantswarm/cli","forks_url":"https://api.github.com/repos/giantswarm/cli/forks","keys_url":"https://api.github.com/repos/giantswarm/cli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/giantswarm/cli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/giantswarm/cli/teams","hooks_url":"https://api.github.com/repos/giantswarm/cli/hooks","issue_events_url":"https://api.github.com/repos/giantswarm/cli/issues/events{/number}","events_url":"https://api.github.com/repos/giantswarm/cli/events","assignees_url":"https://api.github.com/repos/giantswarm/cli/assignees{/user}","branches_url":"https://api.github.com/repos/giantswarm/cli/branches{/branch}","tags_url":"https://api.github.com/repos/giantswarm/cli/tags","blobs_url":"https://api.github.com/repos/giantswarm/cli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/giantswarm/cli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/giantswarm/cli/git/refs{/sha}","trees_url":"https://api.github.com/repos/giantswarm/cli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/giantswarm/cli/statuses/{sha}","languages_url":"https://api.github.com/repos/giantswarm/cli/languages","stargazers_url":"https://api.github.com/repos/giantswarm/cli/stargazers","contributors_url":"https://api.github.com/repos/giantswarm/cli/contributors","subscribers_url":"https://api.github.com/repos/giantswarm/cli/subscribers","subscription_url":"https://api.github.com/repos/giantswarm/cli/subscription","commits_url":"https://api.github.com/repos/giantswarm/cli/commits{/sha}","git_commits_url":"https://api.github.com/repos/giantswarm/cli/git/commits{/sha}","comments_url":"https://api.github.com/repos/giantswarm/cli/comments{/number}","issue_comment_url":"https://api.github.com/repos/giantswarm/cli/issues/comments{/number}","contents_url":"https://api.github.com/repos/giantswarm/cli/contents/{+path}","compare_url":"https://api.github.com/repos/giantswarm/cli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/giantswarm/cli/merges","archive_url":"https://api.github.com/repos/giantswarm/cli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/giantswarm/cli/downloads","issues_url":"https://api.github.com/repos/giantswarm/cli/issues{/number}","pulls_url":"https://api.github.com/repos/giantswarm/cli/pulls{/number}","milestones_url":"https://api.github.com/repos/giantswarm/cli/milestones{/number}","notifications_url":"https://api.github.com/repos/giantswarm/cli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/giantswarm/cli/labels{/name}","releases_url":"https://api.github.com/repos/giantswarm/cli/releases{/id}","created_at":"2015-02-02T11:35:56Z","updated_at":"2015-10-30T18:17:16Z","pushed_at":"2015-12-10T17:42:52Z","git_url":"git://github.com/giantswarm/cli.git","ssh_url":"git@github.com:giantswarm/cli.git","clone_url":"https://github.com/giantswarm/cli.git","svn_url":"https://github.com/giantswarm/cli","homepage":null,"size":908,"stargazers_count":11,"watchers_count":11,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":106,"forks":0,"open_issues":106,"watchers":11,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/giantswarm/cli/pulls/529"},"html":{"href":"https://github.com/giantswarm/cli/pull/529"},"issue":{"href":"https://api.github.com/repos/giantswarm/cli/issues/529"},"comments":{"href":"https://api.github.com/repos/giantswarm/cli/issues/529/comments"},"review_comments":{"href":"https://api.github.com/repos/giantswarm/cli/pulls/529/comments"},"review_comment":{"href":"https://api.github.com/repos/giantswarm/cli/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/giantswarm/cli/pulls/529/commits"},"statuses":{"href":"https://api.github.com/repos/giantswarm/cli/statuses/6d758ee3d3fd3bf9ee4140207da276b08e6142bb"}}}}