{"action":"created","comment":{"url":"https://api.github.com/repos/kedgeproject/kedge/pulls/comments/129521832","pull_request_review_id":52260410,"id":129521832,"diff_hunk":"@@ -56,3 +58,40 @@ func getApplicationsFromFiles(files []string) ([]inputData, error) {\n \t}\n \treturn appData, nil\n }\n+\n+// GetAllYMLFiles if path in argument is directory get all *.yml and *.yaml files\n+// in that directory. If path is file just add it to output list as it is.\n+func GetAllYMLFiles(paths []string) ([]string, error) {\n+\tvar files []string\n+\n+\tfor _, path := range paths {\n+\t\tfileInfo, err := os.Stat(path)\n+\t\tif err != nil {\n+\t\t\treturn nil, errors.Wrapf(err, \"can't get file info about %s\", path)\n+\t\t}\n+\t\tif fileInfo.IsDir() {\n+\t\t\tymlFiles, err := filepath.Glob(filepath.Join(path, \"*.yml\"))\n+\t\t\tif err != nil {\n+\t\t\t\treturn nil, errors.Wrapf(err, \"can't list *.yml files in %s\", path)\n+\t\t\t}\n+\t\t\tfiles = append(files, ymlFiles...)\n+\n+\t\t\tyamlFiles, err := filepath.Glob(filepath.Join(path, \"*.yaml\"))\n+\t\t\tif err != nil {\n+\t\t\t\treturn nil, errors.Wrapf(err, \"can't list *.yml files in %s\", path)\n+\t\t\t}\n+\t\t\tfiles = append(files, yamlFiles...)\n+\n+\t\t} else {\n+\t\t\t// path is regular file, do nothing and just add it to list of files\n+\t\t\tfiles = append(files, path)\n+\t\t}\n+\n+\t}\n+","path":"pkg/cmd/util.go","position":44,"original_position":44,"commit_id":"6a7724dbbe838d4364552038053c2c68abb8046c","original_commit_id":"2e38528395151f7d5e74f30914ce061b3b5e9744","user":{"login":"containscafeine","id":9133660,"avatar_url":"https://avatars1.githubusercontent.com/u/9133660?v=4","gravatar_id":"","url":"https://api.github.com/users/containscafeine","html_url":"https://github.com/containscafeine","followers_url":"https://api.github.com/users/containscafeine/followers","following_url":"https://api.github.com/users/containscafeine/following{/other_user}","gists_url":"https://api.github.com/users/containscafeine/gists{/gist_id}","starred_url":"https://api.github.com/users/containscafeine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/containscafeine/subscriptions","organizations_url":"https://api.github.com/users/containscafeine/orgs","repos_url":"https://api.github.com/users/containscafeine/repos","events_url":"https://api.github.com/users/containscafeine/events{/privacy}","received_events_url":"https://api.github.com/users/containscafeine/received_events","type":"User","site_admin":false},"body":"nit: remove newline?","created_at":"2017-07-26T09:20:51Z","updated_at":"2017-07-26T09:21:39Z","html_url":"https://github.com/kedgeproject/kedge/pull/166#discussion_r129521832","pull_request_url":"https://api.github.com/repos/kedgeproject/kedge/pulls/166","_links":{"self":{"href":"https://api.github.com/repos/kedgeproject/kedge/pulls/comments/129521832"},"html":{"href":"https://github.com/kedgeproject/kedge/pull/166#discussion_r129521832"},"pull_request":{"href":"https://api.github.com/repos/kedgeproject/kedge/pulls/166"}}},"pull_request":{"url":"https://api.github.com/repos/kedgeproject/kedge/pulls/166","id":131115140,"html_url":"https://github.com/kedgeproject/kedge/pull/166","diff_url":"https://github.com/kedgeproject/kedge/pull/166.diff","patch_url":"https://github.com/kedgeproject/kedge/pull/166.patch","issue_url":"https://api.github.com/repos/kedgeproject/kedge/issues/166","number":166,"state":"open","locked":false,"title":" allow passing whole directory as -f argument","user":{"login":"kadel","id":57206,"avatar_url":"https://avatars1.githubusercontent.com/u/57206?v=4","gravatar_id":"","url":"https://api.github.com/users/kadel","html_url":"https://github.com/kadel","followers_url":"https://api.github.com/users/kadel/followers","following_url":"https://api.github.com/users/kadel/following{/other_user}","gists_url":"https://api.github.com/users/kadel/gists{/gist_id}","starred_url":"https://api.github.com/users/kadel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kadel/subscriptions","organizations_url":"https://api.github.com/users/kadel/orgs","repos_url":"https://api.github.com/users/kadel/repos","events_url":"https://api.github.com/users/kadel/events{/privacy}","received_events_url":"https://api.github.com/users/kadel/received_events","type":"User","site_admin":false},"body":"if dir is provided, use all *.yml files in that directory\r\n\r\nfixes #155 \r\n\r\n\r\nTODO: \r\n- [x]  finish unit tests\r\n- [x] maybe call `GetAllYMLFiles` from `ExecuteKubectl`?","created_at":"2017-07-18T15:17:35Z","updated_at":"2017-07-26T09:21:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"89a26cf029859c2e58e4ad77a7da1c8c0434bd75","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/kedgeproject/kedge/pulls/166/commits","review_comments_url":"https://api.github.com/repos/kedgeproject/kedge/pulls/166/comments","review_comment_url":"https://api.github.com/repos/kedgeproject/kedge/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kedgeproject/kedge/issues/166/comments","statuses_url":"https://api.github.com/repos/kedgeproject/kedge/statuses/6a7724dbbe838d4364552038053c2c68abb8046c","head":{"label":"kadel:readFromDir","ref":"readFromDir","sha":"6a7724dbbe838d4364552038053c2c68abb8046c","user":{"login":"kadel","id":57206,"avatar_url":"https://avatars1.githubusercontent.com/u/57206?v=4","gravatar_id":"","url":"https://api.github.com/users/kadel","html_url":"https://github.com/kadel","followers_url":"https://api.github.com/users/kadel/followers","following_url":"https://api.github.com/users/kadel/following{/other_user}","gists_url":"https://api.github.com/users/kadel/gists{/gist_id}","starred_url":"https://api.github.com/users/kadel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kadel/subscriptions","organizations_url":"https://api.github.com/users/kadel/orgs","repos_url":"https://api.github.com/users/kadel/repos","events_url":"https://api.github.com/users/kadel/events{/privacy}","received_events_url":"https://api.github.com/users/kadel/received_events","type":"User","site_admin":false},"repo":{"id":95759301,"name":"kedge","full_name":"kadel/kedge","owner":{"login":"kadel","id":57206,"avatar_url":"https://avatars1.githubusercontent.com/u/57206?v=4","gravatar_id":"","url":"https://api.github.com/users/kadel","html_url":"https://github.com/kadel","followers_url":"https://api.github.com/users/kadel/followers","following_url":"https://api.github.com/users/kadel/following{/other_user}","gists_url":"https://api.github.com/users/kadel/gists{/gist_id}","starred_url":"https://api.github.com/users/kadel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kadel/subscriptions","organizations_url":"https://api.github.com/users/kadel/orgs","repos_url":"https://api.github.com/users/kadel/repos","events_url":"https://api.github.com/users/kadel/events{/privacy}","received_events_url":"https://api.github.com/users/kadel/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kadel/kedge","description":"Compose Kubernetes apps using Kubernetes constructs","fork":true,"url":"https://api.github.com/repos/kadel/kedge","forks_url":"https://api.github.com/repos/kadel/kedge/forks","keys_url":"https://api.github.com/repos/kadel/kedge/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kadel/kedge/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kadel/kedge/teams","hooks_url":"https://api.github.com/repos/kadel/kedge/hooks","issue_events_url":"https://api.github.com/repos/kadel/kedge/issues/events{/number}","events_url":"https://api.github.com/repos/kadel/kedge/events","assignees_url":"https://api.github.com/repos/kadel/kedge/assignees{/user}","branches_url":"https://api.github.com/repos/kadel/kedge/branches{/branch}","tags_url":"https://api.github.com/repos/kadel/kedge/tags","blobs_url":"https://api.github.com/repos/kadel/kedge/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kadel/kedge/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kadel/kedge/git/refs{/sha}","trees_url":"https://api.github.com/repos/kadel/kedge/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kadel/kedge/statuses/{sha}","languages_url":"https://api.github.com/repos/kadel/kedge/languages","stargazers_url":"https://api.github.com/repos/kadel/kedge/stargazers","contributors_url":"https://api.github.com/repos/kadel/kedge/contributors","subscribers_url":"https://api.github.com/repos/kadel/kedge/subscribers","subscription_url":"https://api.github.com/repos/kadel/kedge/subscription","commits_url":"https://api.github.com/repos/kadel/kedge/commits{/sha}","git_commits_url":"https://api.github.com/repos/kadel/kedge/git/commits{/sha}","comments_url":"https://api.github.com/repos/kadel/kedge/comments{/number}","issue_comment_url":"https://api.github.com/repos/kadel/kedge/issues/comments{/number}","contents_url":"https://api.github.com/repos/kadel/kedge/contents/{+path}","compare_url":"https://api.github.com/repos/kadel/kedge/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kadel/kedge/merges","archive_url":"https://api.github.com/repos/kadel/kedge/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kadel/kedge/downloads","issues_url":"https://api.github.com/repos/kadel/kedge/issues{/number}","pulls_url":"https://api.github.com/repos/kadel/kedge/pulls{/number}","milestones_url":"https://api.github.com/repos/kadel/kedge/milestones{/number}","notifications_url":"https://api.github.com/repos/kadel/kedge/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kadel/kedge/labels{/name}","releases_url":"https://api.github.com/repos/kadel/kedge/releases{/id}","deployments_url":"https://api.github.com/repos/kadel/kedge/deployments","created_at":"2017-06-29T09:04:43Z","updated_at":"2017-06-29T09:04:44Z","pushed_at":"2017-07-26T07:55:10Z","git_url":"git://github.com/kadel/kedge.git","ssh_url":"git@github.com:kadel/kedge.git","clone_url":"https://github.com/kadel/kedge.git","svn_url":"https://github.com/kadel/kedge","homepage":"","size":15314,"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,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"kedgeproject:master","ref":"master","sha":"db1b615fa712903e48bd23b99221b845fa4360ed","user":{"login":"kedgeproject","id":29544152,"avatar_url":"https://avatars3.githubusercontent.com/u/29544152?v=4","gravatar_id":"","url":"https://api.github.com/users/kedgeproject","html_url":"https://github.com/kedgeproject","followers_url":"https://api.github.com/users/kedgeproject/followers","following_url":"https://api.github.com/users/kedgeproject/following{/other_user}","gists_url":"https://api.github.com/users/kedgeproject/gists{/gist_id}","starred_url":"https://api.github.com/users/kedgeproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kedgeproject/subscriptions","organizations_url":"https://api.github.com/users/kedgeproject/orgs","repos_url":"https://api.github.com/users/kedgeproject/repos","events_url":"https://api.github.com/users/kedgeproject/events{/privacy}","received_events_url":"https://api.github.com/users/kedgeproject/received_events","type":"Organization","site_admin":false},"repo":{"id":93622792,"name":"kedge","full_name":"kedgeproject/kedge","owner":{"login":"kedgeproject","id":29544152,"avatar_url":"https://avatars3.githubusercontent.com/u/29544152?v=4","gravatar_id":"","url":"https://api.github.com/users/kedgeproject","html_url":"https://github.com/kedgeproject","followers_url":"https://api.github.com/users/kedgeproject/followers","following_url":"https://api.github.com/users/kedgeproject/following{/other_user}","gists_url":"https://api.github.com/users/kedgeproject/gists{/gist_id}","starred_url":"https://api.github.com/users/kedgeproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kedgeproject/subscriptions","organizations_url":"https://api.github.com/users/kedgeproject/orgs","repos_url":"https://api.github.com/users/kedgeproject/repos","events_url":"https://api.github.com/users/kedgeproject/events{/privacy}","received_events_url":"https://api.github.com/users/kedgeproject/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kedgeproject/kedge","description":"Kedge - Concise Application Definition for Kubernetes","fork":false,"url":"https://api.github.com/repos/kedgeproject/kedge","forks_url":"https://api.github.com/repos/kedgeproject/kedge/forks","keys_url":"https://api.github.com/repos/kedgeproject/kedge/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kedgeproject/kedge/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kedgeproject/kedge/teams","hooks_url":"https://api.github.com/repos/kedgeproject/kedge/hooks","issue_events_url":"https://api.github.com/repos/kedgeproject/kedge/issues/events{/number}","events_url":"https://api.github.com/repos/kedgeproject/kedge/events","assignees_url":"https://api.github.com/repos/kedgeproject/kedge/assignees{/user}","branches_url":"https://api.github.com/repos/kedgeproject/kedge/branches{/branch}","tags_url":"https://api.github.com/repos/kedgeproject/kedge/tags","blobs_url":"https://api.github.com/repos/kedgeproject/kedge/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kedgeproject/kedge/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kedgeproject/kedge/git/refs{/sha}","trees_url":"https://api.github.com/repos/kedgeproject/kedge/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kedgeproject/kedge/statuses/{sha}","languages_url":"https://api.github.com/repos/kedgeproject/kedge/languages","stargazers_url":"https://api.github.com/repos/kedgeproject/kedge/stargazers","contributors_url":"https://api.github.com/repos/kedgeproject/kedge/contributors","subscribers_url":"https://api.github.com/repos/kedgeproject/kedge/subscribers","subscription_url":"https://api.github.com/repos/kedgeproject/kedge/subscription","commits_url":"https://api.github.com/repos/kedgeproject/kedge/commits{/sha}","git_commits_url":"https://api.github.com/repos/kedgeproject/kedge/git/commits{/sha}","comments_url":"https://api.github.com/repos/kedgeproject/kedge/comments{/number}","issue_comment_url":"https://api.github.com/repos/kedgeproject/kedge/issues/comments{/number}","contents_url":"https://api.github.com/repos/kedgeproject/kedge/contents/{+path}","compare_url":"https://api.github.com/repos/kedgeproject/kedge/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kedgeproject/kedge/merges","archive_url":"https://api.github.com/repos/kedgeproject/kedge/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kedgeproject/kedge/downloads","issues_url":"https://api.github.com/repos/kedgeproject/kedge/issues{/number}","pulls_url":"https://api.github.com/repos/kedgeproject/kedge/pulls{/number}","milestones_url":"https://api.github.com/repos/kedgeproject/kedge/milestones{/number}","notifications_url":"https://api.github.com/repos/kedgeproject/kedge/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kedgeproject/kedge/labels{/name}","releases_url":"https://api.github.com/repos/kedgeproject/kedge/releases{/id}","deployments_url":"https://api.github.com/repos/kedgeproject/kedge/deployments","created_at":"2017-06-07T10:26:24Z","updated_at":"2017-07-25T15:34:52Z","pushed_at":"2017-07-26T07:55:11Z","git_url":"git://github.com/kedgeproject/kedge.git","ssh_url":"git@github.com:kedgeproject/kedge.git","clone_url":"https://github.com/kedgeproject/kedge.git","svn_url":"https://github.com/kedgeproject/kedge","homepage":"http://kedgeproject.org","size":15429,"stargazers_count":27,"watchers_count":27,"language":"Go","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":7,"mirror_url":null,"open_issues_count":72,"forks":7,"open_issues":72,"watchers":27,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kedgeproject/kedge/pulls/166"},"html":{"href":"https://github.com/kedgeproject/kedge/pull/166"},"issue":{"href":"https://api.github.com/repos/kedgeproject/kedge/issues/166"},"comments":{"href":"https://api.github.com/repos/kedgeproject/kedge/issues/166/comments"},"review_comments":{"href":"https://api.github.com/repos/kedgeproject/kedge/pulls/166/comments"},"review_comment":{"href":"https://api.github.com/repos/kedgeproject/kedge/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kedgeproject/kedge/pulls/166/commits"},"statuses":{"href":"https://api.github.com/repos/kedgeproject/kedge/statuses/6a7724dbbe838d4364552038053c2c68abb8046c"}}}}
{"actor":{"display_login":"containscafeine"}}