GitHub PullRequestReviewCommentEvent at 2014-11-24 19:03:18
Repository: artifacts
Actor: destijl
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/ForensicArtifacts/artifacts/pulls/comments/20813167","id":20813167,"diff_hunk":"@@ -0,0 +1,95 @@\n+#!/usr/bin/python\n+# -*- coding: utf-8 -*-\n+#\n+# Copyright 2014 The ForensicArtifacts.com Artifact Repository project.\n+# Please see the AUTHORS file for details on individual authors.\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+\"\"\"Script to run the tests.\"\"\"\n+\n+import glob\n+import os\n+import unittest\n+import sys\n+\n+\n+def FindTestFiles(path):\n+  \"\"\"Find the test files (*_test.py) within the specified path.\"\"\"\n+  file_list = []\n+\n+  for directory, _, _ in os.walk(path):\n+    directory_pattern = os.path.join(directory, '*_test.py')\n+\n+    for pattern_match in glob.iglob(directory_pattern):\n+      if os.path.isfile(pattern_match):\n+        file_list.append(pattern_match)\n+\n+  return file_list\n+\n+\n+def RunTests(path_list):\n+  \"\"\"Runs all the test for the test files found within the specified paths.\n+\n+  Args:\n+    path_list: list of path string to look for test files.\n+  \"\"\"\n+  test_classes = []\n+\n+  for path in path_list:\n+    for test_file in FindTestFiles(path):\n+      library_name = (\n+          test_file.rstrip('.py').replace(os.path.sep, '.').lstrip('.'))\n+      test_classes.append(library_name)\n+\n+  tests = unittest.TestLoader().loadTestsFromNames(test_classes)\n+  test_run = unittest.TextTestRunner(verbosity=1)\n+  return test_run.run(tests)\n+\n+\n+def FormatHeader(header, char='*'):\n+  \"\"\"Format and return a header for output.\"\"\"\n+  return ('\\n{:%s^80}' % char).format(u' %s ' % header)\n+\n+\n+def PrintResults(my_results):","path":"run_tests.py","position":64,"original_position":64,"commit_id":"53dda7e313025b8e7f99f8182e1e45bd8458db7b","original_commit_id":"53dda7e313025b8e7f99f8182e1e45bd8458db7b","user":{"login":"destijl","id":1291767,"avatar_url":"https://avatars.githubusercontent.com/u/1291767?v=3","gravatar_id":"","url":"https://api.github.com/users/destijl","html_url":"https://github.com/destijl","followers_url":"https://api.github.com/users/destijl/followers","following_url":"https://api.github.com/users/destijl/following{/other_user}","gists_url":"https://api.github.com/users/destijl/gists{/gist_id}","starred_url":"https://api.github.com/users/destijl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/destijl/subscriptions","organizations_url":"https://api.github.com/users/destijl/orgs","repos_url":"https://api.github.com/users/destijl/repos","events_url":"https://api.github.com/users/destijl/events{/privacy}","received_events_url":"https://api.github.com/users/destijl/received_events","type":"User","site_admin":false},"body":"You don't have to implement this? Use the text runner?","created_at":"2014-11-24T19:03:18Z","updated_at":"2014-11-24T19:03:18Z","html_url":"https://github.com/ForensicArtifacts/artifacts/pull/2#discussion_r20813167","pull_request_url":"https://api.github.com/repos/ForensicArtifacts/artifacts/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/ForensicArtifacts/artifacts/pulls/comments/20813167"},"html":{"href":"https://github.com/ForensicArtifacts/artifacts/pull/2#discussion_r20813167"},"pull_request":{"href":"https://api.github.com/repos/ForensicArtifacts/artifacts/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/ForensicArtifacts/artifacts/pulls/2","id":24900018,"html_url":"https://github.com/ForensicArtifacts/artifacts/pull/2","diff_url":"https://github.com/ForensicArtifacts/artifacts/pull/2.diff","patch_url":"https://github.com/ForensicArtifacts/artifacts/pull/2.patch","issue_url":"https://api.github.com/repos/ForensicArtifacts/artifacts/issues/2","number":2,"state":"open","locked":false,"title":"Initial version of artifact definition validator.","user":{"login":"joachimmetz","id":3888750,"avatar_url":"https://avatars.githubusercontent.com/u/3888750?v=3","gravatar_id":"","url":"https://api.github.com/users/joachimmetz","html_url":"https://github.com/joachimmetz","followers_url":"https://api.github.com/users/joachimmetz/followers","following_url":"https://api.github.com/users/joachimmetz/following{/other_user}","gists_url":"https://api.github.com/users/joachimmetz/gists{/gist_id}","starred_url":"https://api.github.com/users/joachimmetz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joachimmetz/subscriptions","organizations_url":"https://api.github.com/users/joachimmetz/orgs","repos_url":"https://api.github.com/users/joachimmetz/repos","events_url":"https://api.github.com/users/joachimmetz/events{/privacy}","received_events_url":"https://api.github.com/users/joachimmetz/received_events","type":"User","site_admin":false},"body":"@destijl for code review.\r\n\r\nCL is ready for review but please do not merge with upstream, just yet.","created_at":"2014-11-23T10:36:53Z","updated_at":"2014-11-24T19:03:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"986abd580285d71ac3369ef7e56027fdc13a9b78","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ForensicArtifacts/artifacts/pulls/2/commits","review_comments_url":"https://api.github.com/repos/ForensicArtifacts/artifacts/pulls/2/comments","review_comment_url":"https://api.github.com/repos/ForensicArtifacts/artifacts/pulls/comments/{number}","comments_url":"https://api.github.com/repos/ForensicArtifacts/artifacts/issues/2/comments","statuses_url":"https://api.github.com/repos/ForensicArtifacts/artifacts/statuses/53dda7e313025b8e7f99f8182e1e45bd8458db7b","head":{"label":"joachimmetz:master","ref":"master","sha":"53dda7e313025b8e7f99f8182e1e45bd8458db7b","user":{"login":"joachimmetz","id":3888750,"avatar_url":"https://avatars.githubusercontent.com/u/3888750?v=3","gravatar_id":"","url":"https://api.github.com/users/joachimmetz","html_url":"https://github.com/joachimmetz","followers_url":"https://api.github.com/users/joachimmetz/followers","following_url":"https://api.github.com/users/joachimmetz/following{/other_user}","gists_url":"https://api.github.com/users/joachimmetz/gists{/gist_id}","starred_url":"https://api.github.com/users/joachimmetz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joachimmetz/subscriptions","organizations_url":"https://api.github.com/users/joachimmetz/orgs","repos_url":"https://api.github.com/users/joachimmetz/repos","events_url":"https://api.github.com/users/joachimmetz/events{/privacy}","received_events_url":"https://api.github.com/users/joachimmetz/received_events","type":"User","site_admin":false},"repo":{"id":26878731,"name":"artifacts","full_name":"joachimmetz/artifacts","owner":{"login":"joachimmetz","id":3888750,"avatar_url":"https://avatars.githubusercontent.com/u/3888750?v=3","gravatar_id":"","url":"https://api.github.com/users/joachimmetz","html_url":"https://github.com/joachimmetz","followers_url":"https://api.github.com/users/joachimmetz/followers","following_url":"https://api.github.com/users/joachimmetz/following{/other_user}","gists_url":"https://api.github.com/users/joachimmetz/gists{/gist_id}","starred_url":"https://api.github.com/users/joachimmetz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joachimmetz/subscriptions","organizations_url":"https://api.github.com/users/joachimmetz/orgs","repos_url":"https://api.github.com/users/joachimmetz/repos","events_url":"https://api.github.com/users/joachimmetz/events{/privacy}","received_events_url":"https://api.github.com/users/joachimmetz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/joachimmetz/artifacts","description":"Fork to work on validator tool.","fork":true,"url":"https://api.github.com/repos/joachimmetz/artifacts","forks_url":"https://api.github.com/repos/joachimmetz/artifacts/forks","keys_url":"https://api.github.com/repos/joachimmetz/artifacts/keys{/key_id}","collaborators_url":"https://api.github.com/repos/joachimmetz/artifacts/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/joachimmetz/artifacts/teams","hooks_url":"https://api.github.com/repos/joachimmetz/artifacts/hooks","issue_events_url":"https://api.github.com/repos/joachimmetz/artifacts/issues/events{/number}","events_url":"https://api.github.com/repos/joachimmetz/artifacts/events","assignees_url":"https://api.github.com/repos/joachimmetz/artifacts/assignees{/user}","branches_url":"https://api.github.com/repos/joachimmetz/artifacts/branches{/branch}","tags_url":"https://api.github.com/repos/joachimmetz/artifacts/tags","blobs_url":"https://api.github.com/repos/joachimmetz/artifacts/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/joachimmetz/artifacts/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/joachimmetz/artifacts/git/refs{/sha}","trees_url":"https://api.github.com/repos/joachimmetz/artifacts/git/trees{/sha}","statuses_url":"https://api.github.com/repos/joachimmetz/artifacts/statuses/{sha}","languages_url":"https://api.github.com/repos/joachimmetz/artifacts/languages","stargazers_url":"https://api.github.com/repos/joachimmetz/artifacts/stargazers","contributors_url":"https://api.github.com/repos/joachimmetz/artifacts/contributors","subscribers_url":"https://api.github.com/repos/joachimmetz/artifacts/subscribers","subscription_url":"https://api.github.com/repos/joachimmetz/artifacts/subscription","commits_url":"https://api.github.com/repos/joachimmetz/artifacts/commits{/sha}","git_commits_url":"https://api.github.com/repos/joachimmetz/artifacts/git/commits{/sha}","comments_url":"https://api.github.com/repos/joachimmetz/artifacts/comments{/number}","issue_comment_url":"https://api.github.com/repos/joachimmetz/artifacts/issues/comments/{number}","contents_url":"https://api.github.com/repos/joachimmetz/artifacts/contents/{+path}","compare_url":"https://api.github.com/repos/joachimmetz/artifacts/compare/{base}...{head}","merges_url":"https://api.github.com/repos/joachimmetz/artifacts/merges","archive_url":"https://api.github.com/repos/joachimmetz/artifacts/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/joachimmetz/artifacts/downloads","issues_url":"https://api.github.com/repos/joachimmetz/artifacts/issues{/number}","pulls_url":"https://api.github.com/repos/joachimmetz/artifacts/pulls{/number}","milestones_url":"https://api.github.com/repos/joachimmetz/artifacts/milestones{/number}","notifications_url":"https://api.github.com/repos/joachimmetz/artifacts/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/joachimmetz/artifacts/labels{/name}","releases_url":"https://api.github.com/repos/joachimmetz/artifacts/releases{/id}","created_at":"2014-11-19T19:51:58Z","updated_at":"2014-11-23T10:25:43Z","pushed_at":"2014-11-23T11:52:03Z","git_url":"git://github.com/joachimmetz/artifacts.git","ssh_url":"git@github.com:joachimmetz/artifacts.git","clone_url":"https://github.com/joachimmetz/artifacts.git","svn_url":"https://github.com/joachimmetz/artifacts","homepage":"","size":149,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"ForensicArtifacts:master","ref":"master","sha":"3690f96bb0d5e4dfc10f7434c5cf3aedf569c7ca","user":{"login":"ForensicArtifacts","id":3381114,"avatar_url":"https://avatars.githubusercontent.com/u/3381114?v=3","gravatar_id":"","url":"https://api.github.com/users/ForensicArtifacts","html_url":"https://github.com/ForensicArtifacts","followers_url":"https://api.github.com/users/ForensicArtifacts/followers","following_url":"https://api.github.com/users/ForensicArtifacts/following{/other_user}","gists_url":"https://api.github.com/users/ForensicArtifacts/gists{/gist_id}","starred_url":"https://api.github.com/users/ForensicArtifacts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ForensicArtifacts/subscriptions","organizations_url":"https://api.github.com/users/ForensicArtifacts/orgs","repos_url":"https://api.github.com/users/ForensicArtifacts/repos","events_url":"https://api.github.com/users/ForensicArtifacts/events{/privacy}","received_events_url":"https://api.github.com/users/ForensicArtifacts/received_events","type":"Organization","site_admin":false},"repo":{"id":26029828,"name":"artifacts","full_name":"ForensicArtifacts/artifacts","owner":{"login":"ForensicArtifacts","id":3381114,"avatar_url":"https://avatars.githubusercontent.com/u/3381114?v=3","gravatar_id":"","url":"https://api.github.com/users/ForensicArtifacts","html_url":"https://github.com/ForensicArtifacts","followers_url":"https://api.github.com/users/ForensicArtifacts/followers","following_url":"https://api.github.com/users/ForensicArtifacts/following{/other_user}","gists_url":"https://api.github.com/users/ForensicArtifacts/gists{/gist_id}","starred_url":"https://api.github.com/users/ForensicArtifacts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ForensicArtifacts/subscriptions","organizations_url":"https://api.github.com/users/ForensicArtifacts/orgs","repos_url":"https://api.github.com/users/ForensicArtifacts/repos","events_url":"https://api.github.com/users/ForensicArtifacts/events{/privacy}","received_events_url":"https://api.github.com/users/ForensicArtifacts/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ForensicArtifacts/artifacts","description":"","fork":false,"url":"https://api.github.com/repos/ForensicArtifacts/artifacts","forks_url":"https://api.github.com/repos/ForensicArtifacts/artifacts/forks","keys_url":"https://api.github.com/repos/ForensicArtifacts/artifacts/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ForensicArtifacts/artifacts/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ForensicArtifacts/artifacts/teams","hooks_url":"https://api.github.com/repos/ForensicArtifacts/artifacts/hooks","issue_events_url":"https://api.github.com/repos/ForensicArtifacts/artifacts/issues/events{/number}","events_url":"https://api.github.com/repos/ForensicArtifacts/artifacts/events","assignees_url":"https://api.github.com/repos/ForensicArtifacts/artifacts/assignees{/user}","branches_url":"https://api.github.com/repos/ForensicArtifacts/artifacts/branches{/branch}","tags_url":"https://api.github.com/repos/ForensicArtifacts/artifacts/tags","blobs_url":"https://api.github.com/repos/ForensicArtifacts/artifacts/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ForensicArtifacts/artifacts/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ForensicArtifacts/artifacts/git/refs{/sha}","trees_url":"https://api.github.com/repos/ForensicArtifacts/artifacts/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ForensicArtifacts/artifacts/statuses/{sha}","languages_url":"https://api.github.com/repos/ForensicArtifacts/artifacts/languages","stargazers_url":"https://api.github.com/repos/ForensicArtifacts/artifacts/stargazers","contributors_url":"https://api.github.com/repos/ForensicArtifacts/artifacts/contributors","subscribers_url":"https://api.github.com/repos/ForensicArtifacts/artifacts/subscribers","subscription_url":"https://api.github.com/repos/ForensicArtifacts/artifacts/subscription","commits_url":"https://api.github.com/repos/ForensicArtifacts/artifacts/commits{/sha}","git_commits_url":"https://api.github.com/repos/ForensicArtifacts/artifacts/git/commits{/sha}","comments_url":"https://api.github.com/repos/ForensicArtifacts/artifacts/comments{/number}","issue_comment_url":"https://api.github.com/repos/ForensicArtifacts/artifacts/issues/comments/{number}","contents_url":"https://api.github.com/repos/ForensicArtifacts/artifacts/contents/{+path}","compare_url":"https://api.github.com/repos/ForensicArtifacts/artifacts/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ForensicArtifacts/artifacts/merges","archive_url":"https://api.github.com/repos/ForensicArtifacts/artifacts/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ForensicArtifacts/artifacts/downloads","issues_url":"https://api.github.com/repos/ForensicArtifacts/artifacts/issues{/number}","pulls_url":"https://api.github.com/repos/ForensicArtifacts/artifacts/pulls{/number}","milestones_url":"https://api.github.com/repos/ForensicArtifacts/artifacts/milestones{/number}","notifications_url":"https://api.github.com/repos/ForensicArtifacts/artifacts/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ForensicArtifacts/artifacts/labels{/name}","releases_url":"https://api.github.com/repos/ForensicArtifacts/artifacts/releases{/id}","created_at":"2014-10-31T19:13:44Z","updated_at":"2014-10-31T19:13:44Z","pushed_at":"2014-11-20T18:18:55Z","git_url":"git://github.com/ForensicArtifacts/artifacts.git","ssh_url":"git@github.com:ForensicArtifacts/artifacts.git","clone_url":"https://github.com/ForensicArtifacts/artifacts.git","svn_url":"https://github.com/ForensicArtifacts/artifacts","homepage":null,"size":149,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":1,"forks":2,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ForensicArtifacts/artifacts/pulls/2"},"html":{"href":"https://github.com/ForensicArtifacts/artifacts/pull/2"},"issue":{"href":"https://api.github.com/repos/ForensicArtifacts/artifacts/issues/2"},"comments":{"href":"https://api.github.com/repos/ForensicArtifacts/artifacts/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/ForensicArtifacts/artifacts/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/ForensicArtifacts/artifacts/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/ForensicArtifacts/artifacts/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/ForensicArtifacts/artifacts/statuses/53dda7e313025b8e7f99f8182e1e45bd8458db7b"}}}}