{"action":"created","comment":{"url":"https://api.github.com/repos/guardian/bonobo/pulls/comments/45712985","id":45712985,"diff_hunk":"@@ -80,6 +82,10 @@ object KongKey {\n     new KongKey(bonoboId, consumer.id, consumer.key, rateLimits.requestsPerDay, rateLimits.requestsPerMinute, tier, Active, consumer.createdAt, productName, productUrl, uniqueRangeKey(consumer.createdAt))\n   }\n \n+  /* model used in the migration endpoint */\n+  def apply(bonoboId: String, consumer: ConsumerCreationResult, rateLimits: RateLimits, tier: Tier, productName: String, productUrl: String, status: String, date: DateTime): KongKey = {\n+    new KongKey(bonoboId, consumer.id, consumer.key, rateLimits.requestsPerDay, rateLimits.requestsPerMinute, tier, status, date, productName, productUrl, uniqueRangeKey(consumer.createdAt))","path":"app/models/models.scala","position":16,"original_position":16,"commit_id":"7edb873bf877154fc74cab973f8de47c54407202","original_commit_id":"7edb873bf877154fc74cab973f8de47c54407202","user":{"login":"marialivia16","id":5732563,"avatar_url":"https://avatars.githubusercontent.com/u/5732563?v=3","gravatar_id":"","url":"https://api.github.com/users/marialivia16","html_url":"https://github.com/marialivia16","followers_url":"https://api.github.com/users/marialivia16/followers","following_url":"https://api.github.com/users/marialivia16/following{/other_user}","gists_url":"https://api.github.com/users/marialivia16/gists{/gist_id}","starred_url":"https://api.github.com/users/marialivia16/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marialivia16/subscriptions","organizations_url":"https://api.github.com/users/marialivia16/orgs","repos_url":"https://api.github.com/users/marialivia16/repos","events_url":"https://api.github.com/users/marialivia16/events{/privacy}","received_events_url":"https://api.github.com/users/marialivia16/received_events","type":"User","site_admin":false},"body":"@cb372 Ok, thank you for pointing that out. Should I restore this PR and make the changes here?","created_at":"2015-11-24T09:36:00Z","updated_at":"2015-11-24T09:36:00Z","html_url":"https://github.com/guardian/bonobo/pull/64#discussion_r45712985","pull_request_url":"https://api.github.com/repos/guardian/bonobo/pulls/64","_links":{"self":{"href":"https://api.github.com/repos/guardian/bonobo/pulls/comments/45712985"},"html":{"href":"https://github.com/guardian/bonobo/pull/64#discussion_r45712985"},"pull_request":{"href":"https://api.github.com/repos/guardian/bonobo/pulls/64"}}},"pull_request":{"url":"https://api.github.com/repos/guardian/bonobo/pulls/64","id":50548943,"html_url":"https://github.com/guardian/bonobo/pull/64","diff_url":"https://github.com/guardian/bonobo/pull/64.diff","patch_url":"https://github.com/guardian/bonobo/pull/64.patch","issue_url":"https://api.github.com/repos/guardian/bonobo/issues/64","number":64,"state":"closed","locked":false,"title":"Migrate endpoint","user":{"login":"marialivia16","id":5732563,"avatar_url":"https://avatars.githubusercontent.com/u/5732563?v=3","gravatar_id":"","url":"https://api.github.com/users/marialivia16","html_url":"https://github.com/marialivia16","followers_url":"https://api.github.com/users/marialivia16/followers","following_url":"https://api.github.com/users/marialivia16/following{/other_user}","gists_url":"https://api.github.com/users/marialivia16/gists{/gist_id}","starred_url":"https://api.github.com/users/marialivia16/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marialivia16/subscriptions","organizations_url":"https://api.github.com/users/marialivia16/orgs","repos_url":"https://api.github.com/users/marialivia16/repos","events_url":"https://api.github.com/users/marialivia16/events{/privacy}","received_events_url":"https://api.github.com/users/marialivia16/received_events","type":"User","site_admin":false},"body":"- Migration endpoint has been added in `controllers/Migration.scala`. The endpoint accepts a POST with a json body containing a list of users and saves a new consumer with his keys to Kong and DynamoDb. If the key is marked as `Inactive` it will be deleted from Kong.\r\n- Use enumeratum for Tier model.\r\n- Tests and a json example file have been added.\r\n- Returns a Json containing:\r\n    - the number of successfully added users\r\n   - the number of successfully added keys\r\n   - the list of users with conflicts\r\n   - the list of keys with conflicts\r\n\r\n","created_at":"2015-11-12T18:32:49Z","updated_at":"2015-11-24T09:36:00Z","closed_at":"2015-11-23T18:05:47Z","merged_at":"2015-11-23T18:05:47Z","merge_commit_sha":"c4fbfee9aac13c932a0abf5e16138dcbf407de11","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/guardian/bonobo/pulls/64/commits","review_comments_url":"https://api.github.com/repos/guardian/bonobo/pulls/64/comments","review_comment_url":"https://api.github.com/repos/guardian/bonobo/pulls/comments{/number}","comments_url":"https://api.github.com/repos/guardian/bonobo/issues/64/comments","statuses_url":"https://api.github.com/repos/guardian/bonobo/statuses/7edb873bf877154fc74cab973f8de47c54407202","head":{"label":"guardian:migrate-endpoint","ref":"migrate-endpoint","sha":"7edb873bf877154fc74cab973f8de47c54407202","user":{"login":"guardian","id":164318,"avatar_url":"https://avatars.githubusercontent.com/u/164318?v=3","gravatar_id":"","url":"https://api.github.com/users/guardian","html_url":"https://github.com/guardian","followers_url":"https://api.github.com/users/guardian/followers","following_url":"https://api.github.com/users/guardian/following{/other_user}","gists_url":"https://api.github.com/users/guardian/gists{/gist_id}","starred_url":"https://api.github.com/users/guardian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guardian/subscriptions","organizations_url":"https://api.github.com/users/guardian/orgs","repos_url":"https://api.github.com/users/guardian/repos","events_url":"https://api.github.com/users/guardian/events{/privacy}","received_events_url":"https://api.github.com/users/guardian/received_events","type":"Organization","site_admin":false},"repo":{"id":42717988,"name":"bonobo","full_name":"guardian/bonobo","owner":{"login":"guardian","id":164318,"avatar_url":"https://avatars.githubusercontent.com/u/164318?v=3","gravatar_id":"","url":"https://api.github.com/users/guardian","html_url":"https://github.com/guardian","followers_url":"https://api.github.com/users/guardian/followers","following_url":"https://api.github.com/users/guardian/following{/other_user}","gists_url":"https://api.github.com/users/guardian/gists{/gist_id}","starred_url":"https://api.github.com/users/guardian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guardian/subscriptions","organizations_url":"https://api.github.com/users/guardian/orgs","repos_url":"https://api.github.com/users/guardian/repos","events_url":"https://api.github.com/users/guardian/events{/privacy}","received_events_url":"https://api.github.com/users/guardian/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/guardian/bonobo","description":"Key management for Kong","fork":false,"url":"https://api.github.com/repos/guardian/bonobo","forks_url":"https://api.github.com/repos/guardian/bonobo/forks","keys_url":"https://api.github.com/repos/guardian/bonobo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/guardian/bonobo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/guardian/bonobo/teams","hooks_url":"https://api.github.com/repos/guardian/bonobo/hooks","issue_events_url":"https://api.github.com/repos/guardian/bonobo/issues/events{/number}","events_url":"https://api.github.com/repos/guardian/bonobo/events","assignees_url":"https://api.github.com/repos/guardian/bonobo/assignees{/user}","branches_url":"https://api.github.com/repos/guardian/bonobo/branches{/branch}","tags_url":"https://api.github.com/repos/guardian/bonobo/tags","blobs_url":"https://api.github.com/repos/guardian/bonobo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/guardian/bonobo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/guardian/bonobo/git/refs{/sha}","trees_url":"https://api.github.com/repos/guardian/bonobo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/guardian/bonobo/statuses/{sha}","languages_url":"https://api.github.com/repos/guardian/bonobo/languages","stargazers_url":"https://api.github.com/repos/guardian/bonobo/stargazers","contributors_url":"https://api.github.com/repos/guardian/bonobo/contributors","subscribers_url":"https://api.github.com/repos/guardian/bonobo/subscribers","subscription_url":"https://api.github.com/repos/guardian/bonobo/subscription","commits_url":"https://api.github.com/repos/guardian/bonobo/commits{/sha}","git_commits_url":"https://api.github.com/repos/guardian/bonobo/git/commits{/sha}","comments_url":"https://api.github.com/repos/guardian/bonobo/comments{/number}","issue_comment_url":"https://api.github.com/repos/guardian/bonobo/issues/comments{/number}","contents_url":"https://api.github.com/repos/guardian/bonobo/contents/{+path}","compare_url":"https://api.github.com/repos/guardian/bonobo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/guardian/bonobo/merges","archive_url":"https://api.github.com/repos/guardian/bonobo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/guardian/bonobo/downloads","issues_url":"https://api.github.com/repos/guardian/bonobo/issues{/number}","pulls_url":"https://api.github.com/repos/guardian/bonobo/pulls{/number}","milestones_url":"https://api.github.com/repos/guardian/bonobo/milestones{/number}","notifications_url":"https://api.github.com/repos/guardian/bonobo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/guardian/bonobo/labels{/name}","releases_url":"https://api.github.com/repos/guardian/bonobo/releases{/id}","created_at":"2015-09-18T11:36:29Z","updated_at":"2015-11-11T19:49:13Z","pushed_at":"2015-11-23T19:41:49Z","git_url":"git://github.com/guardian/bonobo.git","ssh_url":"git@github.com:guardian/bonobo.git","clone_url":"https://github.com/guardian/bonobo.git","svn_url":"https://github.com/guardian/bonobo","homepage":null,"size":30381,"stargazers_count":3,"watchers_count":3,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":3,"default_branch":"master"}},"base":{"label":"guardian:master","ref":"master","sha":"8d9edc589987c2b70706c66b693a2b53121f68e6","user":{"login":"guardian","id":164318,"avatar_url":"https://avatars.githubusercontent.com/u/164318?v=3","gravatar_id":"","url":"https://api.github.com/users/guardian","html_url":"https://github.com/guardian","followers_url":"https://api.github.com/users/guardian/followers","following_url":"https://api.github.com/users/guardian/following{/other_user}","gists_url":"https://api.github.com/users/guardian/gists{/gist_id}","starred_url":"https://api.github.com/users/guardian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guardian/subscriptions","organizations_url":"https://api.github.com/users/guardian/orgs","repos_url":"https://api.github.com/users/guardian/repos","events_url":"https://api.github.com/users/guardian/events{/privacy}","received_events_url":"https://api.github.com/users/guardian/received_events","type":"Organization","site_admin":false},"repo":{"id":42717988,"name":"bonobo","full_name":"guardian/bonobo","owner":{"login":"guardian","id":164318,"avatar_url":"https://avatars.githubusercontent.com/u/164318?v=3","gravatar_id":"","url":"https://api.github.com/users/guardian","html_url":"https://github.com/guardian","followers_url":"https://api.github.com/users/guardian/followers","following_url":"https://api.github.com/users/guardian/following{/other_user}","gists_url":"https://api.github.com/users/guardian/gists{/gist_id}","starred_url":"https://api.github.com/users/guardian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guardian/subscriptions","organizations_url":"https://api.github.com/users/guardian/orgs","repos_url":"https://api.github.com/users/guardian/repos","events_url":"https://api.github.com/users/guardian/events{/privacy}","received_events_url":"https://api.github.com/users/guardian/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/guardian/bonobo","description":"Key management for Kong","fork":false,"url":"https://api.github.com/repos/guardian/bonobo","forks_url":"https://api.github.com/repos/guardian/bonobo/forks","keys_url":"https://api.github.com/repos/guardian/bonobo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/guardian/bonobo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/guardian/bonobo/teams","hooks_url":"https://api.github.com/repos/guardian/bonobo/hooks","issue_events_url":"https://api.github.com/repos/guardian/bonobo/issues/events{/number}","events_url":"https://api.github.com/repos/guardian/bonobo/events","assignees_url":"https://api.github.com/repos/guardian/bonobo/assignees{/user}","branches_url":"https://api.github.com/repos/guardian/bonobo/branches{/branch}","tags_url":"https://api.github.com/repos/guardian/bonobo/tags","blobs_url":"https://api.github.com/repos/guardian/bonobo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/guardian/bonobo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/guardian/bonobo/git/refs{/sha}","trees_url":"https://api.github.com/repos/guardian/bonobo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/guardian/bonobo/statuses/{sha}","languages_url":"https://api.github.com/repos/guardian/bonobo/languages","stargazers_url":"https://api.github.com/repos/guardian/bonobo/stargazers","contributors_url":"https://api.github.com/repos/guardian/bonobo/contributors","subscribers_url":"https://api.github.com/repos/guardian/bonobo/subscribers","subscription_url":"https://api.github.com/repos/guardian/bonobo/subscription","commits_url":"https://api.github.com/repos/guardian/bonobo/commits{/sha}","git_commits_url":"https://api.github.com/repos/guardian/bonobo/git/commits{/sha}","comments_url":"https://api.github.com/repos/guardian/bonobo/comments{/number}","issue_comment_url":"https://api.github.com/repos/guardian/bonobo/issues/comments{/number}","contents_url":"https://api.github.com/repos/guardian/bonobo/contents/{+path}","compare_url":"https://api.github.com/repos/guardian/bonobo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/guardian/bonobo/merges","archive_url":"https://api.github.com/repos/guardian/bonobo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/guardian/bonobo/downloads","issues_url":"https://api.github.com/repos/guardian/bonobo/issues{/number}","pulls_url":"https://api.github.com/repos/guardian/bonobo/pulls{/number}","milestones_url":"https://api.github.com/repos/guardian/bonobo/milestones{/number}","notifications_url":"https://api.github.com/repos/guardian/bonobo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/guardian/bonobo/labels{/name}","releases_url":"https://api.github.com/repos/guardian/bonobo/releases{/id}","created_at":"2015-09-18T11:36:29Z","updated_at":"2015-11-11T19:49:13Z","pushed_at":"2015-11-23T19:41:49Z","git_url":"git://github.com/guardian/bonobo.git","ssh_url":"git@github.com:guardian/bonobo.git","clone_url":"https://github.com/guardian/bonobo.git","svn_url":"https://github.com/guardian/bonobo","homepage":null,"size":30381,"stargazers_count":3,"watchers_count":3,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/guardian/bonobo/pulls/64"},"html":{"href":"https://github.com/guardian/bonobo/pull/64"},"issue":{"href":"https://api.github.com/repos/guardian/bonobo/issues/64"},"comments":{"href":"https://api.github.com/repos/guardian/bonobo/issues/64/comments"},"review_comments":{"href":"https://api.github.com/repos/guardian/bonobo/pulls/64/comments"},"review_comment":{"href":"https://api.github.com/repos/guardian/bonobo/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/guardian/bonobo/pulls/64/commits"},"statuses":{"href":"https://api.github.com/repos/guardian/bonobo/statuses/7edb873bf877154fc74cab973f8de47c54407202"}}}}