{"action":"created","comment":{"url":"https://api.github.com/repos/operable/cog/pulls/comments/85227655","pull_request_review_id":5955428,"id":85227655,"diff_hunk":"@@ -0,0 +1,86 @@\n+defmodule Cog.NestedFile do\n+  @moduledoc \"\"\"\n+  \b\bStores an arbitrary String on the filesystem of the Cog host in a file\n+  named by combining the provided key and extension. Files are written to\n+  a directory hierarchy that is created by splitting the filename into\n+  two character segments and joining up to three of those segments with a\n+  provided list of base path segments.\n+\n+  Note: The key is sanitized to remove dangerous characters, but the\n+  base paths and extension are not. Make sure not to use user entered\n+  values for these unsafe arguments.","path":"lib/cog/nested_file.ex","position":11,"original_position":11,"commit_id":"ae520361d83f24e4b8a80679fed50eb6d9f5e816","original_commit_id":"f3ed87b4d1a21d62dc73934d2aaae09f0f27e77f","user":{"login":"christophermaier","id":207178,"avatar_url":"https://avatars.githubusercontent.com/u/207178?v=3","gravatar_id":"","url":"https://api.github.com/users/christophermaier","html_url":"https://github.com/christophermaier","followers_url":"https://api.github.com/users/christophermaier/followers","following_url":"https://api.github.com/users/christophermaier/following{/other_user}","gists_url":"https://api.github.com/users/christophermaier/gists{/gist_id}","starred_url":"https://api.github.com/users/christophermaier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/christophermaier/subscriptions","organizations_url":"https://api.github.com/users/christophermaier/orgs","repos_url":"https://api.github.com/users/christophermaier/repos","events_url":"https://api.github.com/users/christophermaier/events{/privacy}","received_events_url":"https://api.github.com/users/christophermaier/received_events","type":"User","site_admin":false},"body":"So is the `key` the only thing that's user-specified? The wording of the comment led me to believe otherwise.","created_at":"2016-10-26T21:46:25Z","updated_at":"2016-10-26T21:46:25Z","html_url":"https://github.com/operable/cog/pull/1101#discussion_r85227655","pull_request_url":"https://api.github.com/repos/operable/cog/pulls/1101","_links":{"self":{"href":"https://api.github.com/repos/operable/cog/pulls/comments/85227655"},"html":{"href":"https://github.com/operable/cog/pull/1101#discussion_r85227655"},"pull_request":{"href":"https://api.github.com/repos/operable/cog/pulls/1101"}}},"pull_request":{"url":"https://api.github.com/repos/operable/cog/pulls/1101","id":91069935,"html_url":"https://github.com/operable/cog/pull/1101","diff_url":"https://github.com/operable/cog/pull/1101.diff","patch_url":"https://github.com/operable/cog/pull/1101.patch","issue_url":"https://api.github.com/repos/operable/cog/issues/1101","number":1101,"state":"open","locked":false,"title":"Adds tee and cat commands and a supporting DataStore service","user":{"login":"imbriaco","id":1198,"avatar_url":"https://avatars.githubusercontent.com/u/1198?v=3","gravatar_id":"","url":"https://api.github.com/users/imbriaco","html_url":"https://github.com/imbriaco","followers_url":"https://api.github.com/users/imbriaco/followers","following_url":"https://api.github.com/users/imbriaco/following{/other_user}","gists_url":"https://api.github.com/users/imbriaco/gists{/gist_id}","starred_url":"https://api.github.com/users/imbriaco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/imbriaco/subscriptions","organizations_url":"https://api.github.com/users/imbriaco/orgs","repos_url":"https://api.github.com/users/imbriaco/repos","events_url":"https://api.github.com/users/imbriaco/events{/privacy}","received_events_url":"https://api.github.com/users/imbriaco/received_events","type":"User","site_admin":false},"body":"* Creates a `DataStore` service based heavily on the `Memory` service, but which writes files to disk.\r\n  * This service is not exposed via the web API and is only currently intended for use by Cog internals.\r\n  * Data is written by default to a `service_data` directory under the top-level Cog `data` directory. This is configurable in `config.exs`.\r\n  * File manipulation is handled by a new `NestedFile` module which creates a multi-level directory hierarchy in order to reduce number of files which will be written to a directory for performance reasons.\r\n* Adds a `tee` command to save pipeline output using the DataStore service for later use\r\n* Adds a `cat` command to retrieve saved pipeline output\r\n  * Includes support for modifying the saved `tee` data with the current pipeline output in the following ways:\r\n    * Append current output to saved data returning an array\r\n    * Insert current output into saved map as a provided field name\r\n    * Merge current output map into saved map\r\n\r\nNote that this does include tests for the `cat` and `tee` commands which will pass but which are currently configured with `@moduletag :skip` to align with the other command tests.\r\n","created_at":"2016-10-26T19:19:44Z","updated_at":"2016-10-26T21:46:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f8371116e881eaa1894a133545fad6ca83908d45","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/operable/cog/pulls/1101/commits","review_comments_url":"https://api.github.com/repos/operable/cog/pulls/1101/comments","review_comment_url":"https://api.github.com/repos/operable/cog/pulls/comments{/number}","comments_url":"https://api.github.com/repos/operable/cog/issues/1101/comments","statuses_url":"https://api.github.com/repos/operable/cog/statuses/ae520361d83f24e4b8a80679fed50eb6d9f5e816","head":{"label":"operable:imbriaco/tee-command","ref":"imbriaco/tee-command","sha":"ae520361d83f24e4b8a80679fed50eb6d9f5e816","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":49292670,"name":"cog","full_name":"operable/cog","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/cog","description":"Bringing the power of the command line to chat","fork":false,"url":"https://api.github.com/repos/operable/cog","forks_url":"https://api.github.com/repos/operable/cog/forks","keys_url":"https://api.github.com/repos/operable/cog/keys{/key_id}","collaborators_url":"https://api.github.com/repos/operable/cog/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/operable/cog/teams","hooks_url":"https://api.github.com/repos/operable/cog/hooks","issue_events_url":"https://api.github.com/repos/operable/cog/issues/events{/number}","events_url":"https://api.github.com/repos/operable/cog/events","assignees_url":"https://api.github.com/repos/operable/cog/assignees{/user}","branches_url":"https://api.github.com/repos/operable/cog/branches{/branch}","tags_url":"https://api.github.com/repos/operable/cog/tags","blobs_url":"https://api.github.com/repos/operable/cog/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/operable/cog/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/operable/cog/git/refs{/sha}","trees_url":"https://api.github.com/repos/operable/cog/git/trees{/sha}","statuses_url":"https://api.github.com/repos/operable/cog/statuses/{sha}","languages_url":"https://api.github.com/repos/operable/cog/languages","stargazers_url":"https://api.github.com/repos/operable/cog/stargazers","contributors_url":"https://api.github.com/repos/operable/cog/contributors","subscribers_url":"https://api.github.com/repos/operable/cog/subscribers","subscription_url":"https://api.github.com/repos/operable/cog/subscription","commits_url":"https://api.github.com/repos/operable/cog/commits{/sha}","git_commits_url":"https://api.github.com/repos/operable/cog/git/commits{/sha}","comments_url":"https://api.github.com/repos/operable/cog/comments{/number}","issue_comment_url":"https://api.github.com/repos/operable/cog/issues/comments{/number}","contents_url":"https://api.github.com/repos/operable/cog/contents/{+path}","compare_url":"https://api.github.com/repos/operable/cog/compare/{base}...{head}","merges_url":"https://api.github.com/repos/operable/cog/merges","archive_url":"https://api.github.com/repos/operable/cog/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/operable/cog/downloads","issues_url":"https://api.github.com/repos/operable/cog/issues{/number}","pulls_url":"https://api.github.com/repos/operable/cog/pulls{/number}","milestones_url":"https://api.github.com/repos/operable/cog/milestones{/number}","notifications_url":"https://api.github.com/repos/operable/cog/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/operable/cog/labels{/name}","releases_url":"https://api.github.com/repos/operable/cog/releases{/id}","deployments_url":"https://api.github.com/repos/operable/cog/deployments","created_at":"2016-01-08T19:45:06Z","updated_at":"2016-10-26T00:44:08Z","pushed_at":"2016-10-26T21:42:48Z","git_url":"git://github.com/operable/cog.git","ssh_url":"git@github.com:operable/cog.git","clone_url":"https://github.com/operable/cog.git","svn_url":"https://github.com/operable/cog","homepage":"http://operable.io","size":4054,"stargazers_count":526,"watchers_count":526,"language":"Elixir","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":34,"mirror_url":null,"open_issues_count":94,"forks":34,"open_issues":94,"watchers":526,"default_branch":"master"}},"base":{"label":"operable:master","ref":"master","sha":"0c7732ae182656a589674167354bd1481ef75de5","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":49292670,"name":"cog","full_name":"operable/cog","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/cog","description":"Bringing the power of the command line to chat","fork":false,"url":"https://api.github.com/repos/operable/cog","forks_url":"https://api.github.com/repos/operable/cog/forks","keys_url":"https://api.github.com/repos/operable/cog/keys{/key_id}","collaborators_url":"https://api.github.com/repos/operable/cog/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/operable/cog/teams","hooks_url":"https://api.github.com/repos/operable/cog/hooks","issue_events_url":"https://api.github.com/repos/operable/cog/issues/events{/number}","events_url":"https://api.github.com/repos/operable/cog/events","assignees_url":"https://api.github.com/repos/operable/cog/assignees{/user}","branches_url":"https://api.github.com/repos/operable/cog/branches{/branch}","tags_url":"https://api.github.com/repos/operable/cog/tags","blobs_url":"https://api.github.com/repos/operable/cog/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/operable/cog/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/operable/cog/git/refs{/sha}","trees_url":"https://api.github.com/repos/operable/cog/git/trees{/sha}","statuses_url":"https://api.github.com/repos/operable/cog/statuses/{sha}","languages_url":"https://api.github.com/repos/operable/cog/languages","stargazers_url":"https://api.github.com/repos/operable/cog/stargazers","contributors_url":"https://api.github.com/repos/operable/cog/contributors","subscribers_url":"https://api.github.com/repos/operable/cog/subscribers","subscription_url":"https://api.github.com/repos/operable/cog/subscription","commits_url":"https://api.github.com/repos/operable/cog/commits{/sha}","git_commits_url":"https://api.github.com/repos/operable/cog/git/commits{/sha}","comments_url":"https://api.github.com/repos/operable/cog/comments{/number}","issue_comment_url":"https://api.github.com/repos/operable/cog/issues/comments{/number}","contents_url":"https://api.github.com/repos/operable/cog/contents/{+path}","compare_url":"https://api.github.com/repos/operable/cog/compare/{base}...{head}","merges_url":"https://api.github.com/repos/operable/cog/merges","archive_url":"https://api.github.com/repos/operable/cog/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/operable/cog/downloads","issues_url":"https://api.github.com/repos/operable/cog/issues{/number}","pulls_url":"https://api.github.com/repos/operable/cog/pulls{/number}","milestones_url":"https://api.github.com/repos/operable/cog/milestones{/number}","notifications_url":"https://api.github.com/repos/operable/cog/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/operable/cog/labels{/name}","releases_url":"https://api.github.com/repos/operable/cog/releases{/id}","deployments_url":"https://api.github.com/repos/operable/cog/deployments","created_at":"2016-01-08T19:45:06Z","updated_at":"2016-10-26T00:44:08Z","pushed_at":"2016-10-26T21:42:48Z","git_url":"git://github.com/operable/cog.git","ssh_url":"git@github.com:operable/cog.git","clone_url":"https://github.com/operable/cog.git","svn_url":"https://github.com/operable/cog","homepage":"http://operable.io","size":4054,"stargazers_count":526,"watchers_count":526,"language":"Elixir","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":34,"mirror_url":null,"open_issues_count":94,"forks":34,"open_issues":94,"watchers":526,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/operable/cog/pulls/1101"},"html":{"href":"https://github.com/operable/cog/pull/1101"},"issue":{"href":"https://api.github.com/repos/operable/cog/issues/1101"},"comments":{"href":"https://api.github.com/repos/operable/cog/issues/1101/comments"},"review_comments":{"href":"https://api.github.com/repos/operable/cog/pulls/1101/comments"},"review_comment":{"href":"https://api.github.com/repos/operable/cog/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/operable/cog/pulls/1101/commits"},"statuses":{"href":"https://api.github.com/repos/operable/cog/statuses/ae520361d83f24e4b8a80679fed50eb6d9f5e816"}}}}
{"actor":{"display_login":"christophermaier"}}