{"action":"created","comment":{"url":"https://api.github.com/repos/kiev-ruby/redwings/pulls/comments/33889751","id":33889751,"diff_hunk":"@@ -0,0 +1,27 @@\n+class UsersController < ApplicationController\n+\n+  def index\n+    @users = User.admin(false).deleted(false)\n+    @users_deleted = User.admin(false).deleted(true)\n+  end\n+\n+  def sync\n+    slack_users = User.slack_users\n+\n+    slack_users.each do |slack_user|\n+      if User.is_new?(slack_user[\"email\"])\n+        username =   slack_user[\"username\"]\n+      \tdeleted =    slack_user[\"deleted\"]\n+      \tfirst_name = slack_user[\"first_name\"]\n+      \tlast_name =  slack_user[\"last_name\"]\n+      \timage_48 =   slack_user[\"image_48\"]\n+      \temail =      slack_user[\"email\"]\n+      \tUser.create(username: username, first_name: first_name, last_name: last_name, email: email,\n+      \t\t    deleted: deleted, image_48: image_48, password: \"1111\", password_confirmation: \"1111\")\n+      end","path":"app/controllers/users_controller.rb","position":21,"original_position":21,"commit_id":"6f1ba864dd25e289361a2eb70f49557440cd3668","original_commit_id":"6f1ba864dd25e289361a2eb70f49557440cd3668","user":{"login":"beornborn","id":1485786,"avatar_url":"https://avatars.githubusercontent.com/u/1485786?v=3","gravatar_id":"","url":"https://api.github.com/users/beornborn","html_url":"https://github.com/beornborn","followers_url":"https://api.github.com/users/beornborn/followers","following_url":"https://api.github.com/users/beornborn/following{/other_user}","gists_url":"https://api.github.com/users/beornborn/gists{/gist_id}","starred_url":"https://api.github.com/users/beornborn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/beornborn/subscriptions","organizations_url":"https://api.github.com/users/beornborn/orgs","repos_url":"https://api.github.com/users/beornborn/repos","events_url":"https://api.github.com/users/beornborn/events{/privacy}","received_events_url":"https://api.github.com/users/beornborn/received_events","type":"User","site_admin":false},"body":"как насчет User.create slack_user.merge(password: '111', password_confirmation: '111') ?","created_at":"2015-07-04T20:13:48Z","updated_at":"2015-07-04T20:13:48Z","html_url":"https://github.com/kiev-ruby/redwings/pull/36#discussion_r33889751","pull_request_url":"https://api.github.com/repos/kiev-ruby/redwings/pulls/36","_links":{"self":{"href":"https://api.github.com/repos/kiev-ruby/redwings/pulls/comments/33889751"},"html":{"href":"https://github.com/kiev-ruby/redwings/pull/36#discussion_r33889751"},"pull_request":{"href":"https://api.github.com/repos/kiev-ruby/redwings/pulls/36"}}},"pull_request":{"url":"https://api.github.com/repos/kiev-ruby/redwings/pulls/36","id":39083683,"html_url":"https://github.com/kiev-ruby/redwings/pull/36","diff_url":"https://github.com/kiev-ruby/redwings/pull/36.diff","patch_url":"https://github.com/kiev-ruby/redwings/pull/36.patch","issue_url":"https://api.github.com/repos/kiev-ruby/redwings/issues/36","number":36,"state":"open","locked":false,"title":"Feature/slack sync","user":{"login":"95kach","id":10588116,"avatar_url":"https://avatars.githubusercontent.com/u/10588116?v=3","gravatar_id":"","url":"https://api.github.com/users/95kach","html_url":"https://github.com/95kach","followers_url":"https://api.github.com/users/95kach/followers","following_url":"https://api.github.com/users/95kach/following{/other_user}","gists_url":"https://api.github.com/users/95kach/gists{/gist_id}","starred_url":"https://api.github.com/users/95kach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/95kach/subscriptions","organizations_url":"https://api.github.com/users/95kach/orgs","repos_url":"https://api.github.com/users/95kach/repos","events_url":"https://api.github.com/users/95kach/events{/privacy}","received_events_url":"https://api.github.com/users/95kach/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-07-02T13:43:34Z","updated_at":"2015-07-04T20:13:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5781662a787c35fb1523cd77e0337a9c8ccb8b54","assignee":{"login":"beornborn","id":1485786,"avatar_url":"https://avatars.githubusercontent.com/u/1485786?v=3","gravatar_id":"","url":"https://api.github.com/users/beornborn","html_url":"https://github.com/beornborn","followers_url":"https://api.github.com/users/beornborn/followers","following_url":"https://api.github.com/users/beornborn/following{/other_user}","gists_url":"https://api.github.com/users/beornborn/gists{/gist_id}","starred_url":"https://api.github.com/users/beornborn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/beornborn/subscriptions","organizations_url":"https://api.github.com/users/beornborn/orgs","repos_url":"https://api.github.com/users/beornborn/repos","events_url":"https://api.github.com/users/beornborn/events{/privacy}","received_events_url":"https://api.github.com/users/beornborn/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/kiev-ruby/redwings/pulls/36/commits","review_comments_url":"https://api.github.com/repos/kiev-ruby/redwings/pulls/36/comments","review_comment_url":"https://api.github.com/repos/kiev-ruby/redwings/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kiev-ruby/redwings/issues/36/comments","statuses_url":"https://api.github.com/repos/kiev-ruby/redwings/statuses/6f1ba864dd25e289361a2eb70f49557440cd3668","head":{"label":"kiev-ruby:feature/slack_sync","ref":"feature/slack_sync","sha":"6f1ba864dd25e289361a2eb70f49557440cd3668","user":{"login":"kiev-ruby","id":11543510,"avatar_url":"https://avatars.githubusercontent.com/u/11543510?v=3","gravatar_id":"","url":"https://api.github.com/users/kiev-ruby","html_url":"https://github.com/kiev-ruby","followers_url":"https://api.github.com/users/kiev-ruby/followers","following_url":"https://api.github.com/users/kiev-ruby/following{/other_user}","gists_url":"https://api.github.com/users/kiev-ruby/gists{/gist_id}","starred_url":"https://api.github.com/users/kiev-ruby/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kiev-ruby/subscriptions","organizations_url":"https://api.github.com/users/kiev-ruby/orgs","repos_url":"https://api.github.com/users/kiev-ruby/repos","events_url":"https://api.github.com/users/kiev-ruby/events{/privacy}","received_events_url":"https://api.github.com/users/kiev-ruby/received_events","type":"Organization","site_admin":false},"repo":{"id":36972191,"name":"redwings","full_name":"kiev-ruby/redwings","owner":{"login":"kiev-ruby","id":11543510,"avatar_url":"https://avatars.githubusercontent.com/u/11543510?v=3","gravatar_id":"","url":"https://api.github.com/users/kiev-ruby","html_url":"https://github.com/kiev-ruby","followers_url":"https://api.github.com/users/kiev-ruby/followers","following_url":"https://api.github.com/users/kiev-ruby/following{/other_user}","gists_url":"https://api.github.com/users/kiev-ruby/gists{/gist_id}","starred_url":"https://api.github.com/users/kiev-ruby/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kiev-ruby/subscriptions","organizations_url":"https://api.github.com/users/kiev-ruby/orgs","repos_url":"https://api.github.com/users/kiev-ruby/repos","events_url":"https://api.github.com/users/kiev-ruby/events{/privacy}","received_events_url":"https://api.github.com/users/kiev-ruby/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kiev-ruby/redwings","description":"team management service","fork":false,"url":"https://api.github.com/repos/kiev-ruby/redwings","forks_url":"https://api.github.com/repos/kiev-ruby/redwings/forks","keys_url":"https://api.github.com/repos/kiev-ruby/redwings/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kiev-ruby/redwings/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kiev-ruby/redwings/teams","hooks_url":"https://api.github.com/repos/kiev-ruby/redwings/hooks","issue_events_url":"https://api.github.com/repos/kiev-ruby/redwings/issues/events{/number}","events_url":"https://api.github.com/repos/kiev-ruby/redwings/events","assignees_url":"https://api.github.com/repos/kiev-ruby/redwings/assignees{/user}","branches_url":"https://api.github.com/repos/kiev-ruby/redwings/branches{/branch}","tags_url":"https://api.github.com/repos/kiev-ruby/redwings/tags","blobs_url":"https://api.github.com/repos/kiev-ruby/redwings/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kiev-ruby/redwings/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kiev-ruby/redwings/git/refs{/sha}","trees_url":"https://api.github.com/repos/kiev-ruby/redwings/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kiev-ruby/redwings/statuses/{sha}","languages_url":"https://api.github.com/repos/kiev-ruby/redwings/languages","stargazers_url":"https://api.github.com/repos/kiev-ruby/redwings/stargazers","contributors_url":"https://api.github.com/repos/kiev-ruby/redwings/contributors","subscribers_url":"https://api.github.com/repos/kiev-ruby/redwings/subscribers","subscription_url":"https://api.github.com/repos/kiev-ruby/redwings/subscription","commits_url":"https://api.github.com/repos/kiev-ruby/redwings/commits{/sha}","git_commits_url":"https://api.github.com/repos/kiev-ruby/redwings/git/commits{/sha}","comments_url":"https://api.github.com/repos/kiev-ruby/redwings/comments{/number}","issue_comment_url":"https://api.github.com/repos/kiev-ruby/redwings/issues/comments{/number}","contents_url":"https://api.github.com/repos/kiev-ruby/redwings/contents/{+path}","compare_url":"https://api.github.com/repos/kiev-ruby/redwings/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kiev-ruby/redwings/merges","archive_url":"https://api.github.com/repos/kiev-ruby/redwings/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kiev-ruby/redwings/downloads","issues_url":"https://api.github.com/repos/kiev-ruby/redwings/issues{/number}","pulls_url":"https://api.github.com/repos/kiev-ruby/redwings/pulls{/number}","milestones_url":"https://api.github.com/repos/kiev-ruby/redwings/milestones{/number}","notifications_url":"https://api.github.com/repos/kiev-ruby/redwings/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kiev-ruby/redwings/labels{/name}","releases_url":"https://api.github.com/repos/kiev-ruby/redwings/releases{/id}","created_at":"2015-06-06T07:53:33Z","updated_at":"2015-07-02T20:32:50Z","pushed_at":"2015-07-04T20:09:32Z","git_url":"git://github.com/kiev-ruby/redwings.git","ssh_url":"git@github.com:kiev-ruby/redwings.git","clone_url":"https://github.com/kiev-ruby/redwings.git","svn_url":"https://github.com/kiev-ruby/redwings","homepage":"https://redwings.herokuapp.com/","size":808,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"develop"}},"base":{"label":"kiev-ruby:develop","ref":"develop","sha":"e9a62f4bb31e1662d256b9d7e32cf075fd2a9efd","user":{"login":"kiev-ruby","id":11543510,"avatar_url":"https://avatars.githubusercontent.com/u/11543510?v=3","gravatar_id":"","url":"https://api.github.com/users/kiev-ruby","html_url":"https://github.com/kiev-ruby","followers_url":"https://api.github.com/users/kiev-ruby/followers","following_url":"https://api.github.com/users/kiev-ruby/following{/other_user}","gists_url":"https://api.github.com/users/kiev-ruby/gists{/gist_id}","starred_url":"https://api.github.com/users/kiev-ruby/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kiev-ruby/subscriptions","organizations_url":"https://api.github.com/users/kiev-ruby/orgs","repos_url":"https://api.github.com/users/kiev-ruby/repos","events_url":"https://api.github.com/users/kiev-ruby/events{/privacy}","received_events_url":"https://api.github.com/users/kiev-ruby/received_events","type":"Organization","site_admin":false},"repo":{"id":36972191,"name":"redwings","full_name":"kiev-ruby/redwings","owner":{"login":"kiev-ruby","id":11543510,"avatar_url":"https://avatars.githubusercontent.com/u/11543510?v=3","gravatar_id":"","url":"https://api.github.com/users/kiev-ruby","html_url":"https://github.com/kiev-ruby","followers_url":"https://api.github.com/users/kiev-ruby/followers","following_url":"https://api.github.com/users/kiev-ruby/following{/other_user}","gists_url":"https://api.github.com/users/kiev-ruby/gists{/gist_id}","starred_url":"https://api.github.com/users/kiev-ruby/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kiev-ruby/subscriptions","organizations_url":"https://api.github.com/users/kiev-ruby/orgs","repos_url":"https://api.github.com/users/kiev-ruby/repos","events_url":"https://api.github.com/users/kiev-ruby/events{/privacy}","received_events_url":"https://api.github.com/users/kiev-ruby/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kiev-ruby/redwings","description":"team management service","fork":false,"url":"https://api.github.com/repos/kiev-ruby/redwings","forks_url":"https://api.github.com/repos/kiev-ruby/redwings/forks","keys_url":"https://api.github.com/repos/kiev-ruby/redwings/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kiev-ruby/redwings/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kiev-ruby/redwings/teams","hooks_url":"https://api.github.com/repos/kiev-ruby/redwings/hooks","issue_events_url":"https://api.github.com/repos/kiev-ruby/redwings/issues/events{/number}","events_url":"https://api.github.com/repos/kiev-ruby/redwings/events","assignees_url":"https://api.github.com/repos/kiev-ruby/redwings/assignees{/user}","branches_url":"https://api.github.com/repos/kiev-ruby/redwings/branches{/branch}","tags_url":"https://api.github.com/repos/kiev-ruby/redwings/tags","blobs_url":"https://api.github.com/repos/kiev-ruby/redwings/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kiev-ruby/redwings/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kiev-ruby/redwings/git/refs{/sha}","trees_url":"https://api.github.com/repos/kiev-ruby/redwings/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kiev-ruby/redwings/statuses/{sha}","languages_url":"https://api.github.com/repos/kiev-ruby/redwings/languages","stargazers_url":"https://api.github.com/repos/kiev-ruby/redwings/stargazers","contributors_url":"https://api.github.com/repos/kiev-ruby/redwings/contributors","subscribers_url":"https://api.github.com/repos/kiev-ruby/redwings/subscribers","subscription_url":"https://api.github.com/repos/kiev-ruby/redwings/subscription","commits_url":"https://api.github.com/repos/kiev-ruby/redwings/commits{/sha}","git_commits_url":"https://api.github.com/repos/kiev-ruby/redwings/git/commits{/sha}","comments_url":"https://api.github.com/repos/kiev-ruby/redwings/comments{/number}","issue_comment_url":"https://api.github.com/repos/kiev-ruby/redwings/issues/comments{/number}","contents_url":"https://api.github.com/repos/kiev-ruby/redwings/contents/{+path}","compare_url":"https://api.github.com/repos/kiev-ruby/redwings/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kiev-ruby/redwings/merges","archive_url":"https://api.github.com/repos/kiev-ruby/redwings/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kiev-ruby/redwings/downloads","issues_url":"https://api.github.com/repos/kiev-ruby/redwings/issues{/number}","pulls_url":"https://api.github.com/repos/kiev-ruby/redwings/pulls{/number}","milestones_url":"https://api.github.com/repos/kiev-ruby/redwings/milestones{/number}","notifications_url":"https://api.github.com/repos/kiev-ruby/redwings/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kiev-ruby/redwings/labels{/name}","releases_url":"https://api.github.com/repos/kiev-ruby/redwings/releases{/id}","created_at":"2015-06-06T07:53:33Z","updated_at":"2015-07-02T20:32:50Z","pushed_at":"2015-07-04T20:09:32Z","git_url":"git://github.com/kiev-ruby/redwings.git","ssh_url":"git@github.com:kiev-ruby/redwings.git","clone_url":"https://github.com/kiev-ruby/redwings.git","svn_url":"https://github.com/kiev-ruby/redwings","homepage":"https://redwings.herokuapp.com/","size":808,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/kiev-ruby/redwings/pulls/36"},"html":{"href":"https://github.com/kiev-ruby/redwings/pull/36"},"issue":{"href":"https://api.github.com/repos/kiev-ruby/redwings/issues/36"},"comments":{"href":"https://api.github.com/repos/kiev-ruby/redwings/issues/36/comments"},"review_comments":{"href":"https://api.github.com/repos/kiev-ruby/redwings/pulls/36/comments"},"review_comment":{"href":"https://api.github.com/repos/kiev-ruby/redwings/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kiev-ruby/redwings/pulls/36/commits"},"statuses":{"href":"https://api.github.com/repos/kiev-ruby/redwings/statuses/6f1ba864dd25e289361a2eb70f49557440cd3668"}}}}