{"action":"created","comment":{"url":"https://api.github.com/repos/bocoup/image-annotator/pulls/comments/105162267","pull_request_review_id":26027653,"id":105162267,"diff_hunk":"@@ -47,22 +47,24 @@ export function postAnnotations(req, res) {\n   // match the image ids whose annotations are being submitted\n   .then((data) => {\n     if (! data.length) {\n-      throw new Error('unknown workload');\n+      throw new Error('unknown workload: no stored workload');\n     }\n     const images = data[0].images;\n     const storedIds = images.map(image => image.id);\n     const submittedIds = req.body.images.map(image => image.id);\n-    if (! isEqual(storedIds, submittedIds)) {\n-      throw new Error('unknown workload');\n+    if (! isEqual(storedIds.sort(), submittedIds.sort())) {\n+      throw new Error('unknown workload: session workload of #s ${ submittedIds } did not match stored workload #s ${ storedIds }');","path":"backend/endpoints/annotations/controller.js","position":13,"original_position":13,"commit_id":"96bdba0a1a70870ca31ca137352267cd1483c381","original_commit_id":"96bdba0a1a70870ca31ca137352267cd1483c381","user":{"login":"gnarf","id":549355,"avatar_url":"https://avatars1.githubusercontent.com/u/549355?v=3","gravatar_id":"","url":"https://api.github.com/users/gnarf","html_url":"https://github.com/gnarf","followers_url":"https://api.github.com/users/gnarf/followers","following_url":"https://api.github.com/users/gnarf/following{/other_user}","gists_url":"https://api.github.com/users/gnarf/gists{/gist_id}","starred_url":"https://api.github.com/users/gnarf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gnarf/subscriptions","organizations_url":"https://api.github.com/users/gnarf/orgs","repos_url":"https://api.github.com/users/gnarf/repos","events_url":"https://api.github.com/users/gnarf/events{/privacy}","received_events_url":"https://api.github.com/users/gnarf/received_events","type":"User","site_admin":false},"body":"the `'` should change to `` ` ``'s because you need back ticks for string substitution like this.","created_at":"2017-03-09T13:29:10Z","updated_at":"2017-03-09T13:29:10Z","html_url":"https://github.com/bocoup/image-annotator/pull/51#discussion_r105162267","pull_request_url":"https://api.github.com/repos/bocoup/image-annotator/pulls/51","_links":{"self":{"href":"https://api.github.com/repos/bocoup/image-annotator/pulls/comments/105162267"},"html":{"href":"https://github.com/bocoup/image-annotator/pull/51#discussion_r105162267"},"pull_request":{"href":"https://api.github.com/repos/bocoup/image-annotator/pulls/51"}}},"pull_request":{"url":"https://api.github.com/repos/bocoup/image-annotator/pulls/51","id":109749621,"html_url":"https://github.com/bocoup/image-annotator/pull/51","diff_url":"https://github.com/bocoup/image-annotator/pull/51.diff","patch_url":"https://github.com/bocoup/image-annotator/pull/51.patch","issue_url":"https://api.github.com/repos/bocoup/image-annotator/issues/51","number":51,"state":"open","locked":false,"title":"implement annotation posting","user":{"login":"boazsender","id":122117,"avatar_url":"https://avatars0.githubusercontent.com/u/122117?v=3","gravatar_id":"","url":"https://api.github.com/users/boazsender","html_url":"https://github.com/boazsender","followers_url":"https://api.github.com/users/boazsender/followers","following_url":"https://api.github.com/users/boazsender/following{/other_user}","gists_url":"https://api.github.com/users/boazsender/gists{/gist_id}","starred_url":"https://api.github.com/users/boazsender/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boazsender/subscriptions","organizations_url":"https://api.github.com/users/boazsender/orgs","repos_url":"https://api.github.com/users/boazsender/repos","events_url":"https://api.github.com/users/boazsender/events{/privacy}","received_events_url":"https://api.github.com/users/boazsender/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-03-08T17:57:33Z","updated_at":"2017-03-09T13:29:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"221080255dd8e7c82973581bc61f9ce2db5cff36","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/bocoup/image-annotator/pulls/51/commits","review_comments_url":"https://api.github.com/repos/bocoup/image-annotator/pulls/51/comments","review_comment_url":"https://api.github.com/repos/bocoup/image-annotator/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bocoup/image-annotator/issues/51/comments","statuses_url":"https://api.github.com/repos/bocoup/image-annotator/statuses/96bdba0a1a70870ca31ca137352267cd1483c381","head":{"label":"bocoup:implement-annotation-posting","ref":"implement-annotation-posting","sha":"96bdba0a1a70870ca31ca137352267cd1483c381","user":{"login":"bocoup","id":497466,"avatar_url":"https://avatars2.githubusercontent.com/u/497466?v=3","gravatar_id":"","url":"https://api.github.com/users/bocoup","html_url":"https://github.com/bocoup","followers_url":"https://api.github.com/users/bocoup/followers","following_url":"https://api.github.com/users/bocoup/following{/other_user}","gists_url":"https://api.github.com/users/bocoup/gists{/gist_id}","starred_url":"https://api.github.com/users/bocoup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bocoup/subscriptions","organizations_url":"https://api.github.com/users/bocoup/orgs","repos_url":"https://api.github.com/users/bocoup/repos","events_url":"https://api.github.com/users/bocoup/events{/privacy}","received_events_url":"https://api.github.com/users/bocoup/received_events","type":"Organization","site_admin":false},"repo":{"id":82602055,"name":"image-annotator","full_name":"bocoup/image-annotator","owner":{"login":"bocoup","id":497466,"avatar_url":"https://avatars2.githubusercontent.com/u/497466?v=3","gravatar_id":"","url":"https://api.github.com/users/bocoup","html_url":"https://github.com/bocoup","followers_url":"https://api.github.com/users/bocoup/followers","following_url":"https://api.github.com/users/bocoup/following{/other_user}","gists_url":"https://api.github.com/users/bocoup/gists{/gist_id}","starred_url":"https://api.github.com/users/bocoup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bocoup/subscriptions","organizations_url":"https://api.github.com/users/bocoup/orgs","repos_url":"https://api.github.com/users/bocoup/repos","events_url":"https://api.github.com/users/bocoup/events{/privacy}","received_events_url":"https://api.github.com/users/bocoup/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bocoup/image-annotator","description":"A web application for crowdsourcing the annotation of images.","fork":false,"url":"https://api.github.com/repos/bocoup/image-annotator","forks_url":"https://api.github.com/repos/bocoup/image-annotator/forks","keys_url":"https://api.github.com/repos/bocoup/image-annotator/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bocoup/image-annotator/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bocoup/image-annotator/teams","hooks_url":"https://api.github.com/repos/bocoup/image-annotator/hooks","issue_events_url":"https://api.github.com/repos/bocoup/image-annotator/issues/events{/number}","events_url":"https://api.github.com/repos/bocoup/image-annotator/events","assignees_url":"https://api.github.com/repos/bocoup/image-annotator/assignees{/user}","branches_url":"https://api.github.com/repos/bocoup/image-annotator/branches{/branch}","tags_url":"https://api.github.com/repos/bocoup/image-annotator/tags","blobs_url":"https://api.github.com/repos/bocoup/image-annotator/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bocoup/image-annotator/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bocoup/image-annotator/git/refs{/sha}","trees_url":"https://api.github.com/repos/bocoup/image-annotator/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bocoup/image-annotator/statuses/{sha}","languages_url":"https://api.github.com/repos/bocoup/image-annotator/languages","stargazers_url":"https://api.github.com/repos/bocoup/image-annotator/stargazers","contributors_url":"https://api.github.com/repos/bocoup/image-annotator/contributors","subscribers_url":"https://api.github.com/repos/bocoup/image-annotator/subscribers","subscription_url":"https://api.github.com/repos/bocoup/image-annotator/subscription","commits_url":"https://api.github.com/repos/bocoup/image-annotator/commits{/sha}","git_commits_url":"https://api.github.com/repos/bocoup/image-annotator/git/commits{/sha}","comments_url":"https://api.github.com/repos/bocoup/image-annotator/comments{/number}","issue_comment_url":"https://api.github.com/repos/bocoup/image-annotator/issues/comments{/number}","contents_url":"https://api.github.com/repos/bocoup/image-annotator/contents/{+path}","compare_url":"https://api.github.com/repos/bocoup/image-annotator/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bocoup/image-annotator/merges","archive_url":"https://api.github.com/repos/bocoup/image-annotator/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bocoup/image-annotator/downloads","issues_url":"https://api.github.com/repos/bocoup/image-annotator/issues{/number}","pulls_url":"https://api.github.com/repos/bocoup/image-annotator/pulls{/number}","milestones_url":"https://api.github.com/repos/bocoup/image-annotator/milestones{/number}","notifications_url":"https://api.github.com/repos/bocoup/image-annotator/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bocoup/image-annotator/labels{/name}","releases_url":"https://api.github.com/repos/bocoup/image-annotator/releases{/id}","deployments_url":"https://api.github.com/repos/bocoup/image-annotator/deployments","created_at":"2017-02-20T20:59:07Z","updated_at":"2017-03-08T19:10:59Z","pushed_at":"2017-03-09T05:19:13Z","git_url":"git://github.com/bocoup/image-annotator.git","ssh_url":"git@github.com:bocoup/image-annotator.git","clone_url":"https://github.com/bocoup/image-annotator.git","svn_url":"https://github.com/bocoup/image-annotator","homepage":"","size":457,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":21,"forks":1,"open_issues":21,"watchers":1,"default_branch":"master"}},"base":{"label":"bocoup:master","ref":"master","sha":"a2760f0a7b76a353e4687ee2c8e9ea3e6b0221e6","user":{"login":"bocoup","id":497466,"avatar_url":"https://avatars2.githubusercontent.com/u/497466?v=3","gravatar_id":"","url":"https://api.github.com/users/bocoup","html_url":"https://github.com/bocoup","followers_url":"https://api.github.com/users/bocoup/followers","following_url":"https://api.github.com/users/bocoup/following{/other_user}","gists_url":"https://api.github.com/users/bocoup/gists{/gist_id}","starred_url":"https://api.github.com/users/bocoup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bocoup/subscriptions","organizations_url":"https://api.github.com/users/bocoup/orgs","repos_url":"https://api.github.com/users/bocoup/repos","events_url":"https://api.github.com/users/bocoup/events{/privacy}","received_events_url":"https://api.github.com/users/bocoup/received_events","type":"Organization","site_admin":false},"repo":{"id":82602055,"name":"image-annotator","full_name":"bocoup/image-annotator","owner":{"login":"bocoup","id":497466,"avatar_url":"https://avatars2.githubusercontent.com/u/497466?v=3","gravatar_id":"","url":"https://api.github.com/users/bocoup","html_url":"https://github.com/bocoup","followers_url":"https://api.github.com/users/bocoup/followers","following_url":"https://api.github.com/users/bocoup/following{/other_user}","gists_url":"https://api.github.com/users/bocoup/gists{/gist_id}","starred_url":"https://api.github.com/users/bocoup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bocoup/subscriptions","organizations_url":"https://api.github.com/users/bocoup/orgs","repos_url":"https://api.github.com/users/bocoup/repos","events_url":"https://api.github.com/users/bocoup/events{/privacy}","received_events_url":"https://api.github.com/users/bocoup/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bocoup/image-annotator","description":"A web application for crowdsourcing the annotation of images.","fork":false,"url":"https://api.github.com/repos/bocoup/image-annotator","forks_url":"https://api.github.com/repos/bocoup/image-annotator/forks","keys_url":"https://api.github.com/repos/bocoup/image-annotator/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bocoup/image-annotator/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bocoup/image-annotator/teams","hooks_url":"https://api.github.com/repos/bocoup/image-annotator/hooks","issue_events_url":"https://api.github.com/repos/bocoup/image-annotator/issues/events{/number}","events_url":"https://api.github.com/repos/bocoup/image-annotator/events","assignees_url":"https://api.github.com/repos/bocoup/image-annotator/assignees{/user}","branches_url":"https://api.github.com/repos/bocoup/image-annotator/branches{/branch}","tags_url":"https://api.github.com/repos/bocoup/image-annotator/tags","blobs_url":"https://api.github.com/repos/bocoup/image-annotator/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bocoup/image-annotator/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bocoup/image-annotator/git/refs{/sha}","trees_url":"https://api.github.com/repos/bocoup/image-annotator/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bocoup/image-annotator/statuses/{sha}","languages_url":"https://api.github.com/repos/bocoup/image-annotator/languages","stargazers_url":"https://api.github.com/repos/bocoup/image-annotator/stargazers","contributors_url":"https://api.github.com/repos/bocoup/image-annotator/contributors","subscribers_url":"https://api.github.com/repos/bocoup/image-annotator/subscribers","subscription_url":"https://api.github.com/repos/bocoup/image-annotator/subscription","commits_url":"https://api.github.com/repos/bocoup/image-annotator/commits{/sha}","git_commits_url":"https://api.github.com/repos/bocoup/image-annotator/git/commits{/sha}","comments_url":"https://api.github.com/repos/bocoup/image-annotator/comments{/number}","issue_comment_url":"https://api.github.com/repos/bocoup/image-annotator/issues/comments{/number}","contents_url":"https://api.github.com/repos/bocoup/image-annotator/contents/{+path}","compare_url":"https://api.github.com/repos/bocoup/image-annotator/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bocoup/image-annotator/merges","archive_url":"https://api.github.com/repos/bocoup/image-annotator/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bocoup/image-annotator/downloads","issues_url":"https://api.github.com/repos/bocoup/image-annotator/issues{/number}","pulls_url":"https://api.github.com/repos/bocoup/image-annotator/pulls{/number}","milestones_url":"https://api.github.com/repos/bocoup/image-annotator/milestones{/number}","notifications_url":"https://api.github.com/repos/bocoup/image-annotator/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bocoup/image-annotator/labels{/name}","releases_url":"https://api.github.com/repos/bocoup/image-annotator/releases{/id}","deployments_url":"https://api.github.com/repos/bocoup/image-annotator/deployments","created_at":"2017-02-20T20:59:07Z","updated_at":"2017-03-08T19:10:59Z","pushed_at":"2017-03-09T05:19:13Z","git_url":"git://github.com/bocoup/image-annotator.git","ssh_url":"git@github.com:bocoup/image-annotator.git","clone_url":"https://github.com/bocoup/image-annotator.git","svn_url":"https://github.com/bocoup/image-annotator","homepage":"","size":457,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":21,"forks":1,"open_issues":21,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bocoup/image-annotator/pulls/51"},"html":{"href":"https://github.com/bocoup/image-annotator/pull/51"},"issue":{"href":"https://api.github.com/repos/bocoup/image-annotator/issues/51"},"comments":{"href":"https://api.github.com/repos/bocoup/image-annotator/issues/51/comments"},"review_comments":{"href":"https://api.github.com/repos/bocoup/image-annotator/pulls/51/comments"},"review_comment":{"href":"https://api.github.com/repos/bocoup/image-annotator/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bocoup/image-annotator/pulls/51/commits"},"statuses":{"href":"https://api.github.com/repos/bocoup/image-annotator/statuses/96bdba0a1a70870ca31ca137352267cd1483c381"}}}}
{"actor":{"display_login":"gnarf"}}