{"action":"created","comment":{"url":"https://api.github.com/repos/giantswarm/gsctl/pulls/comments/191436334","pull_request_review_id":124006858,"id":191436334,"diff_hunk":"@@ -206,22 +206,29 @@ func (c *configStruct) SelectEndpoint(endpointAliasOrURL string) error {\n }\n \n // ChooseEndpoint makes a choice which should be the endpoint to use.\n-// If the argument overridingEndpointURL is not empty, this will\n-// be used as the returned endpoint URL.\n-// Errors are only printed to inform users, but not returned, to simplify\n-// usage of this function.\n-func (c *configStruct) ChooseEndpoint(overridingEndpointURL string) string {\n-\tif overridingEndpointURL != \"\" {\n-\t\tep := normalizeEndpoint(overridingEndpointURL)\n+// If the argument overridingEndpointAliasOrURL is not empty, this will\n+// be used to look up an alias to return an endpoint for. If there is none,\n+// it will be the used endpoint URL.\n+func (c *configStruct) ChooseEndpoint(overridingEndpointAliasOrURL string) string {\n+\tif overridingEndpointAliasOrURL != \"\" {\n+\t\t// check if overridingEndpointAliasOrURL is an alias\n+\t\tif c.HasEndpointAlias(overridingEndpointAliasOrURL) {\n+\t\t\tep, _ := c.EndpointByAlias(overridingEndpointAliasOrURL)\n+\t\t\treturn ep\n+\t\t}\n+\n+\t\tep := normalizeEndpoint(overridingEndpointAliasOrURL)\n \t\treturn ep\n \t}\n \n+\t// use environment variable\n \tenvEndpoint := os.Getenv(\"GSCTL_ENDPOINT\")\n \tif envEndpoint != \"\" {","path":"config/config.go","position":28,"original_position":28,"commit_id":"6c3203203653e4cca11c0e25b38d6ea780e366de","original_commit_id":"6c3203203653e4cca11c0e25b38d6ea780e366de","user":{"login":"marians","id":273727,"avatar_url":"https://avatars1.githubusercontent.com/u/273727?v=4","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":"Valid point!","created_at":"2018-05-29T14:04:18Z","updated_at":"2018-05-29T14:04:19Z","html_url":"https://github.com/giantswarm/gsctl/pull/238#discussion_r191436334","pull_request_url":"https://api.github.com/repos/giantswarm/gsctl/pulls/238","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/giantswarm/gsctl/pulls/comments/191436334"},"html":{"href":"https://github.com/giantswarm/gsctl/pull/238#discussion_r191436334"},"pull_request":{"href":"https://api.github.com/repos/giantswarm/gsctl/pulls/238"}},"in_reply_to_id":191421637},"pull_request":{"url":"https://api.github.com/repos/giantswarm/gsctl/pulls/238","id":191120139,"html_url":"https://github.com/giantswarm/gsctl/pull/238","diff_url":"https://github.com/giantswarm/gsctl/pull/238.diff","patch_url":"https://github.com/giantswarm/gsctl/pull/238.patch","issue_url":"https://api.github.com/repos/giantswarm/gsctl/issues/238","number":238,"state":"open","locked":false,"title":"Allow passing endpoint alias with the -e/--endpoint flag","user":{"login":"marians","id":273727,"avatar_url":"https://avatars1.githubusercontent.com/u/273727?v=4","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 https://github.com/giantswarm/gsctl/issues/229\r\n\r\nThis allows to use endpoint aliases instead of endpoint URLs with the `-e` or `--endpoint` flag in all commands.","created_at":"2018-05-29T11:51:38Z","updated_at":"2018-05-29T14:04:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ea9cfd3253aaa68f0e7bc9fb167bbdc0fc002910","assignee":{"login":"marians","id":273727,"avatar_url":"https://avatars1.githubusercontent.com/u/273727?v=4","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},"assignees":[{"login":"marians","id":273727,"avatar_url":"https://avatars1.githubusercontent.com/u/273727?v=4","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}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/giantswarm/gsctl/pulls/238/commits","review_comments_url":"https://api.github.com/repos/giantswarm/gsctl/pulls/238/comments","review_comment_url":"https://api.github.com/repos/giantswarm/gsctl/pulls/comments{/number}","comments_url":"https://api.github.com/repos/giantswarm/gsctl/issues/238/comments","statuses_url":"https://api.github.com/repos/giantswarm/gsctl/statuses/6c3203203653e4cca11c0e25b38d6ea780e366de","head":{"label":"giantswarm:fix-endpoint-alias-flag","ref":"fix-endpoint-alias-flag","sha":"6c3203203653e4cca11c0e25b38d6ea780e366de","user":{"login":"giantswarm","id":7556340,"avatar_url":"https://avatars3.githubusercontent.com/u/7556340?v=4","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":74132145,"name":"gsctl","full_name":"giantswarm/gsctl","owner":{"login":"giantswarm","id":7556340,"avatar_url":"https://avatars3.githubusercontent.com/u/7556340?v=4","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/gsctl","description":"The Giant Swarm command line interface","fork":false,"url":"https://api.github.com/repos/giantswarm/gsctl","forks_url":"https://api.github.com/repos/giantswarm/gsctl/forks","keys_url":"https://api.github.com/repos/giantswarm/gsctl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/giantswarm/gsctl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/giantswarm/gsctl/teams","hooks_url":"https://api.github.com/repos/giantswarm/gsctl/hooks","issue_events_url":"https://api.github.com/repos/giantswarm/gsctl/issues/events{/number}","events_url":"https://api.github.com/repos/giantswarm/gsctl/events","assignees_url":"https://api.github.com/repos/giantswarm/gsctl/assignees{/user}","branches_url":"https://api.github.com/repos/giantswarm/gsctl/branches{/branch}","tags_url":"https://api.github.com/repos/giantswarm/gsctl/tags","blobs_url":"https://api.github.com/repos/giantswarm/gsctl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/giantswarm/gsctl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/giantswarm/gsctl/git/refs{/sha}","trees_url":"https://api.github.com/repos/giantswarm/gsctl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/giantswarm/gsctl/statuses/{sha}","languages_url":"https://api.github.com/repos/giantswarm/gsctl/languages","stargazers_url":"https://api.github.com/repos/giantswarm/gsctl/stargazers","contributors_url":"https://api.github.com/repos/giantswarm/gsctl/contributors","subscribers_url":"https://api.github.com/repos/giantswarm/gsctl/subscribers","subscription_url":"https://api.github.com/repos/giantswarm/gsctl/subscription","commits_url":"https://api.github.com/repos/giantswarm/gsctl/commits{/sha}","git_commits_url":"https://api.github.com/repos/giantswarm/gsctl/git/commits{/sha}","comments_url":"https://api.github.com/repos/giantswarm/gsctl/comments{/number}","issue_comment_url":"https://api.github.com/repos/giantswarm/gsctl/issues/comments{/number}","contents_url":"https://api.github.com/repos/giantswarm/gsctl/contents/{+path}","compare_url":"https://api.github.com/repos/giantswarm/gsctl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/giantswarm/gsctl/merges","archive_url":"https://api.github.com/repos/giantswarm/gsctl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/giantswarm/gsctl/downloads","issues_url":"https://api.github.com/repos/giantswarm/gsctl/issues{/number}","pulls_url":"https://api.github.com/repos/giantswarm/gsctl/pulls{/number}","milestones_url":"https://api.github.com/repos/giantswarm/gsctl/milestones{/number}","notifications_url":"https://api.github.com/repos/giantswarm/gsctl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/giantswarm/gsctl/labels{/name}","releases_url":"https://api.github.com/repos/giantswarm/gsctl/releases{/id}","deployments_url":"https://api.github.com/repos/giantswarm/gsctl/deployments","created_at":"2016-11-18T13:31:19Z","updated_at":"2018-05-14T08:21:07Z","pushed_at":"2018-05-29T11:54:53Z","git_url":"git://github.com/giantswarm/gsctl.git","ssh_url":"git@github.com:giantswarm/gsctl.git","clone_url":"https://github.com/giantswarm/gsctl.git","svn_url":"https://github.com/giantswarm/gsctl","homepage":"https://docs.giantswarm.io/reference/gsctl/","size":15936,"stargazers_count":1,"watchers_count":1,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":39,"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":3,"open_issues":39,"watchers":1,"default_branch":"master"}},"base":{"label":"giantswarm:master","ref":"master","sha":"37a860bccf1d30092f399c69811e71aed7bb6e65","user":{"login":"giantswarm","id":7556340,"avatar_url":"https://avatars3.githubusercontent.com/u/7556340?v=4","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":74132145,"name":"gsctl","full_name":"giantswarm/gsctl","owner":{"login":"giantswarm","id":7556340,"avatar_url":"https://avatars3.githubusercontent.com/u/7556340?v=4","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/gsctl","description":"The Giant Swarm command line interface","fork":false,"url":"https://api.github.com/repos/giantswarm/gsctl","forks_url":"https://api.github.com/repos/giantswarm/gsctl/forks","keys_url":"https://api.github.com/repos/giantswarm/gsctl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/giantswarm/gsctl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/giantswarm/gsctl/teams","hooks_url":"https://api.github.com/repos/giantswarm/gsctl/hooks","issue_events_url":"https://api.github.com/repos/giantswarm/gsctl/issues/events{/number}","events_url":"https://api.github.com/repos/giantswarm/gsctl/events","assignees_url":"https://api.github.com/repos/giantswarm/gsctl/assignees{/user}","branches_url":"https://api.github.com/repos/giantswarm/gsctl/branches{/branch}","tags_url":"https://api.github.com/repos/giantswarm/gsctl/tags","blobs_url":"https://api.github.com/repos/giantswarm/gsctl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/giantswarm/gsctl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/giantswarm/gsctl/git/refs{/sha}","trees_url":"https://api.github.com/repos/giantswarm/gsctl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/giantswarm/gsctl/statuses/{sha}","languages_url":"https://api.github.com/repos/giantswarm/gsctl/languages","stargazers_url":"https://api.github.com/repos/giantswarm/gsctl/stargazers","contributors_url":"https://api.github.com/repos/giantswarm/gsctl/contributors","subscribers_url":"https://api.github.com/repos/giantswarm/gsctl/subscribers","subscription_url":"https://api.github.com/repos/giantswarm/gsctl/subscription","commits_url":"https://api.github.com/repos/giantswarm/gsctl/commits{/sha}","git_commits_url":"https://api.github.com/repos/giantswarm/gsctl/git/commits{/sha}","comments_url":"https://api.github.com/repos/giantswarm/gsctl/comments{/number}","issue_comment_url":"https://api.github.com/repos/giantswarm/gsctl/issues/comments{/number}","contents_url":"https://api.github.com/repos/giantswarm/gsctl/contents/{+path}","compare_url":"https://api.github.com/repos/giantswarm/gsctl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/giantswarm/gsctl/merges","archive_url":"https://api.github.com/repos/giantswarm/gsctl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/giantswarm/gsctl/downloads","issues_url":"https://api.github.com/repos/giantswarm/gsctl/issues{/number}","pulls_url":"https://api.github.com/repos/giantswarm/gsctl/pulls{/number}","milestones_url":"https://api.github.com/repos/giantswarm/gsctl/milestones{/number}","notifications_url":"https://api.github.com/repos/giantswarm/gsctl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/giantswarm/gsctl/labels{/name}","releases_url":"https://api.github.com/repos/giantswarm/gsctl/releases{/id}","deployments_url":"https://api.github.com/repos/giantswarm/gsctl/deployments","created_at":"2016-11-18T13:31:19Z","updated_at":"2018-05-14T08:21:07Z","pushed_at":"2018-05-29T11:54:53Z","git_url":"git://github.com/giantswarm/gsctl.git","ssh_url":"git@github.com:giantswarm/gsctl.git","clone_url":"https://github.com/giantswarm/gsctl.git","svn_url":"https://github.com/giantswarm/gsctl","homepage":"https://docs.giantswarm.io/reference/gsctl/","size":15936,"stargazers_count":1,"watchers_count":1,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":39,"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":3,"open_issues":39,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/giantswarm/gsctl/pulls/238"},"html":{"href":"https://github.com/giantswarm/gsctl/pull/238"},"issue":{"href":"https://api.github.com/repos/giantswarm/gsctl/issues/238"},"comments":{"href":"https://api.github.com/repos/giantswarm/gsctl/issues/238/comments"},"review_comments":{"href":"https://api.github.com/repos/giantswarm/gsctl/pulls/238/comments"},"review_comment":{"href":"https://api.github.com/repos/giantswarm/gsctl/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/giantswarm/gsctl/pulls/238/commits"},"statuses":{"href":"https://api.github.com/repos/giantswarm/gsctl/statuses/6c3203203653e4cca11c0e25b38d6ea780e366de"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"marians"}}