{"action":"closed","number":2,"pull_request":{"url":"https://api.github.com/repos/TwilioDevEd/automated-survey-csharp/pulls/2","id":43538527,"html_url":"https://github.com/TwilioDevEd/automated-survey-csharp/pull/2","diff_url":"https://github.com/TwilioDevEd/automated-survey-csharp/pull/2.diff","patch_url":"https://github.com/TwilioDevEd/automated-survey-csharp/pull/2.patch","issue_url":"https://api.github.com/repos/TwilioDevEd/automated-survey-csharp/issues/2","number":2,"state":"closed","locked":false,"title":"Fix answer creation","user":{"login":"acamino","id":957202,"avatar_url":"https://avatars.githubusercontent.com/u/957202?v=3","gravatar_id":"","url":"https://api.github.com/users/acamino","html_url":"https://github.com/acamino","followers_url":"https://api.github.com/users/acamino/followers","following_url":"https://api.github.com/users/acamino/following{/other_user}","gists_url":"https://api.github.com/users/acamino/gists{/gist_id}","starred_url":"https://api.github.com/users/acamino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acamino/subscriptions","organizations_url":"https://api.github.com/users/acamino/orgs","repos_url":"https://api.github.com/users/acamino/repos","events_url":"https://api.github.com/users/acamino/events{/privacy}","received_events_url":"https://api.github.com/users/acamino/received_events","type":"User","site_admin":false},"body":"After some clean up I accidentally removed `QuestionId` from:\r\n\r\n```\r\n        [HttpPost]\r\n        public TwiMLResult Create(\r\n            [Bind(Include = \"RecordingUrl,Digits,CallSid,From\")]\r\n            Answer answer)\r\n```\r\n\r\nThat's why there was an error when creating an `Answer`, without `QuestionId` I was trying to violate the referential integrity of the database, which is incorrect.\r\n\r\nAdditionally I fix another issue introduced after the same refactor, which was to extract a variable `refactor `for `new Response(nextQuestion).Build()`, this will throw an exception if `nextQuestion` is null.\r\n\r\n@mplacona, if you agree with the changes made, please leave a LGTM.","created_at":"2015-08-27T16:33:10Z","updated_at":"2015-08-27T16:50:14Z","closed_at":"2015-08-27T16:50:14Z","merged_at":"2015-08-27T16:50:14Z","merge_commit_sha":"7a7258397d90f449ad63f8652d33e8255d0e5b72","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/TwilioDevEd/automated-survey-csharp/pulls/2/commits","review_comments_url":"https://api.github.com/repos/TwilioDevEd/automated-survey-csharp/pulls/2/comments","review_comment_url":"https://api.github.com/repos/TwilioDevEd/automated-survey-csharp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/TwilioDevEd/automated-survey-csharp/issues/2/comments","statuses_url":"https://api.github.com/repos/TwilioDevEd/automated-survey-csharp/statuses/8463bcf75a99fdfcffc1889d3250d8479f77b0fe","head":{"label":"TwilioDevEd:fix_answer_creation","ref":"fix_answer_creation","sha":"8463bcf75a99fdfcffc1889d3250d8479f77b0fe","user":{"login":"TwilioDevEd","id":8114879,"avatar_url":"https://avatars.githubusercontent.com/u/8114879?v=3","gravatar_id":"","url":"https://api.github.com/users/TwilioDevEd","html_url":"https://github.com/TwilioDevEd","followers_url":"https://api.github.com/users/TwilioDevEd/followers","following_url":"https://api.github.com/users/TwilioDevEd/following{/other_user}","gists_url":"https://api.github.com/users/TwilioDevEd/gists{/gist_id}","starred_url":"https://api.github.com/users/TwilioDevEd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TwilioDevEd/subscriptions","organizations_url":"https://api.github.com/users/TwilioDevEd/orgs","repos_url":"https://api.github.com/users/TwilioDevEd/repos","events_url":"https://api.github.com/users/TwilioDevEd/events{/privacy}","received_events_url":"https://api.github.com/users/TwilioDevEd/received_events","type":"Organization","site_admin":false},"repo":{"id":40909780,"name":"automated-survey-csharp","full_name":"TwilioDevEd/automated-survey-csharp","owner":{"login":"TwilioDevEd","id":8114879,"avatar_url":"https://avatars.githubusercontent.com/u/8114879?v=3","gravatar_id":"","url":"https://api.github.com/users/TwilioDevEd","html_url":"https://github.com/TwilioDevEd","followers_url":"https://api.github.com/users/TwilioDevEd/followers","following_url":"https://api.github.com/users/TwilioDevEd/following{/other_user}","gists_url":"https://api.github.com/users/TwilioDevEd/gists{/gist_id}","starred_url":"https://api.github.com/users/TwilioDevEd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TwilioDevEd/subscriptions","organizations_url":"https://api.github.com/users/TwilioDevEd/orgs","repos_url":"https://api.github.com/users/TwilioDevEd/repos","events_url":"https://api.github.com/users/TwilioDevEd/events{/privacy}","received_events_url":"https://api.github.com/users/TwilioDevEd/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/TwilioDevEd/automated-survey-csharp","description":"Automated surveys in C#","fork":false,"url":"https://api.github.com/repos/TwilioDevEd/automated-survey-csharp","forks_url":"https://api.github.com/repos/TwilioDevEd/automated-survey-csharp/forks","keys_url":"https://api.github.com/repos/TwilioDevEd/automated-survey-csharp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TwilioDevEd/automated-survey-csharp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TwilioDevEd/automated-survey-csharp/teams","hooks_url":"https://api.github.com/repos/TwilioDevEd/automated-survey-csharp/hooks","issue_events_url":"https://api.github.com/repos/TwilioDevEd/automated-survey-csharp/issues/events{/number}","events_url":"https://api.github.com/repos/TwilioDevEd/automated-survey-csharp/events","assignees_url":"https://api.github.com/repos/TwilioDevEd/automated-survey-csharp/assignees{/user}","branches_url":"https://api.github.com/repos/TwilioDevEd/automated-survey-csharp/branches{/branch}","tags_url":"https://api.github.com/repos/TwilioDevEd/automated-survey-csharp/tags","blobs_url":"https://api.github.com/repos/TwilioDevEd/automated-survey-csharp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TwilioDevEd/automated-survey-csharp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TwilioDevEd/automated-survey-csharp/git/refs{/sha}","trees_url":"https://api.github.com/repos/TwilioDevEd/automated-survey-csharp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TwilioDevEd/automated-survey-csharp/statuses/{sha}","languages_url":"https://api.github.com/repos/TwilioDevEd/automated-survey-csharp/languages","stargazers_url":"https://api.github.com/repos/TwilioDevEd/automated-survey-csharp/stargazers","contributors_url":"https://api.github.com/repos/TwilioDevEd/automated-survey-csharp/contributors","subscribers_url":"https://api.github.com/repos/TwilioDevEd/automated-survey-csharp/subscribers","subscription_url":"https://api.github.com/repos/TwilioDevEd/automated-survey-csharp/subscription","commits_url":"https://api.github.com/repos/TwilioDevEd/automated-survey-csharp/commits{/sha}","git_commits_url":"https://api.github.com/repos/TwilioDevEd/automated-survey-csharp/git/commits{/sha}","comments_url":"https://api.github.com/repos/TwilioDevEd/automated-survey-csharp/comments{/number}","issue_comment_url":"https://api.github.com/repos/TwilioDevEd/automated-survey-csharp/issues/comments{/number}","contents_url":"https://api.github.com/repos/TwilioDevEd/automated-survey-csharp/contents/{+path}","compare_url":"https://api.github.com/repos/TwilioDevEd/automated-survey-csharp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TwilioDevEd/automated-survey-csharp/merges","archive_url":"https://api.github.com/repos/TwilioDevEd/automated-survey-csharp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TwilioDevEd/automated-survey-csharp/downloads","issues_url":"https://api.github.com/repos/TwilioDevEd/automated-survey-csharp/issues{/number}","pulls_url":"https://api.github.com/repos/TwilioDevEd/automated-survey-csharp/pulls{/number}","milestones_url":"https://api.github.com/repos/TwilioDevEd/automated-survey-csharp/milestones{/number}","notifications_url":"https://api.github.com/repos/TwilioDevEd/automated-survey-csharp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TwilioDevEd/automated-survey-csharp/labels{/name}","releases_url":"https://api.github.com/repos/TwilioDevEd/automated-survey-csharp/releases{/id}","created_at":"2015-08-17T16:21:14Z","updated_at":"2015-08-17T20:55:39Z","pushed_at":"2015-08-27T16:50:15Z","git_url":"git://github.com/TwilioDevEd/automated-survey-csharp.git","ssh_url":"git@github.com:TwilioDevEd/automated-survey-csharp.git","clone_url":"https://github.com/TwilioDevEd/automated-survey-csharp.git","svn_url":"https://github.com/TwilioDevEd/automated-survey-csharp","homepage":null,"size":888,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"TwilioDevEd:master","ref":"master","sha":"b7f3937e6a510115ca711ee890cf476d64e87597","user":{"login":"TwilioDevEd","id":8114879,"avatar_url":"https://avatars.githubusercontent.com/u/8114879?v=3","gravatar_id":"","url":"https://api.github.com/users/TwilioDevEd","html_url":"https://github.com/TwilioDevEd","followers_url":"https://api.github.com/users/TwilioDevEd/followers","following_url":"https://api.github.com/users/TwilioDevEd/following{/other_user}","gists_url":"https://api.github.com/users/TwilioDevEd/gists{/gist_id}","starred_url":"https://api.github.com/users/TwilioDevEd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TwilioDevEd/subscriptions","organizations_url":"https://api.github.com/users/TwilioDevEd/orgs","repos_url":"https://api.github.com/users/TwilioDevEd/repos","events_url":"https://api.github.com/users/TwilioDevEd/events{/privacy}","received_events_url":"https://api.github.com/users/TwilioDevEd/received_events","type":"Organization","site_admin":false},"repo":{"id":40909780,"name":"automated-survey-csharp","full_name":"TwilioDevEd/automated-survey-csharp","owner":{"login":"TwilioDevEd","id":8114879,"avatar_url":"https://avatars.githubusercontent.com/u/8114879?v=3","gravatar_id":"","url":"https://api.github.com/users/TwilioDevEd","html_url":"https://github.com/TwilioDevEd","followers_url":"https://api.github.com/users/TwilioDevEd/followers","following_url":"https://api.github.com/users/TwilioDevEd/following{/other_user}","gists_url":"https://api.github.com/users/TwilioDevEd/gists{/gist_id}","starred_url":"https://api.github.com/users/TwilioDevEd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TwilioDevEd/subscriptions","organizations_url":"https://api.github.com/users/TwilioDevEd/orgs","repos_url":"https://api.github.com/users/TwilioDevEd/repos","events_url":"https://api.github.com/users/TwilioDevEd/events{/privacy}","received_events_url":"https://api.github.com/users/TwilioDevEd/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/TwilioDevEd/automated-survey-csharp","description":"Automated surveys in C#","fork":false,"url":"https://api.github.com/repos/TwilioDevEd/automated-survey-csharp","forks_url":"https://api.github.com/repos/TwilioDevEd/automated-survey-csharp/forks","keys_url":"https://api.github.com/repos/TwilioDevEd/automated-survey-csharp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TwilioDevEd/automated-survey-csharp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TwilioDevEd/automated-survey-csharp/teams","hooks_url":"https://api.github.com/repos/TwilioDevEd/automated-survey-csharp/hooks","issue_events_url":"https://api.github.com/repos/TwilioDevEd/automated-survey-csharp/issues/events{/number}","events_url":"https://api.github.com/repos/TwilioDevEd/automated-survey-csharp/events","assignees_url":"https://api.github.com/repos/TwilioDevEd/automated-survey-csharp/assignees{/user}","branches_url":"https://api.github.com/repos/TwilioDevEd/automated-survey-csharp/branches{/branch}","tags_url":"https://api.github.com/repos/TwilioDevEd/automated-survey-csharp/tags","blobs_url":"https://api.github.com/repos/TwilioDevEd/automated-survey-csharp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TwilioDevEd/automated-survey-csharp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TwilioDevEd/automated-survey-csharp/git/refs{/sha}","trees_url":"https://api.github.com/repos/TwilioDevEd/automated-survey-csharp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TwilioDevEd/automated-survey-csharp/statuses/{sha}","languages_url":"https://api.github.com/repos/TwilioDevEd/automated-survey-csharp/languages","stargazers_url":"https://api.github.com/repos/TwilioDevEd/automated-survey-csharp/stargazers","contributors_url":"https://api.github.com/repos/TwilioDevEd/automated-survey-csharp/contributors","subscribers_url":"https://api.github.com/repos/TwilioDevEd/automated-survey-csharp/subscribers","subscription_url":"https://api.github.com/repos/TwilioDevEd/automated-survey-csharp/subscription","commits_url":"https://api.github.com/repos/TwilioDevEd/automated-survey-csharp/commits{/sha}","git_commits_url":"https://api.github.com/repos/TwilioDevEd/automated-survey-csharp/git/commits{/sha}","comments_url":"https://api.github.com/repos/TwilioDevEd/automated-survey-csharp/comments{/number}","issue_comment_url":"https://api.github.com/repos/TwilioDevEd/automated-survey-csharp/issues/comments{/number}","contents_url":"https://api.github.com/repos/TwilioDevEd/automated-survey-csharp/contents/{+path}","compare_url":"https://api.github.com/repos/TwilioDevEd/automated-survey-csharp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TwilioDevEd/automated-survey-csharp/merges","archive_url":"https://api.github.com/repos/TwilioDevEd/automated-survey-csharp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TwilioDevEd/automated-survey-csharp/downloads","issues_url":"https://api.github.com/repos/TwilioDevEd/automated-survey-csharp/issues{/number}","pulls_url":"https://api.github.com/repos/TwilioDevEd/automated-survey-csharp/pulls{/number}","milestones_url":"https://api.github.com/repos/TwilioDevEd/automated-survey-csharp/milestones{/number}","notifications_url":"https://api.github.com/repos/TwilioDevEd/automated-survey-csharp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TwilioDevEd/automated-survey-csharp/labels{/name}","releases_url":"https://api.github.com/repos/TwilioDevEd/automated-survey-csharp/releases{/id}","created_at":"2015-08-17T16:21:14Z","updated_at":"2015-08-17T20:55:39Z","pushed_at":"2015-08-27T16:50:15Z","git_url":"git://github.com/TwilioDevEd/automated-survey-csharp.git","ssh_url":"git@github.com:TwilioDevEd/automated-survey-csharp.git","clone_url":"https://github.com/TwilioDevEd/automated-survey-csharp.git","svn_url":"https://github.com/TwilioDevEd/automated-survey-csharp","homepage":null,"size":888,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/TwilioDevEd/automated-survey-csharp/pulls/2"},"html":{"href":"https://github.com/TwilioDevEd/automated-survey-csharp/pull/2"},"issue":{"href":"https://api.github.com/repos/TwilioDevEd/automated-survey-csharp/issues/2"},"comments":{"href":"https://api.github.com/repos/TwilioDevEd/automated-survey-csharp/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/TwilioDevEd/automated-survey-csharp/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/TwilioDevEd/automated-survey-csharp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/TwilioDevEd/automated-survey-csharp/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/TwilioDevEd/automated-survey-csharp/statuses/8463bcf75a99fdfcffc1889d3250d8479f77b0fe"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"acamino","id":957202,"avatar_url":"https://avatars.githubusercontent.com/u/957202?v=3","gravatar_id":"","url":"https://api.github.com/users/acamino","html_url":"https://github.com/acamino","followers_url":"https://api.github.com/users/acamino/followers","following_url":"https://api.github.com/users/acamino/following{/other_user}","gists_url":"https://api.github.com/users/acamino/gists{/gist_id}","starred_url":"https://api.github.com/users/acamino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acamino/subscriptions","organizations_url":"https://api.github.com/users/acamino/orgs","repos_url":"https://api.github.com/users/acamino/repos","events_url":"https://api.github.com/users/acamino/events{/privacy}","received_events_url":"https://api.github.com/users/acamino/received_events","type":"User","site_admin":false},"comments":1,"review_comments":0,"commits":1,"additions":2,"deletions":4,"changed_files":1}}