{"action":"created","comment":{"url":"https://api.github.com/repos/cubing/worldcubeassociation.org/pulls/comments/57592612","id":57592612,"diff_hunk":"@@ -31,20 +31,15 @@ def self.random_user\n \n # Create members and leaders for every WCA team\n UsersController.WCA_TEAMS.each do |team|\n-  leader_team = :\"#{team}_leader\"\n-  leader = User.new(random_user.merge(\n-    team => true,\n-    leader_team => true,\n-    name: team.to_s,\n-  ))\n-  leader.skip_confirmation!\n-  leader.save!\n+  team_id = Team.find_by_friendly_id(team).id","path":"WcaOnRails/db/seeds/development/users.seeds.rb","position":12,"original_position":12,"commit_id":"049006118fbc67b6166b834e3073e26652b8335b","original_commit_id":"049006118fbc67b6166b834e3073e26652b8335b","user":{"login":"jfly","id":277474,"avatar_url":"https://avatars.githubusercontent.com/u/277474?v=3","gravatar_id":"","url":"https://api.github.com/users/jfly","html_url":"https://github.com/jfly","followers_url":"https://api.github.com/users/jfly/followers","following_url":"https://api.github.com/users/jfly/following{/other_user}","gists_url":"https://api.github.com/users/jfly/gists{/gist_id}","starred_url":"https://api.github.com/users/jfly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jfly/subscriptions","organizations_url":"https://api.github.com/users/jfly/orgs","repos_url":"https://api.github.com/users/jfly/repos","events_url":"https://api.github.com/users/jfly/events{/privacy}","received_events_url":"https://api.github.com/users/jfly/received_events","type":"User","site_admin":false},"body":"Also, I think this seed file now depends on running *after* the new `teams.seeds.rb` file, so it would probably be best to wrap this while file in a call to `after :teams` (see https://github.com/james2m/seedbank#usage).","created_at":"2016-03-28T16:31:18Z","updated_at":"2016-03-28T16:31:18Z","html_url":"https://github.com/cubing/worldcubeassociation.org/pull/439#discussion_r57592612","pull_request_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/pulls/439","_links":{"self":{"href":"https://api.github.com/repos/cubing/worldcubeassociation.org/pulls/comments/57592612"},"html":{"href":"https://github.com/cubing/worldcubeassociation.org/pull/439#discussion_r57592612"},"pull_request":{"href":"https://api.github.com/repos/cubing/worldcubeassociation.org/pulls/439"}}},"pull_request":{"url":"https://api.github.com/repos/cubing/worldcubeassociation.org/pulls/439","id":64334584,"html_url":"https://github.com/cubing/worldcubeassociation.org/pull/439","diff_url":"https://github.com/cubing/worldcubeassociation.org/pull/439.diff","patch_url":"https://github.com/cubing/worldcubeassociation.org/pull/439.patch","issue_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/issues/439","number":439,"state":"open","locked":false,"title":"Fix issues connected with database setup","user":{"login":"jonatanklosko","id":17034772,"avatar_url":"https://avatars.githubusercontent.com/u/17034772?v=3","gravatar_id":"","url":"https://api.github.com/users/jonatanklosko","html_url":"https://github.com/jonatanklosko","followers_url":"https://api.github.com/users/jonatanklosko/followers","following_url":"https://api.github.com/users/jonatanklosko/following{/other_user}","gists_url":"https://api.github.com/users/jonatanklosko/gists{/gist_id}","starred_url":"https://api.github.com/users/jonatanklosko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonatanklosko/subscriptions","organizations_url":"https://api.github.com/users/jonatanklosko/orgs","repos_url":"https://api.github.com/users/jonatanklosko/repos","events_url":"https://api.github.com/users/jonatanklosko/events{/privacy}","received_events_url":"https://api.github.com/users/jonatanklosko/received_events","type":"User","site_admin":false},"body":"This fixes errors occurring while populating database with seeds, caused by 850d27c.\r\nAlso I've added seeds to fill 'teams' table because despite [this migration](https://github.com/cubing/worldcubeassociation.org/blob/master/WcaOnRails/db/migrate/20160303144700_fill_teams_tables.rb) there was no records in the 'teams' in my database (not sure whether that's the correct way, please check it).","created_at":"2016-03-28T15:38:16Z","updated_at":"2016-03-28T16:31:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"63861cde322ab8bfed443644c5b173493ea5598b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/pulls/439/commits","review_comments_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/pulls/439/comments","review_comment_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/issues/439/comments","statuses_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/statuses/049006118fbc67b6166b834e3073e26652b8335b","head":{"label":"jonatanklosko:fix-seeds","ref":"fix-seeds","sha":"049006118fbc67b6166b834e3073e26652b8335b","user":{"login":"jonatanklosko","id":17034772,"avatar_url":"https://avatars.githubusercontent.com/u/17034772?v=3","gravatar_id":"","url":"https://api.github.com/users/jonatanklosko","html_url":"https://github.com/jonatanklosko","followers_url":"https://api.github.com/users/jonatanklosko/followers","following_url":"https://api.github.com/users/jonatanklosko/following{/other_user}","gists_url":"https://api.github.com/users/jonatanklosko/gists{/gist_id}","starred_url":"https://api.github.com/users/jonatanklosko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonatanklosko/subscriptions","organizations_url":"https://api.github.com/users/jonatanklosko/orgs","repos_url":"https://api.github.com/users/jonatanklosko/repos","events_url":"https://api.github.com/users/jonatanklosko/events{/privacy}","received_events_url":"https://api.github.com/users/jonatanklosko/received_events","type":"User","site_admin":false},"repo":{"id":54846746,"name":"worldcubeassociation.org","full_name":"jonatanklosko/worldcubeassociation.org","owner":{"login":"jonatanklosko","id":17034772,"avatar_url":"https://avatars.githubusercontent.com/u/17034772?v=3","gravatar_id":"","url":"https://api.github.com/users/jonatanklosko","html_url":"https://github.com/jonatanklosko","followers_url":"https://api.github.com/users/jonatanklosko/followers","following_url":"https://api.github.com/users/jonatanklosko/following{/other_user}","gists_url":"https://api.github.com/users/jonatanklosko/gists{/gist_id}","starred_url":"https://api.github.com/users/jonatanklosko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonatanklosko/subscriptions","organizations_url":"https://api.github.com/users/jonatanklosko/orgs","repos_url":"https://api.github.com/users/jonatanklosko/repos","events_url":"https://api.github.com/users/jonatanklosko/events{/privacy}","received_events_url":"https://api.github.com/users/jonatanklosko/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jonatanklosko/worldcubeassociation.org","description":"[WCA Project] All of the code that runs on worldcubeassociation.org","fork":true,"url":"https://api.github.com/repos/jonatanklosko/worldcubeassociation.org","forks_url":"https://api.github.com/repos/jonatanklosko/worldcubeassociation.org/forks","keys_url":"https://api.github.com/repos/jonatanklosko/worldcubeassociation.org/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jonatanklosko/worldcubeassociation.org/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jonatanklosko/worldcubeassociation.org/teams","hooks_url":"https://api.github.com/repos/jonatanklosko/worldcubeassociation.org/hooks","issue_events_url":"https://api.github.com/repos/jonatanklosko/worldcubeassociation.org/issues/events{/number}","events_url":"https://api.github.com/repos/jonatanklosko/worldcubeassociation.org/events","assignees_url":"https://api.github.com/repos/jonatanklosko/worldcubeassociation.org/assignees{/user}","branches_url":"https://api.github.com/repos/jonatanklosko/worldcubeassociation.org/branches{/branch}","tags_url":"https://api.github.com/repos/jonatanklosko/worldcubeassociation.org/tags","blobs_url":"https://api.github.com/repos/jonatanklosko/worldcubeassociation.org/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jonatanklosko/worldcubeassociation.org/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jonatanklosko/worldcubeassociation.org/git/refs{/sha}","trees_url":"https://api.github.com/repos/jonatanklosko/worldcubeassociation.org/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jonatanklosko/worldcubeassociation.org/statuses/{sha}","languages_url":"https://api.github.com/repos/jonatanklosko/worldcubeassociation.org/languages","stargazers_url":"https://api.github.com/repos/jonatanklosko/worldcubeassociation.org/stargazers","contributors_url":"https://api.github.com/repos/jonatanklosko/worldcubeassociation.org/contributors","subscribers_url":"https://api.github.com/repos/jonatanklosko/worldcubeassociation.org/subscribers","subscription_url":"https://api.github.com/repos/jonatanklosko/worldcubeassociation.org/subscription","commits_url":"https://api.github.com/repos/jonatanklosko/worldcubeassociation.org/commits{/sha}","git_commits_url":"https://api.github.com/repos/jonatanklosko/worldcubeassociation.org/git/commits{/sha}","comments_url":"https://api.github.com/repos/jonatanklosko/worldcubeassociation.org/comments{/number}","issue_comment_url":"https://api.github.com/repos/jonatanklosko/worldcubeassociation.org/issues/comments{/number}","contents_url":"https://api.github.com/repos/jonatanklosko/worldcubeassociation.org/contents/{+path}","compare_url":"https://api.github.com/repos/jonatanklosko/worldcubeassociation.org/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jonatanklosko/worldcubeassociation.org/merges","archive_url":"https://api.github.com/repos/jonatanklosko/worldcubeassociation.org/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jonatanklosko/worldcubeassociation.org/downloads","issues_url":"https://api.github.com/repos/jonatanklosko/worldcubeassociation.org/issues{/number}","pulls_url":"https://api.github.com/repos/jonatanklosko/worldcubeassociation.org/pulls{/number}","milestones_url":"https://api.github.com/repos/jonatanklosko/worldcubeassociation.org/milestones{/number}","notifications_url":"https://api.github.com/repos/jonatanklosko/worldcubeassociation.org/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jonatanklosko/worldcubeassociation.org/labels{/name}","releases_url":"https://api.github.com/repos/jonatanklosko/worldcubeassociation.org/releases{/id}","deployments_url":"https://api.github.com/repos/jonatanklosko/worldcubeassociation.org/deployments","created_at":"2016-03-27T20:29:06Z","updated_at":"2016-03-27T20:29:13Z","pushed_at":"2016-03-28T15:16:06Z","git_url":"git://github.com/jonatanklosko/worldcubeassociation.org.git","ssh_url":"git@github.com:jonatanklosko/worldcubeassociation.org.git","clone_url":"https://github.com/jonatanklosko/worldcubeassociation.org.git","svn_url":"https://github.com/jonatanklosko/worldcubeassociation.org","homepage":"https://www.worldcubeassociation.org/","size":51104,"stargazers_count":0,"watchers_count":0,"language":"PHP","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":"cubing:master","ref":"master","sha":"64731fd9f5e82de582c0e528dae46ac58f138905","user":{"login":"cubing","id":1092267,"avatar_url":"https://avatars.githubusercontent.com/u/1092267?v=3","gravatar_id":"","url":"https://api.github.com/users/cubing","html_url":"https://github.com/cubing","followers_url":"https://api.github.com/users/cubing/followers","following_url":"https://api.github.com/users/cubing/following{/other_user}","gists_url":"https://api.github.com/users/cubing/gists{/gist_id}","starred_url":"https://api.github.com/users/cubing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cubing/subscriptions","organizations_url":"https://api.github.com/users/cubing/orgs","repos_url":"https://api.github.com/users/cubing/repos","events_url":"https://api.github.com/users/cubing/events{/privacy}","received_events_url":"https://api.github.com/users/cubing/received_events","type":"Organization","site_admin":false},"repo":{"id":34161579,"name":"worldcubeassociation.org","full_name":"cubing/worldcubeassociation.org","owner":{"login":"cubing","id":1092267,"avatar_url":"https://avatars.githubusercontent.com/u/1092267?v=3","gravatar_id":"","url":"https://api.github.com/users/cubing","html_url":"https://github.com/cubing","followers_url":"https://api.github.com/users/cubing/followers","following_url":"https://api.github.com/users/cubing/following{/other_user}","gists_url":"https://api.github.com/users/cubing/gists{/gist_id}","starred_url":"https://api.github.com/users/cubing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cubing/subscriptions","organizations_url":"https://api.github.com/users/cubing/orgs","repos_url":"https://api.github.com/users/cubing/repos","events_url":"https://api.github.com/users/cubing/events{/privacy}","received_events_url":"https://api.github.com/users/cubing/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cubing/worldcubeassociation.org","description":"[WCA Project] All of the code that runs on worldcubeassociation.org","fork":false,"url":"https://api.github.com/repos/cubing/worldcubeassociation.org","forks_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/forks","keys_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/teams","hooks_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/hooks","issue_events_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/issues/events{/number}","events_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/events","assignees_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/assignees{/user}","branches_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/branches{/branch}","tags_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/tags","blobs_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/git/refs{/sha}","trees_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/statuses/{sha}","languages_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/languages","stargazers_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/stargazers","contributors_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/contributors","subscribers_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/subscribers","subscription_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/subscription","commits_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/commits{/sha}","git_commits_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/git/commits{/sha}","comments_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/comments{/number}","issue_comment_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/issues/comments{/number}","contents_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/contents/{+path}","compare_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/merges","archive_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/downloads","issues_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/issues{/number}","pulls_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/pulls{/number}","milestones_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/milestones{/number}","notifications_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/labels{/name}","releases_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/releases{/id}","deployments_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/deployments","created_at":"2015-04-18T10:21:53Z","updated_at":"2016-03-24T10:55:48Z","pushed_at":"2016-03-28T15:38:16Z","git_url":"git://github.com/cubing/worldcubeassociation.org.git","ssh_url":"git@github.com:cubing/worldcubeassociation.org.git","clone_url":"https://github.com/cubing/worldcubeassociation.org.git","svn_url":"https://github.com/cubing/worldcubeassociation.org","homepage":"https://www.worldcubeassociation.org/","size":51209,"stargazers_count":9,"watchers_count":9,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":21,"mirror_url":null,"open_issues_count":146,"forks":21,"open_issues":146,"watchers":9,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cubing/worldcubeassociation.org/pulls/439"},"html":{"href":"https://github.com/cubing/worldcubeassociation.org/pull/439"},"issue":{"href":"https://api.github.com/repos/cubing/worldcubeassociation.org/issues/439"},"comments":{"href":"https://api.github.com/repos/cubing/worldcubeassociation.org/issues/439/comments"},"review_comments":{"href":"https://api.github.com/repos/cubing/worldcubeassociation.org/pulls/439/comments"},"review_comment":{"href":"https://api.github.com/repos/cubing/worldcubeassociation.org/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cubing/worldcubeassociation.org/pulls/439/commits"},"statuses":{"href":"https://api.github.com/repos/cubing/worldcubeassociation.org/statuses/049006118fbc67b6166b834e3073e26652b8335b"}}}}