{"action":"created","comment":{"url":"https://api.github.com/repos/projectkudu/kudu/pulls/comments/43459349","id":43459349,"diff_hunk":"@@ -79,17 +85,33 @@ public void Delete(string id)\n         /// </summary>\n         /// <param name=\"id\">id of the deployment to redeploy</param>\n         [HttpPut]\n-        public async Task Deploy(string id = null)\n+        public async Task<HttpResponseMessage> Deploy(string id = null)\n         {\n             JObject result = GetJsonContent();\n \n             // Just block here to read the json payload from the body\n             using (_tracer.Step(\"DeploymentService.Deploy(id)\"))\n             {\n+                HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.OK);\n                 await _deploymentLock.LockHttpOperationAsync(async () =>\n                 {\n                     try\n                     {\n+                        DeployResult deployResult;\n+                        if (TryParseDeployResult(id, result, out deployResult))\n+                        {\n+                            using (_tracer.Step(\"DeploymentService.Create(id)\"))\n+                            {\n+                                CreateDeployment(deployResult, result.Value<string>(\"details\"));\n+\n+                                deployResult.Url = Request.RequestUri;\n+                                deployResult.LogUrl = UriHelper.MakeRelative(Request.RequestUri, \"log\");\n+\n+                                response = Request.CreateResponse(HttpStatusCode.OK, ArmUtils.AddEnvelopeOnArmRequest(deployResult, Request));\n+                                return;\n+                            }\n+                        }\n+\n                         if (_autoSwapHandler.IsAutoSwapOngoing())","path":"Kudu.Services/Deployment/DeploymentController.cs","position":59,"original_position":59,"commit_id":"47e8f58f5c9497c8af27d54973785747ae87700d","original_commit_id":"47e8f58f5c9497c8af27d54973785747ae87700d","user":{"login":"shrimpy","id":79823,"avatar_url":"https://avatars.githubusercontent.com/u/79823?v=3","gravatar_id":"","url":"https://api.github.com/users/shrimpy","html_url":"https://github.com/shrimpy","followers_url":"https://api.github.com/users/shrimpy/followers","following_url":"https://api.github.com/users/shrimpy/following{/other_user}","gists_url":"https://api.github.com/users/shrimpy/gists{/gist_id}","starred_url":"https://api.github.com/users/shrimpy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shrimpy/subscriptions","organizations_url":"https://api.github.com/users/shrimpy/orgs","repos_url":"https://api.github.com/users/shrimpy/repos","events_url":"https://api.github.com/users/shrimpy/events{/privacy}","received_events_url":"https://api.github.com/users/shrimpy/received_events","type":"User","site_admin":false},"body":"Have another question, might be out of scope of this PR.\r\n\r\nseems like during deployment, an AutoSwap could happen, do we need to make sure that during a deployment, no auto swap can be made?","created_at":"2015-10-29T23:56:30Z","updated_at":"2015-10-29T23:56:30Z","html_url":"https://github.com/projectkudu/kudu/pull/1778#discussion_r43459349","pull_request_url":"https://api.github.com/repos/projectkudu/kudu/pulls/1778","_links":{"self":{"href":"https://api.github.com/repos/projectkudu/kudu/pulls/comments/43459349"},"html":{"href":"https://github.com/projectkudu/kudu/pull/1778#discussion_r43459349"},"pull_request":{"href":"https://api.github.com/repos/projectkudu/kudu/pulls/1778"}}},"pull_request":{"url":"https://api.github.com/repos/projectkudu/kudu/pulls/1778","id":49204746,"html_url":"https://github.com/projectkudu/kudu/pull/1778","diff_url":"https://github.com/projectkudu/kudu/pull/1778.diff","patch_url":"https://github.com/projectkudu/kudu/pull/1778.patch","issue_url":"https://api.github.com/repos/projectkudu/kudu/issues/1778","number":1778,"state":"open","locked":false,"title":"support add deployment history api","user":{"login":"suwatch","id":1088218,"avatar_url":"https://avatars.githubusercontent.com/u/1088218?v=3","gravatar_id":"","url":"https://api.github.com/users/suwatch","html_url":"https://github.com/suwatch","followers_url":"https://api.github.com/users/suwatch/followers","following_url":"https://api.github.com/users/suwatch/following{/other_user}","gists_url":"https://api.github.com/users/suwatch/gists{/gist_id}","starred_url":"https://api.github.com/users/suwatch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/suwatch/subscriptions","organizations_url":"https://api.github.com/users/suwatch/orgs","repos_url":"https://api.github.com/users/suwatch/repos","events_url":"https://api.github.com/users/suwatch/events{/privacy}","received_events_url":"https://api.github.com/users/suwatch/received_events","type":"User","site_admin":false},"body":"Per [REST API spec](https://github.com/projectkudu/kudu/wiki/REST-API#deploymen).","created_at":"2015-10-29T21:46:58Z","updated_at":"2015-10-29T23:56:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"128924c69569e520668700ef306ca54ae1cefb84","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/projectkudu/kudu/pulls/1778/commits","review_comments_url":"https://api.github.com/repos/projectkudu/kudu/pulls/1778/comments","review_comment_url":"https://api.github.com/repos/projectkudu/kudu/pulls/comments{/number}","comments_url":"https://api.github.com/repos/projectkudu/kudu/issues/1778/comments","statuses_url":"https://api.github.com/repos/projectkudu/kudu/statuses/47e8f58f5c9497c8af27d54973785747ae87700d","head":{"label":"projectkudu:suwatch_work","ref":"suwatch_work","sha":"47e8f58f5c9497c8af27d54973785747ae87700d","user":{"login":"projectkudu","id":927131,"avatar_url":"https://avatars.githubusercontent.com/u/927131?v=3","gravatar_id":"","url":"https://api.github.com/users/projectkudu","html_url":"https://github.com/projectkudu","followers_url":"https://api.github.com/users/projectkudu/followers","following_url":"https://api.github.com/users/projectkudu/following{/other_user}","gists_url":"https://api.github.com/users/projectkudu/gists{/gist_id}","starred_url":"https://api.github.com/users/projectkudu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/projectkudu/subscriptions","organizations_url":"https://api.github.com/users/projectkudu/orgs","repos_url":"https://api.github.com/users/projectkudu/repos","events_url":"https://api.github.com/users/projectkudu/events{/privacy}","received_events_url":"https://api.github.com/users/projectkudu/received_events","type":"Organization","site_admin":false},"repo":{"id":1939769,"name":"kudu","full_name":"projectkudu/kudu","owner":{"login":"projectkudu","id":927131,"avatar_url":"https://avatars.githubusercontent.com/u/927131?v=3","gravatar_id":"","url":"https://api.github.com/users/projectkudu","html_url":"https://github.com/projectkudu","followers_url":"https://api.github.com/users/projectkudu/followers","following_url":"https://api.github.com/users/projectkudu/following{/other_user}","gists_url":"https://api.github.com/users/projectkudu/gists{/gist_id}","starred_url":"https://api.github.com/users/projectkudu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/projectkudu/subscriptions","organizations_url":"https://api.github.com/users/projectkudu/orgs","repos_url":"https://api.github.com/users/projectkudu/repos","events_url":"https://api.github.com/users/projectkudu/events{/privacy}","received_events_url":"https://api.github.com/users/projectkudu/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/projectkudu/kudu","description":"Kudu is the engine behind git/hg deployments, WebJobs, and various other features in Azure Web Sites. It can also run outside of Azure.","fork":false,"url":"https://api.github.com/repos/projectkudu/kudu","forks_url":"https://api.github.com/repos/projectkudu/kudu/forks","keys_url":"https://api.github.com/repos/projectkudu/kudu/keys{/key_id}","collaborators_url":"https://api.github.com/repos/projectkudu/kudu/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/projectkudu/kudu/teams","hooks_url":"https://api.github.com/repos/projectkudu/kudu/hooks","issue_events_url":"https://api.github.com/repos/projectkudu/kudu/issues/events{/number}","events_url":"https://api.github.com/repos/projectkudu/kudu/events","assignees_url":"https://api.github.com/repos/projectkudu/kudu/assignees{/user}","branches_url":"https://api.github.com/repos/projectkudu/kudu/branches{/branch}","tags_url":"https://api.github.com/repos/projectkudu/kudu/tags","blobs_url":"https://api.github.com/repos/projectkudu/kudu/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/projectkudu/kudu/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/projectkudu/kudu/git/refs{/sha}","trees_url":"https://api.github.com/repos/projectkudu/kudu/git/trees{/sha}","statuses_url":"https://api.github.com/repos/projectkudu/kudu/statuses/{sha}","languages_url":"https://api.github.com/repos/projectkudu/kudu/languages","stargazers_url":"https://api.github.com/repos/projectkudu/kudu/stargazers","contributors_url":"https://api.github.com/repos/projectkudu/kudu/contributors","subscribers_url":"https://api.github.com/repos/projectkudu/kudu/subscribers","subscription_url":"https://api.github.com/repos/projectkudu/kudu/subscription","commits_url":"https://api.github.com/repos/projectkudu/kudu/commits{/sha}","git_commits_url":"https://api.github.com/repos/projectkudu/kudu/git/commits{/sha}","comments_url":"https://api.github.com/repos/projectkudu/kudu/comments{/number}","issue_comment_url":"https://api.github.com/repos/projectkudu/kudu/issues/comments{/number}","contents_url":"https://api.github.com/repos/projectkudu/kudu/contents/{+path}","compare_url":"https://api.github.com/repos/projectkudu/kudu/compare/{base}...{head}","merges_url":"https://api.github.com/repos/projectkudu/kudu/merges","archive_url":"https://api.github.com/repos/projectkudu/kudu/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/projectkudu/kudu/downloads","issues_url":"https://api.github.com/repos/projectkudu/kudu/issues{/number}","pulls_url":"https://api.github.com/repos/projectkudu/kudu/pulls{/number}","milestones_url":"https://api.github.com/repos/projectkudu/kudu/milestones{/number}","notifications_url":"https://api.github.com/repos/projectkudu/kudu/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/projectkudu/kudu/labels{/name}","releases_url":"https://api.github.com/repos/projectkudu/kudu/releases{/id}","created_at":"2011-06-23T05:36:20Z","updated_at":"2015-10-29T09:34:40Z","pushed_at":"2015-10-29T23:37:52Z","git_url":"git://github.com/projectkudu/kudu.git","ssh_url":"git@github.com:projectkudu/kudu.git","clone_url":"https://github.com/projectkudu/kudu.git","svn_url":"https://github.com/projectkudu/kudu","homepage":"","size":48859,"stargazers_count":1045,"watchers_count":1045,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":222,"mirror_url":null,"open_issues_count":144,"forks":222,"open_issues":144,"watchers":1045,"default_branch":"master"}},"base":{"label":"projectkudu:master","ref":"master","sha":"fcdcd81126c7d44bc47ad5524d6b3e9d133386be","user":{"login":"projectkudu","id":927131,"avatar_url":"https://avatars.githubusercontent.com/u/927131?v=3","gravatar_id":"","url":"https://api.github.com/users/projectkudu","html_url":"https://github.com/projectkudu","followers_url":"https://api.github.com/users/projectkudu/followers","following_url":"https://api.github.com/users/projectkudu/following{/other_user}","gists_url":"https://api.github.com/users/projectkudu/gists{/gist_id}","starred_url":"https://api.github.com/users/projectkudu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/projectkudu/subscriptions","organizations_url":"https://api.github.com/users/projectkudu/orgs","repos_url":"https://api.github.com/users/projectkudu/repos","events_url":"https://api.github.com/users/projectkudu/events{/privacy}","received_events_url":"https://api.github.com/users/projectkudu/received_events","type":"Organization","site_admin":false},"repo":{"id":1939769,"name":"kudu","full_name":"projectkudu/kudu","owner":{"login":"projectkudu","id":927131,"avatar_url":"https://avatars.githubusercontent.com/u/927131?v=3","gravatar_id":"","url":"https://api.github.com/users/projectkudu","html_url":"https://github.com/projectkudu","followers_url":"https://api.github.com/users/projectkudu/followers","following_url":"https://api.github.com/users/projectkudu/following{/other_user}","gists_url":"https://api.github.com/users/projectkudu/gists{/gist_id}","starred_url":"https://api.github.com/users/projectkudu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/projectkudu/subscriptions","organizations_url":"https://api.github.com/users/projectkudu/orgs","repos_url":"https://api.github.com/users/projectkudu/repos","events_url":"https://api.github.com/users/projectkudu/events{/privacy}","received_events_url":"https://api.github.com/users/projectkudu/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/projectkudu/kudu","description":"Kudu is the engine behind git/hg deployments, WebJobs, and various other features in Azure Web Sites. It can also run outside of Azure.","fork":false,"url":"https://api.github.com/repos/projectkudu/kudu","forks_url":"https://api.github.com/repos/projectkudu/kudu/forks","keys_url":"https://api.github.com/repos/projectkudu/kudu/keys{/key_id}","collaborators_url":"https://api.github.com/repos/projectkudu/kudu/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/projectkudu/kudu/teams","hooks_url":"https://api.github.com/repos/projectkudu/kudu/hooks","issue_events_url":"https://api.github.com/repos/projectkudu/kudu/issues/events{/number}","events_url":"https://api.github.com/repos/projectkudu/kudu/events","assignees_url":"https://api.github.com/repos/projectkudu/kudu/assignees{/user}","branches_url":"https://api.github.com/repos/projectkudu/kudu/branches{/branch}","tags_url":"https://api.github.com/repos/projectkudu/kudu/tags","blobs_url":"https://api.github.com/repos/projectkudu/kudu/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/projectkudu/kudu/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/projectkudu/kudu/git/refs{/sha}","trees_url":"https://api.github.com/repos/projectkudu/kudu/git/trees{/sha}","statuses_url":"https://api.github.com/repos/projectkudu/kudu/statuses/{sha}","languages_url":"https://api.github.com/repos/projectkudu/kudu/languages","stargazers_url":"https://api.github.com/repos/projectkudu/kudu/stargazers","contributors_url":"https://api.github.com/repos/projectkudu/kudu/contributors","subscribers_url":"https://api.github.com/repos/projectkudu/kudu/subscribers","subscription_url":"https://api.github.com/repos/projectkudu/kudu/subscription","commits_url":"https://api.github.com/repos/projectkudu/kudu/commits{/sha}","git_commits_url":"https://api.github.com/repos/projectkudu/kudu/git/commits{/sha}","comments_url":"https://api.github.com/repos/projectkudu/kudu/comments{/number}","issue_comment_url":"https://api.github.com/repos/projectkudu/kudu/issues/comments{/number}","contents_url":"https://api.github.com/repos/projectkudu/kudu/contents/{+path}","compare_url":"https://api.github.com/repos/projectkudu/kudu/compare/{base}...{head}","merges_url":"https://api.github.com/repos/projectkudu/kudu/merges","archive_url":"https://api.github.com/repos/projectkudu/kudu/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/projectkudu/kudu/downloads","issues_url":"https://api.github.com/repos/projectkudu/kudu/issues{/number}","pulls_url":"https://api.github.com/repos/projectkudu/kudu/pulls{/number}","milestones_url":"https://api.github.com/repos/projectkudu/kudu/milestones{/number}","notifications_url":"https://api.github.com/repos/projectkudu/kudu/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/projectkudu/kudu/labels{/name}","releases_url":"https://api.github.com/repos/projectkudu/kudu/releases{/id}","created_at":"2011-06-23T05:36:20Z","updated_at":"2015-10-29T09:34:40Z","pushed_at":"2015-10-29T23:37:52Z","git_url":"git://github.com/projectkudu/kudu.git","ssh_url":"git@github.com:projectkudu/kudu.git","clone_url":"https://github.com/projectkudu/kudu.git","svn_url":"https://github.com/projectkudu/kudu","homepage":"","size":48859,"stargazers_count":1045,"watchers_count":1045,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":222,"mirror_url":null,"open_issues_count":144,"forks":222,"open_issues":144,"watchers":1045,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/projectkudu/kudu/pulls/1778"},"html":{"href":"https://github.com/projectkudu/kudu/pull/1778"},"issue":{"href":"https://api.github.com/repos/projectkudu/kudu/issues/1778"},"comments":{"href":"https://api.github.com/repos/projectkudu/kudu/issues/1778/comments"},"review_comments":{"href":"https://api.github.com/repos/projectkudu/kudu/pulls/1778/comments"},"review_comment":{"href":"https://api.github.com/repos/projectkudu/kudu/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/projectkudu/kudu/pulls/1778/commits"},"statuses":{"href":"https://api.github.com/repos/projectkudu/kudu/statuses/47e8f58f5c9497c8af27d54973785747ae87700d"}}}}