{"action":"created","comment":{"url":"https://api.github.com/repos/deis/deis/pulls/comments/32373838","id":32373838,"diff_hunk":"@@ -1,10 +1,12 @@\n #!/usr/bin/env bash\n \n+set -x\n+\n export ETCD=${ETCD:-$HOST:4001}\n \n cd $(dirname $0) # absolute path\n \n-for repo in *.git\n+for repo in $(ls | grep .git)","path":"builder/rootfs/etc/confd/templates/check-repos","position":10,"original_position":10,"commit_id":"5c211d78b08c4f18abbbed24c617bafeea03ef75","original_commit_id":"5c211d78b08c4f18abbbed24c617bafeea03ef75","user":{"login":"bacongobbler","id":1360539,"avatar_url":"https://avatars.githubusercontent.com/u/1360539?v=3","gravatar_id":"","url":"https://api.github.com/users/bacongobbler","html_url":"https://github.com/bacongobbler","followers_url":"https://api.github.com/users/bacongobbler/followers","following_url":"https://api.github.com/users/bacongobbler/following{/other_user}","gists_url":"https://api.github.com/users/bacongobbler/gists{/gist_id}","starred_url":"https://api.github.com/users/bacongobbler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bacongobbler/subscriptions","organizations_url":"https://api.github.com/users/bacongobbler/orgs","repos_url":"https://api.github.com/users/bacongobbler/repos","events_url":"https://api.github.com/users/bacongobbler/events{/privacy}","received_events_url":"https://api.github.com/users/bacongobbler/received_events","type":"User","site_admin":false},"body":"godd point","created_at":"2015-06-13T21:01:01Z","updated_at":"2015-06-13T21:01:01Z","html_url":"https://github.com/deis/deis/pull/3867#discussion_r32373838","pull_request_url":"https://api.github.com/repos/deis/deis/pulls/3867","_links":{"self":{"href":"https://api.github.com/repos/deis/deis/pulls/comments/32373838"},"html":{"href":"https://github.com/deis/deis/pull/3867#discussion_r32373838"},"pull_request":{"href":"https://api.github.com/repos/deis/deis/pulls/3867"}}},"pull_request":{"url":"https://api.github.com/repos/deis/deis/pulls/3867","id":37610541,"html_url":"https://github.com/deis/deis/pull/3867","diff_url":"https://github.com/deis/deis/pull/3867.diff","patch_url":"https://github.com/deis/deis/pull/3867.patch","issue_url":"https://api.github.com/repos/deis/deis/issues/3867","number":3867,"state":"open","locked":false,"title":"fix(builder): call ls rather than using a wildcard","user":{"login":"bacongobbler","id":1360539,"avatar_url":"https://avatars.githubusercontent.com/u/1360539?v=3","gravatar_id":"","url":"https://api.github.com/users/bacongobbler","html_url":"https://github.com/bacongobbler","followers_url":"https://api.github.com/users/bacongobbler/followers","following_url":"https://api.github.com/users/bacongobbler/following{/other_user}","gists_url":"https://api.github.com/users/bacongobbler/gists{/gist_id}","starred_url":"https://api.github.com/users/bacongobbler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bacongobbler/subscriptions","organizations_url":"https://api.github.com/users/bacongobbler/orgs","repos_url":"https://api.github.com/users/bacongobbler/repos","events_url":"https://api.github.com/users/bacongobbler/events{/privacy}","received_events_url":"https://api.github.com/users/bacongobbler/received_events","type":"User","site_admin":false},"body":"The wildcard caused an off-by-one error where if no git repositories\r\nexisted, the wildcard was then interpreted, causing all images prefixed\r\nwith the registry IP address to be removed inside builder.\r\n\r\nAs an example:\r\n\r\n    $ for repo in *.git; do echo $repo; done\r\n    *.git\r\n    $ for repo in $(ls | grep .git); do echo $repo; done\r\n    $ mkdir foo.git\r\n    $ for repo in *.git; do echo $repo; done\r\n    foo.git\r\n    $ for repo in $(ls | grep .git); do echo $repo; done\r\n    foo.git\r\n\r\ncloses #3862","created_at":"2015-06-12T22:35:47Z","updated_at":"2015-06-13T21:01:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6a30c3f55c8b68b7c8843320e8c0beb1c93b8c99","assignee":null,"milestone":{"url":"https://api.github.com/repos/deis/deis/milestones/40","html_url":"https://github.com/deis/deis/milestones/v1.8","labels_url":"https://api.github.com/repos/deis/deis/milestones/40/labels","id":1100516,"number":40,"title":"v1.8","description":"","creator":{"login":"mboersma","id":73019,"avatar_url":"https://avatars.githubusercontent.com/u/73019?v=3","gravatar_id":"","url":"https://api.github.com/users/mboersma","html_url":"https://github.com/mboersma","followers_url":"https://api.github.com/users/mboersma/followers","following_url":"https://api.github.com/users/mboersma/following{/other_user}","gists_url":"https://api.github.com/users/mboersma/gists{/gist_id}","starred_url":"https://api.github.com/users/mboersma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mboersma/subscriptions","organizations_url":"https://api.github.com/users/mboersma/orgs","repos_url":"https://api.github.com/users/mboersma/repos","events_url":"https://api.github.com/users/mboersma/events{/privacy}","received_events_url":"https://api.github.com/users/mboersma/received_events","type":"User","site_admin":false},"open_issues":17,"closed_issues":22,"state":"open","created_at":"2015-05-07T16:37:37Z","updated_at":"2015-06-13T19:27:17Z","due_on":"2015-07-07T06:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/deis/deis/pulls/3867/commits","review_comments_url":"https://api.github.com/repos/deis/deis/pulls/3867/comments","review_comment_url":"https://api.github.com/repos/deis/deis/pulls/comments{/number}","comments_url":"https://api.github.com/repos/deis/deis/issues/3867/comments","statuses_url":"https://api.github.com/repos/deis/deis/statuses/5c211d78b08c4f18abbbed24c617bafeea03ef75","head":{"label":"bacongobbler:3862-remove-dangling-cleanup","ref":"3862-remove-dangling-cleanup","sha":"5c211d78b08c4f18abbbed24c617bafeea03ef75","user":{"login":"bacongobbler","id":1360539,"avatar_url":"https://avatars.githubusercontent.com/u/1360539?v=3","gravatar_id":"","url":"https://api.github.com/users/bacongobbler","html_url":"https://github.com/bacongobbler","followers_url":"https://api.github.com/users/bacongobbler/followers","following_url":"https://api.github.com/users/bacongobbler/following{/other_user}","gists_url":"https://api.github.com/users/bacongobbler/gists{/gist_id}","starred_url":"https://api.github.com/users/bacongobbler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bacongobbler/subscriptions","organizations_url":"https://api.github.com/users/bacongobbler/orgs","repos_url":"https://api.github.com/users/bacongobbler/repos","events_url":"https://api.github.com/users/bacongobbler/events{/privacy}","received_events_url":"https://api.github.com/users/bacongobbler/received_events","type":"User","site_admin":false},"repo":{"id":22929148,"name":"deis","full_name":"bacongobbler/deis","owner":{"login":"bacongobbler","id":1360539,"avatar_url":"https://avatars.githubusercontent.com/u/1360539?v=3","gravatar_id":"","url":"https://api.github.com/users/bacongobbler","html_url":"https://github.com/bacongobbler","followers_url":"https://api.github.com/users/bacongobbler/followers","following_url":"https://api.github.com/users/bacongobbler/following{/other_user}","gists_url":"https://api.github.com/users/bacongobbler/gists{/gist_id}","starred_url":"https://api.github.com/users/bacongobbler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bacongobbler/subscriptions","organizations_url":"https://api.github.com/users/bacongobbler/orgs","repos_url":"https://api.github.com/users/bacongobbler/repos","events_url":"https://api.github.com/users/bacongobbler/events{/privacy}","received_events_url":"https://api.github.com/users/bacongobbler/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bacongobbler/deis","description":"Your PaaS. Your Rules. ","fork":true,"url":"https://api.github.com/repos/bacongobbler/deis","forks_url":"https://api.github.com/repos/bacongobbler/deis/forks","keys_url":"https://api.github.com/repos/bacongobbler/deis/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bacongobbler/deis/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bacongobbler/deis/teams","hooks_url":"https://api.github.com/repos/bacongobbler/deis/hooks","issue_events_url":"https://api.github.com/repos/bacongobbler/deis/issues/events{/number}","events_url":"https://api.github.com/repos/bacongobbler/deis/events","assignees_url":"https://api.github.com/repos/bacongobbler/deis/assignees{/user}","branches_url":"https://api.github.com/repos/bacongobbler/deis/branches{/branch}","tags_url":"https://api.github.com/repos/bacongobbler/deis/tags","blobs_url":"https://api.github.com/repos/bacongobbler/deis/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bacongobbler/deis/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bacongobbler/deis/git/refs{/sha}","trees_url":"https://api.github.com/repos/bacongobbler/deis/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bacongobbler/deis/statuses/{sha}","languages_url":"https://api.github.com/repos/bacongobbler/deis/languages","stargazers_url":"https://api.github.com/repos/bacongobbler/deis/stargazers","contributors_url":"https://api.github.com/repos/bacongobbler/deis/contributors","subscribers_url":"https://api.github.com/repos/bacongobbler/deis/subscribers","subscription_url":"https://api.github.com/repos/bacongobbler/deis/subscription","commits_url":"https://api.github.com/repos/bacongobbler/deis/commits{/sha}","git_commits_url":"https://api.github.com/repos/bacongobbler/deis/git/commits{/sha}","comments_url":"https://api.github.com/repos/bacongobbler/deis/comments{/number}","issue_comment_url":"https://api.github.com/repos/bacongobbler/deis/issues/comments{/number}","contents_url":"https://api.github.com/repos/bacongobbler/deis/contents/{+path}","compare_url":"https://api.github.com/repos/bacongobbler/deis/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bacongobbler/deis/merges","archive_url":"https://api.github.com/repos/bacongobbler/deis/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bacongobbler/deis/downloads","issues_url":"https://api.github.com/repos/bacongobbler/deis/issues{/number}","pulls_url":"https://api.github.com/repos/bacongobbler/deis/pulls{/number}","milestones_url":"https://api.github.com/repos/bacongobbler/deis/milestones{/number}","notifications_url":"https://api.github.com/repos/bacongobbler/deis/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bacongobbler/deis/labels{/name}","releases_url":"https://api.github.com/repos/bacongobbler/deis/releases{/id}","created_at":"2014-08-13T19:53:55Z","updated_at":"2015-05-08T15:51:37Z","pushed_at":"2015-06-12T22:36:13Z","git_url":"git://github.com/bacongobbler/deis.git","ssh_url":"git@github.com:bacongobbler/deis.git","clone_url":"https://github.com/bacongobbler/deis.git","svn_url":"https://github.com/bacongobbler/deis","homepage":"http://deis.io","size":21815,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"deis:master","ref":"master","sha":"1c9d34c465736113690767a1f2212c4935aa0b98","user":{"login":"deis","id":6117407,"avatar_url":"https://avatars.githubusercontent.com/u/6117407?v=3","gravatar_id":"","url":"https://api.github.com/users/deis","html_url":"https://github.com/deis","followers_url":"https://api.github.com/users/deis/followers","following_url":"https://api.github.com/users/deis/following{/other_user}","gists_url":"https://api.github.com/users/deis/gists{/gist_id}","starred_url":"https://api.github.com/users/deis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deis/subscriptions","organizations_url":"https://api.github.com/users/deis/orgs","repos_url":"https://api.github.com/users/deis/repos","events_url":"https://api.github.com/users/deis/events{/privacy}","received_events_url":"https://api.github.com/users/deis/received_events","type":"Organization","site_admin":false},"repo":{"id":11589713,"name":"deis","full_name":"deis/deis","owner":{"login":"deis","id":6117407,"avatar_url":"https://avatars.githubusercontent.com/u/6117407?v=3","gravatar_id":"","url":"https://api.github.com/users/deis","html_url":"https://github.com/deis","followers_url":"https://api.github.com/users/deis/followers","following_url":"https://api.github.com/users/deis/following{/other_user}","gists_url":"https://api.github.com/users/deis/gists{/gist_id}","starred_url":"https://api.github.com/users/deis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deis/subscriptions","organizations_url":"https://api.github.com/users/deis/orgs","repos_url":"https://api.github.com/users/deis/repos","events_url":"https://api.github.com/users/deis/events{/privacy}","received_events_url":"https://api.github.com/users/deis/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/deis/deis","description":"Your PaaS. Your Rules. ","fork":false,"url":"https://api.github.com/repos/deis/deis","forks_url":"https://api.github.com/repos/deis/deis/forks","keys_url":"https://api.github.com/repos/deis/deis/keys{/key_id}","collaborators_url":"https://api.github.com/repos/deis/deis/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/deis/deis/teams","hooks_url":"https://api.github.com/repos/deis/deis/hooks","issue_events_url":"https://api.github.com/repos/deis/deis/issues/events{/number}","events_url":"https://api.github.com/repos/deis/deis/events","assignees_url":"https://api.github.com/repos/deis/deis/assignees{/user}","branches_url":"https://api.github.com/repos/deis/deis/branches{/branch}","tags_url":"https://api.github.com/repos/deis/deis/tags","blobs_url":"https://api.github.com/repos/deis/deis/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/deis/deis/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/deis/deis/git/refs{/sha}","trees_url":"https://api.github.com/repos/deis/deis/git/trees{/sha}","statuses_url":"https://api.github.com/repos/deis/deis/statuses/{sha}","languages_url":"https://api.github.com/repos/deis/deis/languages","stargazers_url":"https://api.github.com/repos/deis/deis/stargazers","contributors_url":"https://api.github.com/repos/deis/deis/contributors","subscribers_url":"https://api.github.com/repos/deis/deis/subscribers","subscription_url":"https://api.github.com/repos/deis/deis/subscription","commits_url":"https://api.github.com/repos/deis/deis/commits{/sha}","git_commits_url":"https://api.github.com/repos/deis/deis/git/commits{/sha}","comments_url":"https://api.github.com/repos/deis/deis/comments{/number}","issue_comment_url":"https://api.github.com/repos/deis/deis/issues/comments{/number}","contents_url":"https://api.github.com/repos/deis/deis/contents/{+path}","compare_url":"https://api.github.com/repos/deis/deis/compare/{base}...{head}","merges_url":"https://api.github.com/repos/deis/deis/merges","archive_url":"https://api.github.com/repos/deis/deis/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/deis/deis/downloads","issues_url":"https://api.github.com/repos/deis/deis/issues{/number}","pulls_url":"https://api.github.com/repos/deis/deis/pulls{/number}","milestones_url":"https://api.github.com/repos/deis/deis/milestones{/number}","notifications_url":"https://api.github.com/repos/deis/deis/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/deis/deis/labels{/name}","releases_url":"https://api.github.com/repos/deis/deis/releases{/id}","created_at":"2013-07-22T19:02:40Z","updated_at":"2015-06-13T19:25:57Z","pushed_at":"2015-06-13T14:33:16Z","git_url":"git://github.com/deis/deis.git","ssh_url":"git@github.com:deis/deis.git","clone_url":"https://github.com/deis/deis.git","svn_url":"https://github.com/deis/deis","homepage":"http://deis.io","size":40295,"stargazers_count":4362,"watchers_count":4362,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":674,"mirror_url":null,"open_issues_count":198,"forks":674,"open_issues":198,"watchers":4362,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/deis/deis/pulls/3867"},"html":{"href":"https://github.com/deis/deis/pull/3867"},"issue":{"href":"https://api.github.com/repos/deis/deis/issues/3867"},"comments":{"href":"https://api.github.com/repos/deis/deis/issues/3867/comments"},"review_comments":{"href":"https://api.github.com/repos/deis/deis/pulls/3867/comments"},"review_comment":{"href":"https://api.github.com/repos/deis/deis/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/deis/deis/pulls/3867/commits"},"statuses":{"href":"https://api.github.com/repos/deis/deis/statuses/5c211d78b08c4f18abbbed24c617bafeea03ef75"}}}}