GitHub PullRequestReviewCommentEvent at 2014-06-25 10:38:09
Repository: alaveteli
Actor: houndci
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/mysociety/alaveteli/pulls/comments/14178626","id":14178626,"diff_hunk":"@@ -75,311 +91,431 @@\n         new_request.info_request_events[0].event_type.should == 'sent'\n         new_request.info_request_events[0].calculated_state.should == 'waiting_response'\n     end\n-\n-    def _create_request\n-        post :create_request,\n-            :k => public_bodies(:geraldine_public_body).api_key,\n-            :request_json => {\n-                \"title\" => \"Tell me about your chickens\",\n-                \"body\" => \"Dear Sir,\\n\\nI should like to know about your chickens.\\n\\nYours in faith,\\nBob\\n\",\n-\n-                \"external_url\" => \"http://www.example.gov.uk/foi/chickens_23\",\n-                \"external_user_name\" => \"Bob Smith\",\n-            }.to_json\n-        response.content_type.should == \"application/json\"\n-        return ActiveSupport::JSON.decode(response.body)[\"id\"]\n     end\n \n-    it \"should add a response to a request\" do\n-        # First we need an external request\n-        request_id = info_requests(:external_request).id\n-\n-        # Initially it has no incoming messages\n-        IncomingMessage.count(:conditions => [\"info_request_id = ?\", request_id]).should == 0\n-\n-        # Now add one\n-        sent_at = \"2012-05-28T12:35:39+01:00\"\n-        response_body = \"Thank you for your request for information, which we are handling in accordance with the Freedom of Information Act 2000. You will receive a response within 20 working days or before the next full moon, whichever is sooner.\\n\\nYours sincerely,\\nJohn Gandermulch,\\nExample Council FOI Officer\\n\"\n-        post :add_correspondence,\n-            :k => public_bodies(:geraldine_public_body).api_key,\n-            :id => request_id,\n-            :correspondence_json => {\n-                \"direction\" => \"response\",\n-                \"sent_at\" => sent_at,\n-                \"body\" => response_body\n-            }.to_json\n-\n-        # And make sure it worked\n-        response.should be_success\n-        incoming_messages = IncomingMessage.all(:conditions => [\"info_request_id = ?\", request_id])\n-        incoming_messages.count.should == 1\n-        incoming_message = incoming_messages[0]\n-\n-        incoming_message.sent_at.should == Time.iso8601(sent_at)\n-        incoming_message.get_main_body_text_folded.should be_equal_modulo_whitespace_to(response_body)\n-    end\n+    # POST /api/v2/request/:id/add_correspondence.json\n+    describe 'adding correspondence to a request' do\n+      it \"should add a response to a request\" do\n+          # First we need an external request\n+          request_id = info_requests(:external_request).id\n+\n+          # Initially it has no incoming messages\n+          IncomingMessage.count(:conditions => [\"info_request_id = ?\", request_id]).should == 0\n+\n+          # Now add one\n+          sent_at = \"2012-05-28T12:35:39+01:00\"\n+          response_body = \"Thank you for your request for information, which we are handling in accordance with the Freedom of Information Act 2000. You will receive a response within 20 working days or before the next full moon, whichever is sooner.\\n\\nYours sincerely,\\nJohn Gandermulch,\\nExample Council FOI Officer\\n\"\n+          post :add_correspondence,\n+               :k => public_bodies(:geraldine_public_body).api_key,\n+               :id => request_id,\n+               :correspondence_json => {\n+                   \"direction\" => \"response\",\n+                   \"sent_at\" => sent_at,\n+                   \"body\" => response_body\n+               }.to_json\n+\n+          # And make sure it worked\n+          response.should be_success\n+          incoming_messages = IncomingMessage.all(:conditions => [\"info_request_id = ?\", request_id])\n+          incoming_messages.count.should == 1\n+          incoming_message = incoming_messages[0]\n+\n+          incoming_message.sent_at.should == Time.iso8601(sent_at)\n+          incoming_message.get_main_body_text_folded.should be_equal_modulo_whitespace_to(response_body)\n+      end\n \n-    it \"should add a followup to a request\" do\n-        # First we need an external request\n-        request_id = info_requests(:external_request).id\n-\n-        # Initially it has one outgoing message\n-        OutgoingMessage.count(:conditions => [\"info_request_id = ?\", request_id]).should == 1\n-\n-        # Add another, as a followup\n-        sent_at = \"2012-05-29T12:35:39+01:00\"\n-        followup_body = \"Pls answer ASAP.\\nkthxbye\\n\"\n-        post :add_correspondence,\n-            :k => public_bodies(:geraldine_public_body).api_key,\n-            :id => request_id,\n-            :correspondence_json => {\n-                \"direction\" => \"request\",\n-                \"sent_at\" => sent_at,\n-                \"body\" => followup_body\n-            }.to_json\n-\n-        # Make sure it worked\n-        response.should be_success\n-        followup_messages = OutgoingMessage.all(\n-            :conditions => [\"info_request_id = ? and message_type = 'followup'\", request_id]\n-        )\n-        followup_messages.size.should == 1\n-        followup_message = followup_messages[0]\n+      it \"should add a followup to a request\" do\n+          # First we need an external request\n+          request_id = info_requests(:external_request).id\n+\n+          # Initially it has one outgoing message\n+          OutgoingMessage.count(:conditions => [\"info_request_id = ?\", request_id]).should == 1\n+\n+          # Add another, as a followup\n+          sent_at = \"2012-05-29T12:35:39+01:00\"\n+          followup_body = \"Pls answer ASAP.\\nkthxbye\\n\"\n+          post :add_correspondence,\n+               :k => public_bodies(:geraldine_public_body).api_key,\n+               :id => request_id,\n+               :correspondence_json => {\n+                   \"direction\" => \"request\",\n+                   \"sent_at\" => sent_at,\n+                   \"body\" => followup_body\n+               }.to_json\n+\n+          # Make sure it worked\n+          response.should be_success\n+          followup_messages = OutgoingMessage.all(\n+              :conditions => [\"info_request_id = ? and message_type = 'followup'\", request_id]\n+          )\n+          followup_messages.size.should == 1\n+          followup_message = followup_messages[0]\n+\n+          followup_message.last_sent_at.should == Time.iso8601(sent_at)\n+          followup_message.body.should == followup_body.strip\n+      end\n \n-        followup_message.last_sent_at.should == Time.iso8601(sent_at)\n-        followup_message.body.should == followup_body.strip\n-    end\n+      it \"should update the status if a valid state is supplied\" do\n+          # First we need an external request\n+          request_id = info_requests(:external_request).id\n+\n+          # Initially it has no incoming messages\n+          IncomingMessage.count(:conditions => [\"info_request_id = ?\", request_id]).should == 0\n+\n+          # Now add one\n+          sent_at = \"2012-05-28T12:35:39+01:00\"\n+          response_body = \"Thank you for your request for information, which we are handling in accordance with the Freedom of Information Act 2000. You will receive a response within 20 working days or before the next full moon, whichever is sooner.\\n\\nYours sincerely,\\nJohn Gandermulch,\\nExample Council FOI Officer\\n\"\n+          post :add_correspondence,\n+              :k => public_bodies(:geraldine_public_body).api_key,\n+              :id => request_id,\n+              :state => \"successful\",\n+              :correspondence_json => {\n+                  \"direction\" => \"response\",\n+                  \"sent_at\" => sent_at,\n+                  \"body\" => response_body,\n+              }.to_json\n+\n+          # And make sure it worked\n+          response.should be_success\n+          incoming_messages = IncomingMessage.all(:conditions => [\"info_request_id = ?\", request_id])\n+          incoming_messages.count.should == 1\n+          request = InfoRequest.find_by_id(request_id)\n+          request.described_state.should == \"successful\"\n+      end\n \n-    it \"should not allow internal requests to be updated\" do\n-        n_incoming_messages = IncomingMessage.count\n-        n_outgoing_messages = OutgoingMessage.count\n-\n-        request_id = info_requests(:naughty_chicken_request).id\n-        post :add_correspondence,\n-            :k => public_bodies(:geraldine_public_body).api_key,\n-            :id => request_id,\n-            :correspondence_json => {\n-                \"direction\" => \"request\",\n-                \"sent_at\" => Time.now.iso8601,\n-                \"body\" => \"xxx\"\n-            }.to_json\n-\n-        response.status.should == 500\n-        ActiveSupport::JSON.decode(response.body)[\"errors\"].should == [\n-          \"Request #{request_id} cannot be updated using the API\"]\n-\n-        IncomingMessage.count.should == n_incoming_messages\n-        OutgoingMessage.count.should == n_outgoing_messages\n-    end\n+      it \"should ignore the status if an invalid state is supplied\" do\n+          # First we need an external request\n+          request_id = info_requests(:external_request).id\n+\n+          # Initially it has no incoming messages\n+          IncomingMessage.count(:conditions => [\"info_request_id = ?\", request_id]).should == 0\n+\n+          # Now add one\n+          sent_at = \"2012-05-28T12:35:39+01:00\"\n+          response_body = \"Thank you for your request for information, which we are handling in accordance with the Freedom of Information Act 2000. You will receive a response within 20 working days or before the next full moon, whichever is sooner.\\n\\nYours sincerely,\\nJohn Gandermulch,\\nExample Council FOI Officer\\n\"\n+          post :add_correspondence,\n+              :k => public_bodies(:geraldine_public_body).api_key,\n+              :id => request_id,\n+              :state => \"random_string\",\n+              :correspondence_json => {\n+                  \"direction\" => \"response\",\n+                  \"sent_at\" => sent_at,\n+                  \"body\" => response_body,\n+              }.to_json\n+\n+          # And make sure it worked\n+          response.should be_success\n+          incoming_messages = IncomingMessage.all(:conditions => [\"info_request_id = ?\", request_id])\n+          incoming_messages.count.should == 1\n+          request = InfoRequest.find_by_id(request_id)\n+          request.described_state.should == \"waiting_response\"\n+      end\n \n-    it \"should not allow other people's requests to be updated\" do\n-        request_id = _create_request\n-        n_incoming_messages = IncomingMessage.count\n-        n_outgoing_messages = OutgoingMessage.count\n-\n-        post :add_correspondence,\n-            :k => public_bodies(:humpadink_public_body).api_key,\n-            :id => request_id,\n-            :correspondence_json => {\n-                \"direction\" => \"request\",\n-                \"sent_at\" => Time.now.iso8601,\n-                \"body\" => \"xxx\"\n-            }.to_json\n-\n-        response.status.should == 500\n-        ActiveSupport::JSON.decode(response.body)[\"errors\"].should == [\n-          \"You do not own request #{request_id}\"]\n-\n-        IncomingMessage.count.should == n_incoming_messages\n-        OutgoingMessage.count.should == n_outgoing_messages\n-    end\n+      it \"should not allow internal requests to be updated\" do\n+          n_incoming_messages = IncomingMessage.count\n+          n_outgoing_messages = OutgoingMessage.count\n+\n+          request_id = info_requests(:naughty_chicken_request).id\n+          post :add_correspondence,\n+               :k => public_bodies(:geraldine_public_body).api_key,\n+               :id => request_id,\n+               :correspondence_json => {\n+                   \"direction\" => \"request\",\n+                   \"sent_at\" => Time.now.iso8601,\n+                   \"body\" => \"xxx\"\n+               }.to_json\n+\n+          response.status.should == 500\n+          ActiveSupport::JSON.decode(response.body)[\"errors\"].should == [\n+            \"Request #{request_id} cannot be updated using the API\"]\n+\n+          IncomingMessage.count.should == n_incoming_messages\n+          OutgoingMessage.count.should == n_outgoing_messages\n+      end\n \n-    it \"should not allow files to be attached to a followup\" do\n-        post :add_correspondence,\n-            :k => public_bodies(:geraldine_public_body).api_key,\n-            :id => info_requests(:external_request).id,\n-            :correspondence_json => {\n-                    \"direction\" => \"request\",\n-                    \"sent_at\" => Time.now.iso8601,\n-                    \"body\" => \"Are you joking, or are you serious?\"\n-                }.to_json,\n-            :attachments => [\n-                fixture_file_upload(\"/files/tfl.pdf\")\n-            ]\n+      it \"should not allow other people's requests to be updated\" do\n+          request_id = _create_request\n+          n_incoming_messages = IncomingMessage.count\n+          n_outgoing_messages = OutgoingMessage.count\n+\n+          post :add_correspondence,\n+               :k => public_bodies(:humpadink_public_body).api_key,\n+               :id => request_id,\n+               :correspondence_json => {\n+                   \"direction\" => \"request\",\n+                   \"sent_at\" => Time.now.iso8601,\n+                   \"body\" => \"xxx\"\n+               }.to_json\n+\n+          response.status.should == 500\n+          ActiveSupport::JSON.decode(response.body)[\"errors\"].should == [\n+            \"You do not own request #{request_id}\"]\n+\n+          IncomingMessage.count.should == n_incoming_messages\n+          OutgoingMessage.count.should == n_outgoing_messages\n+      end\n \n+      it \"should return a JSON 404 error for non-existent requests\" do\n+          request_id = 123459876 # Let's hope this doesn't exist!\n+          sent_at = \"2012-05-28T12:35:39+01:00\"\n+          response_body = \"Thank you for your request for information, which we are handling in accordance with the Freedom of Information Act 2000. You will receive a response within 20 working days or before the next full moon, whichever is sooner.\\n\\nYours sincerely,\\nJohn Gandermulch,\\nExample Council FOI Officer\\n\"\n+          post :add_correspondence,\n+               :k => public_bodies(:geraldine_public_body).api_key,\n+               :id => request_id,\n+               :correspondence_json => {\n+                   \"direction\" => \"response\",\n+                   \"sent_at\" => sent_at,\n+                   \"body\" => response_body\n+               }.to_json\n+          response.status.should == 404\n+          ActiveSupport::JSON.decode(response.body)[\"errors\"].should == [\"Could not find request 123459876\"]\n+      end\n \n-        # Make sure it worked\n-        response.status.should == 500\n-        errors = ActiveSupport::JSON.decode(response.body)[\"errors\"]\n-        errors.should == [\"You cannot attach files to messages in the 'request' direction\"]\n-    end\n+      it \"should return a JSON 500 error if we try to add correspondence to a request we don't own\" do\n+          request_id = info_requests(:naughty_chicken_request).id\n+          sent_at = \"2012-05-28T12:35:39+01:00\"\n+          response_body = \"Thank you for your request for information, which we are handling in accordance with the Freedom of Information Act 2000. You will receive a response within 20 working days or before the next full moon, whichever is sooner.\\n\\nYours sincerely,\\nJohn Gandermulch,\\nExample Council FOI Officer\\n\"\n+          post :add_correspondence,\n+               :k => public_bodies(:geraldine_public_body).api_key,\n+               :id => request_id,\n+               :correspondence_json => {\n+                   \"direction\" => \"response\",\n+                   \"sent_at\" => sent_at,\n+                   \"body\" => response_body\n+               }.to_json\n+          response.status.should == 500\n+          ActiveSupport::JSON.decode(response.body)[\"errors\"].should == [\"Request #{request_id} cannot be updated using the API\"]\n+      end\n \n-    it \"should allow files to be attached to a response\" do\n-        # First we need an external request\n-        request_id = info_requests(:external_request).id\n-\n-        # Initially it has no incoming messages\n-        IncomingMessage.count(:conditions => [\"info_request_id = ?\", request_id]).should == 0\n-\n-        # Now add one\n-        sent_at = \"2012-05-28T12:35:39+01:00\"\n-        response_body = \"Thank you for your request for information, which we are handling in accordance with the Freedom of Information Act 2000. You will receive a response within 20 working days or before the next full moon, whichever is sooner.\\n\\nYours sincerely,\\nJohn Gandermulch,\\nExample Council FOI Officer\\n\"\n-        post :add_correspondence,\n-            :k => public_bodies(:geraldine_public_body).api_key,\n-            :id => request_id,\n-            :correspondence_json => {\n-                    \"direction\" => \"response\",\n-                    \"sent_at\" => sent_at,\n-                    \"body\" => response_body\n+      it \"should not allow files to be attached to a followup\" do\n+          post :add_correspondence,\n+               :k => public_bodies(:geraldine_public_body).api_key,\n+               :id => info_requests(:external_request).id,\n+               :correspondence_json => {\n+                   \"direction\" => \"request\",\n+                   \"sent_at\" => Time.now.iso8601,\n+                   \"body\" => \"Are you joking, or are you serious?\"","path":"spec/controllers/api_controller_spec.rb","position":378,"original_position":378,"commit_id":"701ae259a6d5235d6f7b86491723c5776464cd3d","original_commit_id":"701ae259a6d5235d6f7b86491723c5776464cd3d","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?","gravatar_id":"38d9cefd9971a05bf447f07c6cd332cc","url":"https://api.github.com/users/houndci","html_url":"https://github.com/houndci","followers_url":"https://api.github.com/users/houndci/followers","following_url":"https://api.github.com/users/houndci/following{/other_user}","gists_url":"https://api.github.com/users/houndci/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci/subscriptions","organizations_url":"https://api.github.com/users/houndci/orgs","repos_url":"https://api.github.com/users/houndci/repos","events_url":"https://api.github.com/users/houndci/events{/privacy}","received_events_url":"https://api.github.com/users/houndci/received_events","type":"User","site_admin":false},"body":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","created_at":"2014-06-25T10:38:09Z","updated_at":"2014-06-25T10:38:09Z","html_url":"https://github.com/mysociety/alaveteli/pull/1631#discussion_r14178626","pull_request_url":"https://api.github.com/repos/mysociety/alaveteli/pulls/1631","_links":{"self":{"href":"https://api.github.com/repos/mysociety/alaveteli/pulls/comments/14178626"},"html":{"href":"https://github.com/mysociety/alaveteli/pull/1631#discussion_r14178626"},"pull_request":{"href":"https://api.github.com/repos/mysociety/alaveteli/pulls/1631"}}},"pull_request":{"url":"https://api.github.com/repos/mysociety/alaveteli/pulls/1631","id":17484753,"html_url":"https://github.com/mysociety/alaveteli/pull/1631","diff_url":"https://github.com/mysociety/alaveteli/pull/1631.diff","patch_url":"https://github.com/mysociety/alaveteli/pull/1631.patch","issue_url":"https://api.github.com/repos/mysociety/alaveteli/issues/1631","number":1631,"state":"open","title":"Add request state updating functionality to API","user":{"login":"lizconlan","id":27760,"avatar_url":"https://avatars.githubusercontent.com/u/27760?","gravatar_id":"f943610b98a484c0e703a1567cad8d4d","url":"https://api.github.com/users/lizconlan","html_url":"https://github.com/lizconlan","followers_url":"https://api.github.com/users/lizconlan/followers","following_url":"https://api.github.com/users/lizconlan/following{/other_user}","gists_url":"https://api.github.com/users/lizconlan/gists{/gist_id}","starred_url":"https://api.github.com/users/lizconlan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lizconlan/subscriptions","organizations_url":"https://api.github.com/users/lizconlan/orgs","repos_url":"https://api.github.com/users/lizconlan/repos","events_url":"https://api.github.com/users/lizconlan/events{/privacy}","received_events_url":"https://api.github.com/users/lizconlan/received_events","type":"User","site_admin":false},"body":"WIP\r\n\r\nAdds a new `update_state` method to the API that uses the existing API key mechanism to send a status update to a request created via an external API request. Intended usage - foi-register end-users confirming whether the information they requested has been disclosed ([the parallel work on foi-register can be found here](https://github.com/mysociety/foi-register/tree/issues/169-ask-user-to-confirm-request-state)). Status description mismatches should be handled on the foi-register side but unexpected status values are rejected with a 500 error by the API.\r\n\r\nAdds an optional parameter to the pre-existing `add_correspondence` API method to allow it to update status (intended use - updates from a public body) if a `state` value is supplied. Again, the foi-register code is responsible for handling state description mismatches but in this case the API deals with erroneous data by ignoring that part of the request.\r\n\r\nApologies for having restructured `api_controller_spec` but I kept losing track of which API methods the various tests were targeting. I will be happy to change it back before finalising the Pull Request if I've caused trouble.","created_at":"2014-06-23T16:37:59Z","updated_at":"2014-06-25T10:38:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"45b5ff3c8a441dea5f993c0e3aff074805f5c94f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mysociety/alaveteli/pulls/1631/commits","review_comments_url":"https://api.github.com/repos/mysociety/alaveteli/pulls/1631/comments","review_comment_url":"https://api.github.com/repos/mysociety/alaveteli/pulls/comments/{number}","comments_url":"https://api.github.com/repos/mysociety/alaveteli/issues/1631/comments","statuses_url":"https://api.github.com/repos/mysociety/alaveteli/statuses/701ae259a6d5235d6f7b86491723c5776464cd3d","head":{"label":"mysociety:issues/1418-update-described-state-via-api","ref":"issues/1418-update-described-state-via-api","sha":"701ae259a6d5235d6f7b86491723c5776464cd3d","user":{"login":"mysociety","id":141338,"avatar_url":"https://avatars.githubusercontent.com/u/141338?","gravatar_id":"cb4e9c9ec6d33ee844baa03bd8f58cd3","url":"https://api.github.com/users/mysociety","html_url":"https://github.com/mysociety","followers_url":"https://api.github.com/users/mysociety/followers","following_url":"https://api.github.com/users/mysociety/following{/other_user}","gists_url":"https://api.github.com/users/mysociety/gists{/gist_id}","starred_url":"https://api.github.com/users/mysociety/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mysociety/subscriptions","organizations_url":"https://api.github.com/users/mysociety/orgs","repos_url":"https://api.github.com/users/mysociety/repos","events_url":"https://api.github.com/users/mysociety/events{/privacy}","received_events_url":"https://api.github.com/users/mysociety/received_events","type":"Organization","site_admin":false},"repo":{"id":1125389,"name":"alaveteli","full_name":"mysociety/alaveteli","owner":{"login":"mysociety","id":141338,"avatar_url":"https://avatars.githubusercontent.com/u/141338?","gravatar_id":"cb4e9c9ec6d33ee844baa03bd8f58cd3","url":"https://api.github.com/users/mysociety","html_url":"https://github.com/mysociety","followers_url":"https://api.github.com/users/mysociety/followers","following_url":"https://api.github.com/users/mysociety/following{/other_user}","gists_url":"https://api.github.com/users/mysociety/gists{/gist_id}","starred_url":"https://api.github.com/users/mysociety/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mysociety/subscriptions","organizations_url":"https://api.github.com/users/mysociety/orgs","repos_url":"https://api.github.com/users/mysociety/repos","events_url":"https://api.github.com/users/mysociety/events{/privacy}","received_events_url":"https://api.github.com/users/mysociety/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mysociety/alaveteli","description":"Provide a Freedom of Information request system for your jurisdiction","fork":false,"url":"https://api.github.com/repos/mysociety/alaveteli","forks_url":"https://api.github.com/repos/mysociety/alaveteli/forks","keys_url":"https://api.github.com/repos/mysociety/alaveteli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mysociety/alaveteli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mysociety/alaveteli/teams","hooks_url":"https://api.github.com/repos/mysociety/alaveteli/hooks","issue_events_url":"https://api.github.com/repos/mysociety/alaveteli/issues/events{/number}","events_url":"https://api.github.com/repos/mysociety/alaveteli/events","assignees_url":"https://api.github.com/repos/mysociety/alaveteli/assignees{/user}","branches_url":"https://api.github.com/repos/mysociety/alaveteli/branches{/branch}","tags_url":"https://api.github.com/repos/mysociety/alaveteli/tags","blobs_url":"https://api.github.com/repos/mysociety/alaveteli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mysociety/alaveteli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mysociety/alaveteli/git/refs{/sha}","trees_url":"https://api.github.com/repos/mysociety/alaveteli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mysociety/alaveteli/statuses/{sha}","languages_url":"https://api.github.com/repos/mysociety/alaveteli/languages","stargazers_url":"https://api.github.com/repos/mysociety/alaveteli/stargazers","contributors_url":"https://api.github.com/repos/mysociety/alaveteli/contributors","subscribers_url":"https://api.github.com/repos/mysociety/alaveteli/subscribers","subscription_url":"https://api.github.com/repos/mysociety/alaveteli/subscription","commits_url":"https://api.github.com/repos/mysociety/alaveteli/commits{/sha}","git_commits_url":"https://api.github.com/repos/mysociety/alaveteli/git/commits{/sha}","comments_url":"https://api.github.com/repos/mysociety/alaveteli/comments{/number}","issue_comment_url":"https://api.github.com/repos/mysociety/alaveteli/issues/comments/{number}","contents_url":"https://api.github.com/repos/mysociety/alaveteli/contents/{+path}","compare_url":"https://api.github.com/repos/mysociety/alaveteli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mysociety/alaveteli/merges","archive_url":"https://api.github.com/repos/mysociety/alaveteli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mysociety/alaveteli/downloads","issues_url":"https://api.github.com/repos/mysociety/alaveteli/issues{/number}","pulls_url":"https://api.github.com/repos/mysociety/alaveteli/pulls{/number}","milestones_url":"https://api.github.com/repos/mysociety/alaveteli/milestones{/number}","notifications_url":"https://api.github.com/repos/mysociety/alaveteli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mysociety/alaveteli/labels{/name}","releases_url":"https://api.github.com/repos/mysociety/alaveteli/releases{/id}","created_at":"2010-11-30T13:11:39Z","updated_at":"2014-06-25T10:02:14Z","pushed_at":"2014-06-25T10:37:42Z","git_url":"git://github.com/mysociety/alaveteli.git","ssh_url":"git@github.com:mysociety/alaveteli.git","clone_url":"https://github.com/mysociety/alaveteli.git","svn_url":"https://github.com/mysociety/alaveteli","homepage":"http://alaveteli.org","size":82553,"stargazers_count":119,"watchers_count":119,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":76,"mirror_url":null,"open_issues_count":407,"forks":76,"open_issues":407,"watchers":119,"default_branch":"rails-3-develop"}},"base":{"label":"mysociety:rails-3-develop","ref":"rails-3-develop","sha":"a9389e60e3e2f912ef3131351ab37551a3929a2a","user":{"login":"mysociety","id":141338,"avatar_url":"https://avatars.githubusercontent.com/u/141338?","gravatar_id":"cb4e9c9ec6d33ee844baa03bd8f58cd3","url":"https://api.github.com/users/mysociety","html_url":"https://github.com/mysociety","followers_url":"https://api.github.com/users/mysociety/followers","following_url":"https://api.github.com/users/mysociety/following{/other_user}","gists_url":"https://api.github.com/users/mysociety/gists{/gist_id}","starred_url":"https://api.github.com/users/mysociety/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mysociety/subscriptions","organizations_url":"https://api.github.com/users/mysociety/orgs","repos_url":"https://api.github.com/users/mysociety/repos","events_url":"https://api.github.com/users/mysociety/events{/privacy}","received_events_url":"https://api.github.com/users/mysociety/received_events","type":"Organization","site_admin":false},"repo":{"id":1125389,"name":"alaveteli","full_name":"mysociety/alaveteli","owner":{"login":"mysociety","id":141338,"avatar_url":"https://avatars.githubusercontent.com/u/141338?","gravatar_id":"cb4e9c9ec6d33ee844baa03bd8f58cd3","url":"https://api.github.com/users/mysociety","html_url":"https://github.com/mysociety","followers_url":"https://api.github.com/users/mysociety/followers","following_url":"https://api.github.com/users/mysociety/following{/other_user}","gists_url":"https://api.github.com/users/mysociety/gists{/gist_id}","starred_url":"https://api.github.com/users/mysociety/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mysociety/subscriptions","organizations_url":"https://api.github.com/users/mysociety/orgs","repos_url":"https://api.github.com/users/mysociety/repos","events_url":"https://api.github.com/users/mysociety/events{/privacy}","received_events_url":"https://api.github.com/users/mysociety/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mysociety/alaveteli","description":"Provide a Freedom of Information request system for your jurisdiction","fork":false,"url":"https://api.github.com/repos/mysociety/alaveteli","forks_url":"https://api.github.com/repos/mysociety/alaveteli/forks","keys_url":"https://api.github.com/repos/mysociety/alaveteli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mysociety/alaveteli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mysociety/alaveteli/teams","hooks_url":"https://api.github.com/repos/mysociety/alaveteli/hooks","issue_events_url":"https://api.github.com/repos/mysociety/alaveteli/issues/events{/number}","events_url":"https://api.github.com/repos/mysociety/alaveteli/events","assignees_url":"https://api.github.com/repos/mysociety/alaveteli/assignees{/user}","branches_url":"https://api.github.com/repos/mysociety/alaveteli/branches{/branch}","tags_url":"https://api.github.com/repos/mysociety/alaveteli/tags","blobs_url":"https://api.github.com/repos/mysociety/alaveteli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mysociety/alaveteli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mysociety/alaveteli/git/refs{/sha}","trees_url":"https://api.github.com/repos/mysociety/alaveteli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mysociety/alaveteli/statuses/{sha}","languages_url":"https://api.github.com/repos/mysociety/alaveteli/languages","stargazers_url":"https://api.github.com/repos/mysociety/alaveteli/stargazers","contributors_url":"https://api.github.com/repos/mysociety/alaveteli/contributors","subscribers_url":"https://api.github.com/repos/mysociety/alaveteli/subscribers","subscription_url":"https://api.github.com/repos/mysociety/alaveteli/subscription","commits_url":"https://api.github.com/repos/mysociety/alaveteli/commits{/sha}","git_commits_url":"https://api.github.com/repos/mysociety/alaveteli/git/commits{/sha}","comments_url":"https://api.github.com/repos/mysociety/alaveteli/comments{/number}","issue_comment_url":"https://api.github.com/repos/mysociety/alaveteli/issues/comments/{number}","contents_url":"https://api.github.com/repos/mysociety/alaveteli/contents/{+path}","compare_url":"https://api.github.com/repos/mysociety/alaveteli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mysociety/alaveteli/merges","archive_url":"https://api.github.com/repos/mysociety/alaveteli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mysociety/alaveteli/downloads","issues_url":"https://api.github.com/repos/mysociety/alaveteli/issues{/number}","pulls_url":"https://api.github.com/repos/mysociety/alaveteli/pulls{/number}","milestones_url":"https://api.github.com/repos/mysociety/alaveteli/milestones{/number}","notifications_url":"https://api.github.com/repos/mysociety/alaveteli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mysociety/alaveteli/labels{/name}","releases_url":"https://api.github.com/repos/mysociety/alaveteli/releases{/id}","created_at":"2010-11-30T13:11:39Z","updated_at":"2014-06-25T10:02:14Z","pushed_at":"2014-06-25T10:37:42Z","git_url":"git://github.com/mysociety/alaveteli.git","ssh_url":"git@github.com:mysociety/alaveteli.git","clone_url":"https://github.com/mysociety/alaveteli.git","svn_url":"https://github.com/mysociety/alaveteli","homepage":"http://alaveteli.org","size":82553,"stargazers_count":119,"watchers_count":119,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":76,"mirror_url":null,"open_issues_count":407,"forks":76,"open_issues":407,"watchers":119,"default_branch":"rails-3-develop"}},"_links":{"self":{"href":"https://api.github.com/repos/mysociety/alaveteli/pulls/1631"},"html":{"href":"https://github.com/mysociety/alaveteli/pull/1631"},"issue":{"href":"https://api.github.com/repos/mysociety/alaveteli/issues/1631"},"comments":{"href":"https://api.github.com/repos/mysociety/alaveteli/issues/1631/comments"},"review_comments":{"href":"https://api.github.com/repos/mysociety/alaveteli/pulls/1631/comments"},"review_comment":{"href":"https://api.github.com/repos/mysociety/alaveteli/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/mysociety/alaveteli/pulls/1631/commits"},"statuses":{"href":"https://api.github.com/repos/mysociety/alaveteli/statuses/701ae259a6d5235d6f7b86491723c5776464cd3d"}}}}