{"action":"created","comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/professional-services/pulls/comments/226671486","pull_request_review_id":166555084,"id":226671486,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyNjY3MTQ4Ng==","diff_hunk":"@@ -0,0 +1,108 @@\n+# Copyright 2018 Google Inc.\n+#\n+# Licensed under the Apache License, Version 2.0 (the \"License\");\n+# you may not use this file except in compliance with the License.\n+# You may obtain a copy of the License at\n+#\n+#            http://www.apache.org/licenses/LICENSE-2.0\n+#\n+# Unless required by applicable law or agreed to in writing, software\n+# distributed under the License is distributed on an \"AS IS\" BASIS,\n+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+# See the License for the specific language governing permissions and\n+# limitations under the License.\n+\n+import argparse\n+import importlib\n+import re\n+import sys\n+import logging\n+from gsuite_exporter import exporters\n+from gsuite_exporter.collectors.reports import AdminReportsAPIFetcher\n+\n+logging.basicConfig(stream=sys.stdout, level=logging.INFO)\n+logging.getLogger('googleapiclient').setLevel(logging.ERROR)\n+\n+logger = logging.getLogger(__name__)\n+\n+def get_exporter_cls(exporter_class):\n+    try:\n+        file, name = tuple(exporter_class.split('.'))\n+        package = 'gsuite_exporter.exporters.%s' % file\n+        return getattr(importlib.import_module(package), name)\n+    except Exception as e:\n+        logger.exception(\n+            'Exporter \"%s\" not found. Verify the exporter class name is'\n+            'prefixed by the exporter file name.\\n'\n+            'Example: `stackdriver_exporter.StackdriverExporter`',\n+            exporter_class)\n+        sys.exit()","path":"infrastructure/gsuite-exporter/gsuite_exporter/cli.py","position":null,"original_position":39,"commit_id":"a40ca9f76e0cf9bfda151c73c4bc1619c4e16f6f","original_commit_id":"e1042d4fa25a1b2b87520296cf77de69e89260a1","user":{"login":"ocervell","id":9629314,"node_id":"MDQ6VXNlcjk2MjkzMTQ=","avatar_url":"https://avatars0.githubusercontent.com/u/9629314?v=4","gravatar_id":"","url":"https://api.github.com/users/ocervell","html_url":"https://github.com/ocervell","followers_url":"https://api.github.com/users/ocervell/followers","following_url":"https://api.github.com/users/ocervell/following{/other_user}","gists_url":"https://api.github.com/users/ocervell/gists{/gist_id}","starred_url":"https://api.github.com/users/ocervell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ocervell/subscriptions","organizations_url":"https://api.github.com/users/ocervell/orgs","repos_url":"https://api.github.com/users/ocervell/repos","events_url":"https://api.github.com/users/ocervell/events{/privacy}","received_events_url":"https://api.github.com/users/ocervell/received_events","type":"User","site_admin":false},"body":"Good catch, changed to sys.exit(1) to mark an error","created_at":"2018-10-19T14:39:40Z","updated_at":"2018-10-19T14:39:40Z","html_url":"https://github.com/GoogleCloudPlatform/professional-services/pull/69#discussion_r226671486","pull_request_url":"https://api.github.com/repos/GoogleCloudPlatform/professional-services/pulls/69","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/professional-services/pulls/comments/226671486"},"html":{"href":"https://github.com/GoogleCloudPlatform/professional-services/pull/69#discussion_r226671486"},"pull_request":{"href":"https://api.github.com/repos/GoogleCloudPlatform/professional-services/pulls/69"}},"in_reply_to_id":225247365},"pull_request":{"url":"https://api.github.com/repos/GoogleCloudPlatform/professional-services/pulls/69","id":208419928,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA4NDE5OTI4","html_url":"https://github.com/GoogleCloudPlatform/professional-services/pull/69","diff_url":"https://github.com/GoogleCloudPlatform/professional-services/pull/69.diff","patch_url":"https://github.com/GoogleCloudPlatform/professional-services/pull/69.patch","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/professional-services/issues/69","number":69,"state":"open","locked":false,"title":"G Suite Admin Report Sync","user":{"login":"morgante","id":1627801,"node_id":"MDQ6VXNlcjE2Mjc4MDE=","avatar_url":"https://avatars0.githubusercontent.com/u/1627801?v=4","gravatar_id":"","url":"https://api.github.com/users/morgante","html_url":"https://github.com/morgante","followers_url":"https://api.github.com/users/morgante/followers","following_url":"https://api.github.com/users/morgante/following{/other_user}","gists_url":"https://api.github.com/users/morgante/gists{/gist_id}","starred_url":"https://api.github.com/users/morgante/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/morgante/subscriptions","organizations_url":"https://api.github.com/users/morgante/orgs","repos_url":"https://api.github.com/users/morgante/repos","events_url":"https://api.github.com/users/morgante/events{/privacy}","received_events_url":"https://api.github.com/users/morgante/received_events","type":"User","site_admin":false},"body":"This PR adds a package to automate syncing Admin SDK APIs activity reports to a GCP destination.","created_at":"2018-08-14T21:46:11Z","updated_at":"2018-10-19T14:39:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5cab0fd7a79f5f954dcfb5b8f217637d4c503af3","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/GoogleCloudPlatform/professional-services/pulls/69/commits","review_comments_url":"https://api.github.com/repos/GoogleCloudPlatform/professional-services/pulls/69/comments","review_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/professional-services/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/professional-services/issues/69/comments","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/professional-services/statuses/a40ca9f76e0cf9bfda151c73c4bc1619c4e16f6f","head":{"label":"morgante:gsuite-report-sync","ref":"gsuite-report-sync","sha":"a40ca9f76e0cf9bfda151c73c4bc1619c4e16f6f","user":{"login":"morgante","id":1627801,"node_id":"MDQ6VXNlcjE2Mjc4MDE=","avatar_url":"https://avatars0.githubusercontent.com/u/1627801?v=4","gravatar_id":"","url":"https://api.github.com/users/morgante","html_url":"https://github.com/morgante","followers_url":"https://api.github.com/users/morgante/followers","following_url":"https://api.github.com/users/morgante/following{/other_user}","gists_url":"https://api.github.com/users/morgante/gists{/gist_id}","starred_url":"https://api.github.com/users/morgante/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/morgante/subscriptions","organizations_url":"https://api.github.com/users/morgante/orgs","repos_url":"https://api.github.com/users/morgante/repos","events_url":"https://api.github.com/users/morgante/events{/privacy}","received_events_url":"https://api.github.com/users/morgante/received_events","type":"User","site_admin":false},"repo":{"id":106714020,"node_id":"MDEwOlJlcG9zaXRvcnkxMDY3MTQwMjA=","name":"professional-services","full_name":"morgante/professional-services","private":false,"owner":{"login":"morgante","id":1627801,"node_id":"MDQ6VXNlcjE2Mjc4MDE=","avatar_url":"https://avatars0.githubusercontent.com/u/1627801?v=4","gravatar_id":"","url":"https://api.github.com/users/morgante","html_url":"https://github.com/morgante","followers_url":"https://api.github.com/users/morgante/followers","following_url":"https://api.github.com/users/morgante/following{/other_user}","gists_url":"https://api.github.com/users/morgante/gists{/gist_id}","starred_url":"https://api.github.com/users/morgante/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/morgante/subscriptions","organizations_url":"https://api.github.com/users/morgante/orgs","repos_url":"https://api.github.com/users/morgante/repos","events_url":"https://api.github.com/users/morgante/events{/privacy}","received_events_url":"https://api.github.com/users/morgante/received_events","type":"User","site_admin":false},"html_url":"https://github.com/morgante/professional-services","description":null,"fork":true,"url":"https://api.github.com/repos/morgante/professional-services","forks_url":"https://api.github.com/repos/morgante/professional-services/forks","keys_url":"https://api.github.com/repos/morgante/professional-services/keys{/key_id}","collaborators_url":"https://api.github.com/repos/morgante/professional-services/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/morgante/professional-services/teams","hooks_url":"https://api.github.com/repos/morgante/professional-services/hooks","issue_events_url":"https://api.github.com/repos/morgante/professional-services/issues/events{/number}","events_url":"https://api.github.com/repos/morgante/professional-services/events","assignees_url":"https://api.github.com/repos/morgante/professional-services/assignees{/user}","branches_url":"https://api.github.com/repos/morgante/professional-services/branches{/branch}","tags_url":"https://api.github.com/repos/morgante/professional-services/tags","blobs_url":"https://api.github.com/repos/morgante/professional-services/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/morgante/professional-services/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/morgante/professional-services/git/refs{/sha}","trees_url":"https://api.github.com/repos/morgante/professional-services/git/trees{/sha}","statuses_url":"https://api.github.com/repos/morgante/professional-services/statuses/{sha}","languages_url":"https://api.github.com/repos/morgante/professional-services/languages","stargazers_url":"https://api.github.com/repos/morgante/professional-services/stargazers","contributors_url":"https://api.github.com/repos/morgante/professional-services/contributors","subscribers_url":"https://api.github.com/repos/morgante/professional-services/subscribers","subscription_url":"https://api.github.com/repos/morgante/professional-services/subscription","commits_url":"https://api.github.com/repos/morgante/professional-services/commits{/sha}","git_commits_url":"https://api.github.com/repos/morgante/professional-services/git/commits{/sha}","comments_url":"https://api.github.com/repos/morgante/professional-services/comments{/number}","issue_comment_url":"https://api.github.com/repos/morgante/professional-services/issues/comments{/number}","contents_url":"https://api.github.com/repos/morgante/professional-services/contents/{+path}","compare_url":"https://api.github.com/repos/morgante/professional-services/compare/{base}...{head}","merges_url":"https://api.github.com/repos/morgante/professional-services/merges","archive_url":"https://api.github.com/repos/morgante/professional-services/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/morgante/professional-services/downloads","issues_url":"https://api.github.com/repos/morgante/professional-services/issues{/number}","pulls_url":"https://api.github.com/repos/morgante/professional-services/pulls{/number}","milestones_url":"https://api.github.com/repos/morgante/professional-services/milestones{/number}","notifications_url":"https://api.github.com/repos/morgante/professional-services/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/morgante/professional-services/labels{/name}","releases_url":"https://api.github.com/repos/morgante/professional-services/releases{/id}","deployments_url":"https://api.github.com/repos/morgante/professional-services/deployments","created_at":"2017-10-12T15:52:19Z","updated_at":"2018-08-14T21:47:45Z","pushed_at":"2018-10-19T14:39:23Z","git_url":"git://github.com/morgante/professional-services.git","ssh_url":"git@github.com:morgante/professional-services.git","clone_url":"https://github.com/morgante/professional-services.git","svn_url":"https://github.com/morgante/professional-services","homepage":null,"size":8110,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"GoogleCloudPlatform:master","ref":"master","sha":"ce6b241c6f03109d29ee270f45297157e014f8ca","user":{"login":"GoogleCloudPlatform","id":2810941,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI4MTA5NDE=","avatar_url":"https://avatars0.githubusercontent.com/u/2810941?v=4","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"repo":{"id":91730359,"node_id":"MDEwOlJlcG9zaXRvcnk5MTczMDM1OQ==","name":"professional-services","full_name":"GoogleCloudPlatform/professional-services","private":false,"owner":{"login":"GoogleCloudPlatform","id":2810941,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI4MTA5NDE=","avatar_url":"https://avatars0.githubusercontent.com/u/2810941?v=4","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/GoogleCloudPlatform/professional-services","description":"Common solutions and tools developed by Google Cloud's Professional Services team","fork":false,"url":"https://api.github.com/repos/GoogleCloudPlatform/professional-services","forks_url":"https://api.github.com/repos/GoogleCloudPlatform/professional-services/forks","keys_url":"https://api.github.com/repos/GoogleCloudPlatform/professional-services/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GoogleCloudPlatform/professional-services/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GoogleCloudPlatform/professional-services/teams","hooks_url":"https://api.github.com/repos/GoogleCloudPlatform/professional-services/hooks","issue_events_url":"https://api.github.com/repos/GoogleCloudPlatform/professional-services/issues/events{/number}","events_url":"https://api.github.com/repos/GoogleCloudPlatform/professional-services/events","assignees_url":"https://api.github.com/repos/GoogleCloudPlatform/professional-services/assignees{/user}","branches_url":"https://api.github.com/repos/GoogleCloudPlatform/professional-services/branches{/branch}","tags_url":"https://api.github.com/repos/GoogleCloudPlatform/professional-services/tags","blobs_url":"https://api.github.com/repos/GoogleCloudPlatform/professional-services/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GoogleCloudPlatform/professional-services/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GoogleCloudPlatform/professional-services/git/refs{/sha}","trees_url":"https://api.github.com/repos/GoogleCloudPlatform/professional-services/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/professional-services/statuses/{sha}","languages_url":"https://api.github.com/repos/GoogleCloudPlatform/professional-services/languages","stargazers_url":"https://api.github.com/repos/GoogleCloudPlatform/professional-services/stargazers","contributors_url":"https://api.github.com/repos/GoogleCloudPlatform/professional-services/contributors","subscribers_url":"https://api.github.com/repos/GoogleCloudPlatform/professional-services/subscribers","subscription_url":"https://api.github.com/repos/GoogleCloudPlatform/professional-services/subscription","commits_url":"https://api.github.com/repos/GoogleCloudPlatform/professional-services/commits{/sha}","git_commits_url":"https://api.github.com/repos/GoogleCloudPlatform/professional-services/git/commits{/sha}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/professional-services/comments{/number}","issue_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/professional-services/issues/comments{/number}","contents_url":"https://api.github.com/repos/GoogleCloudPlatform/professional-services/contents/{+path}","compare_url":"https://api.github.com/repos/GoogleCloudPlatform/professional-services/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GoogleCloudPlatform/professional-services/merges","archive_url":"https://api.github.com/repos/GoogleCloudPlatform/professional-services/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GoogleCloudPlatform/professional-services/downloads","issues_url":"https://api.github.com/repos/GoogleCloudPlatform/professional-services/issues{/number}","pulls_url":"https://api.github.com/repos/GoogleCloudPlatform/professional-services/pulls{/number}","milestones_url":"https://api.github.com/repos/GoogleCloudPlatform/professional-services/milestones{/number}","notifications_url":"https://api.github.com/repos/GoogleCloudPlatform/professional-services/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/professional-services/labels{/name}","releases_url":"https://api.github.com/repos/GoogleCloudPlatform/professional-services/releases{/id}","deployments_url":"https://api.github.com/repos/GoogleCloudPlatform/professional-services/deployments","created_at":"2017-05-18T19:29:27Z","updated_at":"2018-10-18T17:26:36Z","pushed_at":"2018-10-19T14:39:25Z","git_url":"git://github.com/GoogleCloudPlatform/professional-services.git","ssh_url":"git@github.com:GoogleCloudPlatform/professional-services.git","clone_url":"https://github.com/GoogleCloudPlatform/professional-services.git","svn_url":"https://github.com/GoogleCloudPlatform/professional-services","homepage":"","size":25813,"stargazers_count":80,"watchers_count":80,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":62,"mirror_url":null,"archived":false,"open_issues_count":9,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":62,"open_issues":9,"watchers":80,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/professional-services/pulls/69"},"html":{"href":"https://github.com/GoogleCloudPlatform/professional-services/pull/69"},"issue":{"href":"https://api.github.com/repos/GoogleCloudPlatform/professional-services/issues/69"},"comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/professional-services/issues/69/comments"},"review_comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/professional-services/pulls/69/comments"},"review_comment":{"href":"https://api.github.com/repos/GoogleCloudPlatform/professional-services/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GoogleCloudPlatform/professional-services/pulls/69/commits"},"statuses":{"href":"https://api.github.com/repos/GoogleCloudPlatform/professional-services/statuses/a40ca9f76e0cf9bfda151c73c4bc1619c4e16f6f"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"ocervell"}}