{"action":"created","comment":{"url":"https://api.github.com/repos/puppetlabs/cfacter/pulls/comments/26619553","id":26619553,"diff_hunk":"@@ -225,107 +264,156 @@ namespace facter { namespace execution {\n         // Execute the command, reading the results into a buffer until there's no more to read.\n         // See http://msdn.microsoft.com/en-us/library/windows/desktop/ms682499(v=vs.85).aspx\n         // for details on redirecting input/output.\n-        try {\n-            scoped_resource<HANDLE> stdInRd, stdInWr;\n-            tie(stdInRd, stdInWr) = CreatePipeThrow();\n-            if (!SetHandleInformation(stdInWr, HANDLE_FLAG_INHERIT, 0)) {\n-                throw execution_exception(\"pipe could not be modified\");\n+        scoped_resource<HANDLE> stdInRd, stdInWr;\n+        tie(stdInRd, stdInWr) = CreatePipeThrow();\n+        if (!SetHandleInformation(stdInWr, HANDLE_FLAG_INHERIT, 0)) {\n+            throw execution_exception(\"pipe could not be modified\");\n+        }\n+\n+        scoped_resource<HANDLE> stdOutRd, stdOutWr;\n+        tie(stdOutRd, stdOutWr) = CreatePipeThrow(FILE_FLAG_OVERLAPPED, 0);\n+        if (!SetHandleInformation(stdOutRd, HANDLE_FLAG_INHERIT, 0)) {\n+            throw execution_exception(\"pipe could not be modified\");\n+        }\n+\n+        scoped_resource<HANDLE> stdErrRd, stdErrWr;\n+\n+        // Execute the command with arguments. Prefix arguments with the executable, or quoted arguments won't work.\n+        auto commandLine = arguments ?\n+            boost::nowide::widen(ArgvToCommandLine({ executable }) + \" \" + ArgvToCommandLine(*arguments)) : L\"\";\n+\n+        STARTUPINFO startupInfo = {};\n+        startupInfo.cb = sizeof(startupInfo);\n+        startupInfo.dwFlags |= STARTF_USESTDHANDLES;\n+        startupInfo.hStdInput = stdInRd;\n+        startupInfo.hStdOutput = stdOutWr;\n+        if (options[execution_options::redirect_stderr]) {\n+            startupInfo.hStdError = stdOutWr;\n+        } else {\n+            startupInfo.hStdError = INVALID_HANDLE_VALUE;\n+        }\n+\n+        PROCESS_INFORMATION procInfo = {};\n+\n+        bool success = CreateProcessW(\n+            boost::nowide::widen(executable).c_str(),\n+            &commandLine[0], /* Pass a modifiable string buffer; the contents may be modified */\n+            NULL,           /* Don't allow child process to inherit process handle */\n+            NULL,           /* Don't allow child process to inherit thread handle */\n+            TRUE,           /* Inherit handles from the calling process for communication */\n+            CREATE_NO_WINDOW,\n+            options[execution_options::merge_environment] ? NULL : modified_environ.data(),\n+            NULL,           /* Use existing current directory */\n+            &startupInfo,   /* STARTUPINFO for child process */\n+            &procInfo);     /* PROCESS_INFORMATION pointer for output */\n+\n+        // Release unused pipes, to avoid any races in process completion.\n+        stdInWr.release();\n+        stdInRd.release();\n+        stdOutWr.release();\n+        stdErrWr.release();\n+\n+        if (!success) {\n+            throw execution_exception(\"child process failed to start\");\n+        }\n+        scoped_resource<HANDLE> hProcess(move(procInfo.hProcess), CloseHandle);\n+        scoped_resource<HANDLE> hThread(move(procInfo.hThread), CloseHandle);\n+\n+        // Create a waitable timer if given a timeout\n+        scoped_resource<HANDLE> timer;\n+        if (timeout) {\n+            timer = scoped_resource<HANDLE>(CreateWaitableTimer(nullptr, TRUE, nullptr), CloseHandle);\n+            if (!timer) {\n+                LOG_ERROR(\"failed to create waitable timer: %1%.\", system_error());\n+                throw execution_exception(\"failed to create waitable timer.\");\n             }\n \n-            scoped_resource<HANDLE> stdOutRd, stdOutWr;\n-            tie(stdOutRd, stdOutWr) = CreatePipeThrow();\n-            if (!SetHandleInformation(stdOutRd, HANDLE_FLAG_INHERIT, 0)) {\n-                throw execution_exception(\"pipe could not be modified\");\n+            // \"timeout\" in X intervals in the future (1 interval = 100 ns)\n+            // The negative value indicates relative to the current time\n+            LARGE_INTEGER future;\n+            future.QuadPart = timeout * -10000000ll;\n+            if (!SetWaitableTimer(timer, &future, 0, nullptr, nullptr, FALSE)) {\n+                LOG_ERROR(\"failed to set waitable timer: %1%.\", system_error());\n+                throw execution_exception(\"failed to set waitable timer.\");\n             }\n+        }\n \n-            scoped_resource<HANDLE> stdErrRd, stdErrWr;\n+        // Create an event for handling overlapped I/O\n+        scoped_resource<HANDLE> read_event(CreateEvent(nullptr, TRUE, FALSE, nullptr), CloseHandle);\n+        if (!read_event) {\n+            LOG_ERROR(\"failed to create read event: %1%.\", system_error());\n+            throw execution_exception(\"failed to create read event.\");\n+        }\n \n-            // Execute the command with arguments. Prefix arguments with the executable, or quoted arguments won't work.\n-            auto commandLine = arguments ?\n-                boost::nowide::widen(ArgvToCommandLine({executable}) + \" \" + ArgvToCommandLine(*arguments)) : L\"\";\n+        OVERLAPPED overlapped = {};\n+        overlapped.hEvent = read_event;\n \n-            STARTUPINFO startupInfo = {};\n-            startupInfo.cb = sizeof(startupInfo);\n-            startupInfo.dwFlags |= STARTF_USESTDHANDLES;\n-            startupInfo.hStdInput = stdInRd;\n-            startupInfo.hStdOutput = stdOutWr;\n-            if (options[execution_options::redirect_stderr]) {\n-                startupInfo.hStdError = stdOutWr;\n-            } else {\n-                startupInfo.hStdError = INVALID_HANDLE_VALUE;\n-            }\n+        string result = process_stream(options[execution_options::trim_output], callback, [&](string& buffer) {\n+            buffer.resize(4096);\n \n-            PROCESS_INFORMATION procInfo = {};\n-\n-            bool success = CreateProcessW(\n-                    boost::nowide::widen(executable).c_str(),\n-                    &commandLine[0], /* Pass a modifiable string buffer; the contents may be modified */\n-                    NULL,           /* Don't allow child process to inherit process handle */\n-                    NULL,           /* Don't allow child process to inherit thread handle */\n-                    TRUE,           /* Inherit handles from the calling process for communication */\n-                    CREATE_NO_WINDOW,\n-                    options[execution_options::merge_environment] ? NULL : modified_environ.data(),\n-                    NULL,           /* Use existing current directory */\n-                    &startupInfo,   /* STARTUPINFO for child process */\n-                    &procInfo);     /* PROCESS_INFORMATION pointer for output */\n-\n-            // Release unused pipes, to avoid any races in process completion.\n-            stdInWr.release();\n-            stdInRd.release();\n-            stdOutWr.release();\n-            stdErrWr.release();\n-\n-            if (!success) {\n-                throw execution_exception(\"child process failed to start\");\n+            // Before doing anything, check to see if there's been a timeout\n+            // This is done pre-emptively in case ReadFile never returns ERROR_IO_PENDING\n+            if (timer && WaitForSingleObject(timer, 0) == WAIT_OBJECT_0) {\n+                throw timeout_exception((boost::format(\"command timed out after %1% seconds.\") % timeout).str());\n             }\n-            scoped_resource<HANDLE> hProcess(move(procInfo.hProcess), CloseHandle);\n-            scoped_resource<HANDLE> hThread(move(procInfo.hThread), CloseHandle);\n-\n-            string result = process_stream([&](string &buffer) {\n-                DWORD count;\n-                buffer.resize(4096);\n-                auto readSucceeded = ReadFile(stdOutRd, &buffer[0], buffer.size(), &count, NULL);\n-                if (count != 0 && !readSucceeded) {\n-                    // Not an asynchronous read, so it won't return with pending IO.\n-                    assert(GetLastError() != ERROR_IO_PENDING);\n-                    throw execution_exception(\"failed to read child stdout\");\n-                }\n+\n+            // Read the output pipe\n+            DWORD count = 0;\n+            if (ReadFile(stdOutRd, &buffer[0], buffer.size(), &count, &overlapped)) {\n                 buffer.resize(count);\n-                // Halt if nothing was read.\n                 return count != 0;\n-            }, callback, options);\n-\n-            // Close the read pipe; this may be done before all data is read when the callback returns false\n-            // If the child hasn't sent all the data yet, this may signal SIGPIPE on next write\n-            stdOutRd.release();\n-\n-            auto waitStatus = WaitForSingleObject(hProcess, INFINITE);\n-            if (waitStatus != WAIT_OBJECT_0) {\n-                // Not a mutex, and specified INFINITE timeout, so only WAIT_FAILED should be possible.\n-                assert(waitStatus == WAIT_FAILED);\n-                throw execution_exception(\"error waiting on execution\");\n             }\n \n-            // Now check the process return status.\n-            DWORD exitCode;\n-            if (!GetExitCodeProcess(hProcess, &exitCode)) {\n-                throw execution_exception(\"error retrieving exit code of completed process\");\n+            // Check to see if it's a pending operation\n+            if (GetLastError() != ERROR_IO_PENDING) {\n+                LOG_ERROR(\"failed to read child output: %1%.\", system_error());\n+                throw execution_exception(\"failed to read child process output.\");\n             }\n \n-            if (exitCode != 0) {\n-                // Process signaled finished, so it should not return STILL_ACTIVE.\n-                assert(exitCode != STILL_ACTIVE);\n-                throw child_exit_exception(exitCode, result, \"child process returned non-zero exit status.\");\n+            // Operating is pending, wait for it (optionally with the timer)\n+            HANDLE handles[2] = { read_event, timer };\n+            auto result = WaitForMultipleObjects(timer ? 2 : 1, handles, FALSE, INFINITE);\n+            if (result == WAIT_OBJECT_0) {\n+                if (!GetOverlappedResult(stdOutRd, &overlapped, &count, FALSE)) {\n+                    if (GetLastError() != ERROR_BROKEN_PIPE) {\n+                        LOG_ERROR(\"failed to get asynchronous read result: %1%.\", system_error());\n+                        throw execution_exception(\"failed to get asynchronous read result.\");\n+                    }\n+                    // Treat a broken pipe as nothing left to read\n+                    count = 0;\n+                }\n+                buffer.resize(count);\n+                return count != 0;\n             }\n-            return { true, move(result) };\n-        } catch (child_exit_exception &e) {\n-            if (options[execution_options::throw_on_nonzero_exit]) {\n-                throw;\n-            } else {\n-                LOG_DEBUG(\"%1% (%2%): %3%\", e.what(), e.status_code(), system_error());\n-                return { false, move(e.output()) };\n+            if (result == WAIT_OBJECT_0 + 1) {\n+                // The timer has expired\n+                throw timeout_exception((boost::format(\"command timed out after %1% seconds.\") % timeout).str());","path":"lib/src/execution/windows/execution.cc","position":294,"original_position":294,"commit_id":"49c41615bdf5aa034303fb66b03332f13d701775","original_commit_id":"49c41615bdf5aa034303fb66b03332f13d701775","user":{"login":"peterhuene","id":509666,"avatar_url":"https://avatars.githubusercontent.com/u/509666?v=3","gravatar_id":"","url":"https://api.github.com/users/peterhuene","html_url":"https://github.com/peterhuene","followers_url":"https://api.github.com/users/peterhuene/followers","following_url":"https://api.github.com/users/peterhuene/following{/other_user}","gists_url":"https://api.github.com/users/peterhuene/gists{/gist_id}","starred_url":"https://api.github.com/users/peterhuene/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peterhuene/subscriptions","organizations_url":"https://api.github.com/users/peterhuene/orgs","repos_url":"https://api.github.com/users/peterhuene/repos","events_url":"https://api.github.com/users/peterhuene/events{/privacy}","received_events_url":"https://api.github.com/users/peterhuene/received_events","type":"User","site_admin":false},"body":"Yeah, i'd rather not leave these child processes hanging around after a timeout.  I'll just terminate it; I doubt there will be any fall out.","created_at":"2015-03-17T21:44:00Z","updated_at":"2015-03-17T21:44:00Z","html_url":"https://github.com/puppetlabs/cfacter/pull/335#discussion_r26619553","pull_request_url":"https://api.github.com/repos/puppetlabs/cfacter/pulls/335","_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/cfacter/pulls/comments/26619553"},"html":{"href":"https://github.com/puppetlabs/cfacter/pull/335#discussion_r26619553"},"pull_request":{"href":"https://api.github.com/repos/puppetlabs/cfacter/pulls/335"}}},"pull_request":{"url":"https://api.github.com/repos/puppetlabs/cfacter/pulls/335","id":31272094,"html_url":"https://github.com/puppetlabs/cfacter/pull/335","diff_url":"https://github.com/puppetlabs/cfacter/pull/335.diff","patch_url":"https://github.com/puppetlabs/cfacter/pull/335.patch","issue_url":"https://api.github.com/repos/puppetlabs/cfacter/issues/335","number":335,"state":"open","locked":false,"title":"(CFACT-253) Implement timeout option for command execution.","user":{"login":"peterhuene","id":509666,"avatar_url":"https://avatars.githubusercontent.com/u/509666?v=3","gravatar_id":"","url":"https://api.github.com/users/peterhuene","html_url":"https://github.com/peterhuene","followers_url":"https://api.github.com/users/peterhuene/followers","following_url":"https://api.github.com/users/peterhuene/following{/other_user}","gists_url":"https://api.github.com/users/peterhuene/gists{/gist_id}","starred_url":"https://api.github.com/users/peterhuene/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peterhuene/subscriptions","organizations_url":"https://api.github.com/users/peterhuene/orgs","repos_url":"https://api.github.com/users/peterhuene/repos","events_url":"https://api.github.com/users/peterhuene/events{/privacy}","received_events_url":"https://api.github.com/users/peterhuene/received_events","type":"User","site_admin":false},"body":"Implementing a timeout for command execution on Windows and POSIX operating systems.\r\n\r\nThis feature will enable us to timeout command executions that are known to hang Facter (such as `prtdiag` on Solaris).","created_at":"2015-03-16T18:43:08Z","updated_at":"2015-03-17T21:44:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"eeceba81b904787a0ec00faee51a94431e43f647","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/puppetlabs/cfacter/pulls/335/commits","review_comments_url":"https://api.github.com/repos/puppetlabs/cfacter/pulls/335/comments","review_comment_url":"https://api.github.com/repos/puppetlabs/cfacter/pulls/comments{/number}","comments_url":"https://api.github.com/repos/puppetlabs/cfacter/issues/335/comments","statuses_url":"https://api.github.com/repos/puppetlabs/cfacter/statuses/49c41615bdf5aa034303fb66b03332f13d701775","head":{"label":"peterhuene:feature/timeout","ref":"feature/timeout","sha":"49c41615bdf5aa034303fb66b03332f13d701775","user":{"login":"peterhuene","id":509666,"avatar_url":"https://avatars.githubusercontent.com/u/509666?v=3","gravatar_id":"","url":"https://api.github.com/users/peterhuene","html_url":"https://github.com/peterhuene","followers_url":"https://api.github.com/users/peterhuene/followers","following_url":"https://api.github.com/users/peterhuene/following{/other_user}","gists_url":"https://api.github.com/users/peterhuene/gists{/gist_id}","starred_url":"https://api.github.com/users/peterhuene/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peterhuene/subscriptions","organizations_url":"https://api.github.com/users/peterhuene/orgs","repos_url":"https://api.github.com/users/peterhuene/repos","events_url":"https://api.github.com/users/peterhuene/events{/privacy}","received_events_url":"https://api.github.com/users/peterhuene/received_events","type":"User","site_admin":false},"repo":{"id":19052426,"name":"cfacter","full_name":"peterhuene/cfacter","owner":{"login":"peterhuene","id":509666,"avatar_url":"https://avatars.githubusercontent.com/u/509666?v=3","gravatar_id":"","url":"https://api.github.com/users/peterhuene","html_url":"https://github.com/peterhuene","followers_url":"https://api.github.com/users/peterhuene/followers","following_url":"https://api.github.com/users/peterhuene/following{/other_user}","gists_url":"https://api.github.com/users/peterhuene/gists{/gist_id}","starred_url":"https://api.github.com/users/peterhuene/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peterhuene/subscriptions","organizations_url":"https://api.github.com/users/peterhuene/orgs","repos_url":"https://api.github.com/users/peterhuene/repos","events_url":"https://api.github.com/users/peterhuene/events{/privacy}","received_events_url":"https://api.github.com/users/peterhuene/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/peterhuene/cfacter","description":"","fork":true,"url":"https://api.github.com/repos/peterhuene/cfacter","forks_url":"https://api.github.com/repos/peterhuene/cfacter/forks","keys_url":"https://api.github.com/repos/peterhuene/cfacter/keys{/key_id}","collaborators_url":"https://api.github.com/repos/peterhuene/cfacter/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/peterhuene/cfacter/teams","hooks_url":"https://api.github.com/repos/peterhuene/cfacter/hooks","issue_events_url":"https://api.github.com/repos/peterhuene/cfacter/issues/events{/number}","events_url":"https://api.github.com/repos/peterhuene/cfacter/events","assignees_url":"https://api.github.com/repos/peterhuene/cfacter/assignees{/user}","branches_url":"https://api.github.com/repos/peterhuene/cfacter/branches{/branch}","tags_url":"https://api.github.com/repos/peterhuene/cfacter/tags","blobs_url":"https://api.github.com/repos/peterhuene/cfacter/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/peterhuene/cfacter/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/peterhuene/cfacter/git/refs{/sha}","trees_url":"https://api.github.com/repos/peterhuene/cfacter/git/trees{/sha}","statuses_url":"https://api.github.com/repos/peterhuene/cfacter/statuses/{sha}","languages_url":"https://api.github.com/repos/peterhuene/cfacter/languages","stargazers_url":"https://api.github.com/repos/peterhuene/cfacter/stargazers","contributors_url":"https://api.github.com/repos/peterhuene/cfacter/contributors","subscribers_url":"https://api.github.com/repos/peterhuene/cfacter/subscribers","subscription_url":"https://api.github.com/repos/peterhuene/cfacter/subscription","commits_url":"https://api.github.com/repos/peterhuene/cfacter/commits{/sha}","git_commits_url":"https://api.github.com/repos/peterhuene/cfacter/git/commits{/sha}","comments_url":"https://api.github.com/repos/peterhuene/cfacter/comments{/number}","issue_comment_url":"https://api.github.com/repos/peterhuene/cfacter/issues/comments{/number}","contents_url":"https://api.github.com/repos/peterhuene/cfacter/contents/{+path}","compare_url":"https://api.github.com/repos/peterhuene/cfacter/compare/{base}...{head}","merges_url":"https://api.github.com/repos/peterhuene/cfacter/merges","archive_url":"https://api.github.com/repos/peterhuene/cfacter/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/peterhuene/cfacter/downloads","issues_url":"https://api.github.com/repos/peterhuene/cfacter/issues{/number}","pulls_url":"https://api.github.com/repos/peterhuene/cfacter/pulls{/number}","milestones_url":"https://api.github.com/repos/peterhuene/cfacter/milestones{/number}","notifications_url":"https://api.github.com/repos/peterhuene/cfacter/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/peterhuene/cfacter/labels{/name}","releases_url":"https://api.github.com/repos/peterhuene/cfacter/releases{/id}","created_at":"2014-04-23T01:16:12Z","updated_at":"2015-03-10T20:13:08Z","pushed_at":"2015-03-17T20:55:47Z","git_url":"git://github.com/peterhuene/cfacter.git","ssh_url":"git@github.com:peterhuene/cfacter.git","clone_url":"https://github.com/peterhuene/cfacter.git","svn_url":"https://github.com/peterhuene/cfacter","homepage":null,"size":7214,"stargazers_count":0,"watchers_count":0,"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":0,"default_branch":"master"}},"base":{"label":"puppetlabs:master","ref":"master","sha":"25c460270560a2bca163faeddfe63319803b11f0","user":{"login":"puppetlabs","id":234268,"avatar_url":"https://avatars.githubusercontent.com/u/234268?v=3","gravatar_id":"","url":"https://api.github.com/users/puppetlabs","html_url":"https://github.com/puppetlabs","followers_url":"https://api.github.com/users/puppetlabs/followers","following_url":"https://api.github.com/users/puppetlabs/following{/other_user}","gists_url":"https://api.github.com/users/puppetlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/puppetlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/puppetlabs/subscriptions","organizations_url":"https://api.github.com/users/puppetlabs/orgs","repos_url":"https://api.github.com/users/puppetlabs/repos","events_url":"https://api.github.com/users/puppetlabs/events{/privacy}","received_events_url":"https://api.github.com/users/puppetlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":17602228,"name":"cfacter","full_name":"puppetlabs/cfacter","owner":{"login":"puppetlabs","id":234268,"avatar_url":"https://avatars.githubusercontent.com/u/234268?v=3","gravatar_id":"","url":"https://api.github.com/users/puppetlabs","html_url":"https://github.com/puppetlabs","followers_url":"https://api.github.com/users/puppetlabs/followers","following_url":"https://api.github.com/users/puppetlabs/following{/other_user}","gists_url":"https://api.github.com/users/puppetlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/puppetlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/puppetlabs/subscriptions","organizations_url":"https://api.github.com/users/puppetlabs/orgs","repos_url":"https://api.github.com/users/puppetlabs/repos","events_url":"https://api.github.com/users/puppetlabs/events{/privacy}","received_events_url":"https://api.github.com/users/puppetlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/puppetlabs/cfacter","description":"Collect and display system facts from a C++ library.","fork":false,"url":"https://api.github.com/repos/puppetlabs/cfacter","forks_url":"https://api.github.com/repos/puppetlabs/cfacter/forks","keys_url":"https://api.github.com/repos/puppetlabs/cfacter/keys{/key_id}","collaborators_url":"https://api.github.com/repos/puppetlabs/cfacter/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/puppetlabs/cfacter/teams","hooks_url":"https://api.github.com/repos/puppetlabs/cfacter/hooks","issue_events_url":"https://api.github.com/repos/puppetlabs/cfacter/issues/events{/number}","events_url":"https://api.github.com/repos/puppetlabs/cfacter/events","assignees_url":"https://api.github.com/repos/puppetlabs/cfacter/assignees{/user}","branches_url":"https://api.github.com/repos/puppetlabs/cfacter/branches{/branch}","tags_url":"https://api.github.com/repos/puppetlabs/cfacter/tags","blobs_url":"https://api.github.com/repos/puppetlabs/cfacter/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/puppetlabs/cfacter/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/puppetlabs/cfacter/git/refs{/sha}","trees_url":"https://api.github.com/repos/puppetlabs/cfacter/git/trees{/sha}","statuses_url":"https://api.github.com/repos/puppetlabs/cfacter/statuses/{sha}","languages_url":"https://api.github.com/repos/puppetlabs/cfacter/languages","stargazers_url":"https://api.github.com/repos/puppetlabs/cfacter/stargazers","contributors_url":"https://api.github.com/repos/puppetlabs/cfacter/contributors","subscribers_url":"https://api.github.com/repos/puppetlabs/cfacter/subscribers","subscription_url":"https://api.github.com/repos/puppetlabs/cfacter/subscription","commits_url":"https://api.github.com/repos/puppetlabs/cfacter/commits{/sha}","git_commits_url":"https://api.github.com/repos/puppetlabs/cfacter/git/commits{/sha}","comments_url":"https://api.github.com/repos/puppetlabs/cfacter/comments{/number}","issue_comment_url":"https://api.github.com/repos/puppetlabs/cfacter/issues/comments{/number}","contents_url":"https://api.github.com/repos/puppetlabs/cfacter/contents/{+path}","compare_url":"https://api.github.com/repos/puppetlabs/cfacter/compare/{base}...{head}","merges_url":"https://api.github.com/repos/puppetlabs/cfacter/merges","archive_url":"https://api.github.com/repos/puppetlabs/cfacter/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/puppetlabs/cfacter/downloads","issues_url":"https://api.github.com/repos/puppetlabs/cfacter/issues{/number}","pulls_url":"https://api.github.com/repos/puppetlabs/cfacter/pulls{/number}","milestones_url":"https://api.github.com/repos/puppetlabs/cfacter/milestones{/number}","notifications_url":"https://api.github.com/repos/puppetlabs/cfacter/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/puppetlabs/cfacter/labels{/name}","releases_url":"https://api.github.com/repos/puppetlabs/cfacter/releases{/id}","created_at":"2014-03-10T17:48:17Z","updated_at":"2015-03-17T20:39:08Z","pushed_at":"2015-03-17T20:39:08Z","git_url":"git://github.com/puppetlabs/cfacter.git","ssh_url":"git@github.com:puppetlabs/cfacter.git","clone_url":"https://github.com/puppetlabs/cfacter.git","svn_url":"https://github.com/puppetlabs/cfacter","homepage":"https://tickets.puppetlabs.com/browse/CFACT","size":81122,"stargazers_count":27,"watchers_count":27,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":32,"mirror_url":null,"open_issues_count":2,"forks":32,"open_issues":2,"watchers":27,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/cfacter/pulls/335"},"html":{"href":"https://github.com/puppetlabs/cfacter/pull/335"},"issue":{"href":"https://api.github.com/repos/puppetlabs/cfacter/issues/335"},"comments":{"href":"https://api.github.com/repos/puppetlabs/cfacter/issues/335/comments"},"review_comments":{"href":"https://api.github.com/repos/puppetlabs/cfacter/pulls/335/comments"},"review_comment":{"href":"https://api.github.com/repos/puppetlabs/cfacter/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/puppetlabs/cfacter/pulls/335/commits"},"statuses":{"href":"https://api.github.com/repos/puppetlabs/cfacter/statuses/49c41615bdf5aa034303fb66b03332f13d701775"}}}}