{"action":"created","comment":{"url":"https://api.github.com/repos/ampproject/amp-by-example/pulls/comments/207239415","pull_request_review_id":142809973,"id":207239415,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNzIzOTQxNQ==","diff_hunk":"@@ -0,0 +1,123 @@\n+<!---{\n+ \"preview\": \"amp4email\",\n+ \"skipValidation\": \"true\",\n+ \"draft\": \"true\"\n+}--->\n+<!--\n+## Introduction\n+\n+This sample showcases how to use AMPHTML email to create an email with a\n+short summary of an article, giving the user an ability to go to the website\n+to read more or bookmark it to their account for later reading.\n+-->\n+\n+<!-- -->\n+<!doctype html>\n+<html ⚡4email>\n+<head>\n+  <meta charset=\"utf-8\">\n+  <script async src=\"https://cdn.ampproject.org/v0.js\"></script>\n+  <style amp4email-boilerplate>body{visibility:hidden}</style>\n+  <title>AMPHTML Email - Article Bookmark</title>\n+  <!-- ## Setup -->\n+  <!--\n+    Additionally used AMP components must be imported in the header. We use\n+    `amp-form` to submit bookmark requests to the server.\n+  -->\n+  <script async custom-element=\"amp-form\" src=\"https://cdn.ampproject.org/v0/amp-form-0.1.js\"></script>\n+  <!--\n+    We use `amp-mustache` to render the result of a form submission.\n+  -->\n+  <script async custom-template=\"amp-mustache\" src=\"https://cdn.ampproject.org/v0/amp-mustache-0.2.js\"></script>\n+  <style amp-custom>\n+    h1 {\n+      margin-bottom: 1rem;\n+      letter-spacing: inherit;\n+      font-family: inherit;\n+      font-size: 1.5rem;\n+      line-height: 2rem;\n+    }\n+\n+    .buttons {\n+      display: flex;\n+    }\n+\n+    .bookmark {\n+      margin-left: 1rem;\n+      display: flex;\n+      align-items: center;\n+    }\n+\n+    .link {\n+      display: block;\n+    }\n+\n+    .bookmark form.amp-form-submit-success button {\n+      display: none;\n+    }\n+\n+    .bookmark form div[submit-error] {\n+      margin-top: .4em;\n+    }\n+  </style>\n+</head>\n+<!-- ## Body -->\n+<!-- -->\n+<body>\n+  <div class=\"article\">\n+    <!--\n+      We display a simple summary of the article in the email.\n+\t-->\n+    <div>\n+      <h1>Sample article</h1>\n+      <p>\n+        This is a short summary of a sample article. The user can choose to continue\n+        reading on the website or bookmark it to their account for later.\n+      </p>\n+    </div>\n+    <!--\n+      We show two buttons under the article:\n+      -   A \"read more\" button, which is a regular link to the article.\n+      -   A \"bookmark\" button, which sends a request to bookmark the article to the server asynchronously via `amp-form`.\n+    -->\n+    <div class=\"buttons\">\n+      <div>\n+        <a class=\"ampstart-btn link\" href=\"https://www.ampproject.org/docs/interaction_dynamic/amp-email-format\">Read more</a>\n+      </div>\n+      <div class=\"bookmark\">\n+        <form action-xhr=\"<%host%>/amphtml-email/submit-form-bookmark\" method=\"post\">\n+          <input type=\"hidden\"\n+                  name=\"id\"\n+                  value=\"ARTICLE_UNIQUE_ID\">\n+          <input type=\"hidden\"\n+                  name=\"auth_token\"\n+                  value=\"REPLACE_WITH_YOUR_TOKEN\">\n+\n+          <button type=\"submit\"\n+                  class=\"ampstart-btn submit-button\">\n+            Bookmark\n+          </button>\n+          <div class=\"pr2\" submit-success>\n+            <template type=\"amp-mustache\">\n+              {{result}}\n+            </template>\n+          </div>\n+          <div submit-error>An error occurred.</div>\n+        </form>\n+      </div>\n+    </div>\n+  </div>\n+</body>\n+\n+</html>\n+\n+<!--\n+  ## Server-side considerations\n+\n+  Because there is no authentication for outgoing XHR calls from AMP email\n+  messages, all authentication should be done using access tokens.\n+\n+  In the sample above, `REPLACE_WITH_YOUR_TOKEN` represents an access token.","path":"src/amphtml-email/20_Samples/Bookmark_Article_Email.html","position":120,"original_position":120,"commit_id":"2d85f6d053611043914f9918560aac52b739adc0","original_commit_id":"2d85f6d053611043914f9918560aac52b739adc0","user":{"login":"sebastianbenz","id":380472,"node_id":"MDQ6VXNlcjM4MDQ3Mg==","avatar_url":"https://avatars3.githubusercontent.com/u/380472?v=4","gravatar_id":"","url":"https://api.github.com/users/sebastianbenz","html_url":"https://github.com/sebastianbenz","followers_url":"https://api.github.com/users/sebastianbenz/followers","following_url":"https://api.github.com/users/sebastianbenz/following{/other_user}","gists_url":"https://api.github.com/users/sebastianbenz/gists{/gist_id}","starred_url":"https://api.github.com/users/sebastianbenz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sebastianbenz/subscriptions","organizations_url":"https://api.github.com/users/sebastianbenz/orgs","repos_url":"https://api.github.com/users/sebastianbenz/repos","events_url":"https://api.github.com/users/sebastianbenz/events{/privacy}","received_events_url":"https://api.github.com/users/sebastianbenz/received_events","type":"User","site_admin":false},"body":"This would be a good candidate for a hint in the code section.","created_at":"2018-08-02T14:08:02Z","updated_at":"2018-08-02T14:08:02Z","html_url":"https://github.com/ampproject/amp-by-example/pull/1423#discussion_r207239415","pull_request_url":"https://api.github.com/repos/ampproject/amp-by-example/pulls/1423","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/ampproject/amp-by-example/pulls/comments/207239415"},"html":{"href":"https://github.com/ampproject/amp-by-example/pull/1423#discussion_r207239415"},"pull_request":{"href":"https://api.github.com/repos/ampproject/amp-by-example/pulls/1423"}}},"pull_request":{"url":"https://api.github.com/repos/ampproject/amp-by-example/pulls/1423","id":205074650,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA1MDc0NjUw","html_url":"https://github.com/ampproject/amp-by-example/pull/1423","diff_url":"https://github.com/ampproject/amp-by-example/pull/1423.diff","patch_url":"https://github.com/ampproject/amp-by-example/pull/1423.patch","issue_url":"https://api.github.com/repos/ampproject/amp-by-example/issues/1423","number":1423,"state":"open","locked":false,"title":"Add sample for AMPHTML Email bookmarks in email","user":{"login":"fstanis","id":250887,"node_id":"MDQ6VXNlcjI1MDg4Nw==","avatar_url":"https://avatars3.githubusercontent.com/u/250887?v=4","gravatar_id":"","url":"https://api.github.com/users/fstanis","html_url":"https://github.com/fstanis","followers_url":"https://api.github.com/users/fstanis/followers","following_url":"https://api.github.com/users/fstanis/following{/other_user}","gists_url":"https://api.github.com/users/fstanis/gists{/gist_id}","starred_url":"https://api.github.com/users/fstanis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fstanis/subscriptions","organizations_url":"https://api.github.com/users/fstanis/orgs","repos_url":"https://api.github.com/users/fstanis/repos","events_url":"https://api.github.com/users/fstanis/events{/privacy}","received_events_url":"https://api.github.com/users/fstanis/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-07-31T11:02:44Z","updated_at":"2018-08-02T14:08:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"183a62f7fabb85586569b7560feb4862ee4efb58","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ampproject/amp-by-example/pulls/1423/commits","review_comments_url":"https://api.github.com/repos/ampproject/amp-by-example/pulls/1423/comments","review_comment_url":"https://api.github.com/repos/ampproject/amp-by-example/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ampproject/amp-by-example/issues/1423/comments","statuses_url":"https://api.github.com/repos/ampproject/amp-by-example/statuses/2d85f6d053611043914f9918560aac52b739adc0","head":{"label":"fstanis:bookmarks","ref":"bookmarks","sha":"2d85f6d053611043914f9918560aac52b739adc0","user":{"login":"fstanis","id":250887,"node_id":"MDQ6VXNlcjI1MDg4Nw==","avatar_url":"https://avatars3.githubusercontent.com/u/250887?v=4","gravatar_id":"","url":"https://api.github.com/users/fstanis","html_url":"https://github.com/fstanis","followers_url":"https://api.github.com/users/fstanis/followers","following_url":"https://api.github.com/users/fstanis/following{/other_user}","gists_url":"https://api.github.com/users/fstanis/gists{/gist_id}","starred_url":"https://api.github.com/users/fstanis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fstanis/subscriptions","organizations_url":"https://api.github.com/users/fstanis/orgs","repos_url":"https://api.github.com/users/fstanis/repos","events_url":"https://api.github.com/users/fstanis/events{/privacy}","received_events_url":"https://api.github.com/users/fstanis/received_events","type":"User","site_admin":false},"repo":{"id":133676000,"node_id":"MDEwOlJlcG9zaXRvcnkxMzM2NzYwMDA=","name":"amp-by-example","full_name":"fstanis/amp-by-example","owner":{"login":"fstanis","id":250887,"node_id":"MDQ6VXNlcjI1MDg4Nw==","avatar_url":"https://avatars3.githubusercontent.com/u/250887?v=4","gravatar_id":"","url":"https://api.github.com/users/fstanis","html_url":"https://github.com/fstanis","followers_url":"https://api.github.com/users/fstanis/followers","following_url":"https://api.github.com/users/fstanis/following{/other_user}","gists_url":"https://api.github.com/users/fstanis/gists{/gist_id}","starred_url":"https://api.github.com/users/fstanis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fstanis/subscriptions","organizations_url":"https://api.github.com/users/fstanis/orgs","repos_url":"https://api.github.com/users/fstanis/repos","events_url":"https://api.github.com/users/fstanis/events{/privacy}","received_events_url":"https://api.github.com/users/fstanis/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/fstanis/amp-by-example","description":"A hands-on introduction to Accelerated Mobile Pages (AMP) focusing on code and live samples.","fork":true,"url":"https://api.github.com/repos/fstanis/amp-by-example","forks_url":"https://api.github.com/repos/fstanis/amp-by-example/forks","keys_url":"https://api.github.com/repos/fstanis/amp-by-example/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fstanis/amp-by-example/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fstanis/amp-by-example/teams","hooks_url":"https://api.github.com/repos/fstanis/amp-by-example/hooks","issue_events_url":"https://api.github.com/repos/fstanis/amp-by-example/issues/events{/number}","events_url":"https://api.github.com/repos/fstanis/amp-by-example/events","assignees_url":"https://api.github.com/repos/fstanis/amp-by-example/assignees{/user}","branches_url":"https://api.github.com/repos/fstanis/amp-by-example/branches{/branch}","tags_url":"https://api.github.com/repos/fstanis/amp-by-example/tags","blobs_url":"https://api.github.com/repos/fstanis/amp-by-example/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fstanis/amp-by-example/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fstanis/amp-by-example/git/refs{/sha}","trees_url":"https://api.github.com/repos/fstanis/amp-by-example/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fstanis/amp-by-example/statuses/{sha}","languages_url":"https://api.github.com/repos/fstanis/amp-by-example/languages","stargazers_url":"https://api.github.com/repos/fstanis/amp-by-example/stargazers","contributors_url":"https://api.github.com/repos/fstanis/amp-by-example/contributors","subscribers_url":"https://api.github.com/repos/fstanis/amp-by-example/subscribers","subscription_url":"https://api.github.com/repos/fstanis/amp-by-example/subscription","commits_url":"https://api.github.com/repos/fstanis/amp-by-example/commits{/sha}","git_commits_url":"https://api.github.com/repos/fstanis/amp-by-example/git/commits{/sha}","comments_url":"https://api.github.com/repos/fstanis/amp-by-example/comments{/number}","issue_comment_url":"https://api.github.com/repos/fstanis/amp-by-example/issues/comments{/number}","contents_url":"https://api.github.com/repos/fstanis/amp-by-example/contents/{+path}","compare_url":"https://api.github.com/repos/fstanis/amp-by-example/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fstanis/amp-by-example/merges","archive_url":"https://api.github.com/repos/fstanis/amp-by-example/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fstanis/amp-by-example/downloads","issues_url":"https://api.github.com/repos/fstanis/amp-by-example/issues{/number}","pulls_url":"https://api.github.com/repos/fstanis/amp-by-example/pulls{/number}","milestones_url":"https://api.github.com/repos/fstanis/amp-by-example/milestones{/number}","notifications_url":"https://api.github.com/repos/fstanis/amp-by-example/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fstanis/amp-by-example/labels{/name}","releases_url":"https://api.github.com/repos/fstanis/amp-by-example/releases{/id}","deployments_url":"https://api.github.com/repos/fstanis/amp-by-example/deployments","created_at":"2018-05-16T14:13:32Z","updated_at":"2018-06-01T09:18:25Z","pushed_at":"2018-08-02T12:02:43Z","git_url":"git://github.com/fstanis/amp-by-example.git","ssh_url":"git@github.com:fstanis/amp-by-example.git","clone_url":"https://github.com/fstanis/amp-by-example.git","svn_url":"https://github.com/fstanis/amp-by-example","homepage":"http://ampbyexample.com/","size":225084,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"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":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ampproject:master","ref":"master","sha":"b2bcbaa37c8822b71c162008a79210a45fedcac8","user":{"login":"ampproject","id":14114390,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0MTE0Mzkw","avatar_url":"https://avatars3.githubusercontent.com/u/14114390?v=4","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":51327024,"node_id":"MDEwOlJlcG9zaXRvcnk1MTMyNzAyNA==","name":"amp-by-example","full_name":"ampproject/amp-by-example","owner":{"login":"ampproject","id":14114390,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0MTE0Mzkw","avatar_url":"https://avatars3.githubusercontent.com/u/14114390?v=4","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/amp-by-example","description":"A hands-on introduction to Accelerated Mobile Pages (AMP) focusing on code and live samples.","fork":false,"url":"https://api.github.com/repos/ampproject/amp-by-example","forks_url":"https://api.github.com/repos/ampproject/amp-by-example/forks","keys_url":"https://api.github.com/repos/ampproject/amp-by-example/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ampproject/amp-by-example/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ampproject/amp-by-example/teams","hooks_url":"https://api.github.com/repos/ampproject/amp-by-example/hooks","issue_events_url":"https://api.github.com/repos/ampproject/amp-by-example/issues/events{/number}","events_url":"https://api.github.com/repos/ampproject/amp-by-example/events","assignees_url":"https://api.github.com/repos/ampproject/amp-by-example/assignees{/user}","branches_url":"https://api.github.com/repos/ampproject/amp-by-example/branches{/branch}","tags_url":"https://api.github.com/repos/ampproject/amp-by-example/tags","blobs_url":"https://api.github.com/repos/ampproject/amp-by-example/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ampproject/amp-by-example/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ampproject/amp-by-example/git/refs{/sha}","trees_url":"https://api.github.com/repos/ampproject/amp-by-example/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ampproject/amp-by-example/statuses/{sha}","languages_url":"https://api.github.com/repos/ampproject/amp-by-example/languages","stargazers_url":"https://api.github.com/repos/ampproject/amp-by-example/stargazers","contributors_url":"https://api.github.com/repos/ampproject/amp-by-example/contributors","subscribers_url":"https://api.github.com/repos/ampproject/amp-by-example/subscribers","subscription_url":"https://api.github.com/repos/ampproject/amp-by-example/subscription","commits_url":"https://api.github.com/repos/ampproject/amp-by-example/commits{/sha}","git_commits_url":"https://api.github.com/repos/ampproject/amp-by-example/git/commits{/sha}","comments_url":"https://api.github.com/repos/ampproject/amp-by-example/comments{/number}","issue_comment_url":"https://api.github.com/repos/ampproject/amp-by-example/issues/comments{/number}","contents_url":"https://api.github.com/repos/ampproject/amp-by-example/contents/{+path}","compare_url":"https://api.github.com/repos/ampproject/amp-by-example/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ampproject/amp-by-example/merges","archive_url":"https://api.github.com/repos/ampproject/amp-by-example/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ampproject/amp-by-example/downloads","issues_url":"https://api.github.com/repos/ampproject/amp-by-example/issues{/number}","pulls_url":"https://api.github.com/repos/ampproject/amp-by-example/pulls{/number}","milestones_url":"https://api.github.com/repos/ampproject/amp-by-example/milestones{/number}","notifications_url":"https://api.github.com/repos/ampproject/amp-by-example/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ampproject/amp-by-example/labels{/name}","releases_url":"https://api.github.com/repos/ampproject/amp-by-example/releases{/id}","deployments_url":"https://api.github.com/repos/ampproject/amp-by-example/deployments","created_at":"2016-02-08T21:05:29Z","updated_at":"2018-08-02T12:31:25Z","pushed_at":"2018-08-02T12:31:23Z","git_url":"git://github.com/ampproject/amp-by-example.git","ssh_url":"git@github.com:ampproject/amp-by-example.git","clone_url":"https://github.com/ampproject/amp-by-example.git","svn_url":"https://github.com/ampproject/amp-by-example","homepage":"http://ampbyexample.com/","size":225116,"stargazers_count":655,"watchers_count":655,"language":"HTML","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":464,"mirror_url":null,"archived":false,"open_issues_count":125,"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":464,"open_issues":125,"watchers":655,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ampproject/amp-by-example/pulls/1423"},"html":{"href":"https://github.com/ampproject/amp-by-example/pull/1423"},"issue":{"href":"https://api.github.com/repos/ampproject/amp-by-example/issues/1423"},"comments":{"href":"https://api.github.com/repos/ampproject/amp-by-example/issues/1423/comments"},"review_comments":{"href":"https://api.github.com/repos/ampproject/amp-by-example/pulls/1423/comments"},"review_comment":{"href":"https://api.github.com/repos/ampproject/amp-by-example/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ampproject/amp-by-example/pulls/1423/commits"},"statuses":{"href":"https://api.github.com/repos/ampproject/amp-by-example/statuses/2d85f6d053611043914f9918560aac52b739adc0"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"sebastianbenz"}}