{"action":"created","comment":{"url":"https://api.github.com/repos/framgia/framgia_crb_v2/pulls/comments/65490779","id":65490779,"diff_hunk":"@@ -0,0 +1,27 @@\n+class ChatworkServices\n+  def initialize event\n+    @event = event\n+  end\n+\n+  def create_tasks\n+    if @event.room_id && @event.attendees\n+      unix_time_limit = Time.parse(@event.start_date.to_s).to_i\n+      to_ids = get_chatwork_ids\n+      ChatWork::Task.create(\n+        room_id: @event.room_id,\n+        body: @event.task_content,\n+        to_ids: to_ids,\n+        limit: unix_time_limit\n+      )\n+    end\n+  end\n+\n+  private\n+  def get_chatwork_ids\n+    chatwork_ids = Array.new\n+    @event.attendees.each do |attendee|","path":"app/services/chatwork_services.rb","position":21,"original_position":22,"commit_id":"b2200f679290dcc990bb81a411d29b98748ddc46","original_commit_id":"e82efeabed6f074b7504f0cebbdb4dcb93051d46","user":{"login":"dieunb","id":2122175,"avatar_url":"https://avatars.githubusercontent.com/u/2122175?v=3","gravatar_id":"","url":"https://api.github.com/users/dieunb","html_url":"https://github.com/dieunb","followers_url":"https://api.github.com/users/dieunb/followers","following_url":"https://api.github.com/users/dieunb/following{/other_user}","gists_url":"https://api.github.com/users/dieunb/gists{/gist_id}","starred_url":"https://api.github.com/users/dieunb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dieunb/subscriptions","organizations_url":"https://api.github.com/users/dieunb/orgs","repos_url":"https://api.github.com/users/dieunb/repos","events_url":"https://api.github.com/users/dieunb/events{/privacy}","received_events_url":"https://api.github.com/users/dieunb/received_events","type":"User","site_admin":false},"body":"```\r\n @event.attendees.map{|attendee| attendee.chatwork_id}\r\n```","created_at":"2016-06-02T06:40:29Z","updated_at":"2016-06-02T06:40:29Z","html_url":"https://github.com/framgia/framgia_crb_v2/pull/117#discussion_r65490779","pull_request_url":"https://api.github.com/repos/framgia/framgia_crb_v2/pulls/117","_links":{"self":{"href":"https://api.github.com/repos/framgia/framgia_crb_v2/pulls/comments/65490779"},"html":{"href":"https://github.com/framgia/framgia_crb_v2/pull/117#discussion_r65490779"},"pull_request":{"href":"https://api.github.com/repos/framgia/framgia_crb_v2/pulls/117"}}},"pull_request":{"url":"https://api.github.com/repos/framgia/framgia_crb_v2/pulls/117","id":72145334,"html_url":"https://github.com/framgia/framgia_crb_v2/pull/117","diff_url":"https://github.com/framgia/framgia_crb_v2/pull/117.diff","patch_url":"https://github.com/framgia/framgia_crb_v2/pull/117.patch","issue_url":"https://api.github.com/repos/framgia/framgia_crb_v2/issues/117","number":117,"state":"open","locked":false,"title":"Finish task create task when create event","user":{"login":"tqtrung09","id":17002899,"avatar_url":"https://avatars.githubusercontent.com/u/17002899?v=3","gravatar_id":"","url":"https://api.github.com/users/tqtrung09","html_url":"https://github.com/tqtrung09","followers_url":"https://api.github.com/users/tqtrung09/followers","following_url":"https://api.github.com/users/tqtrung09/following{/other_user}","gists_url":"https://api.github.com/users/tqtrung09/gists{/gist_id}","starred_url":"https://api.github.com/users/tqtrung09/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tqtrung09/subscriptions","organizations_url":"https://api.github.com/users/tqtrung09/orgs","repos_url":"https://api.github.com/users/tqtrung09/repos","events_url":"https://api.github.com/users/tqtrung09/events{/privacy}","received_events_url":"https://api.github.com/users/tqtrung09/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-06-01T09:05:31Z","updated_at":"2016-06-02T06:40:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8521e0b0d0f78cc5f5715b24f0ecef89531cdacd","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/framgia/framgia_crb_v2/pulls/117/commits","review_comments_url":"https://api.github.com/repos/framgia/framgia_crb_v2/pulls/117/comments","review_comment_url":"https://api.github.com/repos/framgia/framgia_crb_v2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/framgia/framgia_crb_v2/issues/117/comments","statuses_url":"https://api.github.com/repos/framgia/framgia_crb_v2/statuses/b2200f679290dcc990bb81a411d29b98748ddc46","head":{"label":"tqtrung09:creat-task-when-create-event","ref":"creat-task-when-create-event","sha":"b2200f679290dcc990bb81a411d29b98748ddc46","user":{"login":"tqtrung09","id":17002899,"avatar_url":"https://avatars.githubusercontent.com/u/17002899?v=3","gravatar_id":"","url":"https://api.github.com/users/tqtrung09","html_url":"https://github.com/tqtrung09","followers_url":"https://api.github.com/users/tqtrung09/followers","following_url":"https://api.github.com/users/tqtrung09/following{/other_user}","gists_url":"https://api.github.com/users/tqtrung09/gists{/gist_id}","starred_url":"https://api.github.com/users/tqtrung09/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tqtrung09/subscriptions","organizations_url":"https://api.github.com/users/tqtrung09/orgs","repos_url":"https://api.github.com/users/tqtrung09/repos","events_url":"https://api.github.com/users/tqtrung09/events{/privacy}","received_events_url":"https://api.github.com/users/tqtrung09/received_events","type":"User","site_admin":false},"repo":{"id":55934632,"name":"framgia_crb_v2","full_name":"tqtrung09/framgia_crb_v2","owner":{"login":"tqtrung09","id":17002899,"avatar_url":"https://avatars.githubusercontent.com/u/17002899?v=3","gravatar_id":"","url":"https://api.github.com/users/tqtrung09","html_url":"https://github.com/tqtrung09","followers_url":"https://api.github.com/users/tqtrung09/followers","following_url":"https://api.github.com/users/tqtrung09/following{/other_user}","gists_url":"https://api.github.com/users/tqtrung09/gists{/gist_id}","starred_url":"https://api.github.com/users/tqtrung09/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tqtrung09/subscriptions","organizations_url":"https://api.github.com/users/tqtrung09/orgs","repos_url":"https://api.github.com/users/tqtrung09/repos","events_url":"https://api.github.com/users/tqtrung09/events{/privacy}","received_events_url":"https://api.github.com/users/tqtrung09/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tqtrung09/framgia_crb_v2","description":"Conference Room Booking System","fork":true,"url":"https://api.github.com/repos/tqtrung09/framgia_crb_v2","forks_url":"https://api.github.com/repos/tqtrung09/framgia_crb_v2/forks","keys_url":"https://api.github.com/repos/tqtrung09/framgia_crb_v2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tqtrung09/framgia_crb_v2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tqtrung09/framgia_crb_v2/teams","hooks_url":"https://api.github.com/repos/tqtrung09/framgia_crb_v2/hooks","issue_events_url":"https://api.github.com/repos/tqtrung09/framgia_crb_v2/issues/events{/number}","events_url":"https://api.github.com/repos/tqtrung09/framgia_crb_v2/events","assignees_url":"https://api.github.com/repos/tqtrung09/framgia_crb_v2/assignees{/user}","branches_url":"https://api.github.com/repos/tqtrung09/framgia_crb_v2/branches{/branch}","tags_url":"https://api.github.com/repos/tqtrung09/framgia_crb_v2/tags","blobs_url":"https://api.github.com/repos/tqtrung09/framgia_crb_v2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tqtrung09/framgia_crb_v2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tqtrung09/framgia_crb_v2/git/refs{/sha}","trees_url":"https://api.github.com/repos/tqtrung09/framgia_crb_v2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tqtrung09/framgia_crb_v2/statuses/{sha}","languages_url":"https://api.github.com/repos/tqtrung09/framgia_crb_v2/languages","stargazers_url":"https://api.github.com/repos/tqtrung09/framgia_crb_v2/stargazers","contributors_url":"https://api.github.com/repos/tqtrung09/framgia_crb_v2/contributors","subscribers_url":"https://api.github.com/repos/tqtrung09/framgia_crb_v2/subscribers","subscription_url":"https://api.github.com/repos/tqtrung09/framgia_crb_v2/subscription","commits_url":"https://api.github.com/repos/tqtrung09/framgia_crb_v2/commits{/sha}","git_commits_url":"https://api.github.com/repos/tqtrung09/framgia_crb_v2/git/commits{/sha}","comments_url":"https://api.github.com/repos/tqtrung09/framgia_crb_v2/comments{/number}","issue_comment_url":"https://api.github.com/repos/tqtrung09/framgia_crb_v2/issues/comments{/number}","contents_url":"https://api.github.com/repos/tqtrung09/framgia_crb_v2/contents/{+path}","compare_url":"https://api.github.com/repos/tqtrung09/framgia_crb_v2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tqtrung09/framgia_crb_v2/merges","archive_url":"https://api.github.com/repos/tqtrung09/framgia_crb_v2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tqtrung09/framgia_crb_v2/downloads","issues_url":"https://api.github.com/repos/tqtrung09/framgia_crb_v2/issues{/number}","pulls_url":"https://api.github.com/repos/tqtrung09/framgia_crb_v2/pulls{/number}","milestones_url":"https://api.github.com/repos/tqtrung09/framgia_crb_v2/milestones{/number}","notifications_url":"https://api.github.com/repos/tqtrung09/framgia_crb_v2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tqtrung09/framgia_crb_v2/labels{/name}","releases_url":"https://api.github.com/repos/tqtrung09/framgia_crb_v2/releases{/id}","deployments_url":"https://api.github.com/repos/tqtrung09/framgia_crb_v2/deployments","created_at":"2016-04-11T02:13:06Z","updated_at":"2016-04-07T02:42:44Z","pushed_at":"2016-06-02T06:20:46Z","git_url":"git://github.com/tqtrung09/framgia_crb_v2.git","ssh_url":"git@github.com:tqtrung09/framgia_crb_v2.git","clone_url":"https://github.com/tqtrung09/framgia_crb_v2.git","svn_url":"https://github.com/tqtrung09/framgia_crb_v2","homepage":null,"size":621,"stargazers_count":0,"watchers_count":0,"language":null,"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":"framgia:develop","ref":"develop","sha":"35d627b9020e84ae97f4250491b48e12026d80df","user":{"login":"framgia","id":2322183,"avatar_url":"https://avatars.githubusercontent.com/u/2322183?v=3","gravatar_id":"","url":"https://api.github.com/users/framgia","html_url":"https://github.com/framgia","followers_url":"https://api.github.com/users/framgia/followers","following_url":"https://api.github.com/users/framgia/following{/other_user}","gists_url":"https://api.github.com/users/framgia/gists{/gist_id}","starred_url":"https://api.github.com/users/framgia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/framgia/subscriptions","organizations_url":"https://api.github.com/users/framgia/orgs","repos_url":"https://api.github.com/users/framgia/repos","events_url":"https://api.github.com/users/framgia/events{/privacy}","received_events_url":"https://api.github.com/users/framgia/received_events","type":"Organization","site_admin":false},"repo":{"id":55657829,"name":"framgia_crb_v2","full_name":"framgia/framgia_crb_v2","owner":{"login":"framgia","id":2322183,"avatar_url":"https://avatars.githubusercontent.com/u/2322183?v=3","gravatar_id":"","url":"https://api.github.com/users/framgia","html_url":"https://github.com/framgia","followers_url":"https://api.github.com/users/framgia/followers","following_url":"https://api.github.com/users/framgia/following{/other_user}","gists_url":"https://api.github.com/users/framgia/gists{/gist_id}","starred_url":"https://api.github.com/users/framgia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/framgia/subscriptions","organizations_url":"https://api.github.com/users/framgia/orgs","repos_url":"https://api.github.com/users/framgia/repos","events_url":"https://api.github.com/users/framgia/events{/privacy}","received_events_url":"https://api.github.com/users/framgia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/framgia/framgia_crb_v2","description":"Conference Room Booking System","fork":false,"url":"https://api.github.com/repos/framgia/framgia_crb_v2","forks_url":"https://api.github.com/repos/framgia/framgia_crb_v2/forks","keys_url":"https://api.github.com/repos/framgia/framgia_crb_v2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/framgia/framgia_crb_v2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/framgia/framgia_crb_v2/teams","hooks_url":"https://api.github.com/repos/framgia/framgia_crb_v2/hooks","issue_events_url":"https://api.github.com/repos/framgia/framgia_crb_v2/issues/events{/number}","events_url":"https://api.github.com/repos/framgia/framgia_crb_v2/events","assignees_url":"https://api.github.com/repos/framgia/framgia_crb_v2/assignees{/user}","branches_url":"https://api.github.com/repos/framgia/framgia_crb_v2/branches{/branch}","tags_url":"https://api.github.com/repos/framgia/framgia_crb_v2/tags","blobs_url":"https://api.github.com/repos/framgia/framgia_crb_v2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/framgia/framgia_crb_v2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/framgia/framgia_crb_v2/git/refs{/sha}","trees_url":"https://api.github.com/repos/framgia/framgia_crb_v2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/framgia/framgia_crb_v2/statuses/{sha}","languages_url":"https://api.github.com/repos/framgia/framgia_crb_v2/languages","stargazers_url":"https://api.github.com/repos/framgia/framgia_crb_v2/stargazers","contributors_url":"https://api.github.com/repos/framgia/framgia_crb_v2/contributors","subscribers_url":"https://api.github.com/repos/framgia/framgia_crb_v2/subscribers","subscription_url":"https://api.github.com/repos/framgia/framgia_crb_v2/subscription","commits_url":"https://api.github.com/repos/framgia/framgia_crb_v2/commits{/sha}","git_commits_url":"https://api.github.com/repos/framgia/framgia_crb_v2/git/commits{/sha}","comments_url":"https://api.github.com/repos/framgia/framgia_crb_v2/comments{/number}","issue_comment_url":"https://api.github.com/repos/framgia/framgia_crb_v2/issues/comments{/number}","contents_url":"https://api.github.com/repos/framgia/framgia_crb_v2/contents/{+path}","compare_url":"https://api.github.com/repos/framgia/framgia_crb_v2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/framgia/framgia_crb_v2/merges","archive_url":"https://api.github.com/repos/framgia/framgia_crb_v2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/framgia/framgia_crb_v2/downloads","issues_url":"https://api.github.com/repos/framgia/framgia_crb_v2/issues{/number}","pulls_url":"https://api.github.com/repos/framgia/framgia_crb_v2/pulls{/number}","milestones_url":"https://api.github.com/repos/framgia/framgia_crb_v2/milestones{/number}","notifications_url":"https://api.github.com/repos/framgia/framgia_crb_v2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/framgia/framgia_crb_v2/labels{/name}","releases_url":"https://api.github.com/repos/framgia/framgia_crb_v2/releases{/id}","deployments_url":"https://api.github.com/repos/framgia/framgia_crb_v2/deployments","created_at":"2016-04-07T02:42:19Z","updated_at":"2016-05-03T02:07:01Z","pushed_at":"2016-06-02T06:37:13Z","git_url":"git://github.com/framgia/framgia_crb_v2.git","ssh_url":"git@github.com:framgia/framgia_crb_v2.git","clone_url":"https://github.com/framgia/framgia_crb_v2.git","svn_url":"https://github.com/framgia/framgia_crb_v2","homepage":null,"size":661,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"open_issues_count":8,"forks":13,"open_issues":8,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/framgia/framgia_crb_v2/pulls/117"},"html":{"href":"https://github.com/framgia/framgia_crb_v2/pull/117"},"issue":{"href":"https://api.github.com/repos/framgia/framgia_crb_v2/issues/117"},"comments":{"href":"https://api.github.com/repos/framgia/framgia_crb_v2/issues/117/comments"},"review_comments":{"href":"https://api.github.com/repos/framgia/framgia_crb_v2/pulls/117/comments"},"review_comment":{"href":"https://api.github.com/repos/framgia/framgia_crb_v2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/framgia/framgia_crb_v2/pulls/117/commits"},"statuses":{"href":"https://api.github.com/repos/framgia/framgia_crb_v2/statuses/b2200f679290dcc990bb81a411d29b98748ddc46"}}}}
{"actor":{"display_login":"dieunb"}}