{"action":"created","comment":{"url":"https://api.github.com/repos/airbnb/interferon/pulls/comments/64279780","id":64279780,"diff_hunk":"@@ -65,10 +65,10 @@ def read_alerts\n       abort(\"no such directory #{path} for reading alert files\") \\\n         unless Dir.exists?(path)\n \n-      Dir.glob(File.join(path, '*.rb')) do |alert_file|\n+      Dir.glob(File.join(path, '**/*.rb')) do |alert_file|\n         break if @request_shutdown\n         begin\n-          alert = Alert.new(alert_file)\n+          alert = Alert.new(@alerts_repo_path, alert_file)","path":"lib/interferon.rb","position":9,"original_position":9,"commit_id":"b2ed69e71f2589790089d76f5190589b17dd13d1","original_commit_id":"b2ed69e71f2589790089d76f5190589b17dd13d1","user":{"login":"tuckerman","id":993116,"avatar_url":"https://avatars.githubusercontent.com/u/993116?v=3","gravatar_id":"","url":"https://api.github.com/users/tuckerman","html_url":"https://github.com/tuckerman","followers_url":"https://api.github.com/users/tuckerman/followers","following_url":"https://api.github.com/users/tuckerman/following{/other_user}","gists_url":"https://api.github.com/users/tuckerman/gists{/gist_id}","starred_url":"https://api.github.com/users/tuckerman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tuckerman/subscriptions","organizations_url":"https://api.github.com/users/tuckerman/orgs","repos_url":"https://api.github.com/users/tuckerman/repos","events_url":"https://api.github.com/users/tuckerman/events{/privacy}","received_events_url":"https://api.github.com/users/tuckerman/received_events","type":"User","site_admin":false},"body":"I had tried the following\r\n```\r\nmkdir -p alerts alerts/x/y\r\ntouch alerts1.rb x/y/alerts2.rb\r\n```\r\nand then\r\n```\r\npath = File.expand_path('.', 'alerts)\r\nDir.glob(File.join(path, '**/*.rb')) { |x| puts x }\r\n```\r\nand got absolute paths:\r\n```\r\n/Users/my_username/alerts/alert1.rb\r\n/Users/my_username/alerts/x/y/alert2.rb\r\n```","created_at":"2016-05-23T20:08:33Z","updated_at":"2016-05-23T20:08:33Z","html_url":"https://github.com/airbnb/interferon/pull/13#discussion_r64279780","pull_request_url":"https://api.github.com/repos/airbnb/interferon/pulls/13","_links":{"self":{"href":"https://api.github.com/repos/airbnb/interferon/pulls/comments/64279780"},"html":{"href":"https://github.com/airbnb/interferon/pull/13#discussion_r64279780"},"pull_request":{"href":"https://api.github.com/repos/airbnb/interferon/pulls/13"}}},"pull_request":{"url":"https://api.github.com/repos/airbnb/interferon/pulls/13","id":71109455,"html_url":"https://github.com/airbnb/interferon/pull/13","diff_url":"https://github.com/airbnb/interferon/pull/13.diff","patch_url":"https://github.com/airbnb/interferon/pull/13.patch","issue_url":"https://api.github.com/repos/airbnb/interferon/issues/13","number":13,"state":"open","locked":false,"title":"allow alerts to be defined in subdirectories","user":{"login":"tuckerman","id":993116,"avatar_url":"https://avatars.githubusercontent.com/u/993116?v=3","gravatar_id":"","url":"https://api.github.com/users/tuckerman","html_url":"https://github.com/tuckerman","followers_url":"https://api.github.com/users/tuckerman/followers","following_url":"https://api.github.com/users/tuckerman/following{/other_user}","gists_url":"https://api.github.com/users/tuckerman/gists{/gist_id}","starred_url":"https://api.github.com/users/tuckerman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tuckerman/subscriptions","organizations_url":"https://api.github.com/users/tuckerman/orgs","repos_url":"https://api.github.com/users/tuckerman/repos","events_url":"https://api.github.com/users/tuckerman/events{/privacy}","received_events_url":"https://api.github.com/users/tuckerman/received_events","type":"User","site_admin":false},"body":"Sending out for comment @igor47 I was wondering if pull request such as this would be something you'd consider merging into interferon?\r\n\r\nWith a large number of alerts, the alerts directory can become quite\r\nlarge and difficult to browse. This commit allows alerts to be defined\r\nfrom within arbitrarily nested subdirectories undernead the 'alerts/'\r\nfolder.\r\n\r\nThe subdirectory traversal is accomplished by changing the glob from\r\n`*.rb` to `**/*.rb`.\r\n\r\nIn oder to prevent name collisions from occuring between two alerts in\r\ndifferent folders but the same file name, we modify `Alert` to make its\r\nname instead a relative path from the 'alerts/' folder. (spec added)","created_at":"2016-05-23T19:47:08Z","updated_at":"2016-05-23T20:08:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"30760d3579a128fda341e4a30b407049351975ac","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/airbnb/interferon/pulls/13/commits","review_comments_url":"https://api.github.com/repos/airbnb/interferon/pulls/13/comments","review_comment_url":"https://api.github.com/repos/airbnb/interferon/pulls/comments{/number}","comments_url":"https://api.github.com/repos/airbnb/interferon/issues/13/comments","statuses_url":"https://api.github.com/repos/airbnb/interferon/statuses/b2ed69e71f2589790089d76f5190589b17dd13d1","head":{"label":"airbnb:cameron-allow-subdirs-under-alerts","ref":"cameron-allow-subdirs-under-alerts","sha":"b2ed69e71f2589790089d76f5190589b17dd13d1","user":{"login":"airbnb","id":698437,"avatar_url":"https://avatars.githubusercontent.com/u/698437?v=3","gravatar_id":"","url":"https://api.github.com/users/airbnb","html_url":"https://github.com/airbnb","followers_url":"https://api.github.com/users/airbnb/followers","following_url":"https://api.github.com/users/airbnb/following{/other_user}","gists_url":"https://api.github.com/users/airbnb/gists{/gist_id}","starred_url":"https://api.github.com/users/airbnb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/airbnb/subscriptions","organizations_url":"https://api.github.com/users/airbnb/orgs","repos_url":"https://api.github.com/users/airbnb/repos","events_url":"https://api.github.com/users/airbnb/events{/privacy}","received_events_url":"https://api.github.com/users/airbnb/received_events","type":"Organization","site_admin":false},"repo":{"id":32302845,"name":"interferon","full_name":"airbnb/interferon","owner":{"login":"airbnb","id":698437,"avatar_url":"https://avatars.githubusercontent.com/u/698437?v=3","gravatar_id":"","url":"https://api.github.com/users/airbnb","html_url":"https://github.com/airbnb","followers_url":"https://api.github.com/users/airbnb/followers","following_url":"https://api.github.com/users/airbnb/following{/other_user}","gists_url":"https://api.github.com/users/airbnb/gists{/gist_id}","starred_url":"https://api.github.com/users/airbnb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/airbnb/subscriptions","organizations_url":"https://api.github.com/users/airbnb/orgs","repos_url":"https://api.github.com/users/airbnb/repos","events_url":"https://api.github.com/users/airbnb/events{/privacy}","received_events_url":"https://api.github.com/users/airbnb/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/airbnb/interferon","description":"Signaling you about infrastructure or application issues","fork":false,"url":"https://api.github.com/repos/airbnb/interferon","forks_url":"https://api.github.com/repos/airbnb/interferon/forks","keys_url":"https://api.github.com/repos/airbnb/interferon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/airbnb/interferon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/airbnb/interferon/teams","hooks_url":"https://api.github.com/repos/airbnb/interferon/hooks","issue_events_url":"https://api.github.com/repos/airbnb/interferon/issues/events{/number}","events_url":"https://api.github.com/repos/airbnb/interferon/events","assignees_url":"https://api.github.com/repos/airbnb/interferon/assignees{/user}","branches_url":"https://api.github.com/repos/airbnb/interferon/branches{/branch}","tags_url":"https://api.github.com/repos/airbnb/interferon/tags","blobs_url":"https://api.github.com/repos/airbnb/interferon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/airbnb/interferon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/airbnb/interferon/git/refs{/sha}","trees_url":"https://api.github.com/repos/airbnb/interferon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/airbnb/interferon/statuses/{sha}","languages_url":"https://api.github.com/repos/airbnb/interferon/languages","stargazers_url":"https://api.github.com/repos/airbnb/interferon/stargazers","contributors_url":"https://api.github.com/repos/airbnb/interferon/contributors","subscribers_url":"https://api.github.com/repos/airbnb/interferon/subscribers","subscription_url":"https://api.github.com/repos/airbnb/interferon/subscription","commits_url":"https://api.github.com/repos/airbnb/interferon/commits{/sha}","git_commits_url":"https://api.github.com/repos/airbnb/interferon/git/commits{/sha}","comments_url":"https://api.github.com/repos/airbnb/interferon/comments{/number}","issue_comment_url":"https://api.github.com/repos/airbnb/interferon/issues/comments{/number}","contents_url":"https://api.github.com/repos/airbnb/interferon/contents/{+path}","compare_url":"https://api.github.com/repos/airbnb/interferon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/airbnb/interferon/merges","archive_url":"https://api.github.com/repos/airbnb/interferon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/airbnb/interferon/downloads","issues_url":"https://api.github.com/repos/airbnb/interferon/issues{/number}","pulls_url":"https://api.github.com/repos/airbnb/interferon/pulls{/number}","milestones_url":"https://api.github.com/repos/airbnb/interferon/milestones{/number}","notifications_url":"https://api.github.com/repos/airbnb/interferon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/airbnb/interferon/labels{/name}","releases_url":"https://api.github.com/repos/airbnb/interferon/releases{/id}","deployments_url":"https://api.github.com/repos/airbnb/interferon/deployments","created_at":"2015-03-16T05:13:40Z","updated_at":"2016-05-03T10:20:46Z","pushed_at":"2016-05-23T19:48:46Z","git_url":"git://github.com/airbnb/interferon.git","ssh_url":"git@github.com:airbnb/interferon.git","clone_url":"https://github.com/airbnb/interferon.git","svn_url":"https://github.com/airbnb/interferon","homepage":null,"size":53,"stargazers_count":46,"watchers_count":46,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":6,"forks":11,"open_issues":6,"watchers":46,"default_branch":"master"}},"base":{"label":"airbnb:master","ref":"master","sha":"fd401bdff3059179db85c9176681a25cf3541ade","user":{"login":"airbnb","id":698437,"avatar_url":"https://avatars.githubusercontent.com/u/698437?v=3","gravatar_id":"","url":"https://api.github.com/users/airbnb","html_url":"https://github.com/airbnb","followers_url":"https://api.github.com/users/airbnb/followers","following_url":"https://api.github.com/users/airbnb/following{/other_user}","gists_url":"https://api.github.com/users/airbnb/gists{/gist_id}","starred_url":"https://api.github.com/users/airbnb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/airbnb/subscriptions","organizations_url":"https://api.github.com/users/airbnb/orgs","repos_url":"https://api.github.com/users/airbnb/repos","events_url":"https://api.github.com/users/airbnb/events{/privacy}","received_events_url":"https://api.github.com/users/airbnb/received_events","type":"Organization","site_admin":false},"repo":{"id":32302845,"name":"interferon","full_name":"airbnb/interferon","owner":{"login":"airbnb","id":698437,"avatar_url":"https://avatars.githubusercontent.com/u/698437?v=3","gravatar_id":"","url":"https://api.github.com/users/airbnb","html_url":"https://github.com/airbnb","followers_url":"https://api.github.com/users/airbnb/followers","following_url":"https://api.github.com/users/airbnb/following{/other_user}","gists_url":"https://api.github.com/users/airbnb/gists{/gist_id}","starred_url":"https://api.github.com/users/airbnb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/airbnb/subscriptions","organizations_url":"https://api.github.com/users/airbnb/orgs","repos_url":"https://api.github.com/users/airbnb/repos","events_url":"https://api.github.com/users/airbnb/events{/privacy}","received_events_url":"https://api.github.com/users/airbnb/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/airbnb/interferon","description":"Signaling you about infrastructure or application issues","fork":false,"url":"https://api.github.com/repos/airbnb/interferon","forks_url":"https://api.github.com/repos/airbnb/interferon/forks","keys_url":"https://api.github.com/repos/airbnb/interferon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/airbnb/interferon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/airbnb/interferon/teams","hooks_url":"https://api.github.com/repos/airbnb/interferon/hooks","issue_events_url":"https://api.github.com/repos/airbnb/interferon/issues/events{/number}","events_url":"https://api.github.com/repos/airbnb/interferon/events","assignees_url":"https://api.github.com/repos/airbnb/interferon/assignees{/user}","branches_url":"https://api.github.com/repos/airbnb/interferon/branches{/branch}","tags_url":"https://api.github.com/repos/airbnb/interferon/tags","blobs_url":"https://api.github.com/repos/airbnb/interferon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/airbnb/interferon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/airbnb/interferon/git/refs{/sha}","trees_url":"https://api.github.com/repos/airbnb/interferon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/airbnb/interferon/statuses/{sha}","languages_url":"https://api.github.com/repos/airbnb/interferon/languages","stargazers_url":"https://api.github.com/repos/airbnb/interferon/stargazers","contributors_url":"https://api.github.com/repos/airbnb/interferon/contributors","subscribers_url":"https://api.github.com/repos/airbnb/interferon/subscribers","subscription_url":"https://api.github.com/repos/airbnb/interferon/subscription","commits_url":"https://api.github.com/repos/airbnb/interferon/commits{/sha}","git_commits_url":"https://api.github.com/repos/airbnb/interferon/git/commits{/sha}","comments_url":"https://api.github.com/repos/airbnb/interferon/comments{/number}","issue_comment_url":"https://api.github.com/repos/airbnb/interferon/issues/comments{/number}","contents_url":"https://api.github.com/repos/airbnb/interferon/contents/{+path}","compare_url":"https://api.github.com/repos/airbnb/interferon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/airbnb/interferon/merges","archive_url":"https://api.github.com/repos/airbnb/interferon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/airbnb/interferon/downloads","issues_url":"https://api.github.com/repos/airbnb/interferon/issues{/number}","pulls_url":"https://api.github.com/repos/airbnb/interferon/pulls{/number}","milestones_url":"https://api.github.com/repos/airbnb/interferon/milestones{/number}","notifications_url":"https://api.github.com/repos/airbnb/interferon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/airbnb/interferon/labels{/name}","releases_url":"https://api.github.com/repos/airbnb/interferon/releases{/id}","deployments_url":"https://api.github.com/repos/airbnb/interferon/deployments","created_at":"2015-03-16T05:13:40Z","updated_at":"2016-05-03T10:20:46Z","pushed_at":"2016-05-23T19:48:46Z","git_url":"git://github.com/airbnb/interferon.git","ssh_url":"git@github.com:airbnb/interferon.git","clone_url":"https://github.com/airbnb/interferon.git","svn_url":"https://github.com/airbnb/interferon","homepage":null,"size":53,"stargazers_count":46,"watchers_count":46,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":6,"forks":11,"open_issues":6,"watchers":46,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/airbnb/interferon/pulls/13"},"html":{"href":"https://github.com/airbnb/interferon/pull/13"},"issue":{"href":"https://api.github.com/repos/airbnb/interferon/issues/13"},"comments":{"href":"https://api.github.com/repos/airbnb/interferon/issues/13/comments"},"review_comments":{"href":"https://api.github.com/repos/airbnb/interferon/pulls/13/comments"},"review_comment":{"href":"https://api.github.com/repos/airbnb/interferon/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/airbnb/interferon/pulls/13/commits"},"statuses":{"href":"https://api.github.com/repos/airbnb/interferon/statuses/b2ed69e71f2589790089d76f5190589b17dd13d1"}}}}
{"actor":{"display_login":"tuckerman"}}