{"action":"created","comment":{"url":"https://api.github.com/repos/googleapis/nodejs-firestore/pulls/comments/232377740","pull_request_review_id":173570748,"id":232377740,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzMjM3Nzc0MA==","diff_hunk":"@@ -519,44 +521,48 @@ export class WriteBatch {\n \n     this._committed = true;\n \n-    return this._firestore.request('commit', request, tag).then(resp => {\n-      const writeResults: WriteResult[] = [];\n-\n-      if (request.writes!.length > 0) {\n-        assert(\n-            resp.writeResults instanceof Array &&\n-                request.writes!.length === resp.writeResults.length,\n-            `Expected one write result per operation, but got ${\n-                resp.writeResults.length} results for ${\n-                request.writes!.length} operations.`);\n-\n-        const commitTime = Timestamp.fromProto(resp.commitTime);\n-\n-        let offset = 0;\n-\n-        for (let i = 0; i < this._writes.length; ++i) {\n-          const writeRequest = this._writes[i];\n-\n-          // Don't return two write results for a write that contains a\n-          // transform, as the fact that we have to split one write operation\n-          // into two distinct write requests is an implementation detail.\n-          if (writeRequest.write && writeRequest.transform) {\n-            // The document transform is always sent last and produces the\n-            // latest update time.\n-            ++offset;\n+    return this._firestore\n+        .request<api.CommitResponse>(\n+            'commit', request, tag, /* allowRetries= */ false)\n+        .then(resp => {\n+          const writeResults: WriteResult[] = [];\n+\n+          if (request.writes!.length > 0) {\n+            assert(\n+                Array.isArray(resp.writeResults) &&","path":"dev/src/write-batch.ts","position":73,"original_position":73,"commit_id":"d0b364809a7fcc267bd074023930341f42fd7517","original_commit_id":"d0b364809a7fcc267bd074023930341f42fd7517","user":{"login":"schmidt-sebastian","id":19397744,"node_id":"MDQ6VXNlcjE5Mzk3NzQ0","avatar_url":"https://avatars3.githubusercontent.com/u/19397744?v=4","gravatar_id":"","url":"https://api.github.com/users/schmidt-sebastian","html_url":"https://github.com/schmidt-sebastian","followers_url":"https://api.github.com/users/schmidt-sebastian/followers","following_url":"https://api.github.com/users/schmidt-sebastian/following{/other_user}","gists_url":"https://api.github.com/users/schmidt-sebastian/gists{/gist_id}","starred_url":"https://api.github.com/users/schmidt-sebastian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schmidt-sebastian/subscriptions","organizations_url":"https://api.github.com/users/schmidt-sebastian/orgs","repos_url":"https://api.github.com/users/schmidt-sebastian/repos","events_url":"https://api.github.com/users/schmidt-sebastian/events{/privacy}","received_events_url":"https://api.github.com/users/schmidt-sebastian/received_events","type":"User","site_admin":false},"body":"\"resp.writeResults instanceof Array\" to \"Array.isArray(resp.writeResults)\" is the only change in this block","created_at":"2018-11-09T20:04:16Z","updated_at":"2018-11-09T20:04:16Z","html_url":"https://github.com/googleapis/nodejs-firestore/pull/442#discussion_r232377740","pull_request_url":"https://api.github.com/repos/googleapis/nodejs-firestore/pulls/442","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/googleapis/nodejs-firestore/pulls/comments/232377740"},"html":{"href":"https://github.com/googleapis/nodejs-firestore/pull/442#discussion_r232377740"},"pull_request":{"href":"https://api.github.com/repos/googleapis/nodejs-firestore/pulls/442"}}},"pull_request":{"url":"https://api.github.com/repos/googleapis/nodejs-firestore/pulls/442","id":229804345,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI5ODA0MzQ1","html_url":"https://github.com/googleapis/nodejs-firestore/pull/442","diff_url":"https://github.com/googleapis/nodejs-firestore/pull/442.diff","patch_url":"https://github.com/googleapis/nodejs-firestore/pull/442.patch","issue_url":"https://api.github.com/repos/googleapis/nodejs-firestore/issues/442","number":442,"state":"open","locked":false,"title":"Better Types","user":{"login":"schmidt-sebastian","id":19397744,"node_id":"MDQ6VXNlcjE5Mzk3NzQ0","avatar_url":"https://avatars3.githubusercontent.com/u/19397744?v=4","gravatar_id":"","url":"https://api.github.com/users/schmidt-sebastian","html_url":"https://github.com/schmidt-sebastian","followers_url":"https://api.github.com/users/schmidt-sebastian/followers","following_url":"https://api.github.com/users/schmidt-sebastian/following{/other_user}","gists_url":"https://api.github.com/users/schmidt-sebastian/gists{/gist_id}","starred_url":"https://api.github.com/users/schmidt-sebastian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schmidt-sebastian/subscriptions","organizations_url":"https://api.github.com/users/schmidt-sebastian/orgs","repos_url":"https://api.github.com/users/schmidt-sebastian/repos","events_url":"https://api.github.com/users/schmidt-sebastian/events{/privacy}","received_events_url":"https://api.github.com/users/schmidt-sebastian/received_events","type":"User","site_admin":false},"body":"Improve the types in preparation for .getAll().\r\n\r\nI also had to remove an invocation for JSON.stringify in the Watch test, as it started complaining about circular references.","created_at":"2018-11-09T20:02:48Z","updated_at":"2018-11-09T20:04:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"96dbd1569617d72bfd81be186d943cb371e728bb","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":706673830,"node_id":"MDU6TGFiZWw3MDY2NzM4MzA=","url":"https://api.github.com/repos/googleapis/nodejs-firestore/labels/cla:%20yes","name":"cla: yes","color":"0B7601","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/googleapis/nodejs-firestore/pulls/442/commits","review_comments_url":"https://api.github.com/repos/googleapis/nodejs-firestore/pulls/442/comments","review_comment_url":"https://api.github.com/repos/googleapis/nodejs-firestore/pulls/comments{/number}","comments_url":"https://api.github.com/repos/googleapis/nodejs-firestore/issues/442/comments","statuses_url":"https://api.github.com/repos/googleapis/nodejs-firestore/statuses/d0b364809a7fcc267bd074023930341f42fd7517","head":{"label":"googleapis:mrschmidt-bettertypes","ref":"mrschmidt-bettertypes","sha":"d0b364809a7fcc267bd074023930341f42fd7517","user":{"login":"googleapis","id":16785467,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2Nzg1NDY3","avatar_url":"https://avatars3.githubusercontent.com/u/16785467?v=4","gravatar_id":"","url":"https://api.github.com/users/googleapis","html_url":"https://github.com/googleapis","followers_url":"https://api.github.com/users/googleapis/followers","following_url":"https://api.github.com/users/googleapis/following{/other_user}","gists_url":"https://api.github.com/users/googleapis/gists{/gist_id}","starred_url":"https://api.github.com/users/googleapis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/googleapis/subscriptions","organizations_url":"https://api.github.com/users/googleapis/orgs","repos_url":"https://api.github.com/users/googleapis/repos","events_url":"https://api.github.com/users/googleapis/events{/privacy}","received_events_url":"https://api.github.com/users/googleapis/received_events","type":"Organization","site_admin":false},"repo":{"id":98464892,"node_id":"MDEwOlJlcG9zaXRvcnk5ODQ2NDg5Mg==","name":"nodejs-firestore","full_name":"googleapis/nodejs-firestore","private":false,"owner":{"login":"googleapis","id":16785467,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2Nzg1NDY3","avatar_url":"https://avatars3.githubusercontent.com/u/16785467?v=4","gravatar_id":"","url":"https://api.github.com/users/googleapis","html_url":"https://github.com/googleapis","followers_url":"https://api.github.com/users/googleapis/followers","following_url":"https://api.github.com/users/googleapis/following{/other_user}","gists_url":"https://api.github.com/users/googleapis/gists{/gist_id}","starred_url":"https://api.github.com/users/googleapis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/googleapis/subscriptions","organizations_url":"https://api.github.com/users/googleapis/orgs","repos_url":"https://api.github.com/users/googleapis/repos","events_url":"https://api.github.com/users/googleapis/events{/privacy}","received_events_url":"https://api.github.com/users/googleapis/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/googleapis/nodejs-firestore","description":"Node.js client for Google Cloud Firestore: a NoSQL document database built for automatic scaling, high performance, and ease of application development.","fork":false,"url":"https://api.github.com/repos/googleapis/nodejs-firestore","forks_url":"https://api.github.com/repos/googleapis/nodejs-firestore/forks","keys_url":"https://api.github.com/repos/googleapis/nodejs-firestore/keys{/key_id}","collaborators_url":"https://api.github.com/repos/googleapis/nodejs-firestore/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/googleapis/nodejs-firestore/teams","hooks_url":"https://api.github.com/repos/googleapis/nodejs-firestore/hooks","issue_events_url":"https://api.github.com/repos/googleapis/nodejs-firestore/issues/events{/number}","events_url":"https://api.github.com/repos/googleapis/nodejs-firestore/events","assignees_url":"https://api.github.com/repos/googleapis/nodejs-firestore/assignees{/user}","branches_url":"https://api.github.com/repos/googleapis/nodejs-firestore/branches{/branch}","tags_url":"https://api.github.com/repos/googleapis/nodejs-firestore/tags","blobs_url":"https://api.github.com/repos/googleapis/nodejs-firestore/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/googleapis/nodejs-firestore/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/googleapis/nodejs-firestore/git/refs{/sha}","trees_url":"https://api.github.com/repos/googleapis/nodejs-firestore/git/trees{/sha}","statuses_url":"https://api.github.com/repos/googleapis/nodejs-firestore/statuses/{sha}","languages_url":"https://api.github.com/repos/googleapis/nodejs-firestore/languages","stargazers_url":"https://api.github.com/repos/googleapis/nodejs-firestore/stargazers","contributors_url":"https://api.github.com/repos/googleapis/nodejs-firestore/contributors","subscribers_url":"https://api.github.com/repos/googleapis/nodejs-firestore/subscribers","subscription_url":"https://api.github.com/repos/googleapis/nodejs-firestore/subscription","commits_url":"https://api.github.com/repos/googleapis/nodejs-firestore/commits{/sha}","git_commits_url":"https://api.github.com/repos/googleapis/nodejs-firestore/git/commits{/sha}","comments_url":"https://api.github.com/repos/googleapis/nodejs-firestore/comments{/number}","issue_comment_url":"https://api.github.com/repos/googleapis/nodejs-firestore/issues/comments{/number}","contents_url":"https://api.github.com/repos/googleapis/nodejs-firestore/contents/{+path}","compare_url":"https://api.github.com/repos/googleapis/nodejs-firestore/compare/{base}...{head}","merges_url":"https://api.github.com/repos/googleapis/nodejs-firestore/merges","archive_url":"https://api.github.com/repos/googleapis/nodejs-firestore/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/googleapis/nodejs-firestore/downloads","issues_url":"https://api.github.com/repos/googleapis/nodejs-firestore/issues{/number}","pulls_url":"https://api.github.com/repos/googleapis/nodejs-firestore/pulls{/number}","milestones_url":"https://api.github.com/repos/googleapis/nodejs-firestore/milestones{/number}","notifications_url":"https://api.github.com/repos/googleapis/nodejs-firestore/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/googleapis/nodejs-firestore/labels{/name}","releases_url":"https://api.github.com/repos/googleapis/nodejs-firestore/releases{/id}","deployments_url":"https://api.github.com/repos/googleapis/nodejs-firestore/deployments","created_at":"2017-07-26T20:51:49Z","updated_at":"2018-11-09T18:00:17Z","pushed_at":"2018-11-09T20:02:48Z","git_url":"git://github.com/googleapis/nodejs-firestore.git","ssh_url":"git@github.com:googleapis/nodejs-firestore.git","clone_url":"https://github.com/googleapis/nodejs-firestore.git","svn_url":"https://github.com/googleapis/nodejs-firestore","homepage":"https://cloud.google.com/firestore/","size":2382,"stargazers_count":153,"watchers_count":153,"language":"TypeScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":30,"mirror_url":null,"archived":false,"open_issues_count":9,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":30,"open_issues":9,"watchers":153,"default_branch":"master"}},"base":{"label":"googleapis:master","ref":"master","sha":"6f68fe7c1ced8cfac46d037323d385e2565d5884","user":{"login":"googleapis","id":16785467,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2Nzg1NDY3","avatar_url":"https://avatars3.githubusercontent.com/u/16785467?v=4","gravatar_id":"","url":"https://api.github.com/users/googleapis","html_url":"https://github.com/googleapis","followers_url":"https://api.github.com/users/googleapis/followers","following_url":"https://api.github.com/users/googleapis/following{/other_user}","gists_url":"https://api.github.com/users/googleapis/gists{/gist_id}","starred_url":"https://api.github.com/users/googleapis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/googleapis/subscriptions","organizations_url":"https://api.github.com/users/googleapis/orgs","repos_url":"https://api.github.com/users/googleapis/repos","events_url":"https://api.github.com/users/googleapis/events{/privacy}","received_events_url":"https://api.github.com/users/googleapis/received_events","type":"Organization","site_admin":false},"repo":{"id":98464892,"node_id":"MDEwOlJlcG9zaXRvcnk5ODQ2NDg5Mg==","name":"nodejs-firestore","full_name":"googleapis/nodejs-firestore","private":false,"owner":{"login":"googleapis","id":16785467,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2Nzg1NDY3","avatar_url":"https://avatars3.githubusercontent.com/u/16785467?v=4","gravatar_id":"","url":"https://api.github.com/users/googleapis","html_url":"https://github.com/googleapis","followers_url":"https://api.github.com/users/googleapis/followers","following_url":"https://api.github.com/users/googleapis/following{/other_user}","gists_url":"https://api.github.com/users/googleapis/gists{/gist_id}","starred_url":"https://api.github.com/users/googleapis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/googleapis/subscriptions","organizations_url":"https://api.github.com/users/googleapis/orgs","repos_url":"https://api.github.com/users/googleapis/repos","events_url":"https://api.github.com/users/googleapis/events{/privacy}","received_events_url":"https://api.github.com/users/googleapis/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/googleapis/nodejs-firestore","description":"Node.js client for Google Cloud Firestore: a NoSQL document database built for automatic scaling, high performance, and ease of application development.","fork":false,"url":"https://api.github.com/repos/googleapis/nodejs-firestore","forks_url":"https://api.github.com/repos/googleapis/nodejs-firestore/forks","keys_url":"https://api.github.com/repos/googleapis/nodejs-firestore/keys{/key_id}","collaborators_url":"https://api.github.com/repos/googleapis/nodejs-firestore/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/googleapis/nodejs-firestore/teams","hooks_url":"https://api.github.com/repos/googleapis/nodejs-firestore/hooks","issue_events_url":"https://api.github.com/repos/googleapis/nodejs-firestore/issues/events{/number}","events_url":"https://api.github.com/repos/googleapis/nodejs-firestore/events","assignees_url":"https://api.github.com/repos/googleapis/nodejs-firestore/assignees{/user}","branches_url":"https://api.github.com/repos/googleapis/nodejs-firestore/branches{/branch}","tags_url":"https://api.github.com/repos/googleapis/nodejs-firestore/tags","blobs_url":"https://api.github.com/repos/googleapis/nodejs-firestore/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/googleapis/nodejs-firestore/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/googleapis/nodejs-firestore/git/refs{/sha}","trees_url":"https://api.github.com/repos/googleapis/nodejs-firestore/git/trees{/sha}","statuses_url":"https://api.github.com/repos/googleapis/nodejs-firestore/statuses/{sha}","languages_url":"https://api.github.com/repos/googleapis/nodejs-firestore/languages","stargazers_url":"https://api.github.com/repos/googleapis/nodejs-firestore/stargazers","contributors_url":"https://api.github.com/repos/googleapis/nodejs-firestore/contributors","subscribers_url":"https://api.github.com/repos/googleapis/nodejs-firestore/subscribers","subscription_url":"https://api.github.com/repos/googleapis/nodejs-firestore/subscription","commits_url":"https://api.github.com/repos/googleapis/nodejs-firestore/commits{/sha}","git_commits_url":"https://api.github.com/repos/googleapis/nodejs-firestore/git/commits{/sha}","comments_url":"https://api.github.com/repos/googleapis/nodejs-firestore/comments{/number}","issue_comment_url":"https://api.github.com/repos/googleapis/nodejs-firestore/issues/comments{/number}","contents_url":"https://api.github.com/repos/googleapis/nodejs-firestore/contents/{+path}","compare_url":"https://api.github.com/repos/googleapis/nodejs-firestore/compare/{base}...{head}","merges_url":"https://api.github.com/repos/googleapis/nodejs-firestore/merges","archive_url":"https://api.github.com/repos/googleapis/nodejs-firestore/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/googleapis/nodejs-firestore/downloads","issues_url":"https://api.github.com/repos/googleapis/nodejs-firestore/issues{/number}","pulls_url":"https://api.github.com/repos/googleapis/nodejs-firestore/pulls{/number}","milestones_url":"https://api.github.com/repos/googleapis/nodejs-firestore/milestones{/number}","notifications_url":"https://api.github.com/repos/googleapis/nodejs-firestore/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/googleapis/nodejs-firestore/labels{/name}","releases_url":"https://api.github.com/repos/googleapis/nodejs-firestore/releases{/id}","deployments_url":"https://api.github.com/repos/googleapis/nodejs-firestore/deployments","created_at":"2017-07-26T20:51:49Z","updated_at":"2018-11-09T18:00:17Z","pushed_at":"2018-11-09T20:02:48Z","git_url":"git://github.com/googleapis/nodejs-firestore.git","ssh_url":"git@github.com:googleapis/nodejs-firestore.git","clone_url":"https://github.com/googleapis/nodejs-firestore.git","svn_url":"https://github.com/googleapis/nodejs-firestore","homepage":"https://cloud.google.com/firestore/","size":2382,"stargazers_count":153,"watchers_count":153,"language":"TypeScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":30,"mirror_url":null,"archived":false,"open_issues_count":9,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":30,"open_issues":9,"watchers":153,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/googleapis/nodejs-firestore/pulls/442"},"html":{"href":"https://github.com/googleapis/nodejs-firestore/pull/442"},"issue":{"href":"https://api.github.com/repos/googleapis/nodejs-firestore/issues/442"},"comments":{"href":"https://api.github.com/repos/googleapis/nodejs-firestore/issues/442/comments"},"review_comments":{"href":"https://api.github.com/repos/googleapis/nodejs-firestore/pulls/442/comments"},"review_comment":{"href":"https://api.github.com/repos/googleapis/nodejs-firestore/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/googleapis/nodejs-firestore/pulls/442/commits"},"statuses":{"href":"https://api.github.com/repos/googleapis/nodejs-firestore/statuses/d0b364809a7fcc267bd074023930341f42fd7517"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"schmidt-sebastian"}}