{"action":"created","comment":{"url":"https://api.github.com/repos/Linaro/art-reports/pulls/comments/70778422","id":70778422,"diff_hunk":"@@ -232,10 +233,36 @@ def create(self, request, *args, **kwargs):\n                 )\n                 if testjob_created:\n                     tasks.set_testjob_results.delay(testjob_id)\n+        else:\n+            # no test_jobs, expect *.json to be passed in directly\n+            for filename in request.FILES:\n+                if not filename.endswith('.json'):\n+                    next\n+                env = re.sub('.json$', '', filename)\n+                filedata = request.FILES[filename]\n+\n+                self.__create_test_job__(result, env, filedata)\n \n         tasks.update_jenkins.delay(result)\n         return response.Response(serializer.data, status=status.HTTP_201_CREATED)\n \n+    def __create_test_job__(self, result, env, data):\n+        environment = benchmarks_models.Environment.objects.get_or_create(identifier=env)\n+        testjob = benchmarks_models.TestJob.objects.create(\n+            id='J' + str(result.build_id) + '_' + result.name + '+' + env,","path":"api/views.py","position":26,"original_position":26,"commit_id":"803c1a21ce1ab02b268228ffad7a84e6bf4be8a9","original_commit_id":"803c1a21ce1ab02b268228ffad7a84e6bf4be8a9","user":{"login":"mwasilew","id":618901,"avatar_url":"https://avatars.githubusercontent.com/u/618901?v=3","gravatar_id":"","url":"https://api.github.com/users/mwasilew","html_url":"https://github.com/mwasilew","followers_url":"https://api.github.com/users/mwasilew/followers","following_url":"https://api.github.com/users/mwasilew/following{/other_user}","gists_url":"https://api.github.com/users/mwasilew/gists{/gist_id}","starred_url":"https://api.github.com/users/mwasilew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mwasilew/subscriptions","organizations_url":"https://api.github.com/users/mwasilew/orgs","repos_url":"https://api.github.com/users/mwasilew/repos","events_url":"https://api.github.com/users/mwasilew/events{/privacy}","received_events_url":"https://api.github.com/users/mwasilew/received_events","type":"User","site_admin":false},"body":"why '+' not '_'?","created_at":"2016-07-14T09:49:58Z","updated_at":"2016-07-14T09:49:58Z","html_url":"https://github.com/Linaro/art-reports/pull/64#discussion_r70778422","pull_request_url":"https://api.github.com/repos/Linaro/art-reports/pulls/64","_links":{"self":{"href":"https://api.github.com/repos/Linaro/art-reports/pulls/comments/70778422"},"html":{"href":"https://github.com/Linaro/art-reports/pull/64#discussion_r70778422"},"pull_request":{"href":"https://api.github.com/repos/Linaro/art-reports/pulls/64"}}},"pull_request":{"url":"https://api.github.com/repos/Linaro/art-reports/pulls/64","id":77360129,"html_url":"https://github.com/Linaro/art-reports/pull/64","diff_url":"https://github.com/Linaro/art-reports/pull/64.diff","patch_url":"https://github.com/Linaro/art-reports/pull/64.patch","issue_url":"https://api.github.com/repos/Linaro/art-reports/issues/64","number":64,"state":"open","locked":false,"title":"API: direct submission","user":{"login":"terceiro","id":30027,"avatar_url":"https://avatars.githubusercontent.com/u/30027?v=3","gravatar_id":"","url":"https://api.github.com/users/terceiro","html_url":"https://github.com/terceiro","followers_url":"https://api.github.com/users/terceiro/followers","following_url":"https://api.github.com/users/terceiro/following{/other_user}","gists_url":"https://api.github.com/users/terceiro/gists{/gist_id}","starred_url":"https://api.github.com/users/terceiro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/terceiro/subscriptions","organizations_url":"https://api.github.com/users/terceiro/orgs","repos_url":"https://api.github.com/users/terceiro/repos","events_url":"https://api.github.com/users/terceiro/events{/privacy}","received_events_url":"https://api.github.com/users/terceiro/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-07-13T20:55:30Z","updated_at":"2016-07-14T09:49:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1e4de19d2d70b2899ff2c58cfc69d108b270a7a1","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Linaro/art-reports/pulls/64/commits","review_comments_url":"https://api.github.com/repos/Linaro/art-reports/pulls/64/comments","review_comment_url":"https://api.github.com/repos/Linaro/art-reports/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Linaro/art-reports/issues/64/comments","statuses_url":"https://api.github.com/repos/Linaro/art-reports/statuses/803c1a21ce1ab02b268228ffad7a84e6bf4be8a9","head":{"label":"terceiro:api-direct-submission","ref":"api-direct-submission","sha":"803c1a21ce1ab02b268228ffad7a84e6bf4be8a9","user":{"login":"terceiro","id":30027,"avatar_url":"https://avatars.githubusercontent.com/u/30027?v=3","gravatar_id":"","url":"https://api.github.com/users/terceiro","html_url":"https://github.com/terceiro","followers_url":"https://api.github.com/users/terceiro/followers","following_url":"https://api.github.com/users/terceiro/following{/other_user}","gists_url":"https://api.github.com/users/terceiro/gists{/gist_id}","starred_url":"https://api.github.com/users/terceiro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/terceiro/subscriptions","organizations_url":"https://api.github.com/users/terceiro/orgs","repos_url":"https://api.github.com/users/terceiro/repos","events_url":"https://api.github.com/users/terceiro/events{/privacy}","received_events_url":"https://api.github.com/users/terceiro/received_events","type":"User","site_admin":false},"repo":{"id":54416724,"name":"art-reports","full_name":"terceiro/art-reports","owner":{"login":"terceiro","id":30027,"avatar_url":"https://avatars.githubusercontent.com/u/30027?v=3","gravatar_id":"","url":"https://api.github.com/users/terceiro","html_url":"https://github.com/terceiro","followers_url":"https://api.github.com/users/terceiro/followers","following_url":"https://api.github.com/users/terceiro/following{/other_user}","gists_url":"https://api.github.com/users/terceiro/gists{/gist_id}","starred_url":"https://api.github.com/users/terceiro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/terceiro/subscriptions","organizations_url":"https://api.github.com/users/terceiro/orgs","repos_url":"https://api.github.com/users/terceiro/repos","events_url":"https://api.github.com/users/terceiro/events{/privacy}","received_events_url":"https://api.github.com/users/terceiro/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/terceiro/art-reports","description":"","fork":true,"url":"https://api.github.com/repos/terceiro/art-reports","forks_url":"https://api.github.com/repos/terceiro/art-reports/forks","keys_url":"https://api.github.com/repos/terceiro/art-reports/keys{/key_id}","collaborators_url":"https://api.github.com/repos/terceiro/art-reports/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/terceiro/art-reports/teams","hooks_url":"https://api.github.com/repos/terceiro/art-reports/hooks","issue_events_url":"https://api.github.com/repos/terceiro/art-reports/issues/events{/number}","events_url":"https://api.github.com/repos/terceiro/art-reports/events","assignees_url":"https://api.github.com/repos/terceiro/art-reports/assignees{/user}","branches_url":"https://api.github.com/repos/terceiro/art-reports/branches{/branch}","tags_url":"https://api.github.com/repos/terceiro/art-reports/tags","blobs_url":"https://api.github.com/repos/terceiro/art-reports/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/terceiro/art-reports/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/terceiro/art-reports/git/refs{/sha}","trees_url":"https://api.github.com/repos/terceiro/art-reports/git/trees{/sha}","statuses_url":"https://api.github.com/repos/terceiro/art-reports/statuses/{sha}","languages_url":"https://api.github.com/repos/terceiro/art-reports/languages","stargazers_url":"https://api.github.com/repos/terceiro/art-reports/stargazers","contributors_url":"https://api.github.com/repos/terceiro/art-reports/contributors","subscribers_url":"https://api.github.com/repos/terceiro/art-reports/subscribers","subscription_url":"https://api.github.com/repos/terceiro/art-reports/subscription","commits_url":"https://api.github.com/repos/terceiro/art-reports/commits{/sha}","git_commits_url":"https://api.github.com/repos/terceiro/art-reports/git/commits{/sha}","comments_url":"https://api.github.com/repos/terceiro/art-reports/comments{/number}","issue_comment_url":"https://api.github.com/repos/terceiro/art-reports/issues/comments{/number}","contents_url":"https://api.github.com/repos/terceiro/art-reports/contents/{+path}","compare_url":"https://api.github.com/repos/terceiro/art-reports/compare/{base}...{head}","merges_url":"https://api.github.com/repos/terceiro/art-reports/merges","archive_url":"https://api.github.com/repos/terceiro/art-reports/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/terceiro/art-reports/downloads","issues_url":"https://api.github.com/repos/terceiro/art-reports/issues{/number}","pulls_url":"https://api.github.com/repos/terceiro/art-reports/pulls{/number}","milestones_url":"https://api.github.com/repos/terceiro/art-reports/milestones{/number}","notifications_url":"https://api.github.com/repos/terceiro/art-reports/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/terceiro/art-reports/labels{/name}","releases_url":"https://api.github.com/repos/terceiro/art-reports/releases{/id}","deployments_url":"https://api.github.com/repos/terceiro/art-reports/deployments","created_at":"2016-03-21T19:28:04Z","updated_at":"2016-03-21T19:28:05Z","pushed_at":"2016-07-13T20:55:11Z","git_url":"git://github.com/terceiro/art-reports.git","ssh_url":"git@github.com:terceiro/art-reports.git","clone_url":"https://github.com/terceiro/art-reports.git","svn_url":"https://github.com/terceiro/art-reports","homepage":null,"size":6430,"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":"Linaro:master","ref":"master","sha":"bb44998e9fe2ee00df84441e4a1273a2c239be25","user":{"login":"Linaro","id":1180626,"avatar_url":"https://avatars.githubusercontent.com/u/1180626?v=3","gravatar_id":"","url":"https://api.github.com/users/Linaro","html_url":"https://github.com/Linaro","followers_url":"https://api.github.com/users/Linaro/followers","following_url":"https://api.github.com/users/Linaro/following{/other_user}","gists_url":"https://api.github.com/users/Linaro/gists{/gist_id}","starred_url":"https://api.github.com/users/Linaro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Linaro/subscriptions","organizations_url":"https://api.github.com/users/Linaro/orgs","repos_url":"https://api.github.com/users/Linaro/repos","events_url":"https://api.github.com/users/Linaro/events{/privacy}","received_events_url":"https://api.github.com/users/Linaro/received_events","type":"Organization","site_admin":false},"repo":{"id":54223014,"name":"art-reports","full_name":"Linaro/art-reports","owner":{"login":"Linaro","id":1180626,"avatar_url":"https://avatars.githubusercontent.com/u/1180626?v=3","gravatar_id":"","url":"https://api.github.com/users/Linaro","html_url":"https://github.com/Linaro","followers_url":"https://api.github.com/users/Linaro/followers","following_url":"https://api.github.com/users/Linaro/following{/other_user}","gists_url":"https://api.github.com/users/Linaro/gists{/gist_id}","starred_url":"https://api.github.com/users/Linaro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Linaro/subscriptions","organizations_url":"https://api.github.com/users/Linaro/orgs","repos_url":"https://api.github.com/users/Linaro/repos","events_url":"https://api.github.com/users/Linaro/events{/privacy}","received_events_url":"https://api.github.com/users/Linaro/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Linaro/art-reports","description":"","fork":true,"url":"https://api.github.com/repos/Linaro/art-reports","forks_url":"https://api.github.com/repos/Linaro/art-reports/forks","keys_url":"https://api.github.com/repos/Linaro/art-reports/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Linaro/art-reports/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Linaro/art-reports/teams","hooks_url":"https://api.github.com/repos/Linaro/art-reports/hooks","issue_events_url":"https://api.github.com/repos/Linaro/art-reports/issues/events{/number}","events_url":"https://api.github.com/repos/Linaro/art-reports/events","assignees_url":"https://api.github.com/repos/Linaro/art-reports/assignees{/user}","branches_url":"https://api.github.com/repos/Linaro/art-reports/branches{/branch}","tags_url":"https://api.github.com/repos/Linaro/art-reports/tags","blobs_url":"https://api.github.com/repos/Linaro/art-reports/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Linaro/art-reports/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Linaro/art-reports/git/refs{/sha}","trees_url":"https://api.github.com/repos/Linaro/art-reports/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Linaro/art-reports/statuses/{sha}","languages_url":"https://api.github.com/repos/Linaro/art-reports/languages","stargazers_url":"https://api.github.com/repos/Linaro/art-reports/stargazers","contributors_url":"https://api.github.com/repos/Linaro/art-reports/contributors","subscribers_url":"https://api.github.com/repos/Linaro/art-reports/subscribers","subscription_url":"https://api.github.com/repos/Linaro/art-reports/subscription","commits_url":"https://api.github.com/repos/Linaro/art-reports/commits{/sha}","git_commits_url":"https://api.github.com/repos/Linaro/art-reports/git/commits{/sha}","comments_url":"https://api.github.com/repos/Linaro/art-reports/comments{/number}","issue_comment_url":"https://api.github.com/repos/Linaro/art-reports/issues/comments{/number}","contents_url":"https://api.github.com/repos/Linaro/art-reports/contents/{+path}","compare_url":"https://api.github.com/repos/Linaro/art-reports/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Linaro/art-reports/merges","archive_url":"https://api.github.com/repos/Linaro/art-reports/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Linaro/art-reports/downloads","issues_url":"https://api.github.com/repos/Linaro/art-reports/issues{/number}","pulls_url":"https://api.github.com/repos/Linaro/art-reports/pulls{/number}","milestones_url":"https://api.github.com/repos/Linaro/art-reports/milestones{/number}","notifications_url":"https://api.github.com/repos/Linaro/art-reports/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Linaro/art-reports/labels{/name}","releases_url":"https://api.github.com/repos/Linaro/art-reports/releases{/id}","deployments_url":"https://api.github.com/repos/Linaro/art-reports/deployments","created_at":"2016-03-18T18:25:40Z","updated_at":"2016-03-22T08:03:45Z","pushed_at":"2016-07-13T20:55:31Z","git_url":"git://github.com/Linaro/art-reports.git","ssh_url":"git@github.com:Linaro/art-reports.git","clone_url":"https://github.com/Linaro/art-reports.git","svn_url":"https://github.com/Linaro/art-reports","homepage":null,"size":6426,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":9,"forks":1,"open_issues":9,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Linaro/art-reports/pulls/64"},"html":{"href":"https://github.com/Linaro/art-reports/pull/64"},"issue":{"href":"https://api.github.com/repos/Linaro/art-reports/issues/64"},"comments":{"href":"https://api.github.com/repos/Linaro/art-reports/issues/64/comments"},"review_comments":{"href":"https://api.github.com/repos/Linaro/art-reports/pulls/64/comments"},"review_comment":{"href":"https://api.github.com/repos/Linaro/art-reports/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Linaro/art-reports/pulls/64/commits"},"statuses":{"href":"https://api.github.com/repos/Linaro/art-reports/statuses/803c1a21ce1ab02b268228ffad7a84e6bf4be8a9"}}}}
{"actor":{"display_login":"mwasilew"}}