{"action":"created","comment":{"url":"https://api.github.com/repos/codex-team/uptime-monitor.workers/pulls/comments/232538544","pull_request_review_id":173755948,"id":232538544,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzMjUzODU0NA==","diff_hunk":"@@ -0,0 +1,70 @@\n+let mongoose = require('mongoose');\n+let config = require('../config');\n+require('../models/project');\n+let Project = mongoose.model('Project');\n+\n+const MONGO_URI = config.mongodbUri;\n+\n+mongoose.Promise = Promise;\n+mongoose.connect(MONGO_URI);\n+\n+let data = prepareData();\n+\n+mongoose.connection.once('connected', () => {\n+  Project.deleteMany({})\n+    .then(() => {\n+      return Project.insertMany(data);\n+    })\n+    .then(res => {\n+      console.log('well done insert!');\n+      mongoose.connection.close();\n+    })\n+    .catch(err => {\n+      console.log(err);\n+      console.log('ERROR insert!');\n+      mongoose.connection.close();\n+    });\n+\n+  console.log('Succesfully connected to MongoDB Database');\n+});\n+\n+/**\n+ * Must have","path":"insert-data/insert-test-data.js","position":32,"original_position":32,"commit_id":"b30ba8fb0a6902fc38db428885d4097ffefedd2b","original_commit_id":"b30ba8fb0a6902fc38db428885d4097ffefedd2b","user":{"login":"khaydarov","id":6507765,"node_id":"MDQ6VXNlcjY1MDc3NjU=","avatar_url":"https://avatars2.githubusercontent.com/u/6507765?v=4","gravatar_id":"","url":"https://api.github.com/users/khaydarov","html_url":"https://github.com/khaydarov","followers_url":"https://api.github.com/users/khaydarov/followers","following_url":"https://api.github.com/users/khaydarov/following{/other_user}","gists_url":"https://api.github.com/users/khaydarov/gists{/gist_id}","starred_url":"https://api.github.com/users/khaydarov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/khaydarov/subscriptions","organizations_url":"https://api.github.com/users/khaydarov/orgs","repos_url":"https://api.github.com/users/khaydarov/repos","events_url":"https://api.github.com/users/khaydarov/events{/privacy}","received_events_url":"https://api.github.com/users/khaydarov/received_events","type":"User","site_admin":false},"body":"Описание","created_at":"2018-11-12T05:34:03Z","updated_at":"2018-11-12T05:34:36Z","html_url":"https://github.com/codex-team/uptime-monitor.workers/pull/2#discussion_r232538544","pull_request_url":"https://api.github.com/repos/codex-team/uptime-monitor.workers/pulls/2","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/codex-team/uptime-monitor.workers/pulls/comments/232538544"},"html":{"href":"https://github.com/codex-team/uptime-monitor.workers/pull/2#discussion_r232538544"},"pull_request":{"href":"https://api.github.com/repos/codex-team/uptime-monitor.workers/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/codex-team/uptime-monitor.workers/pulls/2","id":229417175,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI5NDE3MTc1","html_url":"https://github.com/codex-team/uptime-monitor.workers/pull/2","diff_url":"https://github.com/codex-team/uptime-monitor.workers/pull/2.diff","patch_url":"https://github.com/codex-team/uptime-monitor.workers/pull/2.patch","issue_url":"https://api.github.com/repos/codex-team/uptime-monitor.workers/issues/2","number":2,"state":"open","locked":false,"title":"База данных (Mongo + Mongoose)","user":{"login":"dyadyaJora","id":17435388,"node_id":"MDQ6VXNlcjE3NDM1Mzg4","avatar_url":"https://avatars2.githubusercontent.com/u/17435388?v=4","gravatar_id":"","url":"https://api.github.com/users/dyadyaJora","html_url":"https://github.com/dyadyaJora","followers_url":"https://api.github.com/users/dyadyaJora/followers","following_url":"https://api.github.com/users/dyadyaJora/following{/other_user}","gists_url":"https://api.github.com/users/dyadyaJora/gists{/gist_id}","starred_url":"https://api.github.com/users/dyadyaJora/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dyadyaJora/subscriptions","organizations_url":"https://api.github.com/users/dyadyaJora/orgs","repos_url":"https://api.github.com/users/dyadyaJora/repos","events_url":"https://api.github.com/users/dyadyaJora/events{/privacy}","received_events_url":"https://api.github.com/users/dyadyaJora/received_events","type":"User","site_admin":false},"body":"- Модель для коллекции `Project`\r\n- Скрипт для заполнения адекватными \"случайными\" данными","created_at":"2018-11-08T16:01:59Z","updated_at":"2018-11-12T05:34:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"47cccd472e3393ab860fcc9efe7e324f5de84b56","assignee":null,"assignees":[],"requested_reviewers":[{"login":"talyguryn","id":15259299,"node_id":"MDQ6VXNlcjE1MjU5Mjk5","avatar_url":"https://avatars0.githubusercontent.com/u/15259299?v=4","gravatar_id":"","url":"https://api.github.com/users/talyguryn","html_url":"https://github.com/talyguryn","followers_url":"https://api.github.com/users/talyguryn/followers","following_url":"https://api.github.com/users/talyguryn/following{/other_user}","gists_url":"https://api.github.com/users/talyguryn/gists{/gist_id}","starred_url":"https://api.github.com/users/talyguryn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/talyguryn/subscriptions","organizations_url":"https://api.github.com/users/talyguryn/orgs","repos_url":"https://api.github.com/users/talyguryn/repos","events_url":"https://api.github.com/users/talyguryn/events{/privacy}","received_events_url":"https://api.github.com/users/talyguryn/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/codex-team/uptime-monitor.workers/pulls/2/commits","review_comments_url":"https://api.github.com/repos/codex-team/uptime-monitor.workers/pulls/2/comments","review_comment_url":"https://api.github.com/repos/codex-team/uptime-monitor.workers/pulls/comments{/number}","comments_url":"https://api.github.com/repos/codex-team/uptime-monitor.workers/issues/2/comments","statuses_url":"https://api.github.com/repos/codex-team/uptime-monitor.workers/statuses/b30ba8fb0a6902fc38db428885d4097ffefedd2b","head":{"label":"codex-team:db","ref":"db","sha":"b30ba8fb0a6902fc38db428885d4097ffefedd2b","user":{"login":"codex-team","id":16060815,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2MDYwODE1","avatar_url":"https://avatars0.githubusercontent.com/u/16060815?v=4","gravatar_id":"","url":"https://api.github.com/users/codex-team","html_url":"https://github.com/codex-team","followers_url":"https://api.github.com/users/codex-team/followers","following_url":"https://api.github.com/users/codex-team/following{/other_user}","gists_url":"https://api.github.com/users/codex-team/gists{/gist_id}","starred_url":"https://api.github.com/users/codex-team/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codex-team/subscriptions","organizations_url":"https://api.github.com/users/codex-team/orgs","repos_url":"https://api.github.com/users/codex-team/repos","events_url":"https://api.github.com/users/codex-team/events{/privacy}","received_events_url":"https://api.github.com/users/codex-team/received_events","type":"Organization","site_admin":false},"repo":{"id":156658649,"node_id":"MDEwOlJlcG9zaXRvcnkxNTY2NTg2NDk=","name":"uptime-monitor.workers","full_name":"codex-team/uptime-monitor.workers","private":false,"owner":{"login":"codex-team","id":16060815,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2MDYwODE1","avatar_url":"https://avatars0.githubusercontent.com/u/16060815?v=4","gravatar_id":"","url":"https://api.github.com/users/codex-team","html_url":"https://github.com/codex-team","followers_url":"https://api.github.com/users/codex-team/followers","following_url":"https://api.github.com/users/codex-team/following{/other_user}","gists_url":"https://api.github.com/users/codex-team/gists{/gist_id}","starred_url":"https://api.github.com/users/codex-team/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codex-team/subscriptions","organizations_url":"https://api.github.com/users/codex-team/orgs","repos_url":"https://api.github.com/users/codex-team/repos","events_url":"https://api.github.com/users/codex-team/events{/privacy}","received_events_url":"https://api.github.com/users/codex-team/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/codex-team/uptime-monitor.workers","description":null,"fork":false,"url":"https://api.github.com/repos/codex-team/uptime-monitor.workers","forks_url":"https://api.github.com/repos/codex-team/uptime-monitor.workers/forks","keys_url":"https://api.github.com/repos/codex-team/uptime-monitor.workers/keys{/key_id}","collaborators_url":"https://api.github.com/repos/codex-team/uptime-monitor.workers/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/codex-team/uptime-monitor.workers/teams","hooks_url":"https://api.github.com/repos/codex-team/uptime-monitor.workers/hooks","issue_events_url":"https://api.github.com/repos/codex-team/uptime-monitor.workers/issues/events{/number}","events_url":"https://api.github.com/repos/codex-team/uptime-monitor.workers/events","assignees_url":"https://api.github.com/repos/codex-team/uptime-monitor.workers/assignees{/user}","branches_url":"https://api.github.com/repos/codex-team/uptime-monitor.workers/branches{/branch}","tags_url":"https://api.github.com/repos/codex-team/uptime-monitor.workers/tags","blobs_url":"https://api.github.com/repos/codex-team/uptime-monitor.workers/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/codex-team/uptime-monitor.workers/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/codex-team/uptime-monitor.workers/git/refs{/sha}","trees_url":"https://api.github.com/repos/codex-team/uptime-monitor.workers/git/trees{/sha}","statuses_url":"https://api.github.com/repos/codex-team/uptime-monitor.workers/statuses/{sha}","languages_url":"https://api.github.com/repos/codex-team/uptime-monitor.workers/languages","stargazers_url":"https://api.github.com/repos/codex-team/uptime-monitor.workers/stargazers","contributors_url":"https://api.github.com/repos/codex-team/uptime-monitor.workers/contributors","subscribers_url":"https://api.github.com/repos/codex-team/uptime-monitor.workers/subscribers","subscription_url":"https://api.github.com/repos/codex-team/uptime-monitor.workers/subscription","commits_url":"https://api.github.com/repos/codex-team/uptime-monitor.workers/commits{/sha}","git_commits_url":"https://api.github.com/repos/codex-team/uptime-monitor.workers/git/commits{/sha}","comments_url":"https://api.github.com/repos/codex-team/uptime-monitor.workers/comments{/number}","issue_comment_url":"https://api.github.com/repos/codex-team/uptime-monitor.workers/issues/comments{/number}","contents_url":"https://api.github.com/repos/codex-team/uptime-monitor.workers/contents/{+path}","compare_url":"https://api.github.com/repos/codex-team/uptime-monitor.workers/compare/{base}...{head}","merges_url":"https://api.github.com/repos/codex-team/uptime-monitor.workers/merges","archive_url":"https://api.github.com/repos/codex-team/uptime-monitor.workers/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/codex-team/uptime-monitor.workers/downloads","issues_url":"https://api.github.com/repos/codex-team/uptime-monitor.workers/issues{/number}","pulls_url":"https://api.github.com/repos/codex-team/uptime-monitor.workers/pulls{/number}","milestones_url":"https://api.github.com/repos/codex-team/uptime-monitor.workers/milestones{/number}","notifications_url":"https://api.github.com/repos/codex-team/uptime-monitor.workers/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/codex-team/uptime-monitor.workers/labels{/name}","releases_url":"https://api.github.com/repos/codex-team/uptime-monitor.workers/releases{/id}","deployments_url":"https://api.github.com/repos/codex-team/uptime-monitor.workers/deployments","created_at":"2018-11-08T06:11:19Z","updated_at":"2018-11-08T06:11:22Z","pushed_at":"2018-11-08T16:30:48Z","git_url":"git://github.com/codex-team/uptime-monitor.workers.git","ssh_url":"git@github.com:codex-team/uptime-monitor.workers.git","clone_url":"https://github.com/codex-team/uptime-monitor.workers.git","svn_url":"https://github.com/codex-team/uptime-monitor.workers","homepage":null,"size":46,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":3,"license":null,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"base":{"label":"codex-team:dev-env","ref":"dev-env","sha":"dcbaa446a4f0aa7df3487d94d448c03a44ab881e","user":{"login":"codex-team","id":16060815,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2MDYwODE1","avatar_url":"https://avatars0.githubusercontent.com/u/16060815?v=4","gravatar_id":"","url":"https://api.github.com/users/codex-team","html_url":"https://github.com/codex-team","followers_url":"https://api.github.com/users/codex-team/followers","following_url":"https://api.github.com/users/codex-team/following{/other_user}","gists_url":"https://api.github.com/users/codex-team/gists{/gist_id}","starred_url":"https://api.github.com/users/codex-team/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codex-team/subscriptions","organizations_url":"https://api.github.com/users/codex-team/orgs","repos_url":"https://api.github.com/users/codex-team/repos","events_url":"https://api.github.com/users/codex-team/events{/privacy}","received_events_url":"https://api.github.com/users/codex-team/received_events","type":"Organization","site_admin":false},"repo":{"id":156658649,"node_id":"MDEwOlJlcG9zaXRvcnkxNTY2NTg2NDk=","name":"uptime-monitor.workers","full_name":"codex-team/uptime-monitor.workers","private":false,"owner":{"login":"codex-team","id":16060815,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2MDYwODE1","avatar_url":"https://avatars0.githubusercontent.com/u/16060815?v=4","gravatar_id":"","url":"https://api.github.com/users/codex-team","html_url":"https://github.com/codex-team","followers_url":"https://api.github.com/users/codex-team/followers","following_url":"https://api.github.com/users/codex-team/following{/other_user}","gists_url":"https://api.github.com/users/codex-team/gists{/gist_id}","starred_url":"https://api.github.com/users/codex-team/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codex-team/subscriptions","organizations_url":"https://api.github.com/users/codex-team/orgs","repos_url":"https://api.github.com/users/codex-team/repos","events_url":"https://api.github.com/users/codex-team/events{/privacy}","received_events_url":"https://api.github.com/users/codex-team/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/codex-team/uptime-monitor.workers","description":null,"fork":false,"url":"https://api.github.com/repos/codex-team/uptime-monitor.workers","forks_url":"https://api.github.com/repos/codex-team/uptime-monitor.workers/forks","keys_url":"https://api.github.com/repos/codex-team/uptime-monitor.workers/keys{/key_id}","collaborators_url":"https://api.github.com/repos/codex-team/uptime-monitor.workers/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/codex-team/uptime-monitor.workers/teams","hooks_url":"https://api.github.com/repos/codex-team/uptime-monitor.workers/hooks","issue_events_url":"https://api.github.com/repos/codex-team/uptime-monitor.workers/issues/events{/number}","events_url":"https://api.github.com/repos/codex-team/uptime-monitor.workers/events","assignees_url":"https://api.github.com/repos/codex-team/uptime-monitor.workers/assignees{/user}","branches_url":"https://api.github.com/repos/codex-team/uptime-monitor.workers/branches{/branch}","tags_url":"https://api.github.com/repos/codex-team/uptime-monitor.workers/tags","blobs_url":"https://api.github.com/repos/codex-team/uptime-monitor.workers/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/codex-team/uptime-monitor.workers/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/codex-team/uptime-monitor.workers/git/refs{/sha}","trees_url":"https://api.github.com/repos/codex-team/uptime-monitor.workers/git/trees{/sha}","statuses_url":"https://api.github.com/repos/codex-team/uptime-monitor.workers/statuses/{sha}","languages_url":"https://api.github.com/repos/codex-team/uptime-monitor.workers/languages","stargazers_url":"https://api.github.com/repos/codex-team/uptime-monitor.workers/stargazers","contributors_url":"https://api.github.com/repos/codex-team/uptime-monitor.workers/contributors","subscribers_url":"https://api.github.com/repos/codex-team/uptime-monitor.workers/subscribers","subscription_url":"https://api.github.com/repos/codex-team/uptime-monitor.workers/subscription","commits_url":"https://api.github.com/repos/codex-team/uptime-monitor.workers/commits{/sha}","git_commits_url":"https://api.github.com/repos/codex-team/uptime-monitor.workers/git/commits{/sha}","comments_url":"https://api.github.com/repos/codex-team/uptime-monitor.workers/comments{/number}","issue_comment_url":"https://api.github.com/repos/codex-team/uptime-monitor.workers/issues/comments{/number}","contents_url":"https://api.github.com/repos/codex-team/uptime-monitor.workers/contents/{+path}","compare_url":"https://api.github.com/repos/codex-team/uptime-monitor.workers/compare/{base}...{head}","merges_url":"https://api.github.com/repos/codex-team/uptime-monitor.workers/merges","archive_url":"https://api.github.com/repos/codex-team/uptime-monitor.workers/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/codex-team/uptime-monitor.workers/downloads","issues_url":"https://api.github.com/repos/codex-team/uptime-monitor.workers/issues{/number}","pulls_url":"https://api.github.com/repos/codex-team/uptime-monitor.workers/pulls{/number}","milestones_url":"https://api.github.com/repos/codex-team/uptime-monitor.workers/milestones{/number}","notifications_url":"https://api.github.com/repos/codex-team/uptime-monitor.workers/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/codex-team/uptime-monitor.workers/labels{/name}","releases_url":"https://api.github.com/repos/codex-team/uptime-monitor.workers/releases{/id}","deployments_url":"https://api.github.com/repos/codex-team/uptime-monitor.workers/deployments","created_at":"2018-11-08T06:11:19Z","updated_at":"2018-11-08T06:11:22Z","pushed_at":"2018-11-08T16:30:48Z","git_url":"git://github.com/codex-team/uptime-monitor.workers.git","ssh_url":"git@github.com:codex-team/uptime-monitor.workers.git","clone_url":"https://github.com/codex-team/uptime-monitor.workers.git","svn_url":"https://github.com/codex-team/uptime-monitor.workers","homepage":null,"size":46,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":3,"license":null,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/codex-team/uptime-monitor.workers/pulls/2"},"html":{"href":"https://github.com/codex-team/uptime-monitor.workers/pull/2"},"issue":{"href":"https://api.github.com/repos/codex-team/uptime-monitor.workers/issues/2"},"comments":{"href":"https://api.github.com/repos/codex-team/uptime-monitor.workers/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/codex-team/uptime-monitor.workers/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/codex-team/uptime-monitor.workers/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/codex-team/uptime-monitor.workers/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/codex-team/uptime-monitor.workers/statuses/b30ba8fb0a6902fc38db428885d4097ffefedd2b"}},"author_association":"NONE"}}
{"actor":{"display_login":"khaydarov"}}