{"action":"created","comment":{"url":"https://api.github.com/repos/Automattic/amp-wp/pulls/comments/165266247","pull_request_review_id":93174017,"id":165266247,"diff_hunk":"@@ -0,0 +1,215 @@\n+<?php\n+/**\n+ * Class AMP_Mutation_Utils\n+ *\n+ * @package AMP\n+ */\n+\n+/**\n+ * Class AMP_Mutation_Utils\n+ *\n+ * @since 0.7\n+ */\n+class AMP_Mutation_Utils {\n+\n+\t/**\n+\t * The argument if an attribute was removed.\n+\t *\n+\t * @var array.\n+\t */\n+\tconst ATTRIBUTE_REMOVED = 'removed_attr';\n+\n+\t/**\n+\t * The argument if a node was removed.\n+\t *\n+\t * @var array.\n+\t */\n+\tconst NODE_REMOVED = 'removed';\n+\n+\t/**\n+\t * Key for the markup value in the REST API endpoint.\n+\t *\n+\t * @var string.\n+\t */\n+\tconst MARKUP_KEY = 'markup';\n+\n+\t/**\n+\t * The attributes that the sanitizer removed.\n+\t *\n+\t * @var array.\n+\t */\n+\tpublic static $removed_attributes;\n+\n+\t/**\n+\t * The nodes that the sanitizer removed.\n+\t *\n+\t * @var array.\n+\t */\n+\tpublic static $removed_nodes;\n+\n+\t/**\n+\t * Tracks when a sanitizer removes an attribute or node.\n+\t *\n+\t * @param DOMNode|DOMElement $node The node in which there was a removal.\n+\t * @param string             $removal_type The removal: 'removed_attr' for an attribute, or 'removed' for a node or element.\n+\t * @param string             $attr_name The name of the attribute removed (optional).\n+\t * @return void.\n+\t */\n+\tpublic static function track_removed( $node, $removal_type, $attr_name = null ) {\n+\t\tif ( ( self::ATTRIBUTE_REMOVED === $removal_type ) && isset( $attr_name ) ) { // phpcs:ignore WordPress.NamingConventions.ValidVariableName.NotSnakeCaseMemberVar\n+\t\t\tself::$removed_attributes = self::increment_count( self::$removed_attributes, $attr_name );\n+\t\t} elseif ( ( self::NODE_REMOVED === $removal_type ) && isset( $node->nodeName ) ) {\n+\t\t\tself::$removed_nodes = self::increment_count( self::$removed_nodes, $node->nodeName ); // phpcs:ignore WordPress.NamingConventions.ValidVariableName.NotSnakeCaseMemberVar\n+\t\t}\n+\t}\n+\n+\t/**\n+\t * Tracks when a sanitizer removes an attribute or node.\n+\t *\n+\t * @param array  $histogram The count of attributes or nodes removed.\n+\t * @param string $key The attribute or node name removed.\n+\t * @return array $histogram The incremented histogram.\n+\t */\n+\tpublic static function increment_count( $histogram, $key ) {\n+\t\t$current_value     = isset( $histogram[ $key ] ) ? $histogram[ $key ] : 0;\n+\t\t$histogram[ $key ] = $current_value + 1;\n+\t\treturn $histogram;\n+\t}\n+\n+\t/**\n+\t * Gets whether a node was removed in a sanitizer.\n+\t *\n+\t * @return boolean.\n+\t */\n+\tpublic static function was_node_removed() {\n+\t\treturn ! empty( self::$removed_nodes );\n+\t}\n+\n+\t/**\n+\t * Processes markup, to determine AMP validity.\n+\t *\n+\t * Passes $markup through the AMP sanitizers.\n+\t * Also passes a 'mutation_callback' to keep track of stripped attributes and nodes.\n+\t *\n+\t * @param string $markup The markup to process.\n+\t * @return void.\n+\t */\n+\tpublic static function process_markup( $markup ) {\n+\t\t$args = array(\n+\t\t\t'content_max_width' => ! empty( $content_width ) ? $content_width : AMP_Post_Template::CONTENT_MAX_WIDTH,\n+\t\t\t'mutation_callback' => 'AMP_Mutation_Utils::track_removed',\n+\t\t);\n+\t\tAMP_Content_Sanitizer::sanitize( $markup, amp_get_content_sanitizers(), $args );\n+\t}\n+\n+\t/**\n+\t * Registers the REST API endpoint for validation.\n+\t *\n+\t * @return void.\n+\t */\n+\tpublic static function amp_rest_validation() {\n+\t\tregister_rest_route( 'amp-wp/v1', '/validate', array(\n+\t\t\t'methods'             => 'POST',\n+\t\t\t'callback'            => array( __CLASS__, 'validate_markup' ),\n+\t\t\t'args'                => array(\n+\t\t\t\tself::MARKUP_KEY => array(\n+\t\t\t\t\t'validate_callback' => array( __CLASS__, 'validate_arg' ),\n+\t\t\t\t),\n+\t\t\t),\n+\t\t\t'permission_callback' => array( __CLASS__, 'permission' ),\n+\t\t) );\n+\t}\n+\n+\t/**\n+\t * The permission callback for the REST request.\n+\t *\n+\t * @return boolean $has_permission Whether the current user has the permission.\n+\t */\n+\tpublic static function permission() {\n+\t\treturn current_user_can( 'edit_posts' );\n+\t}\n+\n+\t/**\n+\t * Validate the markup passed to the REST API.\n+\t *\n+\t * @param WP_REST_Request $request The REST request.\n+\t * @return array|WP_Error.\n+\t */\n+\tpublic static function validate_markup( WP_REST_Request $request ) {\n+\t\t$json = $request->get_json_params();\n+\t\tif ( empty( $json[ self::MARKUP_KEY ] ) ) {\n+\t\t\treturn new WP_Error( 'no_markup', 'No markup passed to validator', array(\n+\t\t\t\t'status' => 404,\n+\t\t\t) );\n+\t\t}\n+\n+\t\treturn self::get_response( $json[ self::MARKUP_KEY ] );\n+\t}\n+\n+\t/**\n+\t * Gets the AMP validation response.\n+\t *\n+\t * If $markup isn't passed,\n+\t * It will return the validation errors the sanitizers found in rendering the page.\n+\t *\n+\t * @param string $markup To validate for AMP compatibility (optional).\n+\t * @return array $response The AMP validity of the markup.\n+\t */\n+\tpublic static function get_response( $markup = null ) {\n+\t\t$response = array();\n+\t\tif ( isset( $markup ) ) {\n+\t\t\tself::process_markup( $markup );\n+\t\t\t$response['processed_markup'] = esc_html( $markup );","path":"includes/utils/class-amp-mutation-utils.php","position":162,"original_position":162,"commit_id":"db49a33fe595d3afa8f86987d8304a8db08b0458","original_commit_id":"0b6a4eef902ab76238ce7f758cbff9fb0b5b0474","user":{"login":"kienstra","id":4063887,"avatar_url":"https://avatars2.githubusercontent.com/u/4063887?v=4","gravatar_id":"","url":"https://api.github.com/users/kienstra","html_url":"https://github.com/kienstra","followers_url":"https://api.github.com/users/kienstra/followers","following_url":"https://api.github.com/users/kienstra/following{/other_user}","gists_url":"https://api.github.com/users/kienstra/gists{/gist_id}","starred_url":"https://api.github.com/users/kienstra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kienstra/subscriptions","organizations_url":"https://api.github.com/users/kienstra/orgs","repos_url":"https://api.github.com/users/kienstra/repos","events_url":"https://api.github.com/users/kienstra/events{/privacy}","received_events_url":"https://api.github.com/users/kienstra/received_events","type":"User","site_admin":false},"body":"`esc_html()` probably isn't the best solution, but something is needed. Without it, almost the whole tag is stripped. Here's the result of this from Postman:\r\n```\r\n{\"has_error\":false,\"removed_nodes\":null,\"removed_attributes\":{\"onchange\":1},\"processed_markup\":\"<amp-youtube onchange='someFunction()' data-videoid='XOY3ZUO6P0k' layout='responsive' width='694' height='390'><\\/amp-youtube>\"}\r\n```\r\n\r\nIt looks like it escapes `/` characters:\r\n```\r\n<\\/amp-youtube>\r\n```","created_at":"2018-02-01T05:59:37Z","updated_at":"2018-02-01T05:59:37Z","html_url":"https://github.com/Automattic/amp-wp/pull/912#discussion_r165266247","pull_request_url":"https://api.github.com/repos/Automattic/amp-wp/pulls/912","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/Automattic/amp-wp/pulls/comments/165266247"},"html":{"href":"https://github.com/Automattic/amp-wp/pull/912#discussion_r165266247"},"pull_request":{"href":"https://api.github.com/repos/Automattic/amp-wp/pulls/912"}}},"pull_request":{"url":"https://api.github.com/repos/Automattic/amp-wp/pulls/912","id":165495048,"html_url":"https://github.com/Automattic/amp-wp/pull/912","diff_url":"https://github.com/Automattic/amp-wp/pull/912.diff","patch_url":"https://github.com/Automattic/amp-wp/pull/912.patch","issue_url":"https://api.github.com/repos/Automattic/amp-wp/issues/912","number":912,"state":"open","locked":false,"title":"[WIP] Add sanitization reporting","user":{"login":"westonruter","id":134745,"avatar_url":"https://avatars2.githubusercontent.com/u/134745?v=4","gravatar_id":"","url":"https://api.github.com/users/westonruter","html_url":"https://github.com/westonruter","followers_url":"https://api.github.com/users/westonruter/followers","following_url":"https://api.github.com/users/westonruter/following{/other_user}","gists_url":"https://api.github.com/users/westonruter/gists{/gist_id}","starred_url":"https://api.github.com/users/westonruter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/westonruter/subscriptions","organizations_url":"https://api.github.com/users/westonruter/orgs","repos_url":"https://api.github.com/users/westonruter/repos","events_url":"https://api.github.com/users/westonruter/events{/privacy}","received_events_url":"https://api.github.com/users/westonruter/received_events","type":"User","site_admin":false},"body":"- [x] Add callback mechanism for being able to be informed of when an element or attribute is removed. (mainly applied in [e9f39](https://github.com/Automattic/amp-wp/pull/912/commits/e9f394a8acf473785c72eca3d914844073d6b382), pending review)\r\n- [x] Add REST API endpoint allowing for HTML to be `POST`'ed and get back results for what changes were made. An element removal could be considered a sanitization error. The request would require an `edit_post` cap and require a nonce (see this [screencast](https://cloudup.com/cshOVEISKLg), but still needs nonce)\r\n- [x] For normal frontend GET requests, consider being able to return validation errors in response header when requested via query param. The errors can be gathered during sanitization and then added before the output buffer is sent. ([applied](https://cloudup.com/c29EF6yH898), pending review)\r\n\r\nRelates to content validation (#843) and also determining when a theme or plugin does something invalid (#842).","created_at":"2018-01-27T01:24:29Z","updated_at":"2018-02-01T05:59:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"83308ea28e5c6e40378a7df766b98c75934719a9","assignee":{"login":"kienstra","id":4063887,"avatar_url":"https://avatars2.githubusercontent.com/u/4063887?v=4","gravatar_id":"","url":"https://api.github.com/users/kienstra","html_url":"https://github.com/kienstra","followers_url":"https://api.github.com/users/kienstra/followers","following_url":"https://api.github.com/users/kienstra/following{/other_user}","gists_url":"https://api.github.com/users/kienstra/gists{/gist_id}","starred_url":"https://api.github.com/users/kienstra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kienstra/subscriptions","organizations_url":"https://api.github.com/users/kienstra/orgs","repos_url":"https://api.github.com/users/kienstra/repos","events_url":"https://api.github.com/users/kienstra/events{/privacy}","received_events_url":"https://api.github.com/users/kienstra/received_events","type":"User","site_admin":false},"assignees":[{"login":"kienstra","id":4063887,"avatar_url":"https://avatars2.githubusercontent.com/u/4063887?v=4","gravatar_id":"","url":"https://api.github.com/users/kienstra","html_url":"https://github.com/kienstra","followers_url":"https://api.github.com/users/kienstra/followers","following_url":"https://api.github.com/users/kienstra/following{/other_user}","gists_url":"https://api.github.com/users/kienstra/gists{/gist_id}","starred_url":"https://api.github.com/users/kienstra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kienstra/subscriptions","organizations_url":"https://api.github.com/users/kienstra/orgs","repos_url":"https://api.github.com/users/kienstra/repos","events_url":"https://api.github.com/users/kienstra/events{/privacy}","received_events_url":"https://api.github.com/users/kienstra/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"milestone":{"url":"https://api.github.com/repos/Automattic/amp-wp/milestones/6","html_url":"https://github.com/Automattic/amp-wp/milestone/6","labels_url":"https://api.github.com/repos/Automattic/amp-wp/milestones/6/labels","id":2895463,"number":6,"title":"v0.7","description":"Coming in 2018 after 0.6","creator":{"login":"westonruter","id":134745,"avatar_url":"https://avatars2.githubusercontent.com/u/134745?v=4","gravatar_id":"","url":"https://api.github.com/users/westonruter","html_url":"https://github.com/westonruter","followers_url":"https://api.github.com/users/westonruter/followers","following_url":"https://api.github.com/users/westonruter/following{/other_user}","gists_url":"https://api.github.com/users/westonruter/gists{/gist_id}","starred_url":"https://api.github.com/users/westonruter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/westonruter/subscriptions","organizations_url":"https://api.github.com/users/westonruter/orgs","repos_url":"https://api.github.com/users/westonruter/repos","events_url":"https://api.github.com/users/westonruter/events{/privacy}","received_events_url":"https://api.github.com/users/westonruter/received_events","type":"User","site_admin":false},"open_issues":19,"closed_issues":46,"state":"open","created_at":"2017-11-07T21:45:17Z","updated_at":"2018-02-01T00:21:24Z","due_on":"2018-02-09T08:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/Automattic/amp-wp/pulls/912/commits","review_comments_url":"https://api.github.com/repos/Automattic/amp-wp/pulls/912/comments","review_comment_url":"https://api.github.com/repos/Automattic/amp-wp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Automattic/amp-wp/issues/912/comments","statuses_url":"https://api.github.com/repos/Automattic/amp-wp/statuses/db49a33fe595d3afa8f86987d8304a8db08b0458","head":{"label":"Automattic:add/sanitization-reporting","ref":"add/sanitization-reporting","sha":"db49a33fe595d3afa8f86987d8304a8db08b0458","user":{"login":"Automattic","id":887802,"avatar_url":"https://avatars1.githubusercontent.com/u/887802?v=4","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"repo":{"id":42912130,"name":"amp-wp","full_name":"Automattic/amp-wp","owner":{"login":"Automattic","id":887802,"avatar_url":"https://avatars1.githubusercontent.com/u/887802?v=4","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Automattic/amp-wp","description":"WordPress plugin for adding AMP support","fork":false,"url":"https://api.github.com/repos/Automattic/amp-wp","forks_url":"https://api.github.com/repos/Automattic/amp-wp/forks","keys_url":"https://api.github.com/repos/Automattic/amp-wp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Automattic/amp-wp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Automattic/amp-wp/teams","hooks_url":"https://api.github.com/repos/Automattic/amp-wp/hooks","issue_events_url":"https://api.github.com/repos/Automattic/amp-wp/issues/events{/number}","events_url":"https://api.github.com/repos/Automattic/amp-wp/events","assignees_url":"https://api.github.com/repos/Automattic/amp-wp/assignees{/user}","branches_url":"https://api.github.com/repos/Automattic/amp-wp/branches{/branch}","tags_url":"https://api.github.com/repos/Automattic/amp-wp/tags","blobs_url":"https://api.github.com/repos/Automattic/amp-wp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Automattic/amp-wp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Automattic/amp-wp/git/refs{/sha}","trees_url":"https://api.github.com/repos/Automattic/amp-wp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Automattic/amp-wp/statuses/{sha}","languages_url":"https://api.github.com/repos/Automattic/amp-wp/languages","stargazers_url":"https://api.github.com/repos/Automattic/amp-wp/stargazers","contributors_url":"https://api.github.com/repos/Automattic/amp-wp/contributors","subscribers_url":"https://api.github.com/repos/Automattic/amp-wp/subscribers","subscription_url":"https://api.github.com/repos/Automattic/amp-wp/subscription","commits_url":"https://api.github.com/repos/Automattic/amp-wp/commits{/sha}","git_commits_url":"https://api.github.com/repos/Automattic/amp-wp/git/commits{/sha}","comments_url":"https://api.github.com/repos/Automattic/amp-wp/comments{/number}","issue_comment_url":"https://api.github.com/repos/Automattic/amp-wp/issues/comments{/number}","contents_url":"https://api.github.com/repos/Automattic/amp-wp/contents/{+path}","compare_url":"https://api.github.com/repos/Automattic/amp-wp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Automattic/amp-wp/merges","archive_url":"https://api.github.com/repos/Automattic/amp-wp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Automattic/amp-wp/downloads","issues_url":"https://api.github.com/repos/Automattic/amp-wp/issues{/number}","pulls_url":"https://api.github.com/repos/Automattic/amp-wp/pulls{/number}","milestones_url":"https://api.github.com/repos/Automattic/amp-wp/milestones{/number}","notifications_url":"https://api.github.com/repos/Automattic/amp-wp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Automattic/amp-wp/labels{/name}","releases_url":"https://api.github.com/repos/Automattic/amp-wp/releases{/id}","deployments_url":"https://api.github.com/repos/Automattic/amp-wp/deployments","created_at":"2015-09-22T04:52:15Z","updated_at":"2018-01-31T19:54:55Z","pushed_at":"2018-02-01T05:55:25Z","git_url":"git://github.com/Automattic/amp-wp.git","ssh_url":"git@github.com:Automattic/amp-wp.git","clone_url":"https://github.com/Automattic/amp-wp.git","svn_url":"https://github.com/Automattic/amp-wp","homepage":"https://wordpress.org/plugins/amp/","size":8606,"stargazers_count":1066,"watchers_count":1066,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":222,"mirror_url":null,"archived":false,"open_issues_count":110,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0"},"forks":222,"open_issues":110,"watchers":1066,"default_branch":"develop"}},"base":{"label":"Automattic:develop","ref":"develop","sha":"72638cacbdb54b283ee6d19b7554e140562cdf0e","user":{"login":"Automattic","id":887802,"avatar_url":"https://avatars1.githubusercontent.com/u/887802?v=4","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"repo":{"id":42912130,"name":"amp-wp","full_name":"Automattic/amp-wp","owner":{"login":"Automattic","id":887802,"avatar_url":"https://avatars1.githubusercontent.com/u/887802?v=4","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Automattic/amp-wp","description":"WordPress plugin for adding AMP support","fork":false,"url":"https://api.github.com/repos/Automattic/amp-wp","forks_url":"https://api.github.com/repos/Automattic/amp-wp/forks","keys_url":"https://api.github.com/repos/Automattic/amp-wp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Automattic/amp-wp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Automattic/amp-wp/teams","hooks_url":"https://api.github.com/repos/Automattic/amp-wp/hooks","issue_events_url":"https://api.github.com/repos/Automattic/amp-wp/issues/events{/number}","events_url":"https://api.github.com/repos/Automattic/amp-wp/events","assignees_url":"https://api.github.com/repos/Automattic/amp-wp/assignees{/user}","branches_url":"https://api.github.com/repos/Automattic/amp-wp/branches{/branch}","tags_url":"https://api.github.com/repos/Automattic/amp-wp/tags","blobs_url":"https://api.github.com/repos/Automattic/amp-wp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Automattic/amp-wp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Automattic/amp-wp/git/refs{/sha}","trees_url":"https://api.github.com/repos/Automattic/amp-wp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Automattic/amp-wp/statuses/{sha}","languages_url":"https://api.github.com/repos/Automattic/amp-wp/languages","stargazers_url":"https://api.github.com/repos/Automattic/amp-wp/stargazers","contributors_url":"https://api.github.com/repos/Automattic/amp-wp/contributors","subscribers_url":"https://api.github.com/repos/Automattic/amp-wp/subscribers","subscription_url":"https://api.github.com/repos/Automattic/amp-wp/subscription","commits_url":"https://api.github.com/repos/Automattic/amp-wp/commits{/sha}","git_commits_url":"https://api.github.com/repos/Automattic/amp-wp/git/commits{/sha}","comments_url":"https://api.github.com/repos/Automattic/amp-wp/comments{/number}","issue_comment_url":"https://api.github.com/repos/Automattic/amp-wp/issues/comments{/number}","contents_url":"https://api.github.com/repos/Automattic/amp-wp/contents/{+path}","compare_url":"https://api.github.com/repos/Automattic/amp-wp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Automattic/amp-wp/merges","archive_url":"https://api.github.com/repos/Automattic/amp-wp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Automattic/amp-wp/downloads","issues_url":"https://api.github.com/repos/Automattic/amp-wp/issues{/number}","pulls_url":"https://api.github.com/repos/Automattic/amp-wp/pulls{/number}","milestones_url":"https://api.github.com/repos/Automattic/amp-wp/milestones{/number}","notifications_url":"https://api.github.com/repos/Automattic/amp-wp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Automattic/amp-wp/labels{/name}","releases_url":"https://api.github.com/repos/Automattic/amp-wp/releases{/id}","deployments_url":"https://api.github.com/repos/Automattic/amp-wp/deployments","created_at":"2015-09-22T04:52:15Z","updated_at":"2018-01-31T19:54:55Z","pushed_at":"2018-02-01T05:55:25Z","git_url":"git://github.com/Automattic/amp-wp.git","ssh_url":"git@github.com:Automattic/amp-wp.git","clone_url":"https://github.com/Automattic/amp-wp.git","svn_url":"https://github.com/Automattic/amp-wp","homepage":"https://wordpress.org/plugins/amp/","size":8606,"stargazers_count":1066,"watchers_count":1066,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":222,"mirror_url":null,"archived":false,"open_issues_count":110,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0"},"forks":222,"open_issues":110,"watchers":1066,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/Automattic/amp-wp/pulls/912"},"html":{"href":"https://github.com/Automattic/amp-wp/pull/912"},"issue":{"href":"https://api.github.com/repos/Automattic/amp-wp/issues/912"},"comments":{"href":"https://api.github.com/repos/Automattic/amp-wp/issues/912/comments"},"review_comments":{"href":"https://api.github.com/repos/Automattic/amp-wp/pulls/912/comments"},"review_comment":{"href":"https://api.github.com/repos/Automattic/amp-wp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Automattic/amp-wp/pulls/912/commits"},"statuses":{"href":"https://api.github.com/repos/Automattic/amp-wp/statuses/db49a33fe595d3afa8f86987d8304a8db08b0458"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"kienstra"}}