{"action":"created","comment":{"url":"https://api.github.com/repos/facebook/osquery/pulls/comments/211283546","pull_request_review_id":147670924,"id":211283546,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMTI4MzU0Ng==","diff_hunk":"@@ -0,0 +1,65 @@\n+/**\n+ *  Copyright (c) 2014-present, Facebook, Inc.\n+ *  All rights reserved.\n+ *\n+ *  This source code is licensed under both the Apache 2.0 license (found in the\n+ *  LICENSE file in the root directory of this source tree) and the GPLv2 (found\n+ *  in the COPYING file in the root directory of this source tree).\n+ *  You may select, at your option, one of the above-listed licenses.\n+ */\n+\n+#pragma once\n+\n+#include <utility>\n+\n+namespace osquery {\n+\n+/**\n+ * The RAII based scoupe guard class.","path":"osquery/core/scope_guard.h","position":18,"original_position":18,"commit_id":"6cbae8e044edbabb5e6a1f411d223e4982adfb3a","original_commit_id":"6cbae8e044edbabb5e6a1f411d223e4982adfb3a","user":{"login":"fmanco","id":1463347,"node_id":"MDQ6VXNlcjE0NjMzNDc=","avatar_url":"https://avatars3.githubusercontent.com/u/1463347?v=4","gravatar_id":"","url":"https://api.github.com/users/fmanco","html_url":"https://github.com/fmanco","followers_url":"https://api.github.com/users/fmanco/followers","following_url":"https://api.github.com/users/fmanco/following{/other_user}","gists_url":"https://api.github.com/users/fmanco/gists{/gist_id}","starred_url":"https://api.github.com/users/fmanco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fmanco/subscriptions","organizations_url":"https://api.github.com/users/fmanco/orgs","repos_url":"https://api.github.com/users/fmanco/repos","events_url":"https://api.github.com/users/fmanco/events{/privacy}","received_events_url":"https://api.github.com/users/fmanco/received_events","type":"User","site_admin":false},"body":"typo: scoupe","created_at":"2018-08-20T14:31:29Z","updated_at":"2018-08-20T14:42:44Z","html_url":"https://github.com/facebook/osquery/pull/4980#discussion_r211283546","pull_request_url":"https://api.github.com/repos/facebook/osquery/pulls/4980","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/facebook/osquery/pulls/comments/211283546"},"html":{"href":"https://github.com/facebook/osquery/pull/4980#discussion_r211283546"},"pull_request":{"href":"https://api.github.com/repos/facebook/osquery/pulls/4980"}}},"pull_request":{"url":"https://api.github.com/repos/facebook/osquery/pulls/4980","id":209104881,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA5MTA0ODgx","html_url":"https://github.com/facebook/osquery/pull/4980","diff_url":"https://github.com/facebook/osquery/pull/4980.diff","patch_url":"https://github.com/facebook/osquery/pull/4980.patch","issue_url":"https://api.github.com/repos/facebook/osquery/issues/4980","number":4980,"state":"open","locked":false,"title":"RAII based scope guard class","user":{"login":"akindyakov","id":2223470,"node_id":"MDQ6VXNlcjIyMjM0NzA=","avatar_url":"https://avatars1.githubusercontent.com/u/2223470?v=4","gravatar_id":"","url":"https://api.github.com/users/akindyakov","html_url":"https://github.com/akindyakov","followers_url":"https://api.github.com/users/akindyakov/followers","following_url":"https://api.github.com/users/akindyakov/following{/other_user}","gists_url":"https://api.github.com/users/akindyakov/gists{/gist_id}","starred_url":"https://api.github.com/users/akindyakov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akindyakov/subscriptions","organizations_url":"https://api.github.com/users/akindyakov/orgs","repos_url":"https://api.github.com/users/akindyakov/repos","events_url":"https://api.github.com/users/akindyakov/events{/privacy}","received_events_url":"https://api.github.com/users/akindyakov/received_events","type":"User","site_admin":false},"body":"##    RAII based scope guard class\r\nTo be sure that resources are always released/removed/closed/verified/stoped in face of multiple return statements from the function.\r\n\r\nExample:\r\n```c++\r\n    {\r\n      auto const manager = ScopeGuard<>::create(\r\n        [&file_path]() noexcept { fs::remove(file_path); }\r\n      );\r\n      ...\r\n    }\r\n```\r\n","created_at":"2018-08-17T10:16:29Z","updated_at":"2018-08-20T14:42:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"85f1b19954eaf1b0c96392b7b09276b71c4929d9","assignee":{"login":"akindyakov","id":2223470,"node_id":"MDQ6VXNlcjIyMjM0NzA=","avatar_url":"https://avatars1.githubusercontent.com/u/2223470?v=4","gravatar_id":"","url":"https://api.github.com/users/akindyakov","html_url":"https://github.com/akindyakov","followers_url":"https://api.github.com/users/akindyakov/followers","following_url":"https://api.github.com/users/akindyakov/following{/other_user}","gists_url":"https://api.github.com/users/akindyakov/gists{/gist_id}","starred_url":"https://api.github.com/users/akindyakov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akindyakov/subscriptions","organizations_url":"https://api.github.com/users/akindyakov/orgs","repos_url":"https://api.github.com/users/akindyakov/repos","events_url":"https://api.github.com/users/akindyakov/events{/privacy}","received_events_url":"https://api.github.com/users/akindyakov/received_events","type":"User","site_admin":false},"assignees":[{"login":"akindyakov","id":2223470,"node_id":"MDQ6VXNlcjIyMjM0NzA=","avatar_url":"https://avatars1.githubusercontent.com/u/2223470?v=4","gravatar_id":"","url":"https://api.github.com/users/akindyakov","html_url":"https://github.com/akindyakov","followers_url":"https://api.github.com/users/akindyakov/followers","following_url":"https://api.github.com/users/akindyakov/following{/other_user}","gists_url":"https://api.github.com/users/akindyakov/gists{/gist_id}","starred_url":"https://api.github.com/users/akindyakov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akindyakov/subscriptions","organizations_url":"https://api.github.com/users/akindyakov/orgs","repos_url":"https://api.github.com/users/akindyakov/repos","events_url":"https://api.github.com/users/akindyakov/events{/privacy}","received_events_url":"https://api.github.com/users/akindyakov/received_events","type":"User","site_admin":false}],"requested_reviewers":[{"login":"mkareta","id":1892895,"node_id":"MDQ6VXNlcjE4OTI4OTU=","avatar_url":"https://avatars2.githubusercontent.com/u/1892895?v=4","gravatar_id":"","url":"https://api.github.com/users/mkareta","html_url":"https://github.com/mkareta","followers_url":"https://api.github.com/users/mkareta/followers","following_url":"https://api.github.com/users/mkareta/following{/other_user}","gists_url":"https://api.github.com/users/mkareta/gists{/gist_id}","starred_url":"https://api.github.com/users/mkareta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkareta/subscriptions","organizations_url":"https://api.github.com/users/mkareta/orgs","repos_url":"https://api.github.com/users/mkareta/repos","events_url":"https://api.github.com/users/mkareta/events{/privacy}","received_events_url":"https://api.github.com/users/mkareta/received_events","type":"User","site_admin":false},{"login":"guliashvili","id":4594711,"node_id":"MDQ6VXNlcjQ1OTQ3MTE=","avatar_url":"https://avatars3.githubusercontent.com/u/4594711?v=4","gravatar_id":"","url":"https://api.github.com/users/guliashvili","html_url":"https://github.com/guliashvili","followers_url":"https://api.github.com/users/guliashvili/followers","following_url":"https://api.github.com/users/guliashvili/following{/other_user}","gists_url":"https://api.github.com/users/guliashvili/gists{/gist_id}","starred_url":"https://api.github.com/users/guliashvili/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guliashvili/subscriptions","organizations_url":"https://api.github.com/users/guliashvili/orgs","repos_url":"https://api.github.com/users/guliashvili/repos","events_url":"https://api.github.com/users/guliashvili/events{/privacy}","received_events_url":"https://api.github.com/users/guliashvili/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":196858822,"node_id":"MDU6TGFiZWwxOTY4NTg4MjI=","url":"https://api.github.com/repos/facebook/osquery/labels/cla%20signed","name":"cla signed","color":"ededed","default":false},{"id":117911473,"node_id":"MDU6TGFiZWwxMTc5MTE0NzM=","url":"https://api.github.com/repos/facebook/osquery/labels/feature","name":"feature","color":"bfe5bf","default":false},{"id":119503507,"node_id":"MDU6TGFiZWwxMTk1MDM1MDc=","url":"https://api.github.com/repos/facebook/osquery/labels/ready%20for%20review","name":"ready for review","color":"f7c6c7","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/facebook/osquery/pulls/4980/commits","review_comments_url":"https://api.github.com/repos/facebook/osquery/pulls/4980/comments","review_comment_url":"https://api.github.com/repos/facebook/osquery/pulls/comments{/number}","comments_url":"https://api.github.com/repos/facebook/osquery/issues/4980/comments","statuses_url":"https://api.github.com/repos/facebook/osquery/statuses/6cbae8e044edbabb5e6a1f411d223e4982adfb3a","head":{"label":"akindyakov:feature_resource_manager","ref":"feature_resource_manager","sha":"6cbae8e044edbabb5e6a1f411d223e4982adfb3a","user":{"login":"akindyakov","id":2223470,"node_id":"MDQ6VXNlcjIyMjM0NzA=","avatar_url":"https://avatars1.githubusercontent.com/u/2223470?v=4","gravatar_id":"","url":"https://api.github.com/users/akindyakov","html_url":"https://github.com/akindyakov","followers_url":"https://api.github.com/users/akindyakov/followers","following_url":"https://api.github.com/users/akindyakov/following{/other_user}","gists_url":"https://api.github.com/users/akindyakov/gists{/gist_id}","starred_url":"https://api.github.com/users/akindyakov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akindyakov/subscriptions","organizations_url":"https://api.github.com/users/akindyakov/orgs","repos_url":"https://api.github.com/users/akindyakov/repos","events_url":"https://api.github.com/users/akindyakov/events{/privacy}","received_events_url":"https://api.github.com/users/akindyakov/received_events","type":"User","site_admin":false},"repo":{"id":131700076,"node_id":"MDEwOlJlcG9zaXRvcnkxMzE3MDAwNzY=","name":"osquery","full_name":"akindyakov/osquery","owner":{"login":"akindyakov","id":2223470,"node_id":"MDQ6VXNlcjIyMjM0NzA=","avatar_url":"https://avatars1.githubusercontent.com/u/2223470?v=4","gravatar_id":"","url":"https://api.github.com/users/akindyakov","html_url":"https://github.com/akindyakov","followers_url":"https://api.github.com/users/akindyakov/followers","following_url":"https://api.github.com/users/akindyakov/following{/other_user}","gists_url":"https://api.github.com/users/akindyakov/gists{/gist_id}","starred_url":"https://api.github.com/users/akindyakov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akindyakov/subscriptions","organizations_url":"https://api.github.com/users/akindyakov/orgs","repos_url":"https://api.github.com/users/akindyakov/repos","events_url":"https://api.github.com/users/akindyakov/events{/privacy}","received_events_url":"https://api.github.com/users/akindyakov/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/akindyakov/osquery","description":"SQL powered operating system instrumentation, monitoring, and analytics.","fork":true,"url":"https://api.github.com/repos/akindyakov/osquery","forks_url":"https://api.github.com/repos/akindyakov/osquery/forks","keys_url":"https://api.github.com/repos/akindyakov/osquery/keys{/key_id}","collaborators_url":"https://api.github.com/repos/akindyakov/osquery/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/akindyakov/osquery/teams","hooks_url":"https://api.github.com/repos/akindyakov/osquery/hooks","issue_events_url":"https://api.github.com/repos/akindyakov/osquery/issues/events{/number}","events_url":"https://api.github.com/repos/akindyakov/osquery/events","assignees_url":"https://api.github.com/repos/akindyakov/osquery/assignees{/user}","branches_url":"https://api.github.com/repos/akindyakov/osquery/branches{/branch}","tags_url":"https://api.github.com/repos/akindyakov/osquery/tags","blobs_url":"https://api.github.com/repos/akindyakov/osquery/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/akindyakov/osquery/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/akindyakov/osquery/git/refs{/sha}","trees_url":"https://api.github.com/repos/akindyakov/osquery/git/trees{/sha}","statuses_url":"https://api.github.com/repos/akindyakov/osquery/statuses/{sha}","languages_url":"https://api.github.com/repos/akindyakov/osquery/languages","stargazers_url":"https://api.github.com/repos/akindyakov/osquery/stargazers","contributors_url":"https://api.github.com/repos/akindyakov/osquery/contributors","subscribers_url":"https://api.github.com/repos/akindyakov/osquery/subscribers","subscription_url":"https://api.github.com/repos/akindyakov/osquery/subscription","commits_url":"https://api.github.com/repos/akindyakov/osquery/commits{/sha}","git_commits_url":"https://api.github.com/repos/akindyakov/osquery/git/commits{/sha}","comments_url":"https://api.github.com/repos/akindyakov/osquery/comments{/number}","issue_comment_url":"https://api.github.com/repos/akindyakov/osquery/issues/comments{/number}","contents_url":"https://api.github.com/repos/akindyakov/osquery/contents/{+path}","compare_url":"https://api.github.com/repos/akindyakov/osquery/compare/{base}...{head}","merges_url":"https://api.github.com/repos/akindyakov/osquery/merges","archive_url":"https://api.github.com/repos/akindyakov/osquery/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/akindyakov/osquery/downloads","issues_url":"https://api.github.com/repos/akindyakov/osquery/issues{/number}","pulls_url":"https://api.github.com/repos/akindyakov/osquery/pulls{/number}","milestones_url":"https://api.github.com/repos/akindyakov/osquery/milestones{/number}","notifications_url":"https://api.github.com/repos/akindyakov/osquery/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/akindyakov/osquery/labels{/name}","releases_url":"https://api.github.com/repos/akindyakov/osquery/releases{/id}","deployments_url":"https://api.github.com/repos/akindyakov/osquery/deployments","created_at":"2018-05-01T10:18:25Z","updated_at":"2018-08-17T10:12:51Z","pushed_at":"2018-08-20T14:17:10Z","git_url":"git://github.com/akindyakov/osquery.git","ssh_url":"git@github.com:akindyakov/osquery.git","clone_url":"https://github.com/akindyakov/osquery.git","svn_url":"https://github.com/akindyakov/osquery","homepage":"https://osquery.io","size":15947,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"facebook:master","ref":"master","sha":"5314fc6034db675a8acf8ccdd3782e4b7f88bc47","user":{"login":"facebook","id":69631,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY5NjMx","avatar_url":"https://avatars3.githubusercontent.com/u/69631?v=4","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"repo":{"id":22394357,"node_id":"MDEwOlJlcG9zaXRvcnkyMjM5NDM1Nw==","name":"osquery","full_name":"facebook/osquery","owner":{"login":"facebook","id":69631,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY5NjMx","avatar_url":"https://avatars3.githubusercontent.com/u/69631?v=4","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/facebook/osquery","description":"SQL powered operating system instrumentation, monitoring, and analytics.","fork":false,"url":"https://api.github.com/repos/facebook/osquery","forks_url":"https://api.github.com/repos/facebook/osquery/forks","keys_url":"https://api.github.com/repos/facebook/osquery/keys{/key_id}","collaborators_url":"https://api.github.com/repos/facebook/osquery/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/facebook/osquery/teams","hooks_url":"https://api.github.com/repos/facebook/osquery/hooks","issue_events_url":"https://api.github.com/repos/facebook/osquery/issues/events{/number}","events_url":"https://api.github.com/repos/facebook/osquery/events","assignees_url":"https://api.github.com/repos/facebook/osquery/assignees{/user}","branches_url":"https://api.github.com/repos/facebook/osquery/branches{/branch}","tags_url":"https://api.github.com/repos/facebook/osquery/tags","blobs_url":"https://api.github.com/repos/facebook/osquery/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/facebook/osquery/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/facebook/osquery/git/refs{/sha}","trees_url":"https://api.github.com/repos/facebook/osquery/git/trees{/sha}","statuses_url":"https://api.github.com/repos/facebook/osquery/statuses/{sha}","languages_url":"https://api.github.com/repos/facebook/osquery/languages","stargazers_url":"https://api.github.com/repos/facebook/osquery/stargazers","contributors_url":"https://api.github.com/repos/facebook/osquery/contributors","subscribers_url":"https://api.github.com/repos/facebook/osquery/subscribers","subscription_url":"https://api.github.com/repos/facebook/osquery/subscription","commits_url":"https://api.github.com/repos/facebook/osquery/commits{/sha}","git_commits_url":"https://api.github.com/repos/facebook/osquery/git/commits{/sha}","comments_url":"https://api.github.com/repos/facebook/osquery/comments{/number}","issue_comment_url":"https://api.github.com/repos/facebook/osquery/issues/comments{/number}","contents_url":"https://api.github.com/repos/facebook/osquery/contents/{+path}","compare_url":"https://api.github.com/repos/facebook/osquery/compare/{base}...{head}","merges_url":"https://api.github.com/repos/facebook/osquery/merges","archive_url":"https://api.github.com/repos/facebook/osquery/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/facebook/osquery/downloads","issues_url":"https://api.github.com/repos/facebook/osquery/issues{/number}","pulls_url":"https://api.github.com/repos/facebook/osquery/pulls{/number}","milestones_url":"https://api.github.com/repos/facebook/osquery/milestones{/number}","notifications_url":"https://api.github.com/repos/facebook/osquery/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/facebook/osquery/labels{/name}","releases_url":"https://api.github.com/repos/facebook/osquery/releases{/id}","deployments_url":"https://api.github.com/repos/facebook/osquery/deployments","created_at":"2014-07-29T20:27:33Z","updated_at":"2018-08-20T14:37:44Z","pushed_at":"2018-08-20T14:37:34Z","git_url":"git://github.com/facebook/osquery.git","ssh_url":"git@github.com:facebook/osquery.git","clone_url":"https://github.com/facebook/osquery.git","svn_url":"https://github.com/facebook/osquery","homepage":"https://osquery.io","size":15940,"stargazers_count":12947,"watchers_count":12947,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1532,"mirror_url":null,"archived":false,"open_issues_count":447,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":1532,"open_issues":447,"watchers":12947,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/facebook/osquery/pulls/4980"},"html":{"href":"https://github.com/facebook/osquery/pull/4980"},"issue":{"href":"https://api.github.com/repos/facebook/osquery/issues/4980"},"comments":{"href":"https://api.github.com/repos/facebook/osquery/issues/4980/comments"},"review_comments":{"href":"https://api.github.com/repos/facebook/osquery/pulls/4980/comments"},"review_comment":{"href":"https://api.github.com/repos/facebook/osquery/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/facebook/osquery/pulls/4980/commits"},"statuses":{"href":"https://api.github.com/repos/facebook/osquery/statuses/6cbae8e044edbabb5e6a1f411d223e4982adfb3a"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"fmanco"}}