{"action":"created","comment":{"url":"https://api.github.com/repos/zotero/zotero/pulls/comments/178531355","pull_request_review_id":108600242,"id":178531355,"diff_hunk":"@@ -0,0 +1,72 @@\n+/*\n+\t***** BEGIN LICENSE BLOCK *****\n+\t\n+\tCopyright © 2017 Center for History and New Media\n+\t\t\t\t\tGeorge Mason University, Fairfax, Virginia, USA\n+\t\t\t\t\thttp://zotero.org\n+\t\n+\tThis file is part of Zotero.\n+\t\n+\tZotero is free software: you can redistribute it and/or modify\n+\tit under the terms of the GNU Affero General Public License as published by\n+\tthe Free Software Foundation, either version 3 of the License, or\n+\t(at your option) any later version.\n+\t\n+\tZotero is distributed in the hope that it will be useful,\n+\tbut WITHOUT ANY WARRANTY; without even the implied warranty of\n+\tMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n+\tGNU Affero General Public License for more details.\n+\n+\tYou should have received a copy of the GNU Affero General Public License\n+\talong with Zotero.  If not, see <http://www.gnu.org/licenses/>.\n+\t\n+\t***** END LICENSE BLOCK *****\n+*/\n+\n+/**\n+ * Adds integration endpoints related to doc integration via HTTP/connector.\n+ * \n+ * document/execCommand initiates an integration command and responds with the\n+ * next request for the http client (e.g. 'Application.getDocument').\n+ * The client should respond to document/respond with the payload and expect\n+ * another response with the next request, until it receives 'Document.complete'\n+ * at which point the integration transaction is considered complete.\n+ */\n+Zotero.Server.Endpoints['/connector/document/execCommand'] = function() {};\n+Zotero.Server.Endpoints['/connector/document/execCommand'].prototype = {\n+\tsupportedMethods: [\"POST\"],\n+\tsupportedDataTypes: [\"application/json\"],\n+\tpermitBookmarklet: true,\n+\tinit: function(data, sendResponse) {\n+\t\tif (Zotero.HTTPIntegrationClient.inProgress) {\n+\t\t\t// This will focus the last integration window if present\n+\t\t\tZotero.Integration.execCommand('http', data.command, data.docId);\n+\t\t\tsendResponse(503, 'text/plain', 'Integration transaction is already in progress')","path":"chrome/content/zotero/xpcom/connector/server_connectorIntegration.js","position":44,"original_position":44,"commit_id":"923d54b1e4f5dc4a6a1f87bc2cf3ca1fbe1cab65","original_commit_id":"927ba6c160d3bc39caf93b9fec11cd6506faa78b","user":{"login":"dstillman","id":783082,"avatar_url":"https://avatars0.githubusercontent.com/u/783082?v=4","gravatar_id":"","url":"https://api.github.com/users/dstillman","html_url":"https://github.com/dstillman","followers_url":"https://api.github.com/users/dstillman/followers","following_url":"https://api.github.com/users/dstillman/following{/other_user}","gists_url":"https://api.github.com/users/dstillman/gists{/gist_id}","starred_url":"https://api.github.com/users/dstillman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dstillman/subscriptions","organizations_url":"https://api.github.com/users/dstillman/orgs","repos_url":"https://api.github.com/users/dstillman/repos","events_url":"https://api.github.com/users/dstillman/events{/privacy}","received_events_url":"https://api.github.com/users/dstillman/received_events","type":"User","site_admin":false},"body":"OK, we can see how it goes. If it becomes a problem, it seems like we could maybe do a timeout based on the time of the last field update or something like that.","created_at":"2018-04-02T11:55:50Z","updated_at":"2018-04-02T11:55:50Z","html_url":"https://github.com/zotero/zotero/pull/1476#discussion_r178531355","pull_request_url":"https://api.github.com/repos/zotero/zotero/pulls/1476","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/zotero/zotero/pulls/comments/178531355"},"html":{"href":"https://github.com/zotero/zotero/pull/1476#discussion_r178531355"},"pull_request":{"href":"https://api.github.com/repos/zotero/zotero/pulls/1476"}},"in_reply_to_id":178423883},"pull_request":{"url":"https://api.github.com/repos/zotero/zotero/pulls/1476","id":178560325,"html_url":"https://github.com/zotero/zotero/pull/1476","diff_url":"https://github.com/zotero/zotero/pull/1476.diff","patch_url":"https://github.com/zotero/zotero/pull/1476.patch","issue_url":"https://api.github.com/repos/zotero/zotero/issues/1476","number":1476,"state":"open","locked":false,"title":"Doc Integration Endpoint for the Connector","user":{"login":"adomasven","id":5899315,"avatar_url":"https://avatars1.githubusercontent.com/u/5899315?v=4","gravatar_id":"","url":"https://api.github.com/users/adomasven","html_url":"https://github.com/adomasven","followers_url":"https://api.github.com/users/adomasven/followers","following_url":"https://api.github.com/users/adomasven/following{/other_user}","gists_url":"https://api.github.com/users/adomasven/gists{/gist_id}","starred_url":"https://api.github.com/users/adomasven/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adomasven/subscriptions","organizations_url":"https://api.github.com/users/adomasven/orgs","repos_url":"https://api.github.com/users/adomasven/repos","events_url":"https://api.github.com/users/adomasven/events{/privacy}","received_events_url":"https://api.github.com/users/adomasven/received_events","type":"User","site_admin":false},"body":"Changes:\r\n\r\n- Moved connector communication specific code under `xpcom/connector` (directory was previously occupied by FX connector code and since got removed)\r\n- Added `/connector/document/execCommand` and `/connector/document/respond` endpoints for integration functionality support\r\n- Made all integration plugin invocation calls async (and added a wrapper for old integration plugins that have a sync API).\r\n- Misc changes including support for \"Http\" fields, \"html\" citation/bibl output and plugins that do not support endnotes\r\n- Adds a progress bar for integration interactions that do not use the quickFormat dialog","created_at":"2018-03-30T13:28:03Z","updated_at":"2018-04-02T11:55:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9913eb7a5bee733d244d48c3eb1a4233f1f5ab1e","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/zotero/zotero/pulls/1476/commits","review_comments_url":"https://api.github.com/repos/zotero/zotero/pulls/1476/comments","review_comment_url":"https://api.github.com/repos/zotero/zotero/pulls/comments{/number}","comments_url":"https://api.github.com/repos/zotero/zotero/issues/1476/comments","statuses_url":"https://api.github.com/repos/zotero/zotero/statuses/923d54b1e4f5dc4a6a1f87bc2cf3ca1fbe1cab65","head":{"label":"adomasven:feature/connector-doc-integration","ref":"feature/connector-doc-integration","sha":"923d54b1e4f5dc4a6a1f87bc2cf3ca1fbe1cab65","user":{"login":"adomasven","id":5899315,"avatar_url":"https://avatars1.githubusercontent.com/u/5899315?v=4","gravatar_id":"","url":"https://api.github.com/users/adomasven","html_url":"https://github.com/adomasven","followers_url":"https://api.github.com/users/adomasven/followers","following_url":"https://api.github.com/users/adomasven/following{/other_user}","gists_url":"https://api.github.com/users/adomasven/gists{/gist_id}","starred_url":"https://api.github.com/users/adomasven/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adomasven/subscriptions","organizations_url":"https://api.github.com/users/adomasven/orgs","repos_url":"https://api.github.com/users/adomasven/repos","events_url":"https://api.github.com/users/adomasven/events{/privacy}","received_events_url":"https://api.github.com/users/adomasven/received_events","type":"User","site_admin":false},"repo":{"id":45567955,"name":"zotero","full_name":"adomasven/zotero","owner":{"login":"adomasven","id":5899315,"avatar_url":"https://avatars1.githubusercontent.com/u/5899315?v=4","gravatar_id":"","url":"https://api.github.com/users/adomasven","html_url":"https://github.com/adomasven","followers_url":"https://api.github.com/users/adomasven/followers","following_url":"https://api.github.com/users/adomasven/following{/other_user}","gists_url":"https://api.github.com/users/adomasven/gists{/gist_id}","starred_url":"https://api.github.com/users/adomasven/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adomasven/subscriptions","organizations_url":"https://api.github.com/users/adomasven/orgs","repos_url":"https://api.github.com/users/adomasven/repos","events_url":"https://api.github.com/users/adomasven/events{/privacy}","received_events_url":"https://api.github.com/users/adomasven/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/adomasven/zotero","description":"Zotero is a free, easy-to-use tool to help you collect, organize, cite, and share your research sources.","fork":true,"url":"https://api.github.com/repos/adomasven/zotero","forks_url":"https://api.github.com/repos/adomasven/zotero/forks","keys_url":"https://api.github.com/repos/adomasven/zotero/keys{/key_id}","collaborators_url":"https://api.github.com/repos/adomasven/zotero/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/adomasven/zotero/teams","hooks_url":"https://api.github.com/repos/adomasven/zotero/hooks","issue_events_url":"https://api.github.com/repos/adomasven/zotero/issues/events{/number}","events_url":"https://api.github.com/repos/adomasven/zotero/events","assignees_url":"https://api.github.com/repos/adomasven/zotero/assignees{/user}","branches_url":"https://api.github.com/repos/adomasven/zotero/branches{/branch}","tags_url":"https://api.github.com/repos/adomasven/zotero/tags","blobs_url":"https://api.github.com/repos/adomasven/zotero/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/adomasven/zotero/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/adomasven/zotero/git/refs{/sha}","trees_url":"https://api.github.com/repos/adomasven/zotero/git/trees{/sha}","statuses_url":"https://api.github.com/repos/adomasven/zotero/statuses/{sha}","languages_url":"https://api.github.com/repos/adomasven/zotero/languages","stargazers_url":"https://api.github.com/repos/adomasven/zotero/stargazers","contributors_url":"https://api.github.com/repos/adomasven/zotero/contributors","subscribers_url":"https://api.github.com/repos/adomasven/zotero/subscribers","subscription_url":"https://api.github.com/repos/adomasven/zotero/subscription","commits_url":"https://api.github.com/repos/adomasven/zotero/commits{/sha}","git_commits_url":"https://api.github.com/repos/adomasven/zotero/git/commits{/sha}","comments_url":"https://api.github.com/repos/adomasven/zotero/comments{/number}","issue_comment_url":"https://api.github.com/repos/adomasven/zotero/issues/comments{/number}","contents_url":"https://api.github.com/repos/adomasven/zotero/contents/{+path}","compare_url":"https://api.github.com/repos/adomasven/zotero/compare/{base}...{head}","merges_url":"https://api.github.com/repos/adomasven/zotero/merges","archive_url":"https://api.github.com/repos/adomasven/zotero/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/adomasven/zotero/downloads","issues_url":"https://api.github.com/repos/adomasven/zotero/issues{/number}","pulls_url":"https://api.github.com/repos/adomasven/zotero/pulls{/number}","milestones_url":"https://api.github.com/repos/adomasven/zotero/milestones{/number}","notifications_url":"https://api.github.com/repos/adomasven/zotero/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/adomasven/zotero/labels{/name}","releases_url":"https://api.github.com/repos/adomasven/zotero/releases{/id}","deployments_url":"https://api.github.com/repos/adomasven/zotero/deployments","created_at":"2015-11-04T21:16:24Z","updated_at":"2018-03-27T09:45:18Z","pushed_at":"2018-04-02T11:06:02Z","git_url":"git://github.com/adomasven/zotero.git","ssh_url":"git@github.com:adomasven/zotero.git","clone_url":"https://github.com/adomasven/zotero.git","svn_url":"https://github.com/adomasven/zotero","homepage":"https://www.zotero.org","size":96849,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"zotero:master","ref":"master","sha":"37e850c67ba6893c3575f2dd6a3266a68f03acf9","user":{"login":"zotero","id":891917,"avatar_url":"https://avatars0.githubusercontent.com/u/891917?v=4","gravatar_id":"","url":"https://api.github.com/users/zotero","html_url":"https://github.com/zotero","followers_url":"https://api.github.com/users/zotero/followers","following_url":"https://api.github.com/users/zotero/following{/other_user}","gists_url":"https://api.github.com/users/zotero/gists{/gist_id}","starred_url":"https://api.github.com/users/zotero/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zotero/subscriptions","organizations_url":"https://api.github.com/users/zotero/orgs","repos_url":"https://api.github.com/users/zotero/repos","events_url":"https://api.github.com/users/zotero/events{/privacy}","received_events_url":"https://api.github.com/users/zotero/received_events","type":"Organization","site_admin":false},"repo":{"id":2656556,"name":"zotero","full_name":"zotero/zotero","owner":{"login":"zotero","id":891917,"avatar_url":"https://avatars0.githubusercontent.com/u/891917?v=4","gravatar_id":"","url":"https://api.github.com/users/zotero","html_url":"https://github.com/zotero","followers_url":"https://api.github.com/users/zotero/followers","following_url":"https://api.github.com/users/zotero/following{/other_user}","gists_url":"https://api.github.com/users/zotero/gists{/gist_id}","starred_url":"https://api.github.com/users/zotero/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zotero/subscriptions","organizations_url":"https://api.github.com/users/zotero/orgs","repos_url":"https://api.github.com/users/zotero/repos","events_url":"https://api.github.com/users/zotero/events{/privacy}","received_events_url":"https://api.github.com/users/zotero/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zotero/zotero","description":"Zotero is a free, easy-to-use tool to help you collect, organize, cite, and share your research sources.","fork":false,"url":"https://api.github.com/repos/zotero/zotero","forks_url":"https://api.github.com/repos/zotero/zotero/forks","keys_url":"https://api.github.com/repos/zotero/zotero/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zotero/zotero/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zotero/zotero/teams","hooks_url":"https://api.github.com/repos/zotero/zotero/hooks","issue_events_url":"https://api.github.com/repos/zotero/zotero/issues/events{/number}","events_url":"https://api.github.com/repos/zotero/zotero/events","assignees_url":"https://api.github.com/repos/zotero/zotero/assignees{/user}","branches_url":"https://api.github.com/repos/zotero/zotero/branches{/branch}","tags_url":"https://api.github.com/repos/zotero/zotero/tags","blobs_url":"https://api.github.com/repos/zotero/zotero/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zotero/zotero/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zotero/zotero/git/refs{/sha}","trees_url":"https://api.github.com/repos/zotero/zotero/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zotero/zotero/statuses/{sha}","languages_url":"https://api.github.com/repos/zotero/zotero/languages","stargazers_url":"https://api.github.com/repos/zotero/zotero/stargazers","contributors_url":"https://api.github.com/repos/zotero/zotero/contributors","subscribers_url":"https://api.github.com/repos/zotero/zotero/subscribers","subscription_url":"https://api.github.com/repos/zotero/zotero/subscription","commits_url":"https://api.github.com/repos/zotero/zotero/commits{/sha}","git_commits_url":"https://api.github.com/repos/zotero/zotero/git/commits{/sha}","comments_url":"https://api.github.com/repos/zotero/zotero/comments{/number}","issue_comment_url":"https://api.github.com/repos/zotero/zotero/issues/comments{/number}","contents_url":"https://api.github.com/repos/zotero/zotero/contents/{+path}","compare_url":"https://api.github.com/repos/zotero/zotero/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zotero/zotero/merges","archive_url":"https://api.github.com/repos/zotero/zotero/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zotero/zotero/downloads","issues_url":"https://api.github.com/repos/zotero/zotero/issues{/number}","pulls_url":"https://api.github.com/repos/zotero/zotero/pulls{/number}","milestones_url":"https://api.github.com/repos/zotero/zotero/milestones{/number}","notifications_url":"https://api.github.com/repos/zotero/zotero/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zotero/zotero/labels{/name}","releases_url":"https://api.github.com/repos/zotero/zotero/releases{/id}","deployments_url":"https://api.github.com/repos/zotero/zotero/deployments","created_at":"2011-10-27T07:46:48Z","updated_at":"2018-04-02T00:20:35Z","pushed_at":"2018-04-02T11:06:03Z","git_url":"git://github.com/zotero/zotero.git","ssh_url":"git@github.com:zotero/zotero.git","clone_url":"https://github.com/zotero/zotero.git","svn_url":"https://github.com/zotero/zotero","homepage":"https://www.zotero.org","size":97127,"stargazers_count":931,"watchers_count":931,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":213,"mirror_url":null,"archived":false,"open_issues_count":445,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":213,"open_issues":445,"watchers":931,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/zotero/zotero/pulls/1476"},"html":{"href":"https://github.com/zotero/zotero/pull/1476"},"issue":{"href":"https://api.github.com/repos/zotero/zotero/issues/1476"},"comments":{"href":"https://api.github.com/repos/zotero/zotero/issues/1476/comments"},"review_comments":{"href":"https://api.github.com/repos/zotero/zotero/pulls/1476/comments"},"review_comment":{"href":"https://api.github.com/repos/zotero/zotero/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/zotero/zotero/pulls/1476/commits"},"statuses":{"href":"https://api.github.com/repos/zotero/zotero/statuses/923d54b1e4f5dc4a6a1f87bc2cf3ca1fbe1cab65"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"dstillman"}}