{"action":"created","comment":{"url":"https://api.github.com/repos/andela/colossus-backend/pulls/comments/314913218","pull_request_review_id":276198377,"id":314913218,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDMxNDkxMzIxOA==","diff_hunk":"@@ -1,57 +1,57 @@\n-const mongoose = require(\"mongoose\");\n-const uniqueValidator = require(\"mongoose-unique-validator\");\n-const crypto = require(\"crypto\");\n-const secret = require(\"../config\").secret;\n-\n-const UserSchema = new mongoose.Schema(\n-    {\n-        username: {\n-            type: String,\n-            lowercase: true,\n-            unique: true,\n-            required: [true, \"can't be blank\"],\n-            match: [/^[a-zA-Z0-9]+$/, \"is invalid\"],\n-            index: true\n-        },\n-        email: {\n-            type: String,\n-            lowercase: true,\n-            unique: true,\n-            required: [true, \"can't be blank\"],\n-            match: [/\\S+@\\S+\\.\\S+/, \"is invalid\"],\n-            index: true\n-        },\n-        bio: String,\n-        image: String,\n-        favorites: [{ type: mongoose.Schema.Types.ObjectId, ref: \"Article\" }],\n-        following: [{ type: mongoose.Schema.Types.ObjectId, ref: \"User\" }],\n-        hash: String,\n-        salt: String\n+import { genSaltSync, hashSync } from 'bcryptjs';\n+export const User = (sequelize, DataTypes) => sequelize.define('User', {\n+    id: {\n+        type: DataTypes.INTEGER,\n+        autoIncrement: true,\n+        primaryKey: true\n     },\n-    { timestamps: true }\n-);\n-\n-UserSchema.plugin(uniqueValidator, { message: \"is already taken.\" });\n-\n-UserSchema.methods.validPassword = function(password) {\n-    const hash = crypto\n-        .pbkdf2Sync(password, this.salt, 10000, 512, \"sha512\")\n-        .toString(\"hex\");\n-    return this.hash === hash;\n-};\n-\n-UserSchema.methods.setPassword = function(password) {\n-    this.salt = crypto.randomBytes(16).toString(\"hex\");\n-    this.hash = crypto\n-        .pbkdf2Sync(password, this.salt, 10000, 512, \"sha512\")\n-        .toString(\"hex\");\n-};\n-\n-UserSchema.methods.toAuthJSON = function() {\n-    return {\n-        username: this.username,\n-        email: this.email\n-    };\n-};\n-\n-mongoose.model(\"User\", UserSchema);\n+    first_name: {\n+        type: DataTypes.STRING,\n+        allowNull: false,\n+        validate: {\n+            notEmpty: {\n+                msg: 'First name cannot be empty'\n+            }\n+        }\n+    },\n+    last_name: {","path":"src/models/User.js","position":73,"original_position":73,"commit_id":"c35dd25acbf30356e12b1d1d514df8ad2106509d","original_commit_id":"c35dd25acbf30356e12b1d1d514df8ad2106509d","user":{"login":"hound[bot]","id":30008653,"node_id":"MDM6Qm90MzAwMDg2NTM=","avatar_url":"https://avatars1.githubusercontent.com/in/3598?v=4","gravatar_id":"","url":"https://api.github.com/users/hound%5Bbot%5D","html_url":"https://github.com/apps/hound","followers_url":"https://api.github.com/users/hound%5Bbot%5D/followers","following_url":"https://api.github.com/users/hound%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/hound%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/hound%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hound%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/hound%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/hound%5Bbot%5D/repos","events_url":"https://api.github.com/users/hound%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/hound%5Bbot%5D/received_events","type":"Bot","site_admin":false},"body":"Expected indentation of 2 spaces but found 4                                 indent","created_at":"2019-08-16T22:50:00Z","updated_at":"2019-08-16T22:50:02Z","html_url":"https://github.com/andela/colossus-backend/pull/10#discussion_r314913218","pull_request_url":"https://api.github.com/repos/andela/colossus-backend/pulls/10","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/andela/colossus-backend/pulls/comments/314913218"},"html":{"href":"https://github.com/andela/colossus-backend/pull/10#discussion_r314913218"},"pull_request":{"href":"https://api.github.com/repos/andela/colossus-backend/pulls/10"}}},"pull_request":{"url":"https://api.github.com/repos/andela/colossus-backend/pulls/10","id":307783498,"node_id":"MDExOlB1bGxSZXF1ZXN0MzA3NzgzNDk4","html_url":"https://github.com/andela/colossus-backend/pull/10","diff_url":"https://github.com/andela/colossus-backend/pull/10.diff","patch_url":"https://github.com/andela/colossus-backend/pull/10.patch","issue_url":"https://api.github.com/repos/andela/colossus-backend/issues/10","number":10,"state":"open","locked":false,"title":" #167733803 integrate travisCI with a readme badge","user":{"login":"evansinho","id":43210534,"node_id":"MDQ6VXNlcjQzMjEwNTM0","avatar_url":"https://avatars1.githubusercontent.com/u/43210534?v=4","gravatar_id":"","url":"https://api.github.com/users/evansinho","html_url":"https://github.com/evansinho","followers_url":"https://api.github.com/users/evansinho/followers","following_url":"https://api.github.com/users/evansinho/following{/other_user}","gists_url":"https://api.github.com/users/evansinho/gists{/gist_id}","starred_url":"https://api.github.com/users/evansinho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evansinho/subscriptions","organizations_url":"https://api.github.com/users/evansinho/orgs","repos_url":"https://api.github.com/users/evansinho/repos","events_url":"https://api.github.com/users/evansinho/events{/privacy}","received_events_url":"https://api.github.com/users/evansinho/received_events","type":"User","site_admin":false},"body":"#### What does this PR do?\r\nThe PR is for continous testing and integration of the application\r\n#### Description of Task to be completed?\r\nAdd a travis file \r\nAdd a build badge to the readme file\r\n#### How should this be manually tested?\r\nN/A\r\n#### Any background context you want to provide?\r\nN/A\r\n#### What are the relevant pivotal tracker stories?\r\nhttps://www.pivotaltracker.com/story/show/167733803\r\n#### Screenshots (if appropriate)\r\nN/A\r\n#### Questions:\r\nN/A\r\n","created_at":"2019-08-15T17:09:55Z","updated_at":"2019-08-16T22:50:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f312ff1a0319de3d2d31185b0f11c0d6d53e1aa3","assignee":null,"assignees":[],"requested_reviewers":[{"login":"Ileriayo","id":13166712,"node_id":"MDQ6VXNlcjEzMTY2NzEy","avatar_url":"https://avatars2.githubusercontent.com/u/13166712?v=4","gravatar_id":"","url":"https://api.github.com/users/Ileriayo","html_url":"https://github.com/Ileriayo","followers_url":"https://api.github.com/users/Ileriayo/followers","following_url":"https://api.github.com/users/Ileriayo/following{/other_user}","gists_url":"https://api.github.com/users/Ileriayo/gists{/gist_id}","starred_url":"https://api.github.com/users/Ileriayo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ileriayo/subscriptions","organizations_url":"https://api.github.com/users/Ileriayo/orgs","repos_url":"https://api.github.com/users/Ileriayo/repos","events_url":"https://api.github.com/users/Ileriayo/events{/privacy}","received_events_url":"https://api.github.com/users/Ileriayo/received_events","type":"User","site_admin":false},{"login":"Oluwafayokemi","id":33626790,"node_id":"MDQ6VXNlcjMzNjI2Nzkw","avatar_url":"https://avatars1.githubusercontent.com/u/33626790?v=4","gravatar_id":"","url":"https://api.github.com/users/Oluwafayokemi","html_url":"https://github.com/Oluwafayokemi","followers_url":"https://api.github.com/users/Oluwafayokemi/followers","following_url":"https://api.github.com/users/Oluwafayokemi/following{/other_user}","gists_url":"https://api.github.com/users/Oluwafayokemi/gists{/gist_id}","starred_url":"https://api.github.com/users/Oluwafayokemi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Oluwafayokemi/subscriptions","organizations_url":"https://api.github.com/users/Oluwafayokemi/orgs","repos_url":"https://api.github.com/users/Oluwafayokemi/repos","events_url":"https://api.github.com/users/Oluwafayokemi/events{/privacy}","received_events_url":"https://api.github.com/users/Oluwafayokemi/received_events","type":"User","site_admin":false},{"login":"fegzycole","id":47524585,"node_id":"MDQ6VXNlcjQ3NTI0NTg1","avatar_url":"https://avatars2.githubusercontent.com/u/47524585?v=4","gravatar_id":"","url":"https://api.github.com/users/fegzycole","html_url":"https://github.com/fegzycole","followers_url":"https://api.github.com/users/fegzycole/followers","following_url":"https://api.github.com/users/fegzycole/following{/other_user}","gists_url":"https://api.github.com/users/fegzycole/gists{/gist_id}","starred_url":"https://api.github.com/users/fegzycole/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fegzycole/subscriptions","organizations_url":"https://api.github.com/users/fegzycole/orgs","repos_url":"https://api.github.com/users/fegzycole/repos","events_url":"https://api.github.com/users/fegzycole/events{/privacy}","received_events_url":"https://api.github.com/users/fegzycole/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/andela/colossus-backend/pulls/10/commits","review_comments_url":"https://api.github.com/repos/andela/colossus-backend/pulls/10/comments","review_comment_url":"https://api.github.com/repos/andela/colossus-backend/pulls/comments{/number}","comments_url":"https://api.github.com/repos/andela/colossus-backend/issues/10/comments","statuses_url":"https://api.github.com/repos/andela/colossus-backend/statuses/c35dd25acbf30356e12b1d1d514df8ad2106509d","head":{"label":"andela:ch-integrate-TravisCI-with-a-readme-badge-#167733803","ref":"ch-integrate-TravisCI-with-a-readme-badge-#167733803","sha":"c35dd25acbf30356e12b1d1d514df8ad2106509d","user":{"login":"andela","id":4100206,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQxMDAyMDY=","avatar_url":"https://avatars2.githubusercontent.com/u/4100206?v=4","gravatar_id":"","url":"https://api.github.com/users/andela","html_url":"https://github.com/andela","followers_url":"https://api.github.com/users/andela/followers","following_url":"https://api.github.com/users/andela/following{/other_user}","gists_url":"https://api.github.com/users/andela/gists{/gist_id}","starred_url":"https://api.github.com/users/andela/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela/subscriptions","organizations_url":"https://api.github.com/users/andela/orgs","repos_url":"https://api.github.com/users/andela/repos","events_url":"https://api.github.com/users/andela/events{/privacy}","received_events_url":"https://api.github.com/users/andela/received_events","type":"Organization","site_admin":false},"repo":{"id":200865448,"node_id":"MDEwOlJlcG9zaXRvcnkyMDA4NjU0NDg=","name":"colossus-backend","full_name":"andela/colossus-backend","private":false,"owner":{"login":"andela","id":4100206,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQxMDAyMDY=","avatar_url":"https://avatars2.githubusercontent.com/u/4100206?v=4","gravatar_id":"","url":"https://api.github.com/users/andela","html_url":"https://github.com/andela","followers_url":"https://api.github.com/users/andela/followers","following_url":"https://api.github.com/users/andela/following{/other_user}","gists_url":"https://api.github.com/users/andela/gists{/gist_id}","starred_url":"https://api.github.com/users/andela/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela/subscriptions","organizations_url":"https://api.github.com/users/andela/orgs","repos_url":"https://api.github.com/users/andela/repos","events_url":"https://api.github.com/users/andela/events{/privacy}","received_events_url":"https://api.github.com/users/andela/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/andela/colossus-backend","description":null,"fork":false,"url":"https://api.github.com/repos/andela/colossus-backend","forks_url":"https://api.github.com/repos/andela/colossus-backend/forks","keys_url":"https://api.github.com/repos/andela/colossus-backend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andela/colossus-backend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andela/colossus-backend/teams","hooks_url":"https://api.github.com/repos/andela/colossus-backend/hooks","issue_events_url":"https://api.github.com/repos/andela/colossus-backend/issues/events{/number}","events_url":"https://api.github.com/repos/andela/colossus-backend/events","assignees_url":"https://api.github.com/repos/andela/colossus-backend/assignees{/user}","branches_url":"https://api.github.com/repos/andela/colossus-backend/branches{/branch}","tags_url":"https://api.github.com/repos/andela/colossus-backend/tags","blobs_url":"https://api.github.com/repos/andela/colossus-backend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andela/colossus-backend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andela/colossus-backend/git/refs{/sha}","trees_url":"https://api.github.com/repos/andela/colossus-backend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andela/colossus-backend/statuses/{sha}","languages_url":"https://api.github.com/repos/andela/colossus-backend/languages","stargazers_url":"https://api.github.com/repos/andela/colossus-backend/stargazers","contributors_url":"https://api.github.com/repos/andela/colossus-backend/contributors","subscribers_url":"https://api.github.com/repos/andela/colossus-backend/subscribers","subscription_url":"https://api.github.com/repos/andela/colossus-backend/subscription","commits_url":"https://api.github.com/repos/andela/colossus-backend/commits{/sha}","git_commits_url":"https://api.github.com/repos/andela/colossus-backend/git/commits{/sha}","comments_url":"https://api.github.com/repos/andela/colossus-backend/comments{/number}","issue_comment_url":"https://api.github.com/repos/andela/colossus-backend/issues/comments{/number}","contents_url":"https://api.github.com/repos/andela/colossus-backend/contents/{+path}","compare_url":"https://api.github.com/repos/andela/colossus-backend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andela/colossus-backend/merges","archive_url":"https://api.github.com/repos/andela/colossus-backend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andela/colossus-backend/downloads","issues_url":"https://api.github.com/repos/andela/colossus-backend/issues{/number}","pulls_url":"https://api.github.com/repos/andela/colossus-backend/pulls{/number}","milestones_url":"https://api.github.com/repos/andela/colossus-backend/milestones{/number}","notifications_url":"https://api.github.com/repos/andela/colossus-backend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andela/colossus-backend/labels{/name}","releases_url":"https://api.github.com/repos/andela/colossus-backend/releases{/id}","deployments_url":"https://api.github.com/repos/andela/colossus-backend/deployments","created_at":"2019-08-06T14:15:05Z","updated_at":"2019-08-16T15:20:02Z","pushed_at":"2019-08-16T22:49:54Z","git_url":"git://github.com/andela/colossus-backend.git","ssh_url":"git@github.com:andela/colossus-backend.git","clone_url":"https://github.com/andela/colossus-backend.git","svn_url":"https://github.com/andela/colossus-backend","homepage":null,"size":143,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":2,"license":null,"forks":0,"open_issues":2,"watchers":0,"default_branch":"develop"}},"base":{"label":"andela:develop","ref":"develop","sha":"7d33890d9b0b2c7585b02a5d8bc2aa3db46944a6","user":{"login":"andela","id":4100206,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQxMDAyMDY=","avatar_url":"https://avatars2.githubusercontent.com/u/4100206?v=4","gravatar_id":"","url":"https://api.github.com/users/andela","html_url":"https://github.com/andela","followers_url":"https://api.github.com/users/andela/followers","following_url":"https://api.github.com/users/andela/following{/other_user}","gists_url":"https://api.github.com/users/andela/gists{/gist_id}","starred_url":"https://api.github.com/users/andela/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela/subscriptions","organizations_url":"https://api.github.com/users/andela/orgs","repos_url":"https://api.github.com/users/andela/repos","events_url":"https://api.github.com/users/andela/events{/privacy}","received_events_url":"https://api.github.com/users/andela/received_events","type":"Organization","site_admin":false},"repo":{"id":200865448,"node_id":"MDEwOlJlcG9zaXRvcnkyMDA4NjU0NDg=","name":"colossus-backend","full_name":"andela/colossus-backend","private":false,"owner":{"login":"andela","id":4100206,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQxMDAyMDY=","avatar_url":"https://avatars2.githubusercontent.com/u/4100206?v=4","gravatar_id":"","url":"https://api.github.com/users/andela","html_url":"https://github.com/andela","followers_url":"https://api.github.com/users/andela/followers","following_url":"https://api.github.com/users/andela/following{/other_user}","gists_url":"https://api.github.com/users/andela/gists{/gist_id}","starred_url":"https://api.github.com/users/andela/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela/subscriptions","organizations_url":"https://api.github.com/users/andela/orgs","repos_url":"https://api.github.com/users/andela/repos","events_url":"https://api.github.com/users/andela/events{/privacy}","received_events_url":"https://api.github.com/users/andela/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/andela/colossus-backend","description":null,"fork":false,"url":"https://api.github.com/repos/andela/colossus-backend","forks_url":"https://api.github.com/repos/andela/colossus-backend/forks","keys_url":"https://api.github.com/repos/andela/colossus-backend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andela/colossus-backend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andela/colossus-backend/teams","hooks_url":"https://api.github.com/repos/andela/colossus-backend/hooks","issue_events_url":"https://api.github.com/repos/andela/colossus-backend/issues/events{/number}","events_url":"https://api.github.com/repos/andela/colossus-backend/events","assignees_url":"https://api.github.com/repos/andela/colossus-backend/assignees{/user}","branches_url":"https://api.github.com/repos/andela/colossus-backend/branches{/branch}","tags_url":"https://api.github.com/repos/andela/colossus-backend/tags","blobs_url":"https://api.github.com/repos/andela/colossus-backend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andela/colossus-backend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andela/colossus-backend/git/refs{/sha}","trees_url":"https://api.github.com/repos/andela/colossus-backend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andela/colossus-backend/statuses/{sha}","languages_url":"https://api.github.com/repos/andela/colossus-backend/languages","stargazers_url":"https://api.github.com/repos/andela/colossus-backend/stargazers","contributors_url":"https://api.github.com/repos/andela/colossus-backend/contributors","subscribers_url":"https://api.github.com/repos/andela/colossus-backend/subscribers","subscription_url":"https://api.github.com/repos/andela/colossus-backend/subscription","commits_url":"https://api.github.com/repos/andela/colossus-backend/commits{/sha}","git_commits_url":"https://api.github.com/repos/andela/colossus-backend/git/commits{/sha}","comments_url":"https://api.github.com/repos/andela/colossus-backend/comments{/number}","issue_comment_url":"https://api.github.com/repos/andela/colossus-backend/issues/comments{/number}","contents_url":"https://api.github.com/repos/andela/colossus-backend/contents/{+path}","compare_url":"https://api.github.com/repos/andela/colossus-backend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andela/colossus-backend/merges","archive_url":"https://api.github.com/repos/andela/colossus-backend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andela/colossus-backend/downloads","issues_url":"https://api.github.com/repos/andela/colossus-backend/issues{/number}","pulls_url":"https://api.github.com/repos/andela/colossus-backend/pulls{/number}","milestones_url":"https://api.github.com/repos/andela/colossus-backend/milestones{/number}","notifications_url":"https://api.github.com/repos/andela/colossus-backend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andela/colossus-backend/labels{/name}","releases_url":"https://api.github.com/repos/andela/colossus-backend/releases{/id}","deployments_url":"https://api.github.com/repos/andela/colossus-backend/deployments","created_at":"2019-08-06T14:15:05Z","updated_at":"2019-08-16T15:20:02Z","pushed_at":"2019-08-16T22:49:54Z","git_url":"git://github.com/andela/colossus-backend.git","ssh_url":"git@github.com:andela/colossus-backend.git","clone_url":"https://github.com/andela/colossus-backend.git","svn_url":"https://github.com/andela/colossus-backend","homepage":null,"size":143,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":2,"license":null,"forks":0,"open_issues":2,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/andela/colossus-backend/pulls/10"},"html":{"href":"https://github.com/andela/colossus-backend/pull/10"},"issue":{"href":"https://api.github.com/repos/andela/colossus-backend/issues/10"},"comments":{"href":"https://api.github.com/repos/andela/colossus-backend/issues/10/comments"},"review_comments":{"href":"https://api.github.com/repos/andela/colossus-backend/pulls/10/comments"},"review_comment":{"href":"https://api.github.com/repos/andela/colossus-backend/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/andela/colossus-backend/pulls/10/commits"},"statuses":{"href":"https://api.github.com/repos/andela/colossus-backend/statuses/c35dd25acbf30356e12b1d1d514df8ad2106509d"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"hound"}}