{"action":"created","comment":{"url":"https://api.github.com/repos/commercetools/nodejs/pulls/comments/190695215","pull_request_review_id":123127743,"id":190695215,"diff_hunk":"@@ -0,0 +1,153 @@\n+import CustomerErasure from '@commercetools/customer-erasure'\n+import tmp from 'tmp'\n+import { getCredentials } from '@commercetools/get-credentials'\n+import { exec } from 'mz/child_process'\n+import { version } from '@commercetools/customer-erasure/package.json'\n+import { createData, clearData, getId } from './helpers/utils'\n+import {\n+  customer,\n+  order,\n+  cart,\n+  payment,\n+  shoppingList,\n+  review,\n+  customLineItem,\n+} from './helpers/customer-erasure.data'\n+\n+let projectKey\n+if (process.env.CI === 'true') projectKey = 'custom-objects-import-int-tests'\n+else projectKey = process.env.npm_config_projectkey\n+\n+describe('customer erasure', () => {\n+  const bin = './integration-tests/node_modules/.bin/customer-erasure'","path":"integration-tests/cli/customer-erasure.it.js","position":22,"original_position":22,"commit_id":"e4a3f2572048e1d0553e14bd037401aca3b53c9b","original_commit_id":"5ee8931ba1efd20d4bd9131be985d22863d33f53","user":{"login":"daern91","id":6084427,"avatar_url":"https://avatars2.githubusercontent.com/u/6084427?v=4","gravatar_id":"","url":"https://api.github.com/users/daern91","html_url":"https://github.com/daern91","followers_url":"https://api.github.com/users/daern91/followers","following_url":"https://api.github.com/users/daern91/following{/other_user}","gists_url":"https://api.github.com/users/daern91/gists{/gist_id}","starred_url":"https://api.github.com/users/daern91/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daern91/subscriptions","organizations_url":"https://api.github.com/users/daern91/orgs","repos_url":"https://api.github.com/users/daern91/repos","events_url":"https://api.github.com/users/daern91/events{/privacy}","received_events_url":"https://api.github.com/users/daern91/received_events","type":"User","site_admin":false},"body":"Above didnt work out for me when running locally so I kept the path like this for now.","created_at":"2018-05-24T18:55:11Z","updated_at":"2018-05-24T18:55:12Z","html_url":"https://github.com/commercetools/nodejs/pull/601#discussion_r190695215","pull_request_url":"https://api.github.com/repos/commercetools/nodejs/pulls/601","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/commercetools/nodejs/pulls/comments/190695215"},"html":{"href":"https://github.com/commercetools/nodejs/pull/601#discussion_r190695215"},"pull_request":{"href":"https://api.github.com/repos/commercetools/nodejs/pulls/601"}},"in_reply_to_id":190536530},"pull_request":{"url":"https://api.github.com/repos/commercetools/nodejs/pulls/601","id":189484798,"html_url":"https://github.com/commercetools/nodejs/pull/601","diff_url":"https://github.com/commercetools/nodejs/pull/601.diff","patch_url":"https://github.com/commercetools/nodejs/pull/601.patch","issue_url":"https://api.github.com/repos/commercetools/nodejs/issues/601","number":601,"state":"open","locked":false,"title":"feat(customer-erasure): add new customer erasure package","user":{"login":"daern91","id":6084427,"avatar_url":"https://avatars2.githubusercontent.com/u/6084427?v=4","gravatar_id":"","url":"https://api.github.com/users/daern91","html_url":"https://github.com/daern91","followers_url":"https://api.github.com/users/daern91/followers","following_url":"https://api.github.com/users/daern91/following{/other_user}","gists_url":"https://api.github.com/users/daern91/gists{/gist_id}","starred_url":"https://api.github.com/users/daern91/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daern91/subscriptions","organizations_url":"https://api.github.com/users/daern91/orgs","repos_url":"https://api.github.com/users/daern91/repos","events_url":"https://api.github.com/users/daern91/events{/privacy}","received_events_url":"https://api.github.com/users/daern91/received_events","type":"User","site_admin":false},"body":"#### Summary\r\n\r\nAs the new GDPR rules come into play May 25th we need to offer tools to delete all data existing on a customer if requested. It was proposed to do this as an open source package and this PR is intended to provide just those tools.\r\n\r\n#### Description\r\n\r\nMe and @cneijenhuis worked together to put this together the other day real quick. It is not yet finished but I would love to get your feedback on it so far. Since I am on vacation the rest of this week it would help a lot in order to wrap it up quickly.\r\n\r\nMore info in below links:\r\nhttps://jira.commercetools.com/browse/CTP-1229\r\nhttps://jira.commercetools.com/browse/CTP-1230\r\nhttps://deploy-preview-963--commercetools-documentation.netlify.com/release-notes.html#releases-2018-05-09-data-erasure\r\n\r\n\r\n#### Todo\r\n\r\n* Tests\r\n  * [x] Unit\r\n  * [x] Integration\r\n* [x] Documentation\r\n* [ ] Flow types\r\n* [x] Logging\r\n* [x] Refactor for readability \r\n\r\nresolves #580\r\n","created_at":"2018-05-21T20:51:12Z","updated_at":"2018-05-24T18:55:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8e50bab891959c8d7191fc178a2aea38815bd1a8","assignee":{"login":"cneijenhuis","id":2638512,"avatar_url":"https://avatars3.githubusercontent.com/u/2638512?v=4","gravatar_id":"","url":"https://api.github.com/users/cneijenhuis","html_url":"https://github.com/cneijenhuis","followers_url":"https://api.github.com/users/cneijenhuis/followers","following_url":"https://api.github.com/users/cneijenhuis/following{/other_user}","gists_url":"https://api.github.com/users/cneijenhuis/gists{/gist_id}","starred_url":"https://api.github.com/users/cneijenhuis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cneijenhuis/subscriptions","organizations_url":"https://api.github.com/users/cneijenhuis/orgs","repos_url":"https://api.github.com/users/cneijenhuis/repos","events_url":"https://api.github.com/users/cneijenhuis/events{/privacy}","received_events_url":"https://api.github.com/users/cneijenhuis/received_events","type":"User","site_admin":false},"assignees":[{"login":"cneijenhuis","id":2638512,"avatar_url":"https://avatars3.githubusercontent.com/u/2638512?v=4","gravatar_id":"","url":"https://api.github.com/users/cneijenhuis","html_url":"https://github.com/cneijenhuis","followers_url":"https://api.github.com/users/cneijenhuis/followers","following_url":"https://api.github.com/users/cneijenhuis/following{/other_user}","gists_url":"https://api.github.com/users/cneijenhuis/gists{/gist_id}","starred_url":"https://api.github.com/users/cneijenhuis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cneijenhuis/subscriptions","organizations_url":"https://api.github.com/users/cneijenhuis/orgs","repos_url":"https://api.github.com/users/cneijenhuis/repos","events_url":"https://api.github.com/users/cneijenhuis/events{/privacy}","received_events_url":"https://api.github.com/users/cneijenhuis/received_events","type":"User","site_admin":false},{"login":"daern91","id":6084427,"avatar_url":"https://avatars2.githubusercontent.com/u/6084427?v=4","gravatar_id":"","url":"https://api.github.com/users/daern91","html_url":"https://github.com/daern91","followers_url":"https://api.github.com/users/daern91/followers","following_url":"https://api.github.com/users/daern91/following{/other_user}","gists_url":"https://api.github.com/users/daern91/gists{/gist_id}","starred_url":"https://api.github.com/users/daern91/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daern91/subscriptions","organizations_url":"https://api.github.com/users/daern91/orgs","repos_url":"https://api.github.com/users/daern91/repos","events_url":"https://api.github.com/users/daern91/events{/privacy}","received_events_url":"https://api.github.com/users/daern91/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/commercetools/nodejs/pulls/601/commits","review_comments_url":"https://api.github.com/repos/commercetools/nodejs/pulls/601/comments","review_comment_url":"https://api.github.com/repos/commercetools/nodejs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/commercetools/nodejs/issues/601/comments","statuses_url":"https://api.github.com/repos/commercetools/nodejs/statuses/e4a3f2572048e1d0553e14bd037401aca3b53c9b","head":{"label":"commercetools:580-gdpr-tool","ref":"580-gdpr-tool","sha":"e4a3f2572048e1d0553e14bd037401aca3b53c9b","user":{"login":"commercetools","id":1084585,"avatar_url":"https://avatars3.githubusercontent.com/u/1084585?v=4","gravatar_id":"","url":"https://api.github.com/users/commercetools","html_url":"https://github.com/commercetools","followers_url":"https://api.github.com/users/commercetools/followers","following_url":"https://api.github.com/users/commercetools/following{/other_user}","gists_url":"https://api.github.com/users/commercetools/gists{/gist_id}","starred_url":"https://api.github.com/users/commercetools/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/commercetools/subscriptions","organizations_url":"https://api.github.com/users/commercetools/orgs","repos_url":"https://api.github.com/users/commercetools/repos","events_url":"https://api.github.com/users/commercetools/events{/privacy}","received_events_url":"https://api.github.com/users/commercetools/received_events","type":"Organization","site_admin":false},"repo":{"id":70048127,"name":"nodejs","full_name":"commercetools/nodejs","owner":{"login":"commercetools","id":1084585,"avatar_url":"https://avatars3.githubusercontent.com/u/1084585?v=4","gravatar_id":"","url":"https://api.github.com/users/commercetools","html_url":"https://github.com/commercetools","followers_url":"https://api.github.com/users/commercetools/followers","following_url":"https://api.github.com/users/commercetools/following{/other_user}","gists_url":"https://api.github.com/users/commercetools/gists{/gist_id}","starred_url":"https://api.github.com/users/commercetools/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/commercetools/subscriptions","organizations_url":"https://api.github.com/users/commercetools/orgs","repos_url":"https://api.github.com/users/commercetools/repos","events_url":"https://api.github.com/users/commercetools/events{/privacy}","received_events_url":"https://api.github.com/users/commercetools/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/commercetools/nodejs","description":"Everything related to the Node.js ecosystem for the commercetools platform.","fork":false,"url":"https://api.github.com/repos/commercetools/nodejs","forks_url":"https://api.github.com/repos/commercetools/nodejs/forks","keys_url":"https://api.github.com/repos/commercetools/nodejs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/commercetools/nodejs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/commercetools/nodejs/teams","hooks_url":"https://api.github.com/repos/commercetools/nodejs/hooks","issue_events_url":"https://api.github.com/repos/commercetools/nodejs/issues/events{/number}","events_url":"https://api.github.com/repos/commercetools/nodejs/events","assignees_url":"https://api.github.com/repos/commercetools/nodejs/assignees{/user}","branches_url":"https://api.github.com/repos/commercetools/nodejs/branches{/branch}","tags_url":"https://api.github.com/repos/commercetools/nodejs/tags","blobs_url":"https://api.github.com/repos/commercetools/nodejs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/commercetools/nodejs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/commercetools/nodejs/git/refs{/sha}","trees_url":"https://api.github.com/repos/commercetools/nodejs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/commercetools/nodejs/statuses/{sha}","languages_url":"https://api.github.com/repos/commercetools/nodejs/languages","stargazers_url":"https://api.github.com/repos/commercetools/nodejs/stargazers","contributors_url":"https://api.github.com/repos/commercetools/nodejs/contributors","subscribers_url":"https://api.github.com/repos/commercetools/nodejs/subscribers","subscription_url":"https://api.github.com/repos/commercetools/nodejs/subscription","commits_url":"https://api.github.com/repos/commercetools/nodejs/commits{/sha}","git_commits_url":"https://api.github.com/repos/commercetools/nodejs/git/commits{/sha}","comments_url":"https://api.github.com/repos/commercetools/nodejs/comments{/number}","issue_comment_url":"https://api.github.com/repos/commercetools/nodejs/issues/comments{/number}","contents_url":"https://api.github.com/repos/commercetools/nodejs/contents/{+path}","compare_url":"https://api.github.com/repos/commercetools/nodejs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/commercetools/nodejs/merges","archive_url":"https://api.github.com/repos/commercetools/nodejs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/commercetools/nodejs/downloads","issues_url":"https://api.github.com/repos/commercetools/nodejs/issues{/number}","pulls_url":"https://api.github.com/repos/commercetools/nodejs/pulls{/number}","milestones_url":"https://api.github.com/repos/commercetools/nodejs/milestones{/number}","notifications_url":"https://api.github.com/repos/commercetools/nodejs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/commercetools/nodejs/labels{/name}","releases_url":"https://api.github.com/repos/commercetools/nodejs/releases{/id}","deployments_url":"https://api.github.com/repos/commercetools/nodejs/deployments","created_at":"2016-10-05T09:53:20Z","updated_at":"2018-05-22T13:03:32Z","pushed_at":"2018-05-24T18:53:35Z","git_url":"git://github.com/commercetools/nodejs.git","ssh_url":"git@github.com:commercetools/nodejs.git","clone_url":"https://github.com/commercetools/nodejs.git","svn_url":"https://github.com/commercetools/nodejs","homepage":"https://commercetools.github.io/nodejs/","size":3340,"stargazers_count":10,"watchers_count":10,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":8,"mirror_url":null,"archived":false,"open_issues_count":19,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":8,"open_issues":19,"watchers":10,"default_branch":"master"}},"base":{"label":"commercetools:master","ref":"master","sha":"fd967db331878d978c19933bfa1a7f5008d591e5","user":{"login":"commercetools","id":1084585,"avatar_url":"https://avatars3.githubusercontent.com/u/1084585?v=4","gravatar_id":"","url":"https://api.github.com/users/commercetools","html_url":"https://github.com/commercetools","followers_url":"https://api.github.com/users/commercetools/followers","following_url":"https://api.github.com/users/commercetools/following{/other_user}","gists_url":"https://api.github.com/users/commercetools/gists{/gist_id}","starred_url":"https://api.github.com/users/commercetools/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/commercetools/subscriptions","organizations_url":"https://api.github.com/users/commercetools/orgs","repos_url":"https://api.github.com/users/commercetools/repos","events_url":"https://api.github.com/users/commercetools/events{/privacy}","received_events_url":"https://api.github.com/users/commercetools/received_events","type":"Organization","site_admin":false},"repo":{"id":70048127,"name":"nodejs","full_name":"commercetools/nodejs","owner":{"login":"commercetools","id":1084585,"avatar_url":"https://avatars3.githubusercontent.com/u/1084585?v=4","gravatar_id":"","url":"https://api.github.com/users/commercetools","html_url":"https://github.com/commercetools","followers_url":"https://api.github.com/users/commercetools/followers","following_url":"https://api.github.com/users/commercetools/following{/other_user}","gists_url":"https://api.github.com/users/commercetools/gists{/gist_id}","starred_url":"https://api.github.com/users/commercetools/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/commercetools/subscriptions","organizations_url":"https://api.github.com/users/commercetools/orgs","repos_url":"https://api.github.com/users/commercetools/repos","events_url":"https://api.github.com/users/commercetools/events{/privacy}","received_events_url":"https://api.github.com/users/commercetools/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/commercetools/nodejs","description":"Everything related to the Node.js ecosystem for the commercetools platform.","fork":false,"url":"https://api.github.com/repos/commercetools/nodejs","forks_url":"https://api.github.com/repos/commercetools/nodejs/forks","keys_url":"https://api.github.com/repos/commercetools/nodejs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/commercetools/nodejs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/commercetools/nodejs/teams","hooks_url":"https://api.github.com/repos/commercetools/nodejs/hooks","issue_events_url":"https://api.github.com/repos/commercetools/nodejs/issues/events{/number}","events_url":"https://api.github.com/repos/commercetools/nodejs/events","assignees_url":"https://api.github.com/repos/commercetools/nodejs/assignees{/user}","branches_url":"https://api.github.com/repos/commercetools/nodejs/branches{/branch}","tags_url":"https://api.github.com/repos/commercetools/nodejs/tags","blobs_url":"https://api.github.com/repos/commercetools/nodejs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/commercetools/nodejs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/commercetools/nodejs/git/refs{/sha}","trees_url":"https://api.github.com/repos/commercetools/nodejs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/commercetools/nodejs/statuses/{sha}","languages_url":"https://api.github.com/repos/commercetools/nodejs/languages","stargazers_url":"https://api.github.com/repos/commercetools/nodejs/stargazers","contributors_url":"https://api.github.com/repos/commercetools/nodejs/contributors","subscribers_url":"https://api.github.com/repos/commercetools/nodejs/subscribers","subscription_url":"https://api.github.com/repos/commercetools/nodejs/subscription","commits_url":"https://api.github.com/repos/commercetools/nodejs/commits{/sha}","git_commits_url":"https://api.github.com/repos/commercetools/nodejs/git/commits{/sha}","comments_url":"https://api.github.com/repos/commercetools/nodejs/comments{/number}","issue_comment_url":"https://api.github.com/repos/commercetools/nodejs/issues/comments{/number}","contents_url":"https://api.github.com/repos/commercetools/nodejs/contents/{+path}","compare_url":"https://api.github.com/repos/commercetools/nodejs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/commercetools/nodejs/merges","archive_url":"https://api.github.com/repos/commercetools/nodejs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/commercetools/nodejs/downloads","issues_url":"https://api.github.com/repos/commercetools/nodejs/issues{/number}","pulls_url":"https://api.github.com/repos/commercetools/nodejs/pulls{/number}","milestones_url":"https://api.github.com/repos/commercetools/nodejs/milestones{/number}","notifications_url":"https://api.github.com/repos/commercetools/nodejs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/commercetools/nodejs/labels{/name}","releases_url":"https://api.github.com/repos/commercetools/nodejs/releases{/id}","deployments_url":"https://api.github.com/repos/commercetools/nodejs/deployments","created_at":"2016-10-05T09:53:20Z","updated_at":"2018-05-22T13:03:32Z","pushed_at":"2018-05-24T18:53:35Z","git_url":"git://github.com/commercetools/nodejs.git","ssh_url":"git@github.com:commercetools/nodejs.git","clone_url":"https://github.com/commercetools/nodejs.git","svn_url":"https://github.com/commercetools/nodejs","homepage":"https://commercetools.github.io/nodejs/","size":3340,"stargazers_count":10,"watchers_count":10,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":8,"mirror_url":null,"archived":false,"open_issues_count":19,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":8,"open_issues":19,"watchers":10,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/commercetools/nodejs/pulls/601"},"html":{"href":"https://github.com/commercetools/nodejs/pull/601"},"issue":{"href":"https://api.github.com/repos/commercetools/nodejs/issues/601"},"comments":{"href":"https://api.github.com/repos/commercetools/nodejs/issues/601/comments"},"review_comments":{"href":"https://api.github.com/repos/commercetools/nodejs/pulls/601/comments"},"review_comment":{"href":"https://api.github.com/repos/commercetools/nodejs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/commercetools/nodejs/pulls/601/commits"},"statuses":{"href":"https://api.github.com/repos/commercetools/nodejs/statuses/e4a3f2572048e1d0553e14bd037401aca3b53c9b"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"daern91"}}