{"action":"created","comment":{"url":"https://api.github.com/repos/operable/spanner/pulls/comments/57890166","id":57890166,"diff_hunk":"@@ -48,10 +48,15 @@ defmodule Spanner.Command.Request do\n \n   defp read_config(request, config_path) do\n     [bundle, _cmd] = String.split(request.command, \":\", parts: 2)\n-    cmd_config_file = Path.join([config_path, bundle, Config.dynamic_file_name()])\n-    case File.exists?(cmd_config_file) do\n+    cmd_config_dir = Path.join([config_path, bundle])\n+\n+    case File.dir?(cmd_config_dir) do\n       true ->\n-        Config.Parser.read_from_file(cmd_config_file)\n+        with {:ok, files} <- File.ls(cmd_config_dir),\n+             cmd_config_file when is_binary(cmd_config_file) <- Enum.find(files, {:ok, \"\"}, &Spanner.Config.config_file?/1) do\n+               Path.join([cmd_config_dir, cmd_config_file])","path":"lib/spanner/command/request.ex","position":22,"original_position":22,"commit_id":"c0d170ec3f590aec457e283209ba602c5ebb7163","original_commit_id":"c0d170ec3f590aec457e283209ba602c5ebb7163","user":{"login":"vanstee","id":228734,"avatar_url":"https://avatars.githubusercontent.com/u/228734?v=3","gravatar_id":"","url":"https://api.github.com/users/vanstee","html_url":"https://github.com/vanstee","followers_url":"https://api.github.com/users/vanstee/followers","following_url":"https://api.github.com/users/vanstee/following{/other_user}","gists_url":"https://api.github.com/users/vanstee/gists{/gist_id}","starred_url":"https://api.github.com/users/vanstee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vanstee/subscriptions","organizations_url":"https://api.github.com/users/vanstee/orgs","repos_url":"https://api.github.com/users/vanstee/repos","events_url":"https://api.github.com/users/vanstee/events{/privacy}","received_events_url":"https://api.github.com/users/vanstee/received_events","type":"User","site_admin":false},"body":"I think you might be able to swap out this file finding and path constructing code with a call to `Path.wildcard(\"#{cmd_config_dir}/config.{yml,yaml,json}\")`","created_at":"2016-03-30T13:45:50Z","updated_at":"2016-03-30T13:45:50Z","html_url":"https://github.com/operable/spanner/pull/57#discussion_r57890166","pull_request_url":"https://api.github.com/repos/operable/spanner/pulls/57","_links":{"self":{"href":"https://api.github.com/repos/operable/spanner/pulls/comments/57890166"},"html":{"href":"https://github.com/operable/spanner/pull/57#discussion_r57890166"},"pull_request":{"href":"https://api.github.com/repos/operable/spanner/pulls/57"}}},"pull_request":{"url":"https://api.github.com/repos/operable/spanner/pulls/57","id":64474038,"html_url":"https://github.com/operable/spanner/pull/57","diff_url":"https://github.com/operable/spanner/pull/57.diff","patch_url":"https://github.com/operable/spanner/pull/57.patch","issue_url":"https://api.github.com/repos/operable/spanner/issues/57","number":57,"state":"open","locked":false,"title":"multi extension support for config","user":{"login":"mpeck","id":47858,"avatar_url":"https://avatars.githubusercontent.com/u/47858?v=3","gravatar_id":"","url":"https://api.github.com/users/mpeck","html_url":"https://github.com/mpeck","followers_url":"https://api.github.com/users/mpeck/followers","following_url":"https://api.github.com/users/mpeck/following{/other_user}","gists_url":"https://api.github.com/users/mpeck/gists{/gist_id}","starred_url":"https://api.github.com/users/mpeck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mpeck/subscriptions","organizations_url":"https://api.github.com/users/mpeck/orgs","repos_url":"https://api.github.com/users/mpeck/repos","events_url":"https://api.github.com/users/mpeck/events{/privacy}","received_events_url":"https://api.github.com/users/mpeck/received_events","type":"User","site_admin":false},"body":"This adds support for the `.yml`, `.yaml` and `.json` extensions.\r\n\r\nreference https://github.com/operable/cog/issues/413","created_at":"2016-03-29T14:26:32Z","updated_at":"2016-03-30T13:45:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fd7bba5b027f6b46b6f934b84a9d55373dc4aa4a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/operable/spanner/pulls/57/commits","review_comments_url":"https://api.github.com/repos/operable/spanner/pulls/57/comments","review_comment_url":"https://api.github.com/repos/operable/spanner/pulls/comments{/number}","comments_url":"https://api.github.com/repos/operable/spanner/issues/57/comments","statuses_url":"https://api.github.com/repos/operable/spanner/statuses/c0d170ec3f590aec457e283209ba602c5ebb7163","head":{"label":"operable:peck/yml-and-yaml","ref":"peck/yml-and-yaml","sha":"c0d170ec3f590aec457e283209ba602c5ebb7163","user":{"login":"operable","id":6070463,"avatar_url":"https://avatars.githubusercontent.com/u/6070463?v=3","gravatar_id":"","url":"https://api.github.com/users/operable","html_url":"https://github.com/operable","followers_url":"https://api.github.com/users/operable/followers","following_url":"https://api.github.com/users/operable/following{/other_user}","gists_url":"https://api.github.com/users/operable/gists{/gist_id}","starred_url":"https://api.github.com/users/operable/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/operable/subscriptions","organizations_url":"https://api.github.com/users/operable/orgs","repos_url":"https://api.github.com/users/operable/repos","events_url":"https://api.github.com/users/operable/events{/privacy}","received_events_url":"https://api.github.com/users/operable/received_events","type":"Organization","site_admin":false},"repo":{"id":48129467,"name":"spanner","full_name":"operable/spanner","owner":{"login":"operable","id":6070463,"avatar_url":"https://avatars.githubusercontent.com/u/6070463?v=3","gravatar_id":"","url":"https://api.github.com/users/operable","html_url":"https://github.com/operable","followers_url":"https://api.github.com/users/operable/followers","following_url":"https://api.github.com/users/operable/following{/other_user}","gists_url":"https://api.github.com/users/operable/gists{/gist_id}","starred_url":"https://api.github.com/users/operable/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/operable/subscriptions","organizations_url":"https://api.github.com/users/operable/orgs","repos_url":"https://api.github.com/users/operable/repos","events_url":"https://api.github.com/users/operable/events{/privacy}","received_events_url":"https://api.github.com/users/operable/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/operable/spanner","description":"A tool for creating command bundles","fork":false,"url":"https://api.github.com/repos/operable/spanner","forks_url":"https://api.github.com/repos/operable/spanner/forks","keys_url":"https://api.github.com/repos/operable/spanner/keys{/key_id}","collaborators_url":"https://api.github.com/repos/operable/spanner/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/operable/spanner/teams","hooks_url":"https://api.github.com/repos/operable/spanner/hooks","issue_events_url":"https://api.github.com/repos/operable/spanner/issues/events{/number}","events_url":"https://api.github.com/repos/operable/spanner/events","assignees_url":"https://api.github.com/repos/operable/spanner/assignees{/user}","branches_url":"https://api.github.com/repos/operable/spanner/branches{/branch}","tags_url":"https://api.github.com/repos/operable/spanner/tags","blobs_url":"https://api.github.com/repos/operable/spanner/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/operable/spanner/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/operable/spanner/git/refs{/sha}","trees_url":"https://api.github.com/repos/operable/spanner/git/trees{/sha}","statuses_url":"https://api.github.com/repos/operable/spanner/statuses/{sha}","languages_url":"https://api.github.com/repos/operable/spanner/languages","stargazers_url":"https://api.github.com/repos/operable/spanner/stargazers","contributors_url":"https://api.github.com/repos/operable/spanner/contributors","subscribers_url":"https://api.github.com/repos/operable/spanner/subscribers","subscription_url":"https://api.github.com/repos/operable/spanner/subscription","commits_url":"https://api.github.com/repos/operable/spanner/commits{/sha}","git_commits_url":"https://api.github.com/repos/operable/spanner/git/commits{/sha}","comments_url":"https://api.github.com/repos/operable/spanner/comments{/number}","issue_comment_url":"https://api.github.com/repos/operable/spanner/issues/comments{/number}","contents_url":"https://api.github.com/repos/operable/spanner/contents/{+path}","compare_url":"https://api.github.com/repos/operable/spanner/compare/{base}...{head}","merges_url":"https://api.github.com/repos/operable/spanner/merges","archive_url":"https://api.github.com/repos/operable/spanner/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/operable/spanner/downloads","issues_url":"https://api.github.com/repos/operable/spanner/issues{/number}","pulls_url":"https://api.github.com/repos/operable/spanner/pulls{/number}","milestones_url":"https://api.github.com/repos/operable/spanner/milestones{/number}","notifications_url":"https://api.github.com/repos/operable/spanner/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/operable/spanner/labels{/name}","releases_url":"https://api.github.com/repos/operable/spanner/releases{/id}","deployments_url":"https://api.github.com/repos/operable/spanner/deployments","created_at":"2015-12-16T19:06:08Z","updated_at":"2016-02-22T22:28:36Z","pushed_at":"2016-03-30T12:49:59Z","git_url":"git://github.com/operable/spanner.git","ssh_url":"git@github.com:operable/spanner.git","clone_url":"https://github.com/operable/spanner.git","svn_url":"https://github.com/operable/spanner","homepage":null,"size":201,"stargazers_count":1,"watchers_count":1,"language":"Elixir","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":1,"default_branch":"master"}},"base":{"label":"operable:master","ref":"master","sha":"ff77941c31f8bfe7a9621e2df5b307e96f0d6019","user":{"login":"operable","id":6070463,"avatar_url":"https://avatars.githubusercontent.com/u/6070463?v=3","gravatar_id":"","url":"https://api.github.com/users/operable","html_url":"https://github.com/operable","followers_url":"https://api.github.com/users/operable/followers","following_url":"https://api.github.com/users/operable/following{/other_user}","gists_url":"https://api.github.com/users/operable/gists{/gist_id}","starred_url":"https://api.github.com/users/operable/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/operable/subscriptions","organizations_url":"https://api.github.com/users/operable/orgs","repos_url":"https://api.github.com/users/operable/repos","events_url":"https://api.github.com/users/operable/events{/privacy}","received_events_url":"https://api.github.com/users/operable/received_events","type":"Organization","site_admin":false},"repo":{"id":48129467,"name":"spanner","full_name":"operable/spanner","owner":{"login":"operable","id":6070463,"avatar_url":"https://avatars.githubusercontent.com/u/6070463?v=3","gravatar_id":"","url":"https://api.github.com/users/operable","html_url":"https://github.com/operable","followers_url":"https://api.github.com/users/operable/followers","following_url":"https://api.github.com/users/operable/following{/other_user}","gists_url":"https://api.github.com/users/operable/gists{/gist_id}","starred_url":"https://api.github.com/users/operable/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/operable/subscriptions","organizations_url":"https://api.github.com/users/operable/orgs","repos_url":"https://api.github.com/users/operable/repos","events_url":"https://api.github.com/users/operable/events{/privacy}","received_events_url":"https://api.github.com/users/operable/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/operable/spanner","description":"A tool for creating command bundles","fork":false,"url":"https://api.github.com/repos/operable/spanner","forks_url":"https://api.github.com/repos/operable/spanner/forks","keys_url":"https://api.github.com/repos/operable/spanner/keys{/key_id}","collaborators_url":"https://api.github.com/repos/operable/spanner/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/operable/spanner/teams","hooks_url":"https://api.github.com/repos/operable/spanner/hooks","issue_events_url":"https://api.github.com/repos/operable/spanner/issues/events{/number}","events_url":"https://api.github.com/repos/operable/spanner/events","assignees_url":"https://api.github.com/repos/operable/spanner/assignees{/user}","branches_url":"https://api.github.com/repos/operable/spanner/branches{/branch}","tags_url":"https://api.github.com/repos/operable/spanner/tags","blobs_url":"https://api.github.com/repos/operable/spanner/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/operable/spanner/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/operable/spanner/git/refs{/sha}","trees_url":"https://api.github.com/repos/operable/spanner/git/trees{/sha}","statuses_url":"https://api.github.com/repos/operable/spanner/statuses/{sha}","languages_url":"https://api.github.com/repos/operable/spanner/languages","stargazers_url":"https://api.github.com/repos/operable/spanner/stargazers","contributors_url":"https://api.github.com/repos/operable/spanner/contributors","subscribers_url":"https://api.github.com/repos/operable/spanner/subscribers","subscription_url":"https://api.github.com/repos/operable/spanner/subscription","commits_url":"https://api.github.com/repos/operable/spanner/commits{/sha}","git_commits_url":"https://api.github.com/repos/operable/spanner/git/commits{/sha}","comments_url":"https://api.github.com/repos/operable/spanner/comments{/number}","issue_comment_url":"https://api.github.com/repos/operable/spanner/issues/comments{/number}","contents_url":"https://api.github.com/repos/operable/spanner/contents/{+path}","compare_url":"https://api.github.com/repos/operable/spanner/compare/{base}...{head}","merges_url":"https://api.github.com/repos/operable/spanner/merges","archive_url":"https://api.github.com/repos/operable/spanner/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/operable/spanner/downloads","issues_url":"https://api.github.com/repos/operable/spanner/issues{/number}","pulls_url":"https://api.github.com/repos/operable/spanner/pulls{/number}","milestones_url":"https://api.github.com/repos/operable/spanner/milestones{/number}","notifications_url":"https://api.github.com/repos/operable/spanner/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/operable/spanner/labels{/name}","releases_url":"https://api.github.com/repos/operable/spanner/releases{/id}","deployments_url":"https://api.github.com/repos/operable/spanner/deployments","created_at":"2015-12-16T19:06:08Z","updated_at":"2016-02-22T22:28:36Z","pushed_at":"2016-03-30T12:49:59Z","git_url":"git://github.com/operable/spanner.git","ssh_url":"git@github.com:operable/spanner.git","clone_url":"https://github.com/operable/spanner.git","svn_url":"https://github.com/operable/spanner","homepage":null,"size":201,"stargazers_count":1,"watchers_count":1,"language":"Elixir","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/operable/spanner/pulls/57"},"html":{"href":"https://github.com/operable/spanner/pull/57"},"issue":{"href":"https://api.github.com/repos/operable/spanner/issues/57"},"comments":{"href":"https://api.github.com/repos/operable/spanner/issues/57/comments"},"review_comments":{"href":"https://api.github.com/repos/operable/spanner/pulls/57/comments"},"review_comment":{"href":"https://api.github.com/repos/operable/spanner/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/operable/spanner/pulls/57/commits"},"statuses":{"href":"https://api.github.com/repos/operable/spanner/statuses/c0d170ec3f590aec457e283209ba602c5ebb7163"}}}}