{"action":"opened","number":209,"pull_request":{"url":"https://api.github.com/repos/hashicorp/consul-template/pulls/209","id":30028100,"html_url":"https://github.com/hashicorp/consul-template/pull/209","diff_url":"https://github.com/hashicorp/consul-template/pull/209.diff","patch_url":"https://github.com/hashicorp/consul-template/pull/209.patch","issue_url":"https://api.github.com/repos/hashicorp/consul-template/issues/209","number":209,"state":"open","locked":false,"title":"Add byKey function for grouping the results of tree by its top key","user":{"login":"sethvargo","id":408570,"avatar_url":"https://avatars.githubusercontent.com/u/408570?v=3","gravatar_id":"","url":"https://api.github.com/users/sethvargo","html_url":"https://github.com/sethvargo","followers_url":"https://api.github.com/users/sethvargo/followers","following_url":"https://api.github.com/users/sethvargo/following{/other_user}","gists_url":"https://api.github.com/users/sethvargo/gists{/gist_id}","starred_url":"https://api.github.com/users/sethvargo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sethvargo/subscriptions","organizations_url":"https://api.github.com/users/sethvargo/orgs","repos_url":"https://api.github.com/users/sethvargo/repos","events_url":"https://api.github.com/users/sethvargo/events{/privacy}","received_events_url":"https://api.github.com/users/sethvargo/received_events","type":"User","site_admin":false},"body":"This adds a new `byKey` function for the template that accepts a list of KV pairs (most likely from `tree`) and \"groups\" them by the top-most key. You can see the comment in template_functions.go for a more concrete example of what that might look like.\r\n\r\n- Fixes https://github.com/hashicorp/consul-template/issues/207\r\n\r\n/cc @ryanuber @armon ","created_at":"2015-02-25T21:41:05Z","updated_at":"2015-02-25T21:41:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/hashicorp/consul-template/pulls/209/commits","review_comments_url":"https://api.github.com/repos/hashicorp/consul-template/pulls/209/comments","review_comment_url":"https://api.github.com/repos/hashicorp/consul-template/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hashicorp/consul-template/issues/209/comments","statuses_url":"https://api.github.com/repos/hashicorp/consul-template/statuses/658cf84cb8d76a195758263efec56abd8e831b75","head":{"label":"hashicorp:sethvargo/by_key","ref":"sethvargo/by_key","sha":"658cf84cb8d76a195758263efec56abd8e831b75","user":{"login":"hashicorp","id":761456,"avatar_url":"https://avatars.githubusercontent.com/u/761456?v=3","gravatar_id":"","url":"https://api.github.com/users/hashicorp","html_url":"https://github.com/hashicorp","followers_url":"https://api.github.com/users/hashicorp/followers","following_url":"https://api.github.com/users/hashicorp/following{/other_user}","gists_url":"https://api.github.com/users/hashicorp/gists{/gist_id}","starred_url":"https://api.github.com/users/hashicorp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hashicorp/subscriptions","organizations_url":"https://api.github.com/users/hashicorp/orgs","repos_url":"https://api.github.com/users/hashicorp/repos","events_url":"https://api.github.com/users/hashicorp/events{/privacy}","received_events_url":"https://api.github.com/users/hashicorp/received_events","type":"Organization","site_admin":false},"repo":{"id":24898177,"name":"consul-template","full_name":"hashicorp/consul-template","owner":{"login":"hashicorp","id":761456,"avatar_url":"https://avatars.githubusercontent.com/u/761456?v=3","gravatar_id":"","url":"https://api.github.com/users/hashicorp","html_url":"https://github.com/hashicorp","followers_url":"https://api.github.com/users/hashicorp/followers","following_url":"https://api.github.com/users/hashicorp/following{/other_user}","gists_url":"https://api.github.com/users/hashicorp/gists{/gist_id}","starred_url":"https://api.github.com/users/hashicorp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hashicorp/subscriptions","organizations_url":"https://api.github.com/users/hashicorp/orgs","repos_url":"https://api.github.com/users/hashicorp/repos","events_url":"https://api.github.com/users/hashicorp/events{/privacy}","received_events_url":"https://api.github.com/users/hashicorp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hashicorp/consul-template","description":"Generic template rendering and notifications with Consul","fork":false,"url":"https://api.github.com/repos/hashicorp/consul-template","forks_url":"https://api.github.com/repos/hashicorp/consul-template/forks","keys_url":"https://api.github.com/repos/hashicorp/consul-template/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hashicorp/consul-template/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hashicorp/consul-template/teams","hooks_url":"https://api.github.com/repos/hashicorp/consul-template/hooks","issue_events_url":"https://api.github.com/repos/hashicorp/consul-template/issues/events{/number}","events_url":"https://api.github.com/repos/hashicorp/consul-template/events","assignees_url":"https://api.github.com/repos/hashicorp/consul-template/assignees{/user}","branches_url":"https://api.github.com/repos/hashicorp/consul-template/branches{/branch}","tags_url":"https://api.github.com/repos/hashicorp/consul-template/tags","blobs_url":"https://api.github.com/repos/hashicorp/consul-template/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hashicorp/consul-template/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hashicorp/consul-template/git/refs{/sha}","trees_url":"https://api.github.com/repos/hashicorp/consul-template/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hashicorp/consul-template/statuses/{sha}","languages_url":"https://api.github.com/repos/hashicorp/consul-template/languages","stargazers_url":"https://api.github.com/repos/hashicorp/consul-template/stargazers","contributors_url":"https://api.github.com/repos/hashicorp/consul-template/contributors","subscribers_url":"https://api.github.com/repos/hashicorp/consul-template/subscribers","subscription_url":"https://api.github.com/repos/hashicorp/consul-template/subscription","commits_url":"https://api.github.com/repos/hashicorp/consul-template/commits{/sha}","git_commits_url":"https://api.github.com/repos/hashicorp/consul-template/git/commits{/sha}","comments_url":"https://api.github.com/repos/hashicorp/consul-template/comments{/number}","issue_comment_url":"https://api.github.com/repos/hashicorp/consul-template/issues/comments{/number}","contents_url":"https://api.github.com/repos/hashicorp/consul-template/contents/{+path}","compare_url":"https://api.github.com/repos/hashicorp/consul-template/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hashicorp/consul-template/merges","archive_url":"https://api.github.com/repos/hashicorp/consul-template/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hashicorp/consul-template/downloads","issues_url":"https://api.github.com/repos/hashicorp/consul-template/issues{/number}","pulls_url":"https://api.github.com/repos/hashicorp/consul-template/pulls{/number}","milestones_url":"https://api.github.com/repos/hashicorp/consul-template/milestones{/number}","notifications_url":"https://api.github.com/repos/hashicorp/consul-template/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hashicorp/consul-template/labels{/name}","releases_url":"https://api.github.com/repos/hashicorp/consul-template/releases{/id}","created_at":"2014-10-07T15:52:00Z","updated_at":"2015-02-25T18:43:05Z","pushed_at":"2015-02-25T21:39:47Z","git_url":"git://github.com/hashicorp/consul-template.git","ssh_url":"git@github.com:hashicorp/consul-template.git","clone_url":"https://github.com/hashicorp/consul-template.git","svn_url":"https://github.com/hashicorp/consul-template","homepage":"","size":2803,"stargazers_count":486,"watchers_count":486,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":43,"mirror_url":null,"open_issues_count":5,"forks":43,"open_issues":5,"watchers":486,"default_branch":"master"}},"base":{"label":"hashicorp:master","ref":"master","sha":"dfe51e57a55bb0e529959c0a587017f074fdb059","user":{"login":"hashicorp","id":761456,"avatar_url":"https://avatars.githubusercontent.com/u/761456?v=3","gravatar_id":"","url":"https://api.github.com/users/hashicorp","html_url":"https://github.com/hashicorp","followers_url":"https://api.github.com/users/hashicorp/followers","following_url":"https://api.github.com/users/hashicorp/following{/other_user}","gists_url":"https://api.github.com/users/hashicorp/gists{/gist_id}","starred_url":"https://api.github.com/users/hashicorp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hashicorp/subscriptions","organizations_url":"https://api.github.com/users/hashicorp/orgs","repos_url":"https://api.github.com/users/hashicorp/repos","events_url":"https://api.github.com/users/hashicorp/events{/privacy}","received_events_url":"https://api.github.com/users/hashicorp/received_events","type":"Organization","site_admin":false},"repo":{"id":24898177,"name":"consul-template","full_name":"hashicorp/consul-template","owner":{"login":"hashicorp","id":761456,"avatar_url":"https://avatars.githubusercontent.com/u/761456?v=3","gravatar_id":"","url":"https://api.github.com/users/hashicorp","html_url":"https://github.com/hashicorp","followers_url":"https://api.github.com/users/hashicorp/followers","following_url":"https://api.github.com/users/hashicorp/following{/other_user}","gists_url":"https://api.github.com/users/hashicorp/gists{/gist_id}","starred_url":"https://api.github.com/users/hashicorp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hashicorp/subscriptions","organizations_url":"https://api.github.com/users/hashicorp/orgs","repos_url":"https://api.github.com/users/hashicorp/repos","events_url":"https://api.github.com/users/hashicorp/events{/privacy}","received_events_url":"https://api.github.com/users/hashicorp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hashicorp/consul-template","description":"Generic template rendering and notifications with Consul","fork":false,"url":"https://api.github.com/repos/hashicorp/consul-template","forks_url":"https://api.github.com/repos/hashicorp/consul-template/forks","keys_url":"https://api.github.com/repos/hashicorp/consul-template/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hashicorp/consul-template/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hashicorp/consul-template/teams","hooks_url":"https://api.github.com/repos/hashicorp/consul-template/hooks","issue_events_url":"https://api.github.com/repos/hashicorp/consul-template/issues/events{/number}","events_url":"https://api.github.com/repos/hashicorp/consul-template/events","assignees_url":"https://api.github.com/repos/hashicorp/consul-template/assignees{/user}","branches_url":"https://api.github.com/repos/hashicorp/consul-template/branches{/branch}","tags_url":"https://api.github.com/repos/hashicorp/consul-template/tags","blobs_url":"https://api.github.com/repos/hashicorp/consul-template/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hashicorp/consul-template/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hashicorp/consul-template/git/refs{/sha}","trees_url":"https://api.github.com/repos/hashicorp/consul-template/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hashicorp/consul-template/statuses/{sha}","languages_url":"https://api.github.com/repos/hashicorp/consul-template/languages","stargazers_url":"https://api.github.com/repos/hashicorp/consul-template/stargazers","contributors_url":"https://api.github.com/repos/hashicorp/consul-template/contributors","subscribers_url":"https://api.github.com/repos/hashicorp/consul-template/subscribers","subscription_url":"https://api.github.com/repos/hashicorp/consul-template/subscription","commits_url":"https://api.github.com/repos/hashicorp/consul-template/commits{/sha}","git_commits_url":"https://api.github.com/repos/hashicorp/consul-template/git/commits{/sha}","comments_url":"https://api.github.com/repos/hashicorp/consul-template/comments{/number}","issue_comment_url":"https://api.github.com/repos/hashicorp/consul-template/issues/comments{/number}","contents_url":"https://api.github.com/repos/hashicorp/consul-template/contents/{+path}","compare_url":"https://api.github.com/repos/hashicorp/consul-template/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hashicorp/consul-template/merges","archive_url":"https://api.github.com/repos/hashicorp/consul-template/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hashicorp/consul-template/downloads","issues_url":"https://api.github.com/repos/hashicorp/consul-template/issues{/number}","pulls_url":"https://api.github.com/repos/hashicorp/consul-template/pulls{/number}","milestones_url":"https://api.github.com/repos/hashicorp/consul-template/milestones{/number}","notifications_url":"https://api.github.com/repos/hashicorp/consul-template/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hashicorp/consul-template/labels{/name}","releases_url":"https://api.github.com/repos/hashicorp/consul-template/releases{/id}","created_at":"2014-10-07T15:52:00Z","updated_at":"2015-02-25T18:43:05Z","pushed_at":"2015-02-25T21:39:47Z","git_url":"git://github.com/hashicorp/consul-template.git","ssh_url":"git@github.com:hashicorp/consul-template.git","clone_url":"https://github.com/hashicorp/consul-template.git","svn_url":"https://github.com/hashicorp/consul-template","homepage":"","size":2803,"stargazers_count":486,"watchers_count":486,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":43,"mirror_url":null,"open_issues_count":5,"forks":43,"open_issues":5,"watchers":486,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hashicorp/consul-template/pulls/209"},"html":{"href":"https://github.com/hashicorp/consul-template/pull/209"},"issue":{"href":"https://api.github.com/repos/hashicorp/consul-template/issues/209"},"comments":{"href":"https://api.github.com/repos/hashicorp/consul-template/issues/209/comments"},"review_comments":{"href":"https://api.github.com/repos/hashicorp/consul-template/pulls/209/comments"},"review_comment":{"href":"https://api.github.com/repos/hashicorp/consul-template/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hashicorp/consul-template/pulls/209/commits"},"statuses":{"href":"https://api.github.com/repos/hashicorp/consul-template/statuses/658cf84cb8d76a195758263efec56abd8e831b75"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":80,"deletions":0,"changed_files":4}}