{"action":"created","comment":{"url":"https://api.github.com/repos/cyder/emojix/pulls/comments/195523351","pull_request_review_id":128910458,"id":195523351,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NTUyMzM1MQ==","diff_hunk":"@@ -0,0 +1,31 @@\n+class Api::V1::DownloadController < Api::V1::BaseController\n+  include ActionController::Streaming\n+  include Zipline\n+\n+  skip_before_action :require_valid_token, if: -> { request.headers[:Authorization].blank? }\n+  ZIP_FILENAME = \"emojis.zip\".freeze\n+\n+  def index\n+    ActiveRecord::Base.transaction do\n+      emojis = Emoji.where(id: params[:emojis])\n+      emojis.each {|emoji| emoji.download_logs.create!(user: current_user) }\n+      files = emojis.map do |emoji|\n+        file = emoji.image.slack\n+        filename = filename(emojis, emoji)\n+        [file, filename]\n+      end\n+      zipline(files, ZIP_FILENAME)\n+    end","path":"app/controllers/api/v1/download_controller.rb","position":18,"original_position":18,"commit_id":"51ea0d60231e6e6113c3321b3f51abe68360e1e1","original_commit_id":"51ea0d60231e6e6113c3321b3f51abe68360e1e1","user":{"login":"Mori-Atsushi","id":13435109,"node_id":"MDQ6VXNlcjEzNDM1MTA5","avatar_url":"https://avatars0.githubusercontent.com/u/13435109?v=4","gravatar_id":"","url":"https://api.github.com/users/Mori-Atsushi","html_url":"https://github.com/Mori-Atsushi","followers_url":"https://api.github.com/users/Mori-Atsushi/followers","following_url":"https://api.github.com/users/Mori-Atsushi/following{/other_user}","gists_url":"https://api.github.com/users/Mori-Atsushi/gists{/gist_id}","starred_url":"https://api.github.com/users/Mori-Atsushi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mori-Atsushi/subscriptions","organizations_url":"https://api.github.com/users/Mori-Atsushi/orgs","repos_url":"https://api.github.com/users/Mori-Atsushi/repos","events_url":"https://api.github.com/users/Mori-Atsushi/events{/privacy}","received_events_url":"https://api.github.com/users/Mori-Atsushi/received_events","type":"User","site_admin":false},"body":"emoji.download_logs.createのほうがわかりやすくない？","created_at":"2018-06-14T18:18:24Z","updated_at":"2018-06-14T18:18:24Z","html_url":"https://github.com/cyder/emojix/pull/71#discussion_r195523351","pull_request_url":"https://api.github.com/repos/cyder/emojix/pulls/71","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/cyder/emojix/pulls/comments/195523351"},"html":{"href":"https://github.com/cyder/emojix/pull/71#discussion_r195523351"},"pull_request":{"href":"https://api.github.com/repos/cyder/emojix/pulls/71"}},"in_reply_to_id":195515266},"pull_request":{"url":"https://api.github.com/repos/cyder/emojix/pulls/71","id":194544299,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk0NTQ0Mjk5","html_url":"https://github.com/cyder/emojix/pull/71","diff_url":"https://github.com/cyder/emojix/pull/71.diff","patch_url":"https://github.com/cyder/emojix/pull/71.patch","issue_url":"https://api.github.com/repos/cyder/emojix/issues/71","number":71,"state":"open","locked":false,"title":"EmojiをZipでダウンロードする","user":{"login":"Mori-Atsushi","id":13435109,"node_id":"MDQ6VXNlcjEzNDM1MTA5","avatar_url":"https://avatars0.githubusercontent.com/u/13435109?v=4","gravatar_id":"","url":"https://api.github.com/users/Mori-Atsushi","html_url":"https://github.com/Mori-Atsushi","followers_url":"https://api.github.com/users/Mori-Atsushi/followers","following_url":"https://api.github.com/users/Mori-Atsushi/following{/other_user}","gists_url":"https://api.github.com/users/Mori-Atsushi/gists{/gist_id}","starred_url":"https://api.github.com/users/Mori-Atsushi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mori-Atsushi/subscriptions","organizations_url":"https://api.github.com/users/Mori-Atsushi/orgs","repos_url":"https://api.github.com/users/Mori-Atsushi/repos","events_url":"https://api.github.com/users/Mori-Atsushi/events{/privacy}","received_events_url":"https://api.github.com/users/Mori-Atsushi/received_events","type":"User","site_admin":false},"body":"close #69 \r\n\r\n一時ファイルを作ったわいいが、どうやって消そうってなってます…","created_at":"2018-06-13T10:45:57Z","updated_at":"2018-06-14T18:18:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6e4ed8b16d71de35337cfcbed8f0a7ace540b156","assignee":null,"assignees":[],"requested_reviewers":[{"login":"tanishi","id":3890820,"node_id":"MDQ6VXNlcjM4OTA4MjA=","avatar_url":"https://avatars1.githubusercontent.com/u/3890820?v=4","gravatar_id":"","url":"https://api.github.com/users/tanishi","html_url":"https://github.com/tanishi","followers_url":"https://api.github.com/users/tanishi/followers","following_url":"https://api.github.com/users/tanishi/following{/other_user}","gists_url":"https://api.github.com/users/tanishi/gists{/gist_id}","starred_url":"https://api.github.com/users/tanishi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tanishi/subscriptions","organizations_url":"https://api.github.com/users/tanishi/orgs","repos_url":"https://api.github.com/users/tanishi/repos","events_url":"https://api.github.com/users/tanishi/events{/privacy}","received_events_url":"https://api.github.com/users/tanishi/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":880602014,"node_id":"MDU6TGFiZWw4ODA2MDIwMTQ=","url":"https://api.github.com/repos/cyder/emojix/labels/WIP","name":"WIP","color":"3be238","default":false},{"id":958861541,"node_id":"MDU6TGFiZWw5NTg4NjE1NDE=","url":"https://api.github.com/repos/cyder/emojix/labels/rails","name":"rails","color":"b7442a","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/cyder/emojix/pulls/71/commits","review_comments_url":"https://api.github.com/repos/cyder/emojix/pulls/71/comments","review_comment_url":"https://api.github.com/repos/cyder/emojix/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cyder/emojix/issues/71/comments","statuses_url":"https://api.github.com/repos/cyder/emojix/statuses/51ea0d60231e6e6113c3321b3f51abe68360e1e1","head":{"label":"cyder:69-emoji-zip","ref":"69-emoji-zip","sha":"51ea0d60231e6e6113c3321b3f51abe68360e1e1","user":{"login":"cyder","id":25344502,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI1MzQ0NTAy","avatar_url":"https://avatars3.githubusercontent.com/u/25344502?v=4","gravatar_id":"","url":"https://api.github.com/users/cyder","html_url":"https://github.com/cyder","followers_url":"https://api.github.com/users/cyder/followers","following_url":"https://api.github.com/users/cyder/following{/other_user}","gists_url":"https://api.github.com/users/cyder/gists{/gist_id}","starred_url":"https://api.github.com/users/cyder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cyder/subscriptions","organizations_url":"https://api.github.com/users/cyder/orgs","repos_url":"https://api.github.com/users/cyder/repos","events_url":"https://api.github.com/users/cyder/events{/privacy}","received_events_url":"https://api.github.com/users/cyder/received_events","type":"Organization","site_admin":false},"repo":{"id":125134914,"node_id":"MDEwOlJlcG9zaXRvcnkxMjUxMzQ5MTQ=","name":"emojix","full_name":"cyder/emojix","owner":{"login":"cyder","id":25344502,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI1MzQ0NTAy","avatar_url":"https://avatars3.githubusercontent.com/u/25344502?v=4","gravatar_id":"","url":"https://api.github.com/users/cyder","html_url":"https://github.com/cyder","followers_url":"https://api.github.com/users/cyder/followers","following_url":"https://api.github.com/users/cyder/following{/other_user}","gists_url":"https://api.github.com/users/cyder/gists{/gist_id}","starred_url":"https://api.github.com/users/cyder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cyder/subscriptions","organizations_url":"https://api.github.com/users/cyder/orgs","repos_url":"https://api.github.com/users/cyder/repos","events_url":"https://api.github.com/users/cyder/events{/privacy}","received_events_url":"https://api.github.com/users/cyder/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cyder/emojix","description":"Let's share slack emojis!","fork":false,"url":"https://api.github.com/repos/cyder/emojix","forks_url":"https://api.github.com/repos/cyder/emojix/forks","keys_url":"https://api.github.com/repos/cyder/emojix/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cyder/emojix/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cyder/emojix/teams","hooks_url":"https://api.github.com/repos/cyder/emojix/hooks","issue_events_url":"https://api.github.com/repos/cyder/emojix/issues/events{/number}","events_url":"https://api.github.com/repos/cyder/emojix/events","assignees_url":"https://api.github.com/repos/cyder/emojix/assignees{/user}","branches_url":"https://api.github.com/repos/cyder/emojix/branches{/branch}","tags_url":"https://api.github.com/repos/cyder/emojix/tags","blobs_url":"https://api.github.com/repos/cyder/emojix/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cyder/emojix/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cyder/emojix/git/refs{/sha}","trees_url":"https://api.github.com/repos/cyder/emojix/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cyder/emojix/statuses/{sha}","languages_url":"https://api.github.com/repos/cyder/emojix/languages","stargazers_url":"https://api.github.com/repos/cyder/emojix/stargazers","contributors_url":"https://api.github.com/repos/cyder/emojix/contributors","subscribers_url":"https://api.github.com/repos/cyder/emojix/subscribers","subscription_url":"https://api.github.com/repos/cyder/emojix/subscription","commits_url":"https://api.github.com/repos/cyder/emojix/commits{/sha}","git_commits_url":"https://api.github.com/repos/cyder/emojix/git/commits{/sha}","comments_url":"https://api.github.com/repos/cyder/emojix/comments{/number}","issue_comment_url":"https://api.github.com/repos/cyder/emojix/issues/comments{/number}","contents_url":"https://api.github.com/repos/cyder/emojix/contents/{+path}","compare_url":"https://api.github.com/repos/cyder/emojix/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cyder/emojix/merges","archive_url":"https://api.github.com/repos/cyder/emojix/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cyder/emojix/downloads","issues_url":"https://api.github.com/repos/cyder/emojix/issues{/number}","pulls_url":"https://api.github.com/repos/cyder/emojix/pulls{/number}","milestones_url":"https://api.github.com/repos/cyder/emojix/milestones{/number}","notifications_url":"https://api.github.com/repos/cyder/emojix/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cyder/emojix/labels{/name}","releases_url":"https://api.github.com/repos/cyder/emojix/releases{/id}","deployments_url":"https://api.github.com/repos/cyder/emojix/deployments","created_at":"2018-03-14T01:02:53Z","updated_at":"2018-06-14T12:38:03Z","pushed_at":"2018-06-14T17:29:50Z","git_url":"git://github.com/cyder/emojix.git","ssh_url":"git@github.com:cyder/emojix.git","clone_url":"https://github.com/cyder/emojix.git","svn_url":"https://github.com/cyder/emojix","homepage":null,"size":641,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":22,"license":null,"forks":1,"open_issues":22,"watchers":0,"default_branch":"master"}},"base":{"label":"cyder:master","ref":"master","sha":"b4833985524274f32a4517629d11ad71ccb4e587","user":{"login":"cyder","id":25344502,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI1MzQ0NTAy","avatar_url":"https://avatars3.githubusercontent.com/u/25344502?v=4","gravatar_id":"","url":"https://api.github.com/users/cyder","html_url":"https://github.com/cyder","followers_url":"https://api.github.com/users/cyder/followers","following_url":"https://api.github.com/users/cyder/following{/other_user}","gists_url":"https://api.github.com/users/cyder/gists{/gist_id}","starred_url":"https://api.github.com/users/cyder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cyder/subscriptions","organizations_url":"https://api.github.com/users/cyder/orgs","repos_url":"https://api.github.com/users/cyder/repos","events_url":"https://api.github.com/users/cyder/events{/privacy}","received_events_url":"https://api.github.com/users/cyder/received_events","type":"Organization","site_admin":false},"repo":{"id":125134914,"node_id":"MDEwOlJlcG9zaXRvcnkxMjUxMzQ5MTQ=","name":"emojix","full_name":"cyder/emojix","owner":{"login":"cyder","id":25344502,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI1MzQ0NTAy","avatar_url":"https://avatars3.githubusercontent.com/u/25344502?v=4","gravatar_id":"","url":"https://api.github.com/users/cyder","html_url":"https://github.com/cyder","followers_url":"https://api.github.com/users/cyder/followers","following_url":"https://api.github.com/users/cyder/following{/other_user}","gists_url":"https://api.github.com/users/cyder/gists{/gist_id}","starred_url":"https://api.github.com/users/cyder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cyder/subscriptions","organizations_url":"https://api.github.com/users/cyder/orgs","repos_url":"https://api.github.com/users/cyder/repos","events_url":"https://api.github.com/users/cyder/events{/privacy}","received_events_url":"https://api.github.com/users/cyder/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cyder/emojix","description":"Let's share slack emojis!","fork":false,"url":"https://api.github.com/repos/cyder/emojix","forks_url":"https://api.github.com/repos/cyder/emojix/forks","keys_url":"https://api.github.com/repos/cyder/emojix/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cyder/emojix/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cyder/emojix/teams","hooks_url":"https://api.github.com/repos/cyder/emojix/hooks","issue_events_url":"https://api.github.com/repos/cyder/emojix/issues/events{/number}","events_url":"https://api.github.com/repos/cyder/emojix/events","assignees_url":"https://api.github.com/repos/cyder/emojix/assignees{/user}","branches_url":"https://api.github.com/repos/cyder/emojix/branches{/branch}","tags_url":"https://api.github.com/repos/cyder/emojix/tags","blobs_url":"https://api.github.com/repos/cyder/emojix/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cyder/emojix/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cyder/emojix/git/refs{/sha}","trees_url":"https://api.github.com/repos/cyder/emojix/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cyder/emojix/statuses/{sha}","languages_url":"https://api.github.com/repos/cyder/emojix/languages","stargazers_url":"https://api.github.com/repos/cyder/emojix/stargazers","contributors_url":"https://api.github.com/repos/cyder/emojix/contributors","subscribers_url":"https://api.github.com/repos/cyder/emojix/subscribers","subscription_url":"https://api.github.com/repos/cyder/emojix/subscription","commits_url":"https://api.github.com/repos/cyder/emojix/commits{/sha}","git_commits_url":"https://api.github.com/repos/cyder/emojix/git/commits{/sha}","comments_url":"https://api.github.com/repos/cyder/emojix/comments{/number}","issue_comment_url":"https://api.github.com/repos/cyder/emojix/issues/comments{/number}","contents_url":"https://api.github.com/repos/cyder/emojix/contents/{+path}","compare_url":"https://api.github.com/repos/cyder/emojix/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cyder/emojix/merges","archive_url":"https://api.github.com/repos/cyder/emojix/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cyder/emojix/downloads","issues_url":"https://api.github.com/repos/cyder/emojix/issues{/number}","pulls_url":"https://api.github.com/repos/cyder/emojix/pulls{/number}","milestones_url":"https://api.github.com/repos/cyder/emojix/milestones{/number}","notifications_url":"https://api.github.com/repos/cyder/emojix/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cyder/emojix/labels{/name}","releases_url":"https://api.github.com/repos/cyder/emojix/releases{/id}","deployments_url":"https://api.github.com/repos/cyder/emojix/deployments","created_at":"2018-03-14T01:02:53Z","updated_at":"2018-06-14T12:38:03Z","pushed_at":"2018-06-14T17:29:50Z","git_url":"git://github.com/cyder/emojix.git","ssh_url":"git@github.com:cyder/emojix.git","clone_url":"https://github.com/cyder/emojix.git","svn_url":"https://github.com/cyder/emojix","homepage":null,"size":641,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":22,"license":null,"forks":1,"open_issues":22,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cyder/emojix/pulls/71"},"html":{"href":"https://github.com/cyder/emojix/pull/71"},"issue":{"href":"https://api.github.com/repos/cyder/emojix/issues/71"},"comments":{"href":"https://api.github.com/repos/cyder/emojix/issues/71/comments"},"review_comments":{"href":"https://api.github.com/repos/cyder/emojix/pulls/71/comments"},"review_comment":{"href":"https://api.github.com/repos/cyder/emojix/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cyder/emojix/pulls/71/commits"},"statuses":{"href":"https://api.github.com/repos/cyder/emojix/statuses/51ea0d60231e6e6113c3321b3f51abe68360e1e1"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"Mori-Atsushi"}}