{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla-services/heka/pulls/comments/29540786","id":29540786,"diff_hunk":"@@ -129,12 +130,17 @@ require \"string\"\n local interp = require \"msg_interpolate\"\n \n local name_prefix_orig  = read_config(\"name_prefix\") or \"name\"\n-local name_prefix = name_prefix_orig\n local use_subs\n-if string.find(name_prefix, \"%%{[%w%p]-}\") then\n+if string.find(name_prefix_orig, \"%%{[%w%p]-}\") then\n     use_subs = true\n end\n \n+if name_prefix_orig == \"**none**\" then\n+    name_prefix_orig = \"\"\n+else\n+    name_prefix_orig = name_prefix_orig..\".\"\n+end\n+","path":"sandbox/lua/encoders/schema_influx_write.lua","position":24,"original_position":24,"commit_id":"56d0f493523d8e4a53f840ceb37dfa60cba31dbb","original_commit_id":"56d0f493523d8e4a53f840ceb37dfa60cba31dbb","user":{"login":"rafrombrc","id":151364,"avatar_url":"https://avatars.githubusercontent.com/u/151364?v=3","gravatar_id":"","url":"https://api.github.com/users/rafrombrc","html_url":"https://github.com/rafrombrc","followers_url":"https://api.github.com/users/rafrombrc/followers","following_url":"https://api.github.com/users/rafrombrc/following{/other_user}","gists_url":"https://api.github.com/users/rafrombrc/gists{/gist_id}","starred_url":"https://api.github.com/users/rafrombrc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rafrombrc/subscriptions","organizations_url":"https://api.github.com/users/rafrombrc/orgs","repos_url":"https://api.github.com/users/rafrombrc/repos","events_url":"https://api.github.com/users/rafrombrc/events{/privacy}","received_events_url":"https://api.github.com/users/rafrombrc/received_events","type":"User","site_admin":false},"body":"The two changes above can be replaced by:\r\n\r\n```lua\r\nlocal use_subs\r\nif name_prefix_orig != \"\" then\r\n    if string.find(name_prefix_orig, \"%%{[%w%p]-}\") then\r\n        use_subs = true\r\n    end\r\n    name_prefix_orig = name_prefix_orig..\".\"\r\nend\r\n```\r\n\r\nThen the rest of the code below should work as desired.","created_at":"2015-05-01T23:22:56Z","updated_at":"2015-05-01T23:22:56Z","html_url":"https://github.com/mozilla-services/heka/pull/1510#discussion_r29540786","pull_request_url":"https://api.github.com/repos/mozilla-services/heka/pulls/1510","_links":{"self":{"href":"https://api.github.com/repos/mozilla-services/heka/pulls/comments/29540786"},"html":{"href":"https://github.com/mozilla-services/heka/pull/1510#discussion_r29540786"},"pull_request":{"href":"https://api.github.com/repos/mozilla-services/heka/pulls/1510"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla-services/heka/pulls/1510","id":34561279,"html_url":"https://github.com/mozilla-services/heka/pull/1510","diff_url":"https://github.com/mozilla-services/heka/pull/1510.diff","patch_url":"https://github.com/mozilla-services/heka/pull/1510.patch","issue_url":"https://api.github.com/repos/mozilla-services/heka/issues/1510","number":1510,"state":"open","locked":false,"title":"Allow disabling name_prefix in schema_influx_write","user":{"login":"mattharden","id":2703390,"avatar_url":"https://avatars.githubusercontent.com/u/2703390?v=3","gravatar_id":"","url":"https://api.github.com/users/mattharden","html_url":"https://github.com/mattharden","followers_url":"https://api.github.com/users/mattharden/followers","following_url":"https://api.github.com/users/mattharden/following{/other_user}","gists_url":"https://api.github.com/users/mattharden/gists{/gist_id}","starred_url":"https://api.github.com/users/mattharden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattharden/subscriptions","organizations_url":"https://api.github.com/users/mattharden/orgs","repos_url":"https://api.github.com/users/mattharden/repos","events_url":"https://api.github.com/users/mattharden/events{/privacy}","received_events_url":"https://api.github.com/users/mattharden/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-05-01T19:37:47Z","updated_at":"2015-05-01T23:22:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"84b2c003a3c4c83f2e387dfa67c916b5c4117865","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mozilla-services/heka/pulls/1510/commits","review_comments_url":"https://api.github.com/repos/mozilla-services/heka/pulls/1510/comments","review_comment_url":"https://api.github.com/repos/mozilla-services/heka/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mozilla-services/heka/issues/1510/comments","statuses_url":"https://api.github.com/repos/mozilla-services/heka/statuses/56d0f493523d8e4a53f840ceb37dfa60cba31dbb","head":{"label":"mattharden:dev","ref":"dev","sha":"56d0f493523d8e4a53f840ceb37dfa60cba31dbb","user":{"login":"mattharden","id":2703390,"avatar_url":"https://avatars.githubusercontent.com/u/2703390?v=3","gravatar_id":"","url":"https://api.github.com/users/mattharden","html_url":"https://github.com/mattharden","followers_url":"https://api.github.com/users/mattharden/followers","following_url":"https://api.github.com/users/mattharden/following{/other_user}","gists_url":"https://api.github.com/users/mattharden/gists{/gist_id}","starred_url":"https://api.github.com/users/mattharden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattharden/subscriptions","organizations_url":"https://api.github.com/users/mattharden/orgs","repos_url":"https://api.github.com/users/mattharden/repos","events_url":"https://api.github.com/users/mattharden/events{/privacy}","received_events_url":"https://api.github.com/users/mattharden/received_events","type":"User","site_admin":false},"repo":{"id":34581820,"name":"heka","full_name":"mattharden/heka","owner":{"login":"mattharden","id":2703390,"avatar_url":"https://avatars.githubusercontent.com/u/2703390?v=3","gravatar_id":"","url":"https://api.github.com/users/mattharden","html_url":"https://github.com/mattharden","followers_url":"https://api.github.com/users/mattharden/followers","following_url":"https://api.github.com/users/mattharden/following{/other_user}","gists_url":"https://api.github.com/users/mattharden/gists{/gist_id}","starred_url":"https://api.github.com/users/mattharden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattharden/subscriptions","organizations_url":"https://api.github.com/users/mattharden/orgs","repos_url":"https://api.github.com/users/mattharden/repos","events_url":"https://api.github.com/users/mattharden/events{/privacy}","received_events_url":"https://api.github.com/users/mattharden/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mattharden/heka","description":"Data collection and processing made easy.","fork":true,"url":"https://api.github.com/repos/mattharden/heka","forks_url":"https://api.github.com/repos/mattharden/heka/forks","keys_url":"https://api.github.com/repos/mattharden/heka/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mattharden/heka/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mattharden/heka/teams","hooks_url":"https://api.github.com/repos/mattharden/heka/hooks","issue_events_url":"https://api.github.com/repos/mattharden/heka/issues/events{/number}","events_url":"https://api.github.com/repos/mattharden/heka/events","assignees_url":"https://api.github.com/repos/mattharden/heka/assignees{/user}","branches_url":"https://api.github.com/repos/mattharden/heka/branches{/branch}","tags_url":"https://api.github.com/repos/mattharden/heka/tags","blobs_url":"https://api.github.com/repos/mattharden/heka/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mattharden/heka/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mattharden/heka/git/refs{/sha}","trees_url":"https://api.github.com/repos/mattharden/heka/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mattharden/heka/statuses/{sha}","languages_url":"https://api.github.com/repos/mattharden/heka/languages","stargazers_url":"https://api.github.com/repos/mattharden/heka/stargazers","contributors_url":"https://api.github.com/repos/mattharden/heka/contributors","subscribers_url":"https://api.github.com/repos/mattharden/heka/subscribers","subscription_url":"https://api.github.com/repos/mattharden/heka/subscription","commits_url":"https://api.github.com/repos/mattharden/heka/commits{/sha}","git_commits_url":"https://api.github.com/repos/mattharden/heka/git/commits{/sha}","comments_url":"https://api.github.com/repos/mattharden/heka/comments{/number}","issue_comment_url":"https://api.github.com/repos/mattharden/heka/issues/comments{/number}","contents_url":"https://api.github.com/repos/mattharden/heka/contents/{+path}","compare_url":"https://api.github.com/repos/mattharden/heka/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mattharden/heka/merges","archive_url":"https://api.github.com/repos/mattharden/heka/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mattharden/heka/downloads","issues_url":"https://api.github.com/repos/mattharden/heka/issues{/number}","pulls_url":"https://api.github.com/repos/mattharden/heka/pulls{/number}","milestones_url":"https://api.github.com/repos/mattharden/heka/milestones{/number}","notifications_url":"https://api.github.com/repos/mattharden/heka/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mattharden/heka/labels{/name}","releases_url":"https://api.github.com/repos/mattharden/heka/releases{/id}","created_at":"2015-04-25T19:01:20Z","updated_at":"2015-05-01T19:37:04Z","pushed_at":"2015-05-01T19:37:04Z","git_url":"git://github.com/mattharden/heka.git","ssh_url":"git@github.com:mattharden/heka.git","clone_url":"https://github.com/mattharden/heka.git","svn_url":"https://github.com/mattharden/heka","homepage":"http://hekad.readthedocs.org/","size":10821,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"dev"}},"base":{"label":"mozilla-services:dev","ref":"dev","sha":"b1f318daa010d2479d2ee5b18432c5fc20f05621","user":{"login":"mozilla-services","id":1066228,"avatar_url":"https://avatars.githubusercontent.com/u/1066228?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla-services","html_url":"https://github.com/mozilla-services","followers_url":"https://api.github.com/users/mozilla-services/followers","following_url":"https://api.github.com/users/mozilla-services/following{/other_user}","gists_url":"https://api.github.com/users/mozilla-services/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla-services/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla-services/subscriptions","organizations_url":"https://api.github.com/users/mozilla-services/orgs","repos_url":"https://api.github.com/users/mozilla-services/repos","events_url":"https://api.github.com/users/mozilla-services/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla-services/received_events","type":"Organization","site_admin":false},"repo":{"id":6248212,"name":"heka","full_name":"mozilla-services/heka","owner":{"login":"mozilla-services","id":1066228,"avatar_url":"https://avatars.githubusercontent.com/u/1066228?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla-services","html_url":"https://github.com/mozilla-services","followers_url":"https://api.github.com/users/mozilla-services/followers","following_url":"https://api.github.com/users/mozilla-services/following{/other_user}","gists_url":"https://api.github.com/users/mozilla-services/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla-services/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla-services/subscriptions","organizations_url":"https://api.github.com/users/mozilla-services/orgs","repos_url":"https://api.github.com/users/mozilla-services/repos","events_url":"https://api.github.com/users/mozilla-services/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla-services/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla-services/heka","description":"Data collection and processing made easy.","fork":false,"url":"https://api.github.com/repos/mozilla-services/heka","forks_url":"https://api.github.com/repos/mozilla-services/heka/forks","keys_url":"https://api.github.com/repos/mozilla-services/heka/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla-services/heka/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla-services/heka/teams","hooks_url":"https://api.github.com/repos/mozilla-services/heka/hooks","issue_events_url":"https://api.github.com/repos/mozilla-services/heka/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla-services/heka/events","assignees_url":"https://api.github.com/repos/mozilla-services/heka/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla-services/heka/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla-services/heka/tags","blobs_url":"https://api.github.com/repos/mozilla-services/heka/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla-services/heka/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla-services/heka/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla-services/heka/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla-services/heka/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla-services/heka/languages","stargazers_url":"https://api.github.com/repos/mozilla-services/heka/stargazers","contributors_url":"https://api.github.com/repos/mozilla-services/heka/contributors","subscribers_url":"https://api.github.com/repos/mozilla-services/heka/subscribers","subscription_url":"https://api.github.com/repos/mozilla-services/heka/subscription","commits_url":"https://api.github.com/repos/mozilla-services/heka/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla-services/heka/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla-services/heka/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla-services/heka/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla-services/heka/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla-services/heka/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla-services/heka/merges","archive_url":"https://api.github.com/repos/mozilla-services/heka/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla-services/heka/downloads","issues_url":"https://api.github.com/repos/mozilla-services/heka/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla-services/heka/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla-services/heka/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla-services/heka/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla-services/heka/labels{/name}","releases_url":"https://api.github.com/repos/mozilla-services/heka/releases{/id}","created_at":"2012-10-16T17:20:51Z","updated_at":"2015-05-01T07:08:57Z","pushed_at":"2015-05-01T19:37:47Z","git_url":"git://github.com/mozilla-services/heka.git","ssh_url":"git@github.com:mozilla-services/heka.git","clone_url":"https://github.com/mozilla-services/heka.git","svn_url":"https://github.com/mozilla-services/heka","homepage":"http://hekad.readthedocs.org/","size":21024,"stargazers_count":2151,"watchers_count":2151,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":269,"mirror_url":null,"open_issues_count":123,"forks":269,"open_issues":123,"watchers":2151,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla-services/heka/pulls/1510"},"html":{"href":"https://github.com/mozilla-services/heka/pull/1510"},"issue":{"href":"https://api.github.com/repos/mozilla-services/heka/issues/1510"},"comments":{"href":"https://api.github.com/repos/mozilla-services/heka/issues/1510/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla-services/heka/pulls/1510/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla-services/heka/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mozilla-services/heka/pulls/1510/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla-services/heka/statuses/56d0f493523d8e4a53f840ceb37dfa60cba31dbb"}}}}