{"action":"created","comment":{"url":"https://api.github.com/repos/cfengine/core/pulls/comments/28176848","id":28176848,"diff_hunk":"@@ -1668,6 +1673,193 @@ static FnCallResult FnCallSplayClass(EvalContext *ctx,\n \n /*********************************************************************/\n \n+#ifdef HAVE_LIBCURL\n+static size_t cfengine_curl_write_callback(char *ptr, size_t size, size_t nmemb, void *userdata)\n+{\n+    unsigned int old = BufferSize((Buffer*) userdata);\n+    BufferAppend((Buffer*) userdata, ptr, size*nmemb);\n+    return BufferSize((Buffer*) userdata) - old;\n+}\n+#endif\n+\n+static FnCallResult FnCallCurl(ARG_UNUSED EvalContext *ctx,\n+                               ARG_UNUSED const Policy *policy,\n+                               ARG_UNUSED const FnCall *fp,\n+                               const Rlist *finalargs)\n+{\n+#ifdef HAVE_LIBCURL\n+    if (NULL == CURL_CACHE)\n+    {\n+        CURL_CACHE = JsonObjectCreate(10);\n+    }\n+\n+    char *url = RlistScalarValue(finalargs);\n+    VarRef *ref = ResolveAndQualifyVarName(fp, RlistScalarValue(finalargs->next));\n+    if (!ref)\n+    {\n+        return FnFailure();\n+    }\n+\n+    JsonElement *options = VarRefValueToJson(ctx, fp, ref, NULL, 0);\n+    VarRefDestroy(ref);\n+\n+    if (JsonGetElementType(options) != JSON_ELEMENT_TYPE_CONTAINER ||\n+        JsonGetContainerType(options) != JSON_CONTAINER_TYPE_OBJECT)\n+    {\n+        return FnFailure();\n+    }\n+\n+    Writer *cache_w = StringWriter();\n+    WriterWriteF(cache_w, \"url = %s; options = \", url);\n+    JsonWriteCompact(cache_w, options);\n+    JsonElement *old_result = JsonObjectGetAsObject(CURL_CACHE, StringWriterData(cache_w));\n+\n+    if (NULL != old_result)\n+    {\n+        Log(LOG_LEVEL_VERBOSE, \"%s: found cached request for %s\", fp->name, url);\n+        WriterClose(cache_w);\n+        return (FnCallResult) { FNCALL_SUCCESS, (Rval) { JsonCopy(old_result), RVAL_TYPE_CONTAINER } };\n+    }\n+\n+    if (!CURL_INITIALIZED && curl_global_init(CURL_GLOBAL_DEFAULT) != 0)\n+    {\n+        Log(LOG_LEVEL_ERR, \"%s: libcurl initialization failed, sorry\", fp->name);\n+\n+        WriterClose(cache_w);\n+        return FnFailure();\n+    }\n+\n+    //TODO: register curl_global_cleanup() to run on agent exit\n+    CURL_INITIALIZED = true;\n+\n+    CURL *curl = curl_easy_init();\n+    if (!curl)\n+    {\n+        Log(LOG_LEVEL_ERR, \"%s: libcurl easy_init failed, sorry\", fp->name);\n+\n+        WriterClose(cache_w);\n+        return FnFailure();\n+    }\n+\n+    Buffer *content = BufferNew();\n+    Buffer *headers = BufferNew();\n+    curl_easy_setopt(curl, CURLOPT_URL, url);\n+    // TODO: this uses SIGALRM, is that OK?\n+    curl_easy_setopt(curl, CURLOPT_TIMEOUT, 3L); // set default timeout\n+    curl_easy_setopt(curl, CURLOPT_VERBOSE, 0);\n+    curl_easy_setopt(curl,\n+                     CURLOPT_PROTOCOLS,\n+\n+                     // Allowed protocols\n+                     CURLPROTO_FILE |\n+                     CURLPROTO_FTP |\n+                     CURLPROTO_FTPS |\n+                     CURLPROTO_HTTP |\n+                     CURLPROTO_HTTPS);\n+\n+    curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, cfengine_curl_write_callback);\n+    curl_easy_setopt(curl, CURLOPT_WRITEDATA, content);\n+    curl_easy_setopt(curl, CURLOPT_HEADERFUNCTION, cfengine_curl_write_callback);\n+    curl_easy_setopt(curl, CURLOPT_HEADERDATA, headers);\n+\n+    size_t max_content = 4096;\n+    size_t max_headers = 4096;\n+    JsonIterator iter = JsonIteratorInit(options);\n+    const JsonElement *e;\n+    while ((e = JsonIteratorNextValueByType(&iter, JSON_ELEMENT_TYPE_PRIMITIVE, true)))\n+    {\n+        const char *key = JsonIteratorCurrentKey(&iter);\n+        const char *value = JsonPrimitiveGetAsString(e);\n+\n+        if (0 == strcmp(key, \"curl.timeout\"))\n+        {\n+            Log(LOG_LEVEL_VERBOSE, \"%s: setting timeout to %ld seconds\", fp->name, IntFromString(value));\n+            curl_easy_setopt(curl, CURLOPT_TIMEOUT, IntFromString(value));\n+        }\n+        else if (0 == strcmp(key, \"curl.verbose\"))\n+        {\n+            Log(LOG_LEVEL_VERBOSE, \"%s: setting verbosity to %ld\", fp->name, IntFromString(value));\n+            curl_easy_setopt(curl, CURLOPT_VERBOSE, IntFromString(value));\n+        }\n+        else if (0 == strcmp(key, \"curl.header\"))\n+        {\n+            Log(LOG_LEVEL_VERBOSE, \"%s: setting inline headers to %ld\", fp->name, IntFromString(value));\n+            curl_easy_setopt(curl, CURLOPT_HEADER, IntFromString(value));\n+        }\n+        else if (0 == strcmp(key, \"curl.referer\"))\n+        {\n+            Log(LOG_LEVEL_VERBOSE, \"%s: setting referer to %s\", fp->name, value);\n+            curl_easy_setopt(curl, CURLOPT_REFERER, value);\n+        }\n+        else if (0 == strcmp(key, \"curl.user-agent\"))\n+        {\n+            Log(LOG_LEVEL_VERBOSE, \"%s: setting user agent string to %s\", fp->name, value);\n+            curl_easy_setopt(curl, CURLOPT_USERAGENT, value);\n+        }\n+        else if (0 == strcmp(key, \"cfengine.max_content\"))\n+        {\n+            Log(LOG_LEVEL_VERBOSE, \"%s: setting max contents to %ld\", fp->name, IntFromString(value));\n+            max_content = IntFromString(value);\n+        }\n+        else if (0 == strcmp(key, \"cfengine.max_headers\"))\n+        {\n+            Log(LOG_LEVEL_VERBOSE, \"%s: setting max headers to %ld\", fp->name, IntFromString(value));\n+            max_headers = IntFromString(value);\n+        }\n+    }\n+\n+    JsonElement *options_headers = JsonObjectGetAsArray(options, \"curl.headers\");\n+    iter = JsonIteratorInit(options_headers);\n+    struct curl_slist *header_list = NULL;\n+    while ((e = JsonIteratorNextValueByType(&iter, JSON_ELEMENT_TYPE_PRIMITIVE, true)))\n+    {\n+        header_list = curl_slist_append(header_list, JsonPrimitiveGetAsString(e));","path":"libpromises/evalfunction.c","position":183,"original_position":165,"commit_id":"44138c1fcec8c4b99b1d0e6bb6579075be9e16b6","original_commit_id":"e23c7d7031658b54246c0f6a7f6a27f1b4e0da75","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":"I wouldn't worry about it.  This is a user-provided list of headers, not megabytes of data.","created_at":"2015-04-10T20:17:31Z","updated_at":"2015-04-10T20:17:31Z","html_url":"https://github.com/cfengine/core/pull/2152#discussion_r28176848","pull_request_url":"https://api.github.com/repos/cfengine/core/pulls/2152","_links":{"self":{"href":"https://api.github.com/repos/cfengine/core/pulls/comments/28176848"},"html":{"href":"https://github.com/cfengine/core/pull/2152#discussion_r28176848"},"pull_request":{"href":"https://api.github.com/repos/cfengine/core/pulls/2152"}}},"pull_request":{"url":"https://api.github.com/repos/cfengine/core/pulls/2152","id":32133125,"html_url":"https://github.com/cfengine/core/pull/2152","diff_url":"https://github.com/cfengine/core/pull/2152.diff","patch_url":"https://github.com/cfengine/core/pull/2152.patch","issue_url":"https://api.github.com/repos/cfengine/core/issues/2152","number":2152,"state":"open","locked":false,"title":"Redmine#1815: libcurl integration, curl() 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 implements the function `curl(URL, OPTIONS)`.\r\n\r\nUsage:\r\n```\r\nbundle agent main\r\n{\r\n  vars:\r\n      \"options_str\" string => '\r\n{\r\n  \"cfengine.max_content\": 512,\r\n  \"curl.verbose\": 0,\r\n  \"curl.headers\": [ \"Foo: bar\" ]\r\n}';\r\n      \"options\" data => parsejson($(options_str));\r\n      \"url\" string => \"http://cfengine.com\";\r\n      \"res\" data => curl($(url), options);\r\n      \"out\" string => format(\"%S\", res);\r\n\r\n      \"url2\" string => \"http://nosuchcfenginehost.com\";\r\n      \"res2\" data => curl($(url2), options);\r\n      \"out2\" string => format(\"%S\", res2);\r\n\r\n  reports:\r\n      \"$(this.bundle): from $(url) with options $(options_str) we got $(out)\";\r\n      \"$(this.bundle): from $(url2) with options $(options_str) we got $(out2)\";\r\n}\r\n```\r\n\r\noutput:\r\n\r\n```console\r\nR: main: from http://cfengine.com with options \r\n{\r\n  \"cfengine.max_content\": 512,\r\n  \"curl.verbose\": 0,\r\n  \"curl.headers\": [ \"Foo: bar\" ]\r\n} we got {\"returncode\":200,\"rc\":0,\"success\":true,\"content\":\"\\n<!DOCTYPE html>\\n<!--[if lt IE 7]>\\n<html class=\\\"no-js lt-ie9 lt-ie8 lt-ie7\\\" lang=\\\"en-US\\\" prefix=\\\"og: http://ogp.me/ns#\\\"> <![endif]-->\\n<!--[if IE 7]>\\n<html class=\\\"no-js lt-ie9 lt-ie8\\\" lang=\\\"en-US\\\" prefix=\\\"og: http://ogp.me/ns#\\\"> <![endif]-->\\n<!--[if IE 8]>\\n<html class=\\\"no-js lt-ie9\\\" lang=\\\"en-US\\\" prefix=\\\"og: http://ogp.me/ns#\\\"> <![endif]-->\\n<!--[if gt IE 8]><!-->\\n<html class=\\\"no-js\\\" lang=\\\"en-US\\\" prefix=\\\"og: http://ogp.me/ns#\\\"> <!--<![endif]-->\\n<head>\\n\\n    \\n    <meta charset=\\\"utf-8\\\">\\n\\n    <title>\\n        CFEng\",\"headers\":\"HTTP/1.1 200 OK\\r\\nDate: Fri, 27 Mar 2015 18:13:01 GMT\\r\\nServer: Apache\\r\\nX-Powered-By: PHP/5.3.3\\r\\nX-Pingback: http://cfengine.com/xmlrpc.php\\r\\nConnection: close\\r\\nTransfer-Encoding: chunked\\r\\nContent-Type: text/html; charset=UTF-8\\r\\n\\r\\n\"}\r\n\r\nR: main: from http://nosuchcfenginehost.com with options \r\n{\r\n  \"cfengine.max_content\": 512,\r\n  \"curl.verbose\": 0,\r\n  \"curl.headers\": [ \"Foo: bar\" ]\r\n} we got {\"returncode\":0,\"rc\":6,\"success\":false,\"content\":\"\",\"headers\":\"\"}\r\n```\r\n\r\nThere are several things to note:\r\n\r\n* the options are mostly simple string keys, except for the headers.  When they begin with `curl` they are passed straight on.  When they begin with `cfengine` they control CFEngine's behavior.\r\n* caching is implemented with a simple global cache. The normal caching won't work for this function.  The cache uses the URL plus the JSON dump of the options as a key.\r\n* we never clean up the global resources on exit.  That should happen on agent exit, I think.  But then the initialization should happen on startup too?\r\n* right now it uses signals in `SIGALRM` but we can turn that off\r\n* default timeout is 3 seconds which is pretty short\r\n* the headers are returned as a big string but could be an array... I can't think of a use for that right now.\r\n* no `PUT` and `POST`, no SSL right now\r\n* it could support writing to a file but currently doesn't, and wouldn't be a probe if it did","created_at":"2015-03-27T18:31:37Z","updated_at":"2015-04-10T20:17:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9f5c1427d072608eb43c465034889c5c39f1696a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/cfengine/core/pulls/2152/commits","review_comments_url":"https://api.github.com/repos/cfengine/core/pulls/2152/comments","review_comment_url":"https://api.github.com/repos/cfengine/core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cfengine/core/issues/2152/comments","statuses_url":"https://api.github.com/repos/cfengine/core/statuses/44138c1fcec8c4b99b1d0e6bb6579075be9e16b6","head":{"label":"tzz:feature/redmine1815-curl","ref":"feature/redmine1815-curl","sha":"44138c1fcec8c4b99b1d0e6bb6579075be9e16b6","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-04-10T20:16: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":52062,"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":"1f1b51e79be884af68cf9fd4433f1473a0f1ffbe","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-04-10T09:32:08Z","pushed_at":"2015-04-10T20:16:39Z","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":94165,"stargazers_count":213,"watchers_count":213,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":134,"mirror_url":null,"open_issues_count":27,"forks":134,"open_issues":27,"watchers":213,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cfengine/core/pulls/2152"},"html":{"href":"https://github.com/cfengine/core/pull/2152"},"issue":{"href":"https://api.github.com/repos/cfengine/core/issues/2152"},"comments":{"href":"https://api.github.com/repos/cfengine/core/issues/2152/comments"},"review_comments":{"href":"https://api.github.com/repos/cfengine/core/pulls/2152/comments"},"review_comment":{"href":"https://api.github.com/repos/cfengine/core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cfengine/core/pulls/2152/commits"},"statuses":{"href":"https://api.github.com/repos/cfengine/core/statuses/44138c1fcec8c4b99b1d0e6bb6579075be9e16b6"}}}}