{"action":"created","comment":{"url":"https://api.github.com/repos/ampproject/amphtml/pulls/comments/48053964","id":48053964,"diff_hunk":"@@ -0,0 +1,309 @@\n+/**\n+ * Copyright 2015 The AMP HTML Authors. All Rights Reserved.\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ *      http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS-IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+\n+import * as st from '../../../src/style';\n+import {Layout} from '../../../src/layout';\n+import {assertHttpsUrl} from '../../../src/url';\n+import {assert} from '../../../src/asserts';\n+import {cidFor} from '../../../src/cid';\n+import {getService} from '../../../src/service';\n+import {vsyncFor} from '../../../src/vsync';\n+import {xhrFor, createXhrRequest} from '../../../src/xhr';\n+\n+\n+/**\n+ * @typedef {{\n+ *   elementId: string,\n+ *   externalCID: string\n+ * }}\n+ */\n+let GetRequestMetadata;\n+\n+/**\n+ * @typedef {{\n+ *   show_notification: boolean\n+ * }}\n+ */\n+let GetResponseMetadata;\n+\n+/**\n+ * @typedef {{\n+ *\n+ * }}\n+ */\n+let UserNotificationDefer;\n+\n+/**\n+ *\n+ */\n+class AmpUserNotification extends AMP.BaseElement {\n+\n+  createdCallback() {\n+    /** @private @const {!Window} */\n+    this.win_ = this.getWin();\n+\n+    /** @private @const {!UserNotification} */\n+    this.userNotification_ = getUserNotification_(this.win_);\n+\n+    /** @private @const {!Element} */\n+    this.glasspane_ = this.userNotification_.glasspane;\n+\n+    // TODO: check with Dima if this is safe.\n+    this.element.parentNode.removeChild(this.element);\n+    this.glasspane_.appendChild(this.element);\n+  }\n+\n+  /** @override */\n+  buildCallback() {\n+    /** @private @const {!Vsync} */\n+    this.vsync_ = vsyncFor(this.win_);\n+\n+    /** @private {boolean} */\n+    this.activated_ = false;\n+\n+    assert(this.element.hasAttribute('id'), 'amp-user-notification should ' +\n+        'have an id');\n+    this.elementId_ = this.element.getAttribute('id');\n+\n+    /** @private @const {string} */\n+    this.showIfHref_ = assertHttpsUrl(\n+        this.element.getAttribute('data-show-if-href'), this.element);\n+\n+    // assert these!\n+    /** @private @const {string} */\n+    this.dismissHref_ = assertHttpsUrl(\n+        this.element.getAttribute('data-dismiss-href'), this.element);\n+\n+    this.options_ = {\n+      credentials: this.element.getAttribute('credentials')\n+    };\n+\n+    /** @private @const {!function(*)} */\n+    this.dialogResolve_;\n+\n+    /** @private @const {!Promise} */\n+    this.dialogPromise_ = new Promise((resolve, reject) => {\n+      this.dialogResolve_ = resolve;\n+    });\n+\n+    this.userNotification_.registerUserNotification(this.elementId_,\n+        this.dialogPromise_);\n+\n+    this.registerAction('dismiss', this.dismiss.bind(this));\n+  }\n+\n+  /** @override */\n+  isLayoutSupported(layout) {\n+    return layout == Layout.CONTAINER;\n+  }\n+\n+  /** @override */\n+  layoutCallback(visible) {\n+    if (!this.activated_) {\n+      this.getAsyncCid_()\n+          .then(this.fetchShowEndpoint_.bind(this))\n+          .then(this.onFetchShowEndpointSuccess_.bind(this),\n+              this.onRejection_.bind(this));\n+      this.activated_ = true;\n+    }\n+    return Promise.resolve();\n+  }\n+\n+  /**\n+   * Executes a `GET` request to the href given on the `data-show-if-href`\n+   * attribute.\n+   * @param {string} cid\n+   * @return {!Promise}\n+   * @private\n+   */\n+  fetchShowEndpoint_(cid) {\n+    /** @type {GetRequestMetadata} */\n+    let getReq = {\n+      body: {\n+        elementId: this.elementId_,\n+        externalCID: cid\n+      }\n+    };\n+\n+    return xhrFor(this.win_).fetchJson(this.showIfHref_, getReq);\n+  }\n+\n+  /**\n+   * Creates an POST to the specified `data-dismiss-href` url.\n+   * @private\n+   * @return {!Promise}\n+   */\n+  postDismissEnpoint_() {\n+    return xhrFor(this.win_).fetchJson(this.dismissHref_, {\n+      method: 'POST',\n+      body: {\n+        elementId: this.elementId\n+      }\n+    });\n+  }\n+\n+  /**\n+   * Success handler for `fetchShowEndpoint_`\n+   * @param {GetResponseMetadata}\n+   * @private\n+   */\n+  onFetchShowEndpointSuccess_(data) {\n+    assert(typeof data.show_notification == 'boolean', '%s should ' +\n+        'be a boolean', data.show_notification);\n+    if (data.show_notification) {\n+      this.show();\n+    }\n+    return data;\n+  }\n+\n+  /**\n+   * Generic rejection handler for amp-user-notification.\n+   * @private\n+   */\n+  onRejection_(msg) {\n+    console/*OK*/.error('Rejection ocurred on `amp-user-notification` ' +\n+        `with html element id \"${this.elementId_}\". message: ${msg}`);\n+  }\n+\n+  /**\n+   * Get async cid service.\n+   * @private\n+   */\n+  getAsyncCid_() {\n+    return cidFor(this.win_).then((cid) => {\n+      return cid.get('amp-user-notification',\n+          Promise.resolve(), this.dialogPromise_);\n+    });\n+  }\n+\n+  /**\n+   * Shows the current user notification. Adds the `.amp-active` class to\n+   * the element.\n+   * @export\n+   */\n+  show() {\n+    this.element.classList.add('amp-active');\n+  }\n+\n+  /**\n+   * Hides the current user notification and invokes the `dialogResolve_`\n+   * method. Removes the `.amp-active` class from the element.\n+   * @export\n+   */\n+  dismiss() {\n+    this.vsync_.mutate(() => {\n+      this.element.classList.remove('amp-active');\n+      this.element.classList.add('amp-hidden');\n+      this.dialogResolve_();\n+    });\n+  }\n+}\n+\n+\n+/**\n+ * UserNotification service that is a per window singleton on installation.\n+ */\n+class UserNotification {\n+\n+  constructor(window) {\n+    this.win_ = window;\n+\n+    /** @private @const {!Object<UserNotificationDefer>} */\n+    this.deferRegistry_ = Object.create(null);\n+\n+    this.glasspane = this.win_.document.createElement('div');\n+    this.glasspane.classList.add('-amp-glasspane');\n+    this.win_.document.body.appendChild(this.glasspane);\n+  }\n+\n+  /**\n+   * Retrieve a promise associated to an `amp-user-notification` component\n+   * that is resolved when user agrees to the terms.\n+   * @return {!Promise|null}\n+   */\n+  get(id) {\n+    let defer = this.getElementDeferById_(id);\n+    if (defer) {\n+      return defer.promise;\n+    }\n+    return null;\n+  }\n+\n+  /**\n+   * Checks the internal cache if an amp-user-notification component\n+   * has been registered with the element id given.\n+   * @param {string|undefined} id\n+   * @return boolean\n+   */\n+  has(id) {\n+    if (!id) {\n+      return false;\n+    }\n+    return !!this.getElementDeferById_(id);\n+  }\n+\n+  /**\n+   * Register an instance of `amp-user-notification`.\n+   * @param {string} id html element id of the amp-user-notification component.\n+   * @param {!Promise} consentPromise promise to be resolved when a human\n+   *     accepts the terms.\n+   */\n+  registerUserNotification(id, consentPromise) {\n+    let deferred = this.getElementDeferById_();\n+    let resolve_;\n+\n+    assert(this.getElementDeferById_(id) == undefined, 'Duplicate ' +\n+        'amp-use-notification id found.');\n+\n+    const promise = new Promise((resolve, reject) => {\n+      resolve_ = resolve;\n+    });\n+\n+    deferred = this.deferRegistry_[id] = {\n+      promise: promise,\n+      resolve: resolve_\n+    }\n+    deferred.resolve(consentPromise);\n+  }\n+\n+  /**\n+   * Retrieve UserNotificationDefer object.\n+   * @param {string} id\n+   * @return {UserNotificationDefer|undefined}\n+   * @private\n+   */\n+  getElementDeferById_(id) {\n+    return this.deferRegistry_[id];","path":"extensions/amp-user-notification/0.1/amp-user-notification.js","position":282,"original_position":289,"commit_id":"069843e2ad0de3443ead86b810a25e5d0199db73","original_commit_id":"3c9255d9341eb1830c4aebdaa112d2212ea24692","user":{"login":"erwinmombay","id":354746,"avatar_url":"https://avatars.githubusercontent.com/u/354746?v=3","gravatar_id":"","url":"https://api.github.com/users/erwinmombay","html_url":"https://github.com/erwinmombay","followers_url":"https://api.github.com/users/erwinmombay/followers","following_url":"https://api.github.com/users/erwinmombay/following{/other_user}","gists_url":"https://api.github.com/users/erwinmombay/gists{/gist_id}","starred_url":"https://api.github.com/users/erwinmombay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erwinmombay/subscriptions","organizations_url":"https://api.github.com/users/erwinmombay/orgs","repos_url":"https://api.github.com/users/erwinmombay/repos","events_url":"https://api.github.com/users/erwinmombay/events{/privacy}","received_events_url":"https://api.github.com/users/erwinmombay/received_events","type":"User","site_admin":false},"body":"so we could either do that or eagerly create the `UserNotificationDefer` when somebody requests for it.","created_at":"2015-12-18T18:26:56Z","updated_at":"2015-12-18T18:26:56Z","html_url":"https://github.com/ampproject/amphtml/pull/1178#discussion_r48053964","pull_request_url":"https://api.github.com/repos/ampproject/amphtml/pulls/1178","_links":{"self":{"href":"https://api.github.com/repos/ampproject/amphtml/pulls/comments/48053964"},"html":{"href":"https://github.com/ampproject/amphtml/pull/1178#discussion_r48053964"},"pull_request":{"href":"https://api.github.com/repos/ampproject/amphtml/pulls/1178"}}},"pull_request":{"url":"https://api.github.com/repos/ampproject/amphtml/pulls/1178","id":53926257,"html_url":"https://github.com/ampproject/amphtml/pull/1178","diff_url":"https://github.com/ampproject/amphtml/pull/1178.diff","patch_url":"https://github.com/ampproject/amphtml/pull/1178.patch","issue_url":"https://api.github.com/repos/ampproject/amphtml/issues/1178","number":1178,"state":"open","locked":false,"title":"[WIP] feature(amp-user-notification): add amp-user-notification element.","user":{"login":"erwinmombay","id":354746,"avatar_url":"https://avatars.githubusercontent.com/u/354746?v=3","gravatar_id":"","url":"https://api.github.com/users/erwinmombay","html_url":"https://github.com/erwinmombay","followers_url":"https://api.github.com/users/erwinmombay/followers","following_url":"https://api.github.com/users/erwinmombay/following{/other_user}","gists_url":"https://api.github.com/users/erwinmombay/gists{/gist_id}","starred_url":"https://api.github.com/users/erwinmombay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erwinmombay/subscriptions","organizations_url":"https://api.github.com/users/erwinmombay/orgs","repos_url":"https://api.github.com/users/erwinmombay/repos","events_url":"https://api.github.com/users/erwinmombay/events{/privacy}","received_events_url":"https://api.github.com/users/erwinmombay/received_events","type":"User","site_admin":false},"body":"Closes https://github.com/ampproject/amphtml/issues/902","created_at":"2015-12-17T02:10:13Z","updated_at":"2015-12-18T18:26:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"61c63b5719dced0a175cc571ef789ed737ead9af","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ampproject/amphtml/pulls/1178/commits","review_comments_url":"https://api.github.com/repos/ampproject/amphtml/pulls/1178/comments","review_comment_url":"https://api.github.com/repos/ampproject/amphtml/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ampproject/amphtml/issues/1178/comments","statuses_url":"https://api.github.com/repos/ampproject/amphtml/statuses/069843e2ad0de3443ead86b810a25e5d0199db73","head":{"label":"erwinmombay:amp-notify","ref":"amp-notify","sha":"069843e2ad0de3443ead86b810a25e5d0199db73","user":{"login":"erwinmombay","id":354746,"avatar_url":"https://avatars.githubusercontent.com/u/354746?v=3","gravatar_id":"","url":"https://api.github.com/users/erwinmombay","html_url":"https://github.com/erwinmombay","followers_url":"https://api.github.com/users/erwinmombay/followers","following_url":"https://api.github.com/users/erwinmombay/following{/other_user}","gists_url":"https://api.github.com/users/erwinmombay/gists{/gist_id}","starred_url":"https://api.github.com/users/erwinmombay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erwinmombay/subscriptions","organizations_url":"https://api.github.com/users/erwinmombay/orgs","repos_url":"https://api.github.com/users/erwinmombay/repos","events_url":"https://api.github.com/users/erwinmombay/events{/privacy}","received_events_url":"https://api.github.com/users/erwinmombay/received_events","type":"User","site_admin":false},"repo":{"id":43843790,"name":"amphtml","full_name":"erwinmombay/amphtml","owner":{"login":"erwinmombay","id":354746,"avatar_url":"https://avatars.githubusercontent.com/u/354746?v=3","gravatar_id":"","url":"https://api.github.com/users/erwinmombay","html_url":"https://github.com/erwinmombay","followers_url":"https://api.github.com/users/erwinmombay/followers","following_url":"https://api.github.com/users/erwinmombay/following{/other_user}","gists_url":"https://api.github.com/users/erwinmombay/gists{/gist_id}","starred_url":"https://api.github.com/users/erwinmombay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erwinmombay/subscriptions","organizations_url":"https://api.github.com/users/erwinmombay/orgs","repos_url":"https://api.github.com/users/erwinmombay/repos","events_url":"https://api.github.com/users/erwinmombay/events{/privacy}","received_events_url":"https://api.github.com/users/erwinmombay/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/erwinmombay/amphtml","description":"","fork":true,"url":"https://api.github.com/repos/erwinmombay/amphtml","forks_url":"https://api.github.com/repos/erwinmombay/amphtml/forks","keys_url":"https://api.github.com/repos/erwinmombay/amphtml/keys{/key_id}","collaborators_url":"https://api.github.com/repos/erwinmombay/amphtml/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/erwinmombay/amphtml/teams","hooks_url":"https://api.github.com/repos/erwinmombay/amphtml/hooks","issue_events_url":"https://api.github.com/repos/erwinmombay/amphtml/issues/events{/number}","events_url":"https://api.github.com/repos/erwinmombay/amphtml/events","assignees_url":"https://api.github.com/repos/erwinmombay/amphtml/assignees{/user}","branches_url":"https://api.github.com/repos/erwinmombay/amphtml/branches{/branch}","tags_url":"https://api.github.com/repos/erwinmombay/amphtml/tags","blobs_url":"https://api.github.com/repos/erwinmombay/amphtml/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/erwinmombay/amphtml/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/erwinmombay/amphtml/git/refs{/sha}","trees_url":"https://api.github.com/repos/erwinmombay/amphtml/git/trees{/sha}","statuses_url":"https://api.github.com/repos/erwinmombay/amphtml/statuses/{sha}","languages_url":"https://api.github.com/repos/erwinmombay/amphtml/languages","stargazers_url":"https://api.github.com/repos/erwinmombay/amphtml/stargazers","contributors_url":"https://api.github.com/repos/erwinmombay/amphtml/contributors","subscribers_url":"https://api.github.com/repos/erwinmombay/amphtml/subscribers","subscription_url":"https://api.github.com/repos/erwinmombay/amphtml/subscription","commits_url":"https://api.github.com/repos/erwinmombay/amphtml/commits{/sha}","git_commits_url":"https://api.github.com/repos/erwinmombay/amphtml/git/commits{/sha}","comments_url":"https://api.github.com/repos/erwinmombay/amphtml/comments{/number}","issue_comment_url":"https://api.github.com/repos/erwinmombay/amphtml/issues/comments{/number}","contents_url":"https://api.github.com/repos/erwinmombay/amphtml/contents/{+path}","compare_url":"https://api.github.com/repos/erwinmombay/amphtml/compare/{base}...{head}","merges_url":"https://api.github.com/repos/erwinmombay/amphtml/merges","archive_url":"https://api.github.com/repos/erwinmombay/amphtml/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/erwinmombay/amphtml/downloads","issues_url":"https://api.github.com/repos/erwinmombay/amphtml/issues{/number}","pulls_url":"https://api.github.com/repos/erwinmombay/amphtml/pulls{/number}","milestones_url":"https://api.github.com/repos/erwinmombay/amphtml/milestones{/number}","notifications_url":"https://api.github.com/repos/erwinmombay/amphtml/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/erwinmombay/amphtml/labels{/name}","releases_url":"https://api.github.com/repos/erwinmombay/amphtml/releases{/id}","created_at":"2015-10-07T20:45:56Z","updated_at":"2015-10-07T20:45:57Z","pushed_at":"2015-12-18T18:22:33Z","git_url":"git://github.com/erwinmombay/amphtml.git","ssh_url":"git@github.com:erwinmombay/amphtml.git","clone_url":"https://github.com/erwinmombay/amphtml.git","svn_url":"https://github.com/erwinmombay/amphtml","homepage":"","size":14070,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ampproject:master","ref":"master","sha":"da89bab7c3401f4200d4c58166d5ca062f77e0c0","user":{"login":"ampproject","id":14114390,"avatar_url":"https://avatars.githubusercontent.com/u/14114390?v=3","gravatar_id":"","url":"https://api.github.com/users/ampproject","html_url":"https://github.com/ampproject","followers_url":"https://api.github.com/users/ampproject/followers","following_url":"https://api.github.com/users/ampproject/following{/other_user}","gists_url":"https://api.github.com/users/ampproject/gists{/gist_id}","starred_url":"https://api.github.com/users/ampproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ampproject/subscriptions","organizations_url":"https://api.github.com/users/ampproject/orgs","repos_url":"https://api.github.com/users/ampproject/repos","events_url":"https://api.github.com/users/ampproject/events{/privacy}","received_events_url":"https://api.github.com/users/ampproject/received_events","type":"Organization","site_admin":false},"repo":{"id":41766002,"name":"amphtml","full_name":"ampproject/amphtml","owner":{"login":"ampproject","id":14114390,"avatar_url":"https://avatars.githubusercontent.com/u/14114390?v=3","gravatar_id":"","url":"https://api.github.com/users/ampproject","html_url":"https://github.com/ampproject","followers_url":"https://api.github.com/users/ampproject/followers","following_url":"https://api.github.com/users/ampproject/following{/other_user}","gists_url":"https://api.github.com/users/ampproject/gists{/gist_id}","starred_url":"https://api.github.com/users/ampproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ampproject/subscriptions","organizations_url":"https://api.github.com/users/ampproject/orgs","repos_url":"https://api.github.com/users/ampproject/repos","events_url":"https://api.github.com/users/ampproject/events{/privacy}","received_events_url":"https://api.github.com/users/ampproject/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ampproject/amphtml","description":"AMP HTML source code, samples, and documentation.  See below for more info.","fork":false,"url":"https://api.github.com/repos/ampproject/amphtml","forks_url":"https://api.github.com/repos/ampproject/amphtml/forks","keys_url":"https://api.github.com/repos/ampproject/amphtml/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ampproject/amphtml/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ampproject/amphtml/teams","hooks_url":"https://api.github.com/repos/ampproject/amphtml/hooks","issue_events_url":"https://api.github.com/repos/ampproject/amphtml/issues/events{/number}","events_url":"https://api.github.com/repos/ampproject/amphtml/events","assignees_url":"https://api.github.com/repos/ampproject/amphtml/assignees{/user}","branches_url":"https://api.github.com/repos/ampproject/amphtml/branches{/branch}","tags_url":"https://api.github.com/repos/ampproject/amphtml/tags","blobs_url":"https://api.github.com/repos/ampproject/amphtml/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ampproject/amphtml/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ampproject/amphtml/git/refs{/sha}","trees_url":"https://api.github.com/repos/ampproject/amphtml/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ampproject/amphtml/statuses/{sha}","languages_url":"https://api.github.com/repos/ampproject/amphtml/languages","stargazers_url":"https://api.github.com/repos/ampproject/amphtml/stargazers","contributors_url":"https://api.github.com/repos/ampproject/amphtml/contributors","subscribers_url":"https://api.github.com/repos/ampproject/amphtml/subscribers","subscription_url":"https://api.github.com/repos/ampproject/amphtml/subscription","commits_url":"https://api.github.com/repos/ampproject/amphtml/commits{/sha}","git_commits_url":"https://api.github.com/repos/ampproject/amphtml/git/commits{/sha}","comments_url":"https://api.github.com/repos/ampproject/amphtml/comments{/number}","issue_comment_url":"https://api.github.com/repos/ampproject/amphtml/issues/comments{/number}","contents_url":"https://api.github.com/repos/ampproject/amphtml/contents/{+path}","compare_url":"https://api.github.com/repos/ampproject/amphtml/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ampproject/amphtml/merges","archive_url":"https://api.github.com/repos/ampproject/amphtml/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ampproject/amphtml/downloads","issues_url":"https://api.github.com/repos/ampproject/amphtml/issues{/number}","pulls_url":"https://api.github.com/repos/ampproject/amphtml/pulls{/number}","milestones_url":"https://api.github.com/repos/ampproject/amphtml/milestones{/number}","notifications_url":"https://api.github.com/repos/ampproject/amphtml/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ampproject/amphtml/labels{/name}","releases_url":"https://api.github.com/repos/ampproject/amphtml/releases{/id}","created_at":"2015-09-01T22:10:53Z","updated_at":"2015-12-18T18:10:04Z","pushed_at":"2015-12-18T18:22:33Z","git_url":"git://github.com/ampproject/amphtml.git","ssh_url":"git@github.com:ampproject/amphtml.git","clone_url":"https://github.com/ampproject/amphtml.git","svn_url":"https://github.com/ampproject/amphtml","homepage":"https://ampproject.org","size":15837,"stargazers_count":5072,"watchers_count":5072,"language":"JavaScript","has_issues":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":492,"mirror_url":null,"open_issues_count":178,"forks":492,"open_issues":178,"watchers":5072,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ampproject/amphtml/pulls/1178"},"html":{"href":"https://github.com/ampproject/amphtml/pull/1178"},"issue":{"href":"https://api.github.com/repos/ampproject/amphtml/issues/1178"},"comments":{"href":"https://api.github.com/repos/ampproject/amphtml/issues/1178/comments"},"review_comments":{"href":"https://api.github.com/repos/ampproject/amphtml/pulls/1178/comments"},"review_comment":{"href":"https://api.github.com/repos/ampproject/amphtml/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ampproject/amphtml/pulls/1178/commits"},"statuses":{"href":"https://api.github.com/repos/ampproject/amphtml/statuses/069843e2ad0de3443ead86b810a25e5d0199db73"}}}}