{"action":"created","comment":{"url":"https://api.github.com/repos/andela/getmyshop/pulls/comments/77830740","id":77830740,"diff_hunk":"@@ -0,0 +1,40 @@\n+$ ->\n+  $('a.update-btn').click ->\n+    json_array = []\n+    $('tr').each ->\n+      id = $(this).attr('id')\n+      json_object = {}\n+      json_object[\"id\"] = id\n+      json_object[\"status\"] = $(this).find('select').val()\n+      json_array.push(json_object) if id?\n+\n+    orders_status = { orders_attributes: json_array }\n+    updateOrderStatus({ shop: orders_status })\n+    \n+\n+@setOrderStatus = (status, element) ->\n+  json_array = []\n+  $('tr').each ->\n+    id = $(this).attr('id')\n+    json_object = {}\n+    json_object[\"id\"] = id\n+    json_object[\"status\"] = status\n+    if $(this).find(\"input[type='checkbox']\").is(':checked')\n+      json_array.push(json_object) \n+\n+  orders_status = { orders_attributes: json_array }\n+  updateOrderStatus({ shop: orders_status })\n+\n+\n+updateOrderStatus = (status) ->\n+  $.ajax\n+    type: \"PUT\"\n+    url: \"/shopowners/shop/orders\"\n+    beforeSend: (xhr) ->\n+      xhr.setRequestHeader 'X-CSRF-Token', $('meta[name=\"csrf-token\"]').attr 'content'","path":"app/assets/javascripts/shop_orders.coffee","position":34,"original_position":34,"commit_id":"fc3435fa09d72bd6ec969dc14ed8f726f51ea8b2","original_commit_id":"fc3435fa09d72bd6ec969dc14ed8f726f51ea8b2","user":{"login":"houndci-bot","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci-bot","html_url":"https://github.com/houndci-bot","followers_url":"https://api.github.com/users/houndci-bot/followers","following_url":"https://api.github.com/users/houndci-bot/following{/other_user}","gists_url":"https://api.github.com/users/houndci-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci-bot/subscriptions","organizations_url":"https://api.github.com/users/houndci-bot/orgs","repos_url":"https://api.github.com/users/houndci-bot/repos","events_url":"https://api.github.com/users/houndci-bot/events{/privacy}","received_events_url":"https://api.github.com/users/houndci-bot/received_events","type":"User","site_admin":false},"body":"Line exceeds maximum allowed length","created_at":"2016-09-07T14:19:17Z","updated_at":"2016-09-07T14:19:17Z","html_url":"https://github.com/andela/getmyshop/pull/125#discussion_r77830740","pull_request_url":"https://api.github.com/repos/andela/getmyshop/pulls/125","_links":{"self":{"href":"https://api.github.com/repos/andela/getmyshop/pulls/comments/77830740"},"html":{"href":"https://github.com/andela/getmyshop/pull/125#discussion_r77830740"},"pull_request":{"href":"https://api.github.com/repos/andela/getmyshop/pulls/125"}}},"pull_request":{"url":"https://api.github.com/repos/andela/getmyshop/pulls/125","id":84308772,"html_url":"https://github.com/andela/getmyshop/pull/125","diff_url":"https://github.com/andela/getmyshop/pull/125.diff","patch_url":"https://github.com/andela/getmyshop/pull/125.patch","issue_url":"https://api.github.com/repos/andela/getmyshop/issues/125","number":125,"state":"open","locked":false,"title":"Shopowners Cancel Orders","user":{"login":"andela-anwocha","id":16139143,"avatar_url":"https://avatars.githubusercontent.com/u/16139143?v=3","gravatar_id":"","url":"https://api.github.com/users/andela-anwocha","html_url":"https://github.com/andela-anwocha","followers_url":"https://api.github.com/users/andela-anwocha/followers","following_url":"https://api.github.com/users/andela-anwocha/following{/other_user}","gists_url":"https://api.github.com/users/andela-anwocha/gists{/gist_id}","starred_url":"https://api.github.com/users/andela-anwocha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela-anwocha/subscriptions","organizations_url":"https://api.github.com/users/andela-anwocha/orgs","repos_url":"https://api.github.com/users/andela-anwocha/repos","events_url":"https://api.github.com/users/andela-anwocha/events{/privacy}","received_events_url":"https://api.github.com/users/andela-anwocha/received_events","type":"User","site_admin":false},"body":"#### What does this PR do?\r\nIt ensures that Shop owners are able to cancel shop orders\r\n\r\n#### What are the relevant pivotal tracker stories?\r\n128320495","created_at":"2016-09-07T14:18:57Z","updated_at":"2016-09-07T14:19:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f171a043d61da05699c0a09459a8b81b9f8383d0","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/andela/getmyshop/pulls/125/commits","review_comments_url":"https://api.github.com/repos/andela/getmyshop/pulls/125/comments","review_comment_url":"https://api.github.com/repos/andela/getmyshop/pulls/comments{/number}","comments_url":"https://api.github.com/repos/andela/getmyshop/issues/125/comments","statuses_url":"https://api.github.com/repos/andela/getmyshop/statuses/fc3435fa09d72bd6ec969dc14ed8f726f51ea8b2","head":{"label":"andela:ft-shopowners-cancel-orders-128320495","ref":"ft-shopowners-cancel-orders-128320495","sha":"fc3435fa09d72bd6ec969dc14ed8f726f51ea8b2","user":{"login":"andela","id":4100206,"avatar_url":"https://avatars.githubusercontent.com/u/4100206?v=3","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":45830862,"name":"getmyshop","full_name":"andela/getmyshop","owner":{"login":"andela","id":4100206,"avatar_url":"https://avatars.githubusercontent.com/u/4100206?v=3","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},"private":false,"html_url":"https://github.com/andela/getmyshop","description":"Online shop for rent","fork":false,"url":"https://api.github.com/repos/andela/getmyshop","forks_url":"https://api.github.com/repos/andela/getmyshop/forks","keys_url":"https://api.github.com/repos/andela/getmyshop/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andela/getmyshop/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andela/getmyshop/teams","hooks_url":"https://api.github.com/repos/andela/getmyshop/hooks","issue_events_url":"https://api.github.com/repos/andela/getmyshop/issues/events{/number}","events_url":"https://api.github.com/repos/andela/getmyshop/events","assignees_url":"https://api.github.com/repos/andela/getmyshop/assignees{/user}","branches_url":"https://api.github.com/repos/andela/getmyshop/branches{/branch}","tags_url":"https://api.github.com/repos/andela/getmyshop/tags","blobs_url":"https://api.github.com/repos/andela/getmyshop/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andela/getmyshop/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andela/getmyshop/git/refs{/sha}","trees_url":"https://api.github.com/repos/andela/getmyshop/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andela/getmyshop/statuses/{sha}","languages_url":"https://api.github.com/repos/andela/getmyshop/languages","stargazers_url":"https://api.github.com/repos/andela/getmyshop/stargazers","contributors_url":"https://api.github.com/repos/andela/getmyshop/contributors","subscribers_url":"https://api.github.com/repos/andela/getmyshop/subscribers","subscription_url":"https://api.github.com/repos/andela/getmyshop/subscription","commits_url":"https://api.github.com/repos/andela/getmyshop/commits{/sha}","git_commits_url":"https://api.github.com/repos/andela/getmyshop/git/commits{/sha}","comments_url":"https://api.github.com/repos/andela/getmyshop/comments{/number}","issue_comment_url":"https://api.github.com/repos/andela/getmyshop/issues/comments{/number}","contents_url":"https://api.github.com/repos/andela/getmyshop/contents/{+path}","compare_url":"https://api.github.com/repos/andela/getmyshop/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andela/getmyshop/merges","archive_url":"https://api.github.com/repos/andela/getmyshop/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andela/getmyshop/downloads","issues_url":"https://api.github.com/repos/andela/getmyshop/issues{/number}","pulls_url":"https://api.github.com/repos/andela/getmyshop/pulls{/number}","milestones_url":"https://api.github.com/repos/andela/getmyshop/milestones{/number}","notifications_url":"https://api.github.com/repos/andela/getmyshop/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andela/getmyshop/labels{/name}","releases_url":"https://api.github.com/repos/andela/getmyshop/releases{/id}","deployments_url":"https://api.github.com/repos/andela/getmyshop/deployments","created_at":"2015-11-09T10:22:52Z","updated_at":"2016-08-29T13:39:27Z","pushed_at":"2016-09-07T14:18:57Z","git_url":"git://github.com/andela/getmyshop.git","ssh_url":"git@github.com:andela/getmyshop.git","clone_url":"https://github.com/andela/getmyshop.git","svn_url":"https://github.com/andela/getmyshop","homepage":"http://getmyshop-staging.herokuapp.com","size":12794,"stargazers_count":6,"watchers_count":6,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":5,"forks":4,"open_issues":5,"watchers":6,"default_branch":"master"}},"base":{"label":"andela:master","ref":"master","sha":"27114cf7caebbccae167ff421da5a9c1f6a8ca1f","user":{"login":"andela","id":4100206,"avatar_url":"https://avatars.githubusercontent.com/u/4100206?v=3","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":45830862,"name":"getmyshop","full_name":"andela/getmyshop","owner":{"login":"andela","id":4100206,"avatar_url":"https://avatars.githubusercontent.com/u/4100206?v=3","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},"private":false,"html_url":"https://github.com/andela/getmyshop","description":"Online shop for rent","fork":false,"url":"https://api.github.com/repos/andela/getmyshop","forks_url":"https://api.github.com/repos/andela/getmyshop/forks","keys_url":"https://api.github.com/repos/andela/getmyshop/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andela/getmyshop/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andela/getmyshop/teams","hooks_url":"https://api.github.com/repos/andela/getmyshop/hooks","issue_events_url":"https://api.github.com/repos/andela/getmyshop/issues/events{/number}","events_url":"https://api.github.com/repos/andela/getmyshop/events","assignees_url":"https://api.github.com/repos/andela/getmyshop/assignees{/user}","branches_url":"https://api.github.com/repos/andela/getmyshop/branches{/branch}","tags_url":"https://api.github.com/repos/andela/getmyshop/tags","blobs_url":"https://api.github.com/repos/andela/getmyshop/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andela/getmyshop/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andela/getmyshop/git/refs{/sha}","trees_url":"https://api.github.com/repos/andela/getmyshop/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andela/getmyshop/statuses/{sha}","languages_url":"https://api.github.com/repos/andela/getmyshop/languages","stargazers_url":"https://api.github.com/repos/andela/getmyshop/stargazers","contributors_url":"https://api.github.com/repos/andela/getmyshop/contributors","subscribers_url":"https://api.github.com/repos/andela/getmyshop/subscribers","subscription_url":"https://api.github.com/repos/andela/getmyshop/subscription","commits_url":"https://api.github.com/repos/andela/getmyshop/commits{/sha}","git_commits_url":"https://api.github.com/repos/andela/getmyshop/git/commits{/sha}","comments_url":"https://api.github.com/repos/andela/getmyshop/comments{/number}","issue_comment_url":"https://api.github.com/repos/andela/getmyshop/issues/comments{/number}","contents_url":"https://api.github.com/repos/andela/getmyshop/contents/{+path}","compare_url":"https://api.github.com/repos/andela/getmyshop/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andela/getmyshop/merges","archive_url":"https://api.github.com/repos/andela/getmyshop/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andela/getmyshop/downloads","issues_url":"https://api.github.com/repos/andela/getmyshop/issues{/number}","pulls_url":"https://api.github.com/repos/andela/getmyshop/pulls{/number}","milestones_url":"https://api.github.com/repos/andela/getmyshop/milestones{/number}","notifications_url":"https://api.github.com/repos/andela/getmyshop/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andela/getmyshop/labels{/name}","releases_url":"https://api.github.com/repos/andela/getmyshop/releases{/id}","deployments_url":"https://api.github.com/repos/andela/getmyshop/deployments","created_at":"2015-11-09T10:22:52Z","updated_at":"2016-08-29T13:39:27Z","pushed_at":"2016-09-07T14:18:57Z","git_url":"git://github.com/andela/getmyshop.git","ssh_url":"git@github.com:andela/getmyshop.git","clone_url":"https://github.com/andela/getmyshop.git","svn_url":"https://github.com/andela/getmyshop","homepage":"http://getmyshop-staging.herokuapp.com","size":12794,"stargazers_count":6,"watchers_count":6,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":5,"forks":4,"open_issues":5,"watchers":6,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/andela/getmyshop/pulls/125"},"html":{"href":"https://github.com/andela/getmyshop/pull/125"},"issue":{"href":"https://api.github.com/repos/andela/getmyshop/issues/125"},"comments":{"href":"https://api.github.com/repos/andela/getmyshop/issues/125/comments"},"review_comments":{"href":"https://api.github.com/repos/andela/getmyshop/pulls/125/comments"},"review_comment":{"href":"https://api.github.com/repos/andela/getmyshop/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/andela/getmyshop/pulls/125/commits"},"statuses":{"href":"https://api.github.com/repos/andela/getmyshop/statuses/fc3435fa09d72bd6ec969dc14ed8f726f51ea8b2"}}}}
{"actor":{"display_login":"houndci-bot"}}