{"action":"created","comment":{"url":"https://api.github.com/repos/dotnet/docfx/pulls/comments/93369311","pull_request_review_id":13894668,"id":93369311,"diff_hunk":"@@ -0,0 +1,106 @@\n+// Copyright (c) Microsoft. All rights reserved.\n+// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n+\n+\"use strict\"\n+\n+let spawn = require('child_process').spawn;\n+\n+let colors = require('colors/safe');\n+let moment = require('moment-timezone');\n+\n+colors.setTheme({\n+  verbose: 'cyan',\n+  info: 'green',\n+  help: 'cyan',\n+  warn: 'yellow',\n+  debug: 'blue',\n+  error: 'red'\n+});\n+\n+let logger = {\n+  info(msg) {\n+    console.log(colors.info(msg));\n+  },\n+  warn(msg) {\n+    console.log(colors.warn(msg));\n+  },\n+  debug(msg) {\n+    console.log(colors.debug(msg));\n+  },\n+  verbose(msg) {\n+    console.log(colors.verbose(msg));\n+  },\n+  error(msg) {\n+    console.log(colors.error(msg));\n+  },\n+}\n+\n+let git = {\n+  add(filePath, workDir) {\n+    return execPromiseFn(\"git\", [\"add\", filePath], workDir);\n+  },\n+  commit(msg, workDir) {\n+    return execPromiseFn(\"git\", [\"commit\", \"-m\", msg], workDir);\n+  },\n+  amend(workDir) {\n+    return execPromiseFn(\"git\", [\"commit\", \"--amend\", \"--no-edit\"], workDir);\n+  },\n+  push(current_branch, target_branch, workDir) {\n+    return execPromiseFn(\"git\", [\"push\", \"origin\", current_branch+\":\"+target_branch], workDir);\n+  },\n+  clone(repoUrl, branch, folderName, workDir) {\n+    return execPromiseFn(\"git\", [\"clone\", \"-b\", branch, repoUrl, folderName], workDir)\n+  },\n+  configName(name, workDir) {\n+    return execPromiseFn(\"git\", [\"config\", \"user.name\", name], workDir);\n+  },\n+  configEmail(email, workDir) {\n+    return execPromiseFn(\"git\", [\"config\", \"user.email\", email], workDir);\n+  }\n+}\n+\n+function isThirdWeekInSprint() {\n+  let baseMoment = moment(\"2016-12-12\").tz(\"Asia/Shanghai\");\n+  let gap = moment().tz(\"Asia/Shanghai\").diff(baseMoment, \"weeks\");\n+  return gap % 3 === 2;\n+}\n+\n+function execPromiseFn(command, args, workDir) {\n+  return function() {\n+    return new Promise(function(resolve, reject) {\n+      args = args || [];\n+      workDir = workDir || \".\";\n+      let argStr = args.join(\" \");\n+      let currentDir = process.cwd();\n+\n+      logger.info(\"Running command: \" + command + \" \" + argStr);\n+      try {\n+        process.chdir(workDir);\n+      } catch (err) {\n+        reject(new Error(\"Error occurs while changing work directory to \" + workDir + \", \" + err));\n+      }\n+\n+      let sp = spawn(process.env.comspec, ['/c', command, ...args]);\n+      sp.stdout.on(\"data\", function(data) {\n+        logger.verbose(data.toString());\n+      });\n+      sp.stderr.on(\"data\", function(data) {\n+        logger.warn(data.toString());\n+      });\n+      sp.on(\"close\", function(code) {\n+        if (code === 0) {\n+          logger.info(\"Finishing command: \" + command + \" \" + argStr);\n+          process.chdir(currentDir);\n+          resolve();\n+        } else {\n+          reject(new Error(\"Error occurs while running \" + command + \" \" + argStr + \", Exited with code: \" + code ));","path":"tools/Deployment/util.js","position":96,"original_position":96,"commit_id":"8398f02ccfb8d0e8f76784583f4398e3149e3ac1","original_commit_id":"8398f02ccfb8d0e8f76784583f4398e3149e3ac1","user":{"login":"hellosnow","id":1836885,"avatar_url":"https://avatars.githubusercontent.com/u/1836885?v=3","gravatar_id":"","url":"https://api.github.com/users/hellosnow","html_url":"https://github.com/hellosnow","followers_url":"https://api.github.com/users/hellosnow/followers","following_url":"https://api.github.com/users/hellosnow/following{/other_user}","gists_url":"https://api.github.com/users/hellosnow/gists{/gist_id}","starred_url":"https://api.github.com/users/hellosnow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hellosnow/subscriptions","organizations_url":"https://api.github.com/users/hellosnow/orgs","repos_url":"https://api.github.com/users/hellosnow/repos","events_url":"https://api.github.com/users/hellosnow/events{/privacy}","received_events_url":"https://api.github.com/users/hellosnow/received_events","type":"User","site_admin":false},"body":"I mean should not upper case...\r\n\r\n---\r\nIn reply to: [93369267](https://github.com/dotnet/docfx/pull/1021#discussion_r93369267) [](ancestors = 93369267,93368780)","created_at":"2016-12-21T03:28:36Z","updated_at":"2016-12-21T03:28:36Z","html_url":"https://github.com/dotnet/docfx/pull/1021#discussion_r93369311","pull_request_url":"https://api.github.com/repos/dotnet/docfx/pulls/1021","_links":{"self":{"href":"https://api.github.com/repos/dotnet/docfx/pulls/comments/93369311"},"html":{"href":"https://github.com/dotnet/docfx/pull/1021#discussion_r93369311"},"pull_request":{"href":"https://api.github.com/repos/dotnet/docfx/pulls/1021"}}},"pull_request":{"url":"https://api.github.com/repos/dotnet/docfx/pulls/1021","id":98687775,"html_url":"https://github.com/dotnet/docfx/pull/1021","diff_url":"https://github.com/dotnet/docfx/pull/1021.diff","patch_url":"https://github.com/dotnet/docfx/pull/1021.patch","issue_url":"https://api.github.com/repos/dotnet/docfx/issues/1021","number":1021,"state":"open","locked":false,"title":"Update CI script for new release model","user":{"login":"qinezh","id":15644078,"avatar_url":"https://avatars.githubusercontent.com/u/15644078?v=3","gravatar_id":"","url":"https://api.github.com/users/qinezh","html_url":"https://github.com/qinezh","followers_url":"https://api.github.com/users/qinezh/followers","following_url":"https://api.github.com/users/qinezh/following{/other_user}","gists_url":"https://api.github.com/users/qinezh/gists{/gist_id}","starred_url":"https://api.github.com/users/qinezh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qinezh/subscriptions","organizations_url":"https://api.github.com/users/qinezh/orgs","repos_url":"https://api.github.com/users/qinezh/repos","events_url":"https://api.github.com/users/qinezh/events{/privacy}","received_events_url":"https://api.github.com/users/qinezh/received_events","type":"User","site_admin":false},"body":"Set up a new CI to make *stable* branch sync with *dev* branch in real time automatically in the *first two* weeks. ","created_at":"2016-12-20T05:13:14Z","updated_at":"2016-12-21T03:28:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"eb90c05916b23fe6855482f3e1cceae5e2071dbf","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/dotnet/docfx/pulls/1021/commits","review_comments_url":"https://api.github.com/repos/dotnet/docfx/pulls/1021/comments","review_comment_url":"https://api.github.com/repos/dotnet/docfx/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotnet/docfx/issues/1021/comments","statuses_url":"https://api.github.com/repos/dotnet/docfx/statuses/8398f02ccfb8d0e8f76784583f4398e3149e3ac1","head":{"label":"qinezh:ci","ref":"ci","sha":"8398f02ccfb8d0e8f76784583f4398e3149e3ac1","user":{"login":"qinezh","id":15644078,"avatar_url":"https://avatars.githubusercontent.com/u/15644078?v=3","gravatar_id":"","url":"https://api.github.com/users/qinezh","html_url":"https://github.com/qinezh","followers_url":"https://api.github.com/users/qinezh/followers","following_url":"https://api.github.com/users/qinezh/following{/other_user}","gists_url":"https://api.github.com/users/qinezh/gists{/gist_id}","starred_url":"https://api.github.com/users/qinezh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qinezh/subscriptions","organizations_url":"https://api.github.com/users/qinezh/orgs","repos_url":"https://api.github.com/users/qinezh/repos","events_url":"https://api.github.com/users/qinezh/events{/privacy}","received_events_url":"https://api.github.com/users/qinezh/received_events","type":"User","site_admin":false},"repo":{"id":57273774,"name":"docfx","full_name":"qinezh/docfx","owner":{"login":"qinezh","id":15644078,"avatar_url":"https://avatars.githubusercontent.com/u/15644078?v=3","gravatar_id":"","url":"https://api.github.com/users/qinezh","html_url":"https://github.com/qinezh","followers_url":"https://api.github.com/users/qinezh/followers","following_url":"https://api.github.com/users/qinezh/following{/other_user}","gists_url":"https://api.github.com/users/qinezh/gists{/gist_id}","starred_url":"https://api.github.com/users/qinezh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qinezh/subscriptions","organizations_url":"https://api.github.com/users/qinezh/orgs","repos_url":"https://api.github.com/users/qinezh/repos","events_url":"https://api.github.com/users/qinezh/events{/privacy}","received_events_url":"https://api.github.com/users/qinezh/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/qinezh/docfx","description":"Tools for building and publishing API documentation for .NET projects","fork":true,"url":"https://api.github.com/repos/qinezh/docfx","forks_url":"https://api.github.com/repos/qinezh/docfx/forks","keys_url":"https://api.github.com/repos/qinezh/docfx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/qinezh/docfx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/qinezh/docfx/teams","hooks_url":"https://api.github.com/repos/qinezh/docfx/hooks","issue_events_url":"https://api.github.com/repos/qinezh/docfx/issues/events{/number}","events_url":"https://api.github.com/repos/qinezh/docfx/events","assignees_url":"https://api.github.com/repos/qinezh/docfx/assignees{/user}","branches_url":"https://api.github.com/repos/qinezh/docfx/branches{/branch}","tags_url":"https://api.github.com/repos/qinezh/docfx/tags","blobs_url":"https://api.github.com/repos/qinezh/docfx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/qinezh/docfx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/qinezh/docfx/git/refs{/sha}","trees_url":"https://api.github.com/repos/qinezh/docfx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/qinezh/docfx/statuses/{sha}","languages_url":"https://api.github.com/repos/qinezh/docfx/languages","stargazers_url":"https://api.github.com/repos/qinezh/docfx/stargazers","contributors_url":"https://api.github.com/repos/qinezh/docfx/contributors","subscribers_url":"https://api.github.com/repos/qinezh/docfx/subscribers","subscription_url":"https://api.github.com/repos/qinezh/docfx/subscription","commits_url":"https://api.github.com/repos/qinezh/docfx/commits{/sha}","git_commits_url":"https://api.github.com/repos/qinezh/docfx/git/commits{/sha}","comments_url":"https://api.github.com/repos/qinezh/docfx/comments{/number}","issue_comment_url":"https://api.github.com/repos/qinezh/docfx/issues/comments{/number}","contents_url":"https://api.github.com/repos/qinezh/docfx/contents/{+path}","compare_url":"https://api.github.com/repos/qinezh/docfx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/qinezh/docfx/merges","archive_url":"https://api.github.com/repos/qinezh/docfx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/qinezh/docfx/downloads","issues_url":"https://api.github.com/repos/qinezh/docfx/issues{/number}","pulls_url":"https://api.github.com/repos/qinezh/docfx/pulls{/number}","milestones_url":"https://api.github.com/repos/qinezh/docfx/milestones{/number}","notifications_url":"https://api.github.com/repos/qinezh/docfx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/qinezh/docfx/labels{/name}","releases_url":"https://api.github.com/repos/qinezh/docfx/releases{/id}","deployments_url":"https://api.github.com/repos/qinezh/docfx/deployments","created_at":"2016-04-28T05:32:49Z","updated_at":"2016-04-28T05:32:55Z","pushed_at":"2016-12-20T08:30:06Z","git_url":"git://github.com/qinezh/docfx.git","ssh_url":"git@github.com:qinezh/docfx.git","clone_url":"https://github.com/qinezh/docfx.git","svn_url":"https://github.com/qinezh/docfx","homepage":"http://dotnet.github.io/docfx/","size":150119,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"dev"}},"base":{"label":"dotnet:dev","ref":"dev","sha":"4951be3bab4fecb6a359e4b1fbe092f1dcef66e2","user":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars.githubusercontent.com/u/9141961?v=3","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"repo":{"id":38007053,"name":"docfx","full_name":"dotnet/docfx","owner":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars.githubusercontent.com/u/9141961?v=3","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dotnet/docfx","description":"Tools for building and publishing API documentation for .NET projects","fork":false,"url":"https://api.github.com/repos/dotnet/docfx","forks_url":"https://api.github.com/repos/dotnet/docfx/forks","keys_url":"https://api.github.com/repos/dotnet/docfx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dotnet/docfx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dotnet/docfx/teams","hooks_url":"https://api.github.com/repos/dotnet/docfx/hooks","issue_events_url":"https://api.github.com/repos/dotnet/docfx/issues/events{/number}","events_url":"https://api.github.com/repos/dotnet/docfx/events","assignees_url":"https://api.github.com/repos/dotnet/docfx/assignees{/user}","branches_url":"https://api.github.com/repos/dotnet/docfx/branches{/branch}","tags_url":"https://api.github.com/repos/dotnet/docfx/tags","blobs_url":"https://api.github.com/repos/dotnet/docfx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dotnet/docfx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dotnet/docfx/git/refs{/sha}","trees_url":"https://api.github.com/repos/dotnet/docfx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dotnet/docfx/statuses/{sha}","languages_url":"https://api.github.com/repos/dotnet/docfx/languages","stargazers_url":"https://api.github.com/repos/dotnet/docfx/stargazers","contributors_url":"https://api.github.com/repos/dotnet/docfx/contributors","subscribers_url":"https://api.github.com/repos/dotnet/docfx/subscribers","subscription_url":"https://api.github.com/repos/dotnet/docfx/subscription","commits_url":"https://api.github.com/repos/dotnet/docfx/commits{/sha}","git_commits_url":"https://api.github.com/repos/dotnet/docfx/git/commits{/sha}","comments_url":"https://api.github.com/repos/dotnet/docfx/comments{/number}","issue_comment_url":"https://api.github.com/repos/dotnet/docfx/issues/comments{/number}","contents_url":"https://api.github.com/repos/dotnet/docfx/contents/{+path}","compare_url":"https://api.github.com/repos/dotnet/docfx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dotnet/docfx/merges","archive_url":"https://api.github.com/repos/dotnet/docfx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dotnet/docfx/downloads","issues_url":"https://api.github.com/repos/dotnet/docfx/issues{/number}","pulls_url":"https://api.github.com/repos/dotnet/docfx/pulls{/number}","milestones_url":"https://api.github.com/repos/dotnet/docfx/milestones{/number}","notifications_url":"https://api.github.com/repos/dotnet/docfx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dotnet/docfx/labels{/name}","releases_url":"https://api.github.com/repos/dotnet/docfx/releases{/id}","deployments_url":"https://api.github.com/repos/dotnet/docfx/deployments","created_at":"2015-06-24T19:43:53Z","updated_at":"2016-12-20T15:41:18Z","pushed_at":"2016-12-21T03:02:36Z","git_url":"git://github.com/dotnet/docfx.git","ssh_url":"git@github.com:dotnet/docfx.git","clone_url":"https://github.com/dotnet/docfx.git","svn_url":"https://github.com/dotnet/docfx","homepage":"http://dotnet.github.io/docfx/","size":155604,"stargazers_count":493,"watchers_count":493,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":140,"mirror_url":null,"open_issues_count":88,"forks":140,"open_issues":88,"watchers":493,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/dotnet/docfx/pulls/1021"},"html":{"href":"https://github.com/dotnet/docfx/pull/1021"},"issue":{"href":"https://api.github.com/repos/dotnet/docfx/issues/1021"},"comments":{"href":"https://api.github.com/repos/dotnet/docfx/issues/1021/comments"},"review_comments":{"href":"https://api.github.com/repos/dotnet/docfx/pulls/1021/comments"},"review_comment":{"href":"https://api.github.com/repos/dotnet/docfx/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotnet/docfx/pulls/1021/commits"},"statuses":{"href":"https://api.github.com/repos/dotnet/docfx/statuses/8398f02ccfb8d0e8f76784583f4398e3149e3ac1"}}}}
{"actor":{"display_login":"hellosnow"}}