{"action":"created","comment":{"url":"https://api.github.com/repos/cfengine/core/pulls/comments/22790804","id":22790804,"diff_hunk":"@@ -2666,14 +2666,23 @@ static FnCallResult FnCallMergeData(EvalContext *ctx, ARG_UNUSED const Policy *p\n     assert(false);\n }\n \n-JsonElement *DefaultTemplateData(const EvalContext *ctx)\n+JsonElement *DefaultTemplateData(const EvalContext *ctx, const char *wantbundle)\n {\n     JsonElement *hash = JsonObjectCreate(30);\n-    JsonElement *classes = JsonObjectCreate(50);\n-    JsonElement *bundles = JsonObjectCreate(50);\n-    JsonObjectAppendObject(hash, \"classes\", classes);\n-    JsonObjectAppendObject(hash, \"vars\", bundles);\n+    JsonElement *classes = NULL;\n+    JsonElement *bundles = NULL;\n \n+    bool want_all_bundles = (NULL == wantbundle);\n+\n+    if (want_all_bundles) // no specific bundle\n+    {\n+        classes = JsonObjectCreate(50);\n+        bundles = JsonObjectCreate(50);\n+        JsonObjectAppendObject(hash, \"classes\", classes);\n+        JsonObjectAppendObject(hash, \"vars\", bundles);\n+    }\n+\n+    if (want_all_bundles) // no specific bundle","path":"libpromises/evalfunction.c","position":null,"original_position":25,"commit_id":"8993aab5d099e44bfb583f74e7f4fdac5a605cfc","original_commit_id":"b9d62c86bd2db93a1aa6a774303c18ce115791d7","user":{"login":"tzz","id":67764,"avatar_url":"https://avatars.githubusercontent.com/u/67764?v=3","gravatar_id":"","url":"https://api.github.com/users/tzz","html_url":"https://github.com/tzz","followers_url":"https://api.github.com/users/tzz/followers","following_url":"https://api.github.com/users/tzz/following{/other_user}","gists_url":"https://api.github.com/users/tzz/gists{/gist_id}","starred_url":"https://api.github.com/users/tzz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tzz/subscriptions","organizations_url":"https://api.github.com/users/tzz/orgs","repos_url":"https://api.github.com/users/tzz/repos","events_url":"https://api.github.com/users/tzz/events{/privacy}","received_events_url":"https://api.github.com/users/tzz/received_events","type":"User","site_admin":false},"body":"OK; consolidated.","created_at":"2015-01-12T13:58:47Z","updated_at":"2015-01-12T13:58:47Z","html_url":"https://github.com/cfengine/core/pull/2074#discussion_r22790804","pull_request_url":"https://api.github.com/repos/cfengine/core/pulls/2074","_links":{"self":{"href":"https://api.github.com/repos/cfengine/core/pulls/comments/22790804"},"html":{"href":"https://github.com/cfengine/core/pull/2074#discussion_r22790804"},"pull_request":{"href":"https://api.github.com/repos/cfengine/core/pulls/2074"}}},"pull_request":{"url":"https://api.github.com/repos/cfengine/core/pulls/2074","id":26559118,"html_url":"https://github.com/cfengine/core/pull/2074","diff_url":"https://github.com/cfengine/core/pull/2074.diff","patch_url":"https://github.com/cfengine/core/pull/2074.patch","issue_url":"https://api.github.com/repos/cfengine/core/issues/2074","number":2074,"state":"open","locked":false,"title":"bundlestate: new function","user":{"login":"tzz","id":67764,"avatar_url":"https://avatars.githubusercontent.com/u/67764?v=3","gravatar_id":"","url":"https://api.github.com/users/tzz","html_url":"https://github.com/tzz","followers_url":"https://api.github.com/users/tzz/followers","following_url":"https://api.github.com/users/tzz/following{/other_user}","gists_url":"https://api.github.com/users/tzz/gists{/gist_id}","starred_url":"https://api.github.com/users/tzz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tzz/subscriptions","organizations_url":"https://api.github.com/users/tzz/orgs","repos_url":"https://api.github.com/users/tzz/repos","events_url":"https://api.github.com/users/tzz/events{/privacy}","received_events_url":"https://api.github.com/users/tzz/received_events","type":"User","site_admin":false},"body":"This is not finished because I'm unable to test on Mac OS X (error: \r\n\r\n```\r\nduplicate symbol _DEFAULT_CONTAINER_CAPACITY in:\r\n    ../libutils/.libs/libutils.a(json.o)\r\n    ../libutils/.libs/libutils.a(json-yaml.o)\r\nld: 1 duplicate symbol for architecture x86_64\r\nclang: error: linker command failed with exit code 1 (use -v to see invocation)\r\n```\r\n)\r\n\r\nThus the acceptance test is not finished and the code may be slightly broken, but I hope the general idea is acceptable: this function allows all the variables of a bundle to be returned in a single data container, formatted correctly (especially nested data structures).","created_at":"2014-12-24T13:40:43Z","updated_at":"2015-01-12T13:58:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b7961f046443bb72b34da1f07ef26ffbb65919bf","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/cfengine/core/pulls/2074/commits","review_comments_url":"https://api.github.com/repos/cfengine/core/pulls/2074/comments","review_comment_url":"https://api.github.com/repos/cfengine/core/pulls/comments/{number}","comments_url":"https://api.github.com/repos/cfengine/core/issues/2074/comments","statuses_url":"https://api.github.com/repos/cfengine/core/statuses/8993aab5d099e44bfb583f74e7f4fdac5a605cfc","head":{"label":"tzz:tzz/feature/bundlestate","ref":"tzz/feature/bundlestate","sha":"8993aab5d099e44bfb583f74e7f4fdac5a605cfc","user":{"login":"tzz","id":67764,"avatar_url":"https://avatars.githubusercontent.com/u/67764?v=3","gravatar_id":"","url":"https://api.github.com/users/tzz","html_url":"https://github.com/tzz","followers_url":"https://api.github.com/users/tzz/followers","following_url":"https://api.github.com/users/tzz/following{/other_user}","gists_url":"https://api.github.com/users/tzz/gists{/gist_id}","starred_url":"https://api.github.com/users/tzz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tzz/subscriptions","organizations_url":"https://api.github.com/users/tzz/orgs","repos_url":"https://api.github.com/users/tzz/repos","events_url":"https://api.github.com/users/tzz/events{/privacy}","received_events_url":"https://api.github.com/users/tzz/received_events","type":"User","site_admin":false},"repo":{"id":5155224,"name":"core","full_name":"tzz/core","owner":{"login":"tzz","id":67764,"avatar_url":"https://avatars.githubusercontent.com/u/67764?v=3","gravatar_id":"","url":"https://api.github.com/users/tzz","html_url":"https://github.com/tzz","followers_url":"https://api.github.com/users/tzz/followers","following_url":"https://api.github.com/users/tzz/following{/other_user}","gists_url":"https://api.github.com/users/tzz/gists{/gist_id}","starred_url":"https://api.github.com/users/tzz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tzz/subscriptions","organizations_url":"https://api.github.com/users/tzz/orgs","repos_url":"https://api.github.com/users/tzz/repos","events_url":"https://api.github.com/users/tzz/events{/privacy}","received_events_url":"https://api.github.com/users/tzz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tzz/core","description":"CFEngine Community","fork":true,"url":"https://api.github.com/repos/tzz/core","forks_url":"https://api.github.com/repos/tzz/core/forks","keys_url":"https://api.github.com/repos/tzz/core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tzz/core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tzz/core/teams","hooks_url":"https://api.github.com/repos/tzz/core/hooks","issue_events_url":"https://api.github.com/repos/tzz/core/issues/events{/number}","events_url":"https://api.github.com/repos/tzz/core/events","assignees_url":"https://api.github.com/repos/tzz/core/assignees{/user}","branches_url":"https://api.github.com/repos/tzz/core/branches{/branch}","tags_url":"https://api.github.com/repos/tzz/core/tags","blobs_url":"https://api.github.com/repos/tzz/core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tzz/core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tzz/core/git/refs{/sha}","trees_url":"https://api.github.com/repos/tzz/core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tzz/core/statuses/{sha}","languages_url":"https://api.github.com/repos/tzz/core/languages","stargazers_url":"https://api.github.com/repos/tzz/core/stargazers","contributors_url":"https://api.github.com/repos/tzz/core/contributors","subscribers_url":"https://api.github.com/repos/tzz/core/subscribers","subscription_url":"https://api.github.com/repos/tzz/core/subscription","commits_url":"https://api.github.com/repos/tzz/core/commits{/sha}","git_commits_url":"https://api.github.com/repos/tzz/core/git/commits{/sha}","comments_url":"https://api.github.com/repos/tzz/core/comments{/number}","issue_comment_url":"https://api.github.com/repos/tzz/core/issues/comments/{number}","contents_url":"https://api.github.com/repos/tzz/core/contents/{+path}","compare_url":"https://api.github.com/repos/tzz/core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tzz/core/merges","archive_url":"https://api.github.com/repos/tzz/core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tzz/core/downloads","issues_url":"https://api.github.com/repos/tzz/core/issues{/number}","pulls_url":"https://api.github.com/repos/tzz/core/pulls{/number}","milestones_url":"https://api.github.com/repos/tzz/core/milestones{/number}","notifications_url":"https://api.github.com/repos/tzz/core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tzz/core/labels{/name}","releases_url":"https://api.github.com/repos/tzz/core/releases{/id}","created_at":"2012-07-23T17:54:47Z","updated_at":"2014-06-24T13:51:12Z","pushed_at":"2015-01-12T13:58:38Z","git_url":"git://github.com/tzz/core.git","ssh_url":"git@github.com:tzz/core.git","clone_url":"https://github.com/tzz/core.git","svn_url":"https://github.com/tzz/core","homepage":"https://cfengine.com/community/","size":51272,"stargazers_count":1,"watchers_count":1,"language":"C","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":1,"default_branch":"master"}},"base":{"label":"cfengine:master","ref":"master","sha":"8fa83a490166c3a5e646a00b97c2394f96c6f696","user":{"login":"cfengine","id":1239823,"avatar_url":"https://avatars.githubusercontent.com/u/1239823?v=3","gravatar_id":"","url":"https://api.github.com/users/cfengine","html_url":"https://github.com/cfengine","followers_url":"https://api.github.com/users/cfengine/followers","following_url":"https://api.github.com/users/cfengine/following{/other_user}","gists_url":"https://api.github.com/users/cfengine/gists{/gist_id}","starred_url":"https://api.github.com/users/cfengine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cfengine/subscriptions","organizations_url":"https://api.github.com/users/cfengine/orgs","repos_url":"https://api.github.com/users/cfengine/repos","events_url":"https://api.github.com/users/cfengine/events{/privacy}","received_events_url":"https://api.github.com/users/cfengine/received_events","type":"Organization","site_admin":false},"repo":{"id":3543548,"name":"core","full_name":"cfengine/core","owner":{"login":"cfengine","id":1239823,"avatar_url":"https://avatars.githubusercontent.com/u/1239823?v=3","gravatar_id":"","url":"https://api.github.com/users/cfengine","html_url":"https://github.com/cfengine","followers_url":"https://api.github.com/users/cfengine/followers","following_url":"https://api.github.com/users/cfengine/following{/other_user}","gists_url":"https://api.github.com/users/cfengine/gists{/gist_id}","starred_url":"https://api.github.com/users/cfengine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cfengine/subscriptions","organizations_url":"https://api.github.com/users/cfengine/orgs","repos_url":"https://api.github.com/users/cfengine/repos","events_url":"https://api.github.com/users/cfengine/events{/privacy}","received_events_url":"https://api.github.com/users/cfengine/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cfengine/core","description":"CFEngine Community","fork":false,"url":"https://api.github.com/repos/cfengine/core","forks_url":"https://api.github.com/repos/cfengine/core/forks","keys_url":"https://api.github.com/repos/cfengine/core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cfengine/core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cfengine/core/teams","hooks_url":"https://api.github.com/repos/cfengine/core/hooks","issue_events_url":"https://api.github.com/repos/cfengine/core/issues/events{/number}","events_url":"https://api.github.com/repos/cfengine/core/events","assignees_url":"https://api.github.com/repos/cfengine/core/assignees{/user}","branches_url":"https://api.github.com/repos/cfengine/core/branches{/branch}","tags_url":"https://api.github.com/repos/cfengine/core/tags","blobs_url":"https://api.github.com/repos/cfengine/core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cfengine/core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cfengine/core/git/refs{/sha}","trees_url":"https://api.github.com/repos/cfengine/core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cfengine/core/statuses/{sha}","languages_url":"https://api.github.com/repos/cfengine/core/languages","stargazers_url":"https://api.github.com/repos/cfengine/core/stargazers","contributors_url":"https://api.github.com/repos/cfengine/core/contributors","subscribers_url":"https://api.github.com/repos/cfengine/core/subscribers","subscription_url":"https://api.github.com/repos/cfengine/core/subscription","commits_url":"https://api.github.com/repos/cfengine/core/commits{/sha}","git_commits_url":"https://api.github.com/repos/cfengine/core/git/commits{/sha}","comments_url":"https://api.github.com/repos/cfengine/core/comments{/number}","issue_comment_url":"https://api.github.com/repos/cfengine/core/issues/comments/{number}","contents_url":"https://api.github.com/repos/cfengine/core/contents/{+path}","compare_url":"https://api.github.com/repos/cfengine/core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cfengine/core/merges","archive_url":"https://api.github.com/repos/cfengine/core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cfengine/core/downloads","issues_url":"https://api.github.com/repos/cfengine/core/issues{/number}","pulls_url":"https://api.github.com/repos/cfengine/core/pulls{/number}","milestones_url":"https://api.github.com/repos/cfengine/core/milestones{/number}","notifications_url":"https://api.github.com/repos/cfengine/core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cfengine/core/labels{/name}","releases_url":"https://api.github.com/repos/cfengine/core/releases{/id}","created_at":"2012-02-25T09:19:05Z","updated_at":"2015-01-12T09:31:59Z","pushed_at":"2015-01-12T08:02:57Z","git_url":"git://github.com/cfengine/core.git","ssh_url":"git@github.com:cfengine/core.git","clone_url":"https://github.com/cfengine/core.git","svn_url":"https://github.com/cfengine/core","homepage":"https://cfengine.com/community/","size":90719,"stargazers_count":203,"watchers_count":203,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":130,"mirror_url":null,"open_issues_count":35,"forks":130,"open_issues":35,"watchers":203,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cfengine/core/pulls/2074"},"html":{"href":"https://github.com/cfengine/core/pull/2074"},"issue":{"href":"https://api.github.com/repos/cfengine/core/issues/2074"},"comments":{"href":"https://api.github.com/repos/cfengine/core/issues/2074/comments"},"review_comments":{"href":"https://api.github.com/repos/cfengine/core/pulls/2074/comments"},"review_comment":{"href":"https://api.github.com/repos/cfengine/core/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/cfengine/core/pulls/2074/commits"},"statuses":{"href":"https://api.github.com/repos/cfengine/core/statuses/8993aab5d099e44bfb583f74e7f4fdac5a605cfc"}}}}