{"action":"created","comment":{"url":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync/pulls/comments/90398146","pull_request_review_id":10915622,"id":90398146,"diff_hunk":"@@ -891,3 +891,111 @@ describe 'Import integration test', ->\n         expect(p.slug).toEqual en: @newProductSlug\n         done()\n       .catch (err) -> done _.prettify(err)\n+\n+    it 'should update a product level info based only on SKU', (done) ->\n+      newProductNameUpdated = \"#{@newProductName}-updated\"\n+      categories = []\n+      for i in [1...4]\n+        categories.push(        {\n+          \"name\": {\n+            \"en\": \"Catgeory#{i}\"\n+          },\n+          \"slug\": {\n+            \"en\": \"category-#{i}\"\n+          },\n+          \"externalId\": \"#{i}\",\n+        })\n+\n+      csv =\n+      \"\"\"\n+        productType,name,sku,variantId,prices,categories\n+        #{@productType.id},#{@newProductName},#{@newProductSku+1},1,EUR 999,1;2\n+        \"\"\"\n+\n+      TestHelpers.ensureCategories(@client, categories)\n+      .then =>\n+        @importer.import(csv)\n+      .then (result) =>\n+        expect(_.size result).toBe 1\n+        expect(result[0]).toBe '[row 2] New product created.'\n+\n+        csv =\n+        \"\"\"\n+          productType,sku,name.en,name.it,categories\n+          #{@productType.name},#{@newProductSku+1},#{newProductNameUpdated},#{newProductNameUpdated}-it,2;3","path":"src/spec/integration/import.spec.coffee","position":35,"original_position":35,"commit_id":"60b2263135b97f5c8ed72ae6b819f111694b1c46","original_commit_id":"60b2263135b97f5c8ed72ae6b819f111694b1c46","user":{"login":"PhilippSpo","id":8394418,"avatar_url":"https://avatars.githubusercontent.com/u/8394418?v=3","gravatar_id":"","url":"https://api.github.com/users/PhilippSpo","html_url":"https://github.com/PhilippSpo","followers_url":"https://api.github.com/users/PhilippSpo/followers","following_url":"https://api.github.com/users/PhilippSpo/following{/other_user}","gists_url":"https://api.github.com/users/PhilippSpo/gists{/gist_id}","starred_url":"https://api.github.com/users/PhilippSpo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PhilippSpo/subscriptions","organizations_url":"https://api.github.com/users/PhilippSpo/orgs","repos_url":"https://api.github.com/users/PhilippSpo/repos","events_url":"https://api.github.com/users/PhilippSpo/events{/privacy}","received_events_url":"https://api.github.com/users/PhilippSpo/received_events","type":"User","site_admin":false},"body":"So this does a \"delta\" update and not a real update since it is just adding category 3 and not setting 2 and 3 instead of 1 and 2. Is this what we want and what the user expects?","created_at":"2016-12-01T08:00:01Z","updated_at":"2016-12-01T08:04:42Z","html_url":"https://github.com/sphereio/sphere-node-product-csv-sync/pull/147#discussion_r90398146","pull_request_url":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync/pulls/147","_links":{"self":{"href":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync/pulls/comments/90398146"},"html":{"href":"https://github.com/sphereio/sphere-node-product-csv-sync/pull/147#discussion_r90398146"},"pull_request":{"href":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync/pulls/147"}}},"pull_request":{"url":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync/pulls/147","id":95562794,"html_url":"https://github.com/sphereio/sphere-node-product-csv-sync/pull/147","diff_url":"https://github.com/sphereio/sphere-node-product-csv-sync/pull/147.diff","patch_url":"https://github.com/sphereio/sphere-node-product-csv-sync/pull/147.patch","issue_url":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync/issues/147","number":147,"state":"open","locked":false,"title":"feat(import): Add possibility to update a product level info only by SKU","user":{"login":"junajan","id":1090382,"avatar_url":"https://avatars.githubusercontent.com/u/1090382?v=3","gravatar_id":"","url":"https://api.github.com/users/junajan","html_url":"https://github.com/junajan","followers_url":"https://api.github.com/users/junajan/followers","following_url":"https://api.github.com/users/junajan/following{/other_user}","gists_url":"https://api.github.com/users/junajan/gists{/gist_id}","starred_url":"https://api.github.com/users/junajan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/junajan/subscriptions","organizations_url":"https://api.github.com/users/junajan/orgs","repos_url":"https://api.github.com/users/junajan/repos","events_url":"https://api.github.com/users/junajan/events{/privacy}","received_events_url":"https://api.github.com/users/junajan/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-11-28T19:37:20Z","updated_at":"2016-12-01T08:04:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"89a9cc6fc1e337759312025f1217b3f24f731b4c","assignee":{"login":"hajoeichler","id":602105,"avatar_url":"https://avatars.githubusercontent.com/u/602105?v=3","gravatar_id":"","url":"https://api.github.com/users/hajoeichler","html_url":"https://github.com/hajoeichler","followers_url":"https://api.github.com/users/hajoeichler/followers","following_url":"https://api.github.com/users/hajoeichler/following{/other_user}","gists_url":"https://api.github.com/users/hajoeichler/gists{/gist_id}","starred_url":"https://api.github.com/users/hajoeichler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hajoeichler/subscriptions","organizations_url":"https://api.github.com/users/hajoeichler/orgs","repos_url":"https://api.github.com/users/hajoeichler/repos","events_url":"https://api.github.com/users/hajoeichler/events{/privacy}","received_events_url":"https://api.github.com/users/hajoeichler/received_events","type":"User","site_admin":false},"assignees":[{"login":"hajoeichler","id":602105,"avatar_url":"https://avatars.githubusercontent.com/u/602105?v=3","gravatar_id":"","url":"https://api.github.com/users/hajoeichler","html_url":"https://github.com/hajoeichler","followers_url":"https://api.github.com/users/hajoeichler/followers","following_url":"https://api.github.com/users/hajoeichler/following{/other_user}","gists_url":"https://api.github.com/users/hajoeichler/gists{/gist_id}","starred_url":"https://api.github.com/users/hajoeichler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hajoeichler/subscriptions","organizations_url":"https://api.github.com/users/hajoeichler/orgs","repos_url":"https://api.github.com/users/hajoeichler/repos","events_url":"https://api.github.com/users/hajoeichler/events{/privacy}","received_events_url":"https://api.github.com/users/hajoeichler/received_events","type":"User","site_admin":false},{"login":"PhilippSpo","id":8394418,"avatar_url":"https://avatars.githubusercontent.com/u/8394418?v=3","gravatar_id":"","url":"https://api.github.com/users/PhilippSpo","html_url":"https://github.com/PhilippSpo","followers_url":"https://api.github.com/users/PhilippSpo/followers","following_url":"https://api.github.com/users/PhilippSpo/following{/other_user}","gists_url":"https://api.github.com/users/PhilippSpo/gists{/gist_id}","starred_url":"https://api.github.com/users/PhilippSpo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PhilippSpo/subscriptions","organizations_url":"https://api.github.com/users/PhilippSpo/orgs","repos_url":"https://api.github.com/users/PhilippSpo/repos","events_url":"https://api.github.com/users/PhilippSpo/events{/privacy}","received_events_url":"https://api.github.com/users/PhilippSpo/received_events","type":"User","site_admin":false},{"login":"hisabimbola","id":9654923,"avatar_url":"https://avatars.githubusercontent.com/u/9654923?v=3","gravatar_id":"","url":"https://api.github.com/users/hisabimbola","html_url":"https://github.com/hisabimbola","followers_url":"https://api.github.com/users/hisabimbola/followers","following_url":"https://api.github.com/users/hisabimbola/following{/other_user}","gists_url":"https://api.github.com/users/hisabimbola/gists{/gist_id}","starred_url":"https://api.github.com/users/hisabimbola/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hisabimbola/subscriptions","organizations_url":"https://api.github.com/users/hisabimbola/orgs","repos_url":"https://api.github.com/users/hisabimbola/repos","events_url":"https://api.github.com/users/hisabimbola/events{/privacy}","received_events_url":"https://api.github.com/users/hisabimbola/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync/pulls/147/commits","review_comments_url":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync/pulls/147/comments","review_comment_url":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync/issues/147/comments","statuses_url":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync/statuses/60b2263135b97f5c8ed72ae6b819f111694b1c46","head":{"label":"sphereio:issue-107-update-product-by-sku","ref":"issue-107-update-product-by-sku","sha":"60b2263135b97f5c8ed72ae6b819f111694b1c46","user":{"login":"sphereio","id":4119130,"avatar_url":"https://avatars.githubusercontent.com/u/4119130?v=3","gravatar_id":"","url":"https://api.github.com/users/sphereio","html_url":"https://github.com/sphereio","followers_url":"https://api.github.com/users/sphereio/followers","following_url":"https://api.github.com/users/sphereio/following{/other_user}","gists_url":"https://api.github.com/users/sphereio/gists{/gist_id}","starred_url":"https://api.github.com/users/sphereio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sphereio/subscriptions","organizations_url":"https://api.github.com/users/sphereio/orgs","repos_url":"https://api.github.com/users/sphereio/repos","events_url":"https://api.github.com/users/sphereio/events{/privacy}","received_events_url":"https://api.github.com/users/sphereio/received_events","type":"Organization","site_admin":false},"repo":{"id":15926737,"name":"sphere-node-product-csv-sync","full_name":"sphereio/sphere-node-product-csv-sync","owner":{"login":"sphereio","id":4119130,"avatar_url":"https://avatars.githubusercontent.com/u/4119130?v=3","gravatar_id":"","url":"https://api.github.com/users/sphereio","html_url":"https://github.com/sphereio","followers_url":"https://api.github.com/users/sphereio/followers","following_url":"https://api.github.com/users/sphereio/following{/other_user}","gists_url":"https://api.github.com/users/sphereio/gists{/gist_id}","starred_url":"https://api.github.com/users/sphereio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sphereio/subscriptions","organizations_url":"https://api.github.com/users/sphereio/orgs","repos_url":"https://api.github.com/users/sphereio/repos","events_url":"https://api.github.com/users/sphereio/events{/privacy}","received_events_url":"https://api.github.com/users/sphereio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sphereio/sphere-node-product-csv-sync","description":"Component to import, export and update your SPHERE.IO products via CSV.","fork":false,"url":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync","forks_url":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync/forks","keys_url":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync/teams","hooks_url":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync/hooks","issue_events_url":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync/issues/events{/number}","events_url":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync/events","assignees_url":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync/assignees{/user}","branches_url":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync/branches{/branch}","tags_url":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync/tags","blobs_url":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync/git/refs{/sha}","trees_url":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync/statuses/{sha}","languages_url":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync/languages","stargazers_url":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync/stargazers","contributors_url":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync/contributors","subscribers_url":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync/subscribers","subscription_url":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync/subscription","commits_url":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync/commits{/sha}","git_commits_url":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync/git/commits{/sha}","comments_url":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync/comments{/number}","issue_comment_url":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync/issues/comments{/number}","contents_url":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync/contents/{+path}","compare_url":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync/merges","archive_url":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync/downloads","issues_url":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync/issues{/number}","pulls_url":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync/pulls{/number}","milestones_url":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync/milestones{/number}","notifications_url":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync/labels{/name}","releases_url":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync/releases{/id}","deployments_url":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync/deployments","created_at":"2014-01-15T06:19:41Z","updated_at":"2016-10-24T14:40:26Z","pushed_at":"2016-11-30T17:57:18Z","git_url":"git://github.com/sphereio/sphere-node-product-csv-sync.git","ssh_url":"git@github.com:sphereio/sphere-node-product-csv-sync.git","clone_url":"https://github.com/sphereio/sphere-node-product-csv-sync.git","svn_url":"https://github.com/sphereio/sphere-node-product-csv-sync","homepage":"https://impex.sphere.io","size":5427,"stargazers_count":5,"watchers_count":5,"language":"CoffeeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":42,"forks":2,"open_issues":42,"watchers":5,"default_branch":"master"}},"base":{"label":"sphereio:master","ref":"master","sha":"4213635afafcabcdcf7e0afb3d2586e11b2ca9c6","user":{"login":"sphereio","id":4119130,"avatar_url":"https://avatars.githubusercontent.com/u/4119130?v=3","gravatar_id":"","url":"https://api.github.com/users/sphereio","html_url":"https://github.com/sphereio","followers_url":"https://api.github.com/users/sphereio/followers","following_url":"https://api.github.com/users/sphereio/following{/other_user}","gists_url":"https://api.github.com/users/sphereio/gists{/gist_id}","starred_url":"https://api.github.com/users/sphereio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sphereio/subscriptions","organizations_url":"https://api.github.com/users/sphereio/orgs","repos_url":"https://api.github.com/users/sphereio/repos","events_url":"https://api.github.com/users/sphereio/events{/privacy}","received_events_url":"https://api.github.com/users/sphereio/received_events","type":"Organization","site_admin":false},"repo":{"id":15926737,"name":"sphere-node-product-csv-sync","full_name":"sphereio/sphere-node-product-csv-sync","owner":{"login":"sphereio","id":4119130,"avatar_url":"https://avatars.githubusercontent.com/u/4119130?v=3","gravatar_id":"","url":"https://api.github.com/users/sphereio","html_url":"https://github.com/sphereio","followers_url":"https://api.github.com/users/sphereio/followers","following_url":"https://api.github.com/users/sphereio/following{/other_user}","gists_url":"https://api.github.com/users/sphereio/gists{/gist_id}","starred_url":"https://api.github.com/users/sphereio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sphereio/subscriptions","organizations_url":"https://api.github.com/users/sphereio/orgs","repos_url":"https://api.github.com/users/sphereio/repos","events_url":"https://api.github.com/users/sphereio/events{/privacy}","received_events_url":"https://api.github.com/users/sphereio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sphereio/sphere-node-product-csv-sync","description":"Component to import, export and update your SPHERE.IO products via CSV.","fork":false,"url":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync","forks_url":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync/forks","keys_url":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync/teams","hooks_url":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync/hooks","issue_events_url":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync/issues/events{/number}","events_url":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync/events","assignees_url":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync/assignees{/user}","branches_url":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync/branches{/branch}","tags_url":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync/tags","blobs_url":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync/git/refs{/sha}","trees_url":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync/statuses/{sha}","languages_url":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync/languages","stargazers_url":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync/stargazers","contributors_url":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync/contributors","subscribers_url":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync/subscribers","subscription_url":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync/subscription","commits_url":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync/commits{/sha}","git_commits_url":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync/git/commits{/sha}","comments_url":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync/comments{/number}","issue_comment_url":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync/issues/comments{/number}","contents_url":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync/contents/{+path}","compare_url":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync/merges","archive_url":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync/downloads","issues_url":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync/issues{/number}","pulls_url":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync/pulls{/number}","milestones_url":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync/milestones{/number}","notifications_url":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync/labels{/name}","releases_url":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync/releases{/id}","deployments_url":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync/deployments","created_at":"2014-01-15T06:19:41Z","updated_at":"2016-10-24T14:40:26Z","pushed_at":"2016-11-30T17:57:18Z","git_url":"git://github.com/sphereio/sphere-node-product-csv-sync.git","ssh_url":"git@github.com:sphereio/sphere-node-product-csv-sync.git","clone_url":"https://github.com/sphereio/sphere-node-product-csv-sync.git","svn_url":"https://github.com/sphereio/sphere-node-product-csv-sync","homepage":"https://impex.sphere.io","size":5427,"stargazers_count":5,"watchers_count":5,"language":"CoffeeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":42,"forks":2,"open_issues":42,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync/pulls/147"},"html":{"href":"https://github.com/sphereio/sphere-node-product-csv-sync/pull/147"},"issue":{"href":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync/issues/147"},"comments":{"href":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync/issues/147/comments"},"review_comments":{"href":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync/pulls/147/comments"},"review_comment":{"href":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync/pulls/147/commits"},"statuses":{"href":"https://api.github.com/repos/sphereio/sphere-node-product-csv-sync/statuses/60b2263135b97f5c8ed72ae6b819f111694b1c46"}}}}
{"actor":{"display_login":"PhilippSpo"}}