{"action":"created","issue":{"url":"https://api.github.com/repos/Cimpress-MCP/git2consul/issues/74","repository_url":"https://api.github.com/repos/Cimpress-MCP/git2consul","labels_url":"https://api.github.com/repos/Cimpress-MCP/git2consul/issues/74/labels{/name}","comments_url":"https://api.github.com/repos/Cimpress-MCP/git2consul/issues/74/comments","events_url":"https://api.github.com/repos/Cimpress-MCP/git2consul/issues/74/events","html_url":"https://github.com/Cimpress-MCP/git2consul/pull/74","id":147506930,"number":74,"title":"Added include_file_name option","user":{"login":"alexgervais","id":188509,"avatar_url":"https://avatars.githubusercontent.com/u/188509?v=3","gravatar_id":"","url":"https://api.github.com/users/alexgervais","html_url":"https://github.com/alexgervais","followers_url":"https://api.github.com/users/alexgervais/followers","following_url":"https://api.github.com/users/alexgervais/following{/other_user}","gists_url":"https://api.github.com/users/alexgervais/gists{/gist_id}","starred_url":"https://api.github.com/users/alexgervais/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexgervais/subscriptions","organizations_url":"https://api.github.com/users/alexgervais/orgs","repos_url":"https://api.github.com/users/alexgervais/repos","events_url":"https://api.github.com/users/alexgervais/events{/privacy}","received_events_url":"https://api.github.com/users/alexgervais/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-04-11T18:02:12Z","updated_at":"2016-04-11T18:14:59Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Cimpress-MCP/git2consul/pulls/74","html_url":"https://github.com/Cimpress-MCP/git2consul/pull/74","diff_url":"https://github.com/Cimpress-MCP/git2consul/pull/74.diff","patch_url":"https://github.com/Cimpress-MCP/git2consul/pull/74.patch"},"body":"Added `include_file_name` option to include or not the filename in the consul key prefix, behaving much like `include_branch_name`"},"comment":{"url":"https://api.github.com/repos/Cimpress-MCP/git2consul/issues/comments/208483159","html_url":"https://github.com/Cimpress-MCP/git2consul/pull/74#issuecomment-208483159","issue_url":"https://api.github.com/repos/Cimpress-MCP/git2consul/issues/74","id":208483159,"user":{"login":"cleung2010","id":1883212,"avatar_url":"https://avatars.githubusercontent.com/u/1883212?v=3","gravatar_id":"","url":"https://api.github.com/users/cleung2010","html_url":"https://github.com/cleung2010","followers_url":"https://api.github.com/users/cleung2010/followers","following_url":"https://api.github.com/users/cleung2010/following{/other_user}","gists_url":"https://api.github.com/users/cleung2010/gists{/gist_id}","starred_url":"https://api.github.com/users/cleung2010/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cleung2010/subscriptions","organizations_url":"https://api.github.com/users/cleung2010/orgs","repos_url":"https://api.github.com/users/cleung2010/repos","events_url":"https://api.github.com/users/cleung2010/events{/privacy}","received_events_url":"https://api.github.com/users/cleung2010/received_events","type":"User","site_admin":false},"created_at":"2016-04-11T18:14:59Z","updated_at":"2016-04-11T18:14:59Z","body":"Can you add some test cases for this? \r\n\r\nI don't think it handles the case where the full path is just the filename with no prefix (not sure if that case exists though).\r\n\r\n```javascript\r\nvar file = \"/foo\"\r\nvar path = file.substr(0, file.lastIndexOf('/'))\r\nconsole.log(path) // Returns empty\r\n```"}}