{"action":"created","comment":{"url":"https://api.github.com/repos/c2corg/v6_images/pulls/comments/68406170","id":68406170,"diff_hunk":"@@ -100,8 +102,25 @@ def upload(request):\n     # Create an optimized thumbnail\n     for config in THUMBNAIL_CONFIGS:\n         log.debug('%s - creating thumbnail %s', pre_key, config['template'])\n-        create_thumbnail(INCOMING, pre_key, kind, config)\n+        thumbnail = create_thumbnail(INCOMING, pre_key, kind, config)\n         log.debug('%s - creating thumbnail done %s', pre_key, config['template'])\n \n+        log.debug('%s - uploading thumbnail %s', pre_key, config['template'])\n+        send_and_unlink(INCOMING, os.path.basename(thumbnail))\n+        log.debug('%s - uploading thumbnail done %s', pre_key, config['template'])\n+\n+    log.debug('%s - uploading original file', pre_key)\n+    send_and_unlink(INCOMING, pre_key + '.' + kind)\n+    log.debug('%s - uploading original file done', pre_key)\n+\n     log.debug('%s - returning response', pre_key)\n     return {'filename': pre_key + '.' + kind}\n+\n+\n+@view_config(route_name='publish', renderer='json')\n+def publish(request):\n+    if request.POST['secret'] != os.environ['API_SECRET_KEY']:\n+        raise HTTPForbidden('Bad secret key')\n+    object = request.POST['object']","path":"c2corg_images/views.py","position":37,"original_position":37,"commit_id":"67ff0aeb88603b6d8229edbdf25dcade1c57e77e","original_commit_id":"67ff0aeb88603b6d8229edbdf25dcade1c57e77e","user":{"login":"tsauerwein","id":266474,"avatar_url":"https://avatars.githubusercontent.com/u/266474?v=3","gravatar_id":"","url":"https://api.github.com/users/tsauerwein","html_url":"https://github.com/tsauerwein","followers_url":"https://api.github.com/users/tsauerwein/followers","following_url":"https://api.github.com/users/tsauerwein/following{/other_user}","gists_url":"https://api.github.com/users/tsauerwein/gists{/gist_id}","starred_url":"https://api.github.com/users/tsauerwein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tsauerwein/subscriptions","organizations_url":"https://api.github.com/users/tsauerwein/orgs","repos_url":"https://api.github.com/users/tsauerwein/repos","events_url":"https://api.github.com/users/tsauerwein/events{/privacy}","received_events_url":"https://api.github.com/users/tsauerwein/received_events","type":"User","site_admin":false},"body":"Is `object` a good name? Isn't this the image key?","created_at":"2016-06-24T14:29:30Z","updated_at":"2016-06-24T14:29:30Z","html_url":"https://github.com/c2corg/v6_images/pull/2#discussion_r68406170","pull_request_url":"https://api.github.com/repos/c2corg/v6_images/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/c2corg/v6_images/pulls/comments/68406170"},"html":{"href":"https://github.com/c2corg/v6_images/pull/2#discussion_r68406170"},"pull_request":{"href":"https://api.github.com/repos/c2corg/v6_images/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/c2corg/v6_images/pulls/2","id":75121382,"html_url":"https://github.com/c2corg/v6_images/pull/2","diff_url":"https://github.com/c2corg/v6_images/pull/2.diff","patch_url":"https://github.com/c2corg/v6_images/pull/2.patch","issue_url":"https://api.github.com/repos/c2corg/v6_images/issues/2","number":2,"state":"open","locked":false,"title":"Amorvan s3","user":{"login":"arnaud-morvan","id":6095494,"avatar_url":"https://avatars.githubusercontent.com/u/6095494?v=3","gravatar_id":"","url":"https://api.github.com/users/arnaud-morvan","html_url":"https://github.com/arnaud-morvan","followers_url":"https://api.github.com/users/arnaud-morvan/followers","following_url":"https://api.github.com/users/arnaud-morvan/following{/other_user}","gists_url":"https://api.github.com/users/arnaud-morvan/gists{/gist_id}","starred_url":"https://api.github.com/users/arnaud-morvan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arnaud-morvan/subscriptions","organizations_url":"https://api.github.com/users/arnaud-morvan/orgs","repos_url":"https://api.github.com/users/arnaud-morvan/repos","events_url":"https://api.github.com/users/arnaud-morvan/events{/privacy}","received_events_url":"https://api.github.com/users/arnaud-morvan/received_events","type":"User","site_admin":false},"body":"Upload and publish to S3","created_at":"2016-06-24T14:23:04Z","updated_at":"2016-06-24T14:29:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"67405f3542e930ac8747b11f988c617cc2ee3eee","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/c2corg/v6_images/pulls/2/commits","review_comments_url":"https://api.github.com/repos/c2corg/v6_images/pulls/2/comments","review_comment_url":"https://api.github.com/repos/c2corg/v6_images/pulls/comments{/number}","comments_url":"https://api.github.com/repos/c2corg/v6_images/issues/2/comments","statuses_url":"https://api.github.com/repos/c2corg/v6_images/statuses/67ff0aeb88603b6d8229edbdf25dcade1c57e77e","head":{"label":"arnaud-morvan:amorvan_s3","ref":"amorvan_s3","sha":"67ff0aeb88603b6d8229edbdf25dcade1c57e77e","user":{"login":"arnaud-morvan","id":6095494,"avatar_url":"https://avatars.githubusercontent.com/u/6095494?v=3","gravatar_id":"","url":"https://api.github.com/users/arnaud-morvan","html_url":"https://github.com/arnaud-morvan","followers_url":"https://api.github.com/users/arnaud-morvan/followers","following_url":"https://api.github.com/users/arnaud-morvan/following{/other_user}","gists_url":"https://api.github.com/users/arnaud-morvan/gists{/gist_id}","starred_url":"https://api.github.com/users/arnaud-morvan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arnaud-morvan/subscriptions","organizations_url":"https://api.github.com/users/arnaud-morvan/orgs","repos_url":"https://api.github.com/users/arnaud-morvan/repos","events_url":"https://api.github.com/users/arnaud-morvan/events{/privacy}","received_events_url":"https://api.github.com/users/arnaud-morvan/received_events","type":"User","site_admin":false},"repo":{"id":61889110,"name":"v6_images","full_name":"arnaud-morvan/v6_images","owner":{"login":"arnaud-morvan","id":6095494,"avatar_url":"https://avatars.githubusercontent.com/u/6095494?v=3","gravatar_id":"","url":"https://api.github.com/users/arnaud-morvan","html_url":"https://github.com/arnaud-morvan","followers_url":"https://api.github.com/users/arnaud-morvan/followers","following_url":"https://api.github.com/users/arnaud-morvan/following{/other_user}","gists_url":"https://api.github.com/users/arnaud-morvan/gists{/gist_id}","starred_url":"https://api.github.com/users/arnaud-morvan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arnaud-morvan/subscriptions","organizations_url":"https://api.github.com/users/arnaud-morvan/orgs","repos_url":"https://api.github.com/users/arnaud-morvan/repos","events_url":"https://api.github.com/users/arnaud-morvan/events{/privacy}","received_events_url":"https://api.github.com/users/arnaud-morvan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/arnaud-morvan/v6_images","description":"Images handling app for c2c.org v6","fork":true,"url":"https://api.github.com/repos/arnaud-morvan/v6_images","forks_url":"https://api.github.com/repos/arnaud-morvan/v6_images/forks","keys_url":"https://api.github.com/repos/arnaud-morvan/v6_images/keys{/key_id}","collaborators_url":"https://api.github.com/repos/arnaud-morvan/v6_images/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/arnaud-morvan/v6_images/teams","hooks_url":"https://api.github.com/repos/arnaud-morvan/v6_images/hooks","issue_events_url":"https://api.github.com/repos/arnaud-morvan/v6_images/issues/events{/number}","events_url":"https://api.github.com/repos/arnaud-morvan/v6_images/events","assignees_url":"https://api.github.com/repos/arnaud-morvan/v6_images/assignees{/user}","branches_url":"https://api.github.com/repos/arnaud-morvan/v6_images/branches{/branch}","tags_url":"https://api.github.com/repos/arnaud-morvan/v6_images/tags","blobs_url":"https://api.github.com/repos/arnaud-morvan/v6_images/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/arnaud-morvan/v6_images/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/arnaud-morvan/v6_images/git/refs{/sha}","trees_url":"https://api.github.com/repos/arnaud-morvan/v6_images/git/trees{/sha}","statuses_url":"https://api.github.com/repos/arnaud-morvan/v6_images/statuses/{sha}","languages_url":"https://api.github.com/repos/arnaud-morvan/v6_images/languages","stargazers_url":"https://api.github.com/repos/arnaud-morvan/v6_images/stargazers","contributors_url":"https://api.github.com/repos/arnaud-morvan/v6_images/contributors","subscribers_url":"https://api.github.com/repos/arnaud-morvan/v6_images/subscribers","subscription_url":"https://api.github.com/repos/arnaud-morvan/v6_images/subscription","commits_url":"https://api.github.com/repos/arnaud-morvan/v6_images/commits{/sha}","git_commits_url":"https://api.github.com/repos/arnaud-morvan/v6_images/git/commits{/sha}","comments_url":"https://api.github.com/repos/arnaud-morvan/v6_images/comments{/number}","issue_comment_url":"https://api.github.com/repos/arnaud-morvan/v6_images/issues/comments{/number}","contents_url":"https://api.github.com/repos/arnaud-morvan/v6_images/contents/{+path}","compare_url":"https://api.github.com/repos/arnaud-morvan/v6_images/compare/{base}...{head}","merges_url":"https://api.github.com/repos/arnaud-morvan/v6_images/merges","archive_url":"https://api.github.com/repos/arnaud-morvan/v6_images/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/arnaud-morvan/v6_images/downloads","issues_url":"https://api.github.com/repos/arnaud-morvan/v6_images/issues{/number}","pulls_url":"https://api.github.com/repos/arnaud-morvan/v6_images/pulls{/number}","milestones_url":"https://api.github.com/repos/arnaud-morvan/v6_images/milestones{/number}","notifications_url":"https://api.github.com/repos/arnaud-morvan/v6_images/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/arnaud-morvan/v6_images/labels{/name}","releases_url":"https://api.github.com/repos/arnaud-morvan/v6_images/releases{/id}","deployments_url":"https://api.github.com/repos/arnaud-morvan/v6_images/deployments","created_at":"2016-06-24T14:13:48Z","updated_at":"2016-06-24T14:13:49Z","pushed_at":"2016-06-24T14:24:43Z","git_url":"git://github.com/arnaud-morvan/v6_images.git","ssh_url":"git@github.com:arnaud-morvan/v6_images.git","clone_url":"https://github.com/arnaud-morvan/v6_images.git","svn_url":"https://github.com/arnaud-morvan/v6_images","homepage":null,"size":281,"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":"c2corg:master","ref":"master","sha":"2f030a26397b24ce4b1a6ba01755b3cf18320e88","user":{"login":"c2corg","id":3200587,"avatar_url":"https://avatars.githubusercontent.com/u/3200587?v=3","gravatar_id":"","url":"https://api.github.com/users/c2corg","html_url":"https://github.com/c2corg","followers_url":"https://api.github.com/users/c2corg/followers","following_url":"https://api.github.com/users/c2corg/following{/other_user}","gists_url":"https://api.github.com/users/c2corg/gists{/gist_id}","starred_url":"https://api.github.com/users/c2corg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/c2corg/subscriptions","organizations_url":"https://api.github.com/users/c2corg/orgs","repos_url":"https://api.github.com/users/c2corg/repos","events_url":"https://api.github.com/users/c2corg/events{/privacy}","received_events_url":"https://api.github.com/users/c2corg/received_events","type":"Organization","site_admin":false},"repo":{"id":59824689,"name":"v6_images","full_name":"c2corg/v6_images","owner":{"login":"c2corg","id":3200587,"avatar_url":"https://avatars.githubusercontent.com/u/3200587?v=3","gravatar_id":"","url":"https://api.github.com/users/c2corg","html_url":"https://github.com/c2corg","followers_url":"https://api.github.com/users/c2corg/followers","following_url":"https://api.github.com/users/c2corg/following{/other_user}","gists_url":"https://api.github.com/users/c2corg/gists{/gist_id}","starred_url":"https://api.github.com/users/c2corg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/c2corg/subscriptions","organizations_url":"https://api.github.com/users/c2corg/orgs","repos_url":"https://api.github.com/users/c2corg/repos","events_url":"https://api.github.com/users/c2corg/events{/privacy}","received_events_url":"https://api.github.com/users/c2corg/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/c2corg/v6_images","description":"Images handling app for c2c.org v6","fork":false,"url":"https://api.github.com/repos/c2corg/v6_images","forks_url":"https://api.github.com/repos/c2corg/v6_images/forks","keys_url":"https://api.github.com/repos/c2corg/v6_images/keys{/key_id}","collaborators_url":"https://api.github.com/repos/c2corg/v6_images/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/c2corg/v6_images/teams","hooks_url":"https://api.github.com/repos/c2corg/v6_images/hooks","issue_events_url":"https://api.github.com/repos/c2corg/v6_images/issues/events{/number}","events_url":"https://api.github.com/repos/c2corg/v6_images/events","assignees_url":"https://api.github.com/repos/c2corg/v6_images/assignees{/user}","branches_url":"https://api.github.com/repos/c2corg/v6_images/branches{/branch}","tags_url":"https://api.github.com/repos/c2corg/v6_images/tags","blobs_url":"https://api.github.com/repos/c2corg/v6_images/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/c2corg/v6_images/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/c2corg/v6_images/git/refs{/sha}","trees_url":"https://api.github.com/repos/c2corg/v6_images/git/trees{/sha}","statuses_url":"https://api.github.com/repos/c2corg/v6_images/statuses/{sha}","languages_url":"https://api.github.com/repos/c2corg/v6_images/languages","stargazers_url":"https://api.github.com/repos/c2corg/v6_images/stargazers","contributors_url":"https://api.github.com/repos/c2corg/v6_images/contributors","subscribers_url":"https://api.github.com/repos/c2corg/v6_images/subscribers","subscription_url":"https://api.github.com/repos/c2corg/v6_images/subscription","commits_url":"https://api.github.com/repos/c2corg/v6_images/commits{/sha}","git_commits_url":"https://api.github.com/repos/c2corg/v6_images/git/commits{/sha}","comments_url":"https://api.github.com/repos/c2corg/v6_images/comments{/number}","issue_comment_url":"https://api.github.com/repos/c2corg/v6_images/issues/comments{/number}","contents_url":"https://api.github.com/repos/c2corg/v6_images/contents/{+path}","compare_url":"https://api.github.com/repos/c2corg/v6_images/compare/{base}...{head}","merges_url":"https://api.github.com/repos/c2corg/v6_images/merges","archive_url":"https://api.github.com/repos/c2corg/v6_images/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/c2corg/v6_images/downloads","issues_url":"https://api.github.com/repos/c2corg/v6_images/issues{/number}","pulls_url":"https://api.github.com/repos/c2corg/v6_images/pulls{/number}","milestones_url":"https://api.github.com/repos/c2corg/v6_images/milestones{/number}","notifications_url":"https://api.github.com/repos/c2corg/v6_images/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/c2corg/v6_images/labels{/name}","releases_url":"https://api.github.com/repos/c2corg/v6_images/releases{/id}","deployments_url":"https://api.github.com/repos/c2corg/v6_images/deployments","created_at":"2016-05-27T09:57:38Z","updated_at":"2016-05-27T13:42:01Z","pushed_at":"2016-06-24T14:23:04Z","git_url":"git://github.com/c2corg/v6_images.git","ssh_url":"git@github.com:c2corg/v6_images.git","clone_url":"https://github.com/c2corg/v6_images.git","svn_url":"https://github.com/c2corg/v6_images","homepage":null,"size":281,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/c2corg/v6_images/pulls/2"},"html":{"href":"https://github.com/c2corg/v6_images/pull/2"},"issue":{"href":"https://api.github.com/repos/c2corg/v6_images/issues/2"},"comments":{"href":"https://api.github.com/repos/c2corg/v6_images/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/c2corg/v6_images/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/c2corg/v6_images/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/c2corg/v6_images/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/c2corg/v6_images/statuses/67ff0aeb88603b6d8229edbdf25dcade1c57e77e"}}}}
{"actor":{"display_login":"tsauerwein"}}