{"action":"created","comment":{"url":"https://api.github.com/repos/google/certificate-transparency/pulls/comments/41400642","id":41400642,"diff_hunk":"@@ -0,0 +1,73 @@\n+import datetime\n+import textwrap\n+import base64\n+\n+def _write_java_header(f, package):\n+    year = datetime.date.today().year\n+    f.write(\n+        \"/*\\n\"\n+        \" * Copyright (C) %(year)d The Android Open Source Project\\n\"\n+        \" *\\n\"\n+        \" * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n\"\n+        \" * you may not use this file except in compliance with the License.\\n\"\n+        \" * You may obtain a copy of the License at\\n\"\n+        \" *\\n\"\n+        \" *      http://www.apache.org/licenses/LICENSE-2.0\\n\"\n+        \" *\\n\"\n+        \" * Unless required by applicable law or agreed to in writing, software\\n\"\n+        \" * distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n\"\n+        \" * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n\"\n+        \" * See the License for the specific language governing permissions and\\n\"\n+        \" * limitations under the License.\\n\"\n+        \" */\\n\\n\"\n+        \"/* This file is generated by print_log_list.py\\n\"\n+        \" * https://github.com/google/certificate-transparency/blob/master/python/utilities/log_list/print_log_list.py */\\n\\n\"\n+        \"package %(package)s;\\n\\n\" %\n+        {\"year\": year,\n+         \"package\": package})\n+\n+def _encode_key(description, key):\n+    unsigned = (ord(c) for c in key)\n+    signed = (u - 256 if u > 127 else u for u in unsigned)\n+    return (\"        // \" + description + \"\\n\"\n+            \"        new byte[] {\\n\"\n+            + textwrap.fill(\", \".join(\"%d\" % s for s in signed), width=85,","path":"python/utilities/log_list/java_generator.py","position":34,"original_position":34,"commit_id":"9c8985c3b5459b14f8f68dfc0e334afdeb961145","original_commit_id":"9c8985c3b5459b14f8f68dfc0e334afdeb961145","user":{"login":"eranmes","id":1072163,"avatar_url":"https://avatars.githubusercontent.com/u/1072163?v=3","gravatar_id":"","url":"https://api.github.com/users/eranmes","html_url":"https://github.com/eranmes","followers_url":"https://api.github.com/users/eranmes/followers","following_url":"https://api.github.com/users/eranmes/following{/other_user}","gists_url":"https://api.github.com/users/eranmes/gists{/gist_id}","starred_url":"https://api.github.com/users/eranmes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eranmes/subscriptions","organizations_url":"https://api.github.com/users/eranmes/orgs","repos_url":"https://api.github.com/users/eranmes/repos","events_url":"https://api.github.com/users/eranmes/events{/privacy}","received_events_url":"https://api.github.com/users/eranmes/received_events","type":"User","site_admin":false},"body":"Could you assign the result from this call to a variable you'll include in the string generated here, so the code is slightly more readable?","created_at":"2015-10-07T14:58:30Z","updated_at":"2015-10-07T14:58:30Z","html_url":"https://github.com/google/certificate-transparency/pull/952#discussion_r41400642","pull_request_url":"https://api.github.com/repos/google/certificate-transparency/pulls/952","_links":{"self":{"href":"https://api.github.com/repos/google/certificate-transparency/pulls/comments/41400642"},"html":{"href":"https://github.com/google/certificate-transparency/pull/952#discussion_r41400642"},"pull_request":{"href":"https://api.github.com/repos/google/certificate-transparency/pulls/952"}}},"pull_request":{"url":"https://api.github.com/repos/google/certificate-transparency/pulls/952","id":45927760,"html_url":"https://github.com/google/certificate-transparency/pull/952","diff_url":"https://github.com/google/certificate-transparency/pull/952.diff","patch_url":"https://github.com/google/certificate-transparency/pull/952.patch","issue_url":"https://api.github.com/repos/google/certificate-transparency/issues/952","number":952,"state":"open","locked":false,"title":"Generate Java source file for Android from the list of logs.","user":{"login":"plietar","id":1489775,"avatar_url":"https://avatars.githubusercontent.com/u/1489775?v=3","gravatar_id":"","url":"https://api.github.com/users/plietar","html_url":"https://github.com/plietar","followers_url":"https://api.github.com/users/plietar/followers","following_url":"https://api.github.com/users/plietar/following{/other_user}","gists_url":"https://api.github.com/users/plietar/gists{/gist_id}","starred_url":"https://api.github.com/users/plietar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/plietar/subscriptions","organizations_url":"https://api.github.com/users/plietar/orgs","repos_url":"https://api.github.com/users/plietar/repos","events_url":"https://api.github.com/users/plietar/events{/privacy}","received_events_url":"https://api.github.com/users/plietar/received_events","type":"User","site_admin":false},"body":"This file will be included in conscrypt for Android","created_at":"2015-09-24T17:50:40Z","updated_at":"2015-10-07T14:58:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0ff02b4ea66061e2b46b19e7a6016b6b62d985ee","assignee":{"login":"eranmes","id":1072163,"avatar_url":"https://avatars.githubusercontent.com/u/1072163?v=3","gravatar_id":"","url":"https://api.github.com/users/eranmes","html_url":"https://github.com/eranmes","followers_url":"https://api.github.com/users/eranmes/followers","following_url":"https://api.github.com/users/eranmes/following{/other_user}","gists_url":"https://api.github.com/users/eranmes/gists{/gist_id}","starred_url":"https://api.github.com/users/eranmes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eranmes/subscriptions","organizations_url":"https://api.github.com/users/eranmes/orgs","repos_url":"https://api.github.com/users/eranmes/repos","events_url":"https://api.github.com/users/eranmes/events{/privacy}","received_events_url":"https://api.github.com/users/eranmes/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/google/certificate-transparency/pulls/952/commits","review_comments_url":"https://api.github.com/repos/google/certificate-transparency/pulls/952/comments","review_comment_url":"https://api.github.com/repos/google/certificate-transparency/pulls/comments{/number}","comments_url":"https://api.github.com/repos/google/certificate-transparency/issues/952/comments","statuses_url":"https://api.github.com/repos/google/certificate-transparency/statuses/9c8985c3b5459b14f8f68dfc0e334afdeb961145","head":{"label":"plietar:android-log-file","ref":"android-log-file","sha":"9c8985c3b5459b14f8f68dfc0e334afdeb961145","user":{"login":"plietar","id":1489775,"avatar_url":"https://avatars.githubusercontent.com/u/1489775?v=3","gravatar_id":"","url":"https://api.github.com/users/plietar","html_url":"https://github.com/plietar","followers_url":"https://api.github.com/users/plietar/followers","following_url":"https://api.github.com/users/plietar/following{/other_user}","gists_url":"https://api.github.com/users/plietar/gists{/gist_id}","starred_url":"https://api.github.com/users/plietar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/plietar/subscriptions","organizations_url":"https://api.github.com/users/plietar/orgs","repos_url":"https://api.github.com/users/plietar/repos","events_url":"https://api.github.com/users/plietar/events{/privacy}","received_events_url":"https://api.github.com/users/plietar/received_events","type":"User","site_admin":false},"repo":{"id":38747113,"name":"certificate-transparency","full_name":"plietar/certificate-transparency","owner":{"login":"plietar","id":1489775,"avatar_url":"https://avatars.githubusercontent.com/u/1489775?v=3","gravatar_id":"","url":"https://api.github.com/users/plietar","html_url":"https://github.com/plietar","followers_url":"https://api.github.com/users/plietar/followers","following_url":"https://api.github.com/users/plietar/following{/other_user}","gists_url":"https://api.github.com/users/plietar/gists{/gist_id}","starred_url":"https://api.github.com/users/plietar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/plietar/subscriptions","organizations_url":"https://api.github.com/users/plietar/orgs","repos_url":"https://api.github.com/users/plietar/repos","events_url":"https://api.github.com/users/plietar/events{/privacy}","received_events_url":"https://api.github.com/users/plietar/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/plietar/certificate-transparency","description":"Auditing for TLS certificates.","fork":true,"url":"https://api.github.com/repos/plietar/certificate-transparency","forks_url":"https://api.github.com/repos/plietar/certificate-transparency/forks","keys_url":"https://api.github.com/repos/plietar/certificate-transparency/keys{/key_id}","collaborators_url":"https://api.github.com/repos/plietar/certificate-transparency/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/plietar/certificate-transparency/teams","hooks_url":"https://api.github.com/repos/plietar/certificate-transparency/hooks","issue_events_url":"https://api.github.com/repos/plietar/certificate-transparency/issues/events{/number}","events_url":"https://api.github.com/repos/plietar/certificate-transparency/events","assignees_url":"https://api.github.com/repos/plietar/certificate-transparency/assignees{/user}","branches_url":"https://api.github.com/repos/plietar/certificate-transparency/branches{/branch}","tags_url":"https://api.github.com/repos/plietar/certificate-transparency/tags","blobs_url":"https://api.github.com/repos/plietar/certificate-transparency/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/plietar/certificate-transparency/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/plietar/certificate-transparency/git/refs{/sha}","trees_url":"https://api.github.com/repos/plietar/certificate-transparency/git/trees{/sha}","statuses_url":"https://api.github.com/repos/plietar/certificate-transparency/statuses/{sha}","languages_url":"https://api.github.com/repos/plietar/certificate-transparency/languages","stargazers_url":"https://api.github.com/repos/plietar/certificate-transparency/stargazers","contributors_url":"https://api.github.com/repos/plietar/certificate-transparency/contributors","subscribers_url":"https://api.github.com/repos/plietar/certificate-transparency/subscribers","subscription_url":"https://api.github.com/repos/plietar/certificate-transparency/subscription","commits_url":"https://api.github.com/repos/plietar/certificate-transparency/commits{/sha}","git_commits_url":"https://api.github.com/repos/plietar/certificate-transparency/git/commits{/sha}","comments_url":"https://api.github.com/repos/plietar/certificate-transparency/comments{/number}","issue_comment_url":"https://api.github.com/repos/plietar/certificate-transparency/issues/comments{/number}","contents_url":"https://api.github.com/repos/plietar/certificate-transparency/contents/{+path}","compare_url":"https://api.github.com/repos/plietar/certificate-transparency/compare/{base}...{head}","merges_url":"https://api.github.com/repos/plietar/certificate-transparency/merges","archive_url":"https://api.github.com/repos/plietar/certificate-transparency/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/plietar/certificate-transparency/downloads","issues_url":"https://api.github.com/repos/plietar/certificate-transparency/issues{/number}","pulls_url":"https://api.github.com/repos/plietar/certificate-transparency/pulls{/number}","milestones_url":"https://api.github.com/repos/plietar/certificate-transparency/milestones{/number}","notifications_url":"https://api.github.com/repos/plietar/certificate-transparency/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/plietar/certificate-transparency/labels{/name}","releases_url":"https://api.github.com/repos/plietar/certificate-transparency/releases{/id}","created_at":"2015-07-08T10:17:07Z","updated_at":"2015-07-08T10:17:08Z","pushed_at":"2015-09-25T14:53:51Z","git_url":"git://github.com/plietar/certificate-transparency.git","ssh_url":"git@github.com:plietar/certificate-transparency.git","clone_url":"https://github.com/plietar/certificate-transparency.git","svn_url":"https://github.com/plietar/certificate-transparency","homepage":"http://www.certificate-transparency.org/","size":19450,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"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":"google:master","ref":"master","sha":"a92aa37f15327c50730c4c616463c3591f8852ef","user":{"login":"google","id":1342004,"avatar_url":"https://avatars.githubusercontent.com/u/1342004?v=3","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"repo":{"id":19989605,"name":"certificate-transparency","full_name":"google/certificate-transparency","owner":{"login":"google","id":1342004,"avatar_url":"https://avatars.githubusercontent.com/u/1342004?v=3","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/google/certificate-transparency","description":"Auditing for TLS certificates.","fork":false,"url":"https://api.github.com/repos/google/certificate-transparency","forks_url":"https://api.github.com/repos/google/certificate-transparency/forks","keys_url":"https://api.github.com/repos/google/certificate-transparency/keys{/key_id}","collaborators_url":"https://api.github.com/repos/google/certificate-transparency/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/google/certificate-transparency/teams","hooks_url":"https://api.github.com/repos/google/certificate-transparency/hooks","issue_events_url":"https://api.github.com/repos/google/certificate-transparency/issues/events{/number}","events_url":"https://api.github.com/repos/google/certificate-transparency/events","assignees_url":"https://api.github.com/repos/google/certificate-transparency/assignees{/user}","branches_url":"https://api.github.com/repos/google/certificate-transparency/branches{/branch}","tags_url":"https://api.github.com/repos/google/certificate-transparency/tags","blobs_url":"https://api.github.com/repos/google/certificate-transparency/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/google/certificate-transparency/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/google/certificate-transparency/git/refs{/sha}","trees_url":"https://api.github.com/repos/google/certificate-transparency/git/trees{/sha}","statuses_url":"https://api.github.com/repos/google/certificate-transparency/statuses/{sha}","languages_url":"https://api.github.com/repos/google/certificate-transparency/languages","stargazers_url":"https://api.github.com/repos/google/certificate-transparency/stargazers","contributors_url":"https://api.github.com/repos/google/certificate-transparency/contributors","subscribers_url":"https://api.github.com/repos/google/certificate-transparency/subscribers","subscription_url":"https://api.github.com/repos/google/certificate-transparency/subscription","commits_url":"https://api.github.com/repos/google/certificate-transparency/commits{/sha}","git_commits_url":"https://api.github.com/repos/google/certificate-transparency/git/commits{/sha}","comments_url":"https://api.github.com/repos/google/certificate-transparency/comments{/number}","issue_comment_url":"https://api.github.com/repos/google/certificate-transparency/issues/comments{/number}","contents_url":"https://api.github.com/repos/google/certificate-transparency/contents/{+path}","compare_url":"https://api.github.com/repos/google/certificate-transparency/compare/{base}...{head}","merges_url":"https://api.github.com/repos/google/certificate-transparency/merges","archive_url":"https://api.github.com/repos/google/certificate-transparency/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/google/certificate-transparency/downloads","issues_url":"https://api.github.com/repos/google/certificate-transparency/issues{/number}","pulls_url":"https://api.github.com/repos/google/certificate-transparency/pulls{/number}","milestones_url":"https://api.github.com/repos/google/certificate-transparency/milestones{/number}","notifications_url":"https://api.github.com/repos/google/certificate-transparency/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/google/certificate-transparency/labels{/name}","releases_url":"https://api.github.com/repos/google/certificate-transparency/releases{/id}","created_at":"2014-05-20T17:03:47Z","updated_at":"2015-10-03T14:35:32Z","pushed_at":"2015-10-07T14:51:29Z","git_url":"git://github.com/google/certificate-transparency.git","ssh_url":"git@github.com:google/certificate-transparency.git","clone_url":"https://github.com/google/certificate-transparency.git","svn_url":"https://github.com/google/certificate-transparency","homepage":"http://www.certificate-transparency.org/","size":26459,"stargazers_count":177,"watchers_count":177,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":62,"mirror_url":null,"open_issues_count":58,"forks":62,"open_issues":58,"watchers":177,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/google/certificate-transparency/pulls/952"},"html":{"href":"https://github.com/google/certificate-transparency/pull/952"},"issue":{"href":"https://api.github.com/repos/google/certificate-transparency/issues/952"},"comments":{"href":"https://api.github.com/repos/google/certificate-transparency/issues/952/comments"},"review_comments":{"href":"https://api.github.com/repos/google/certificate-transparency/pulls/952/comments"},"review_comment":{"href":"https://api.github.com/repos/google/certificate-transparency/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/google/certificate-transparency/pulls/952/commits"},"statuses":{"href":"https://api.github.com/repos/google/certificate-transparency/statuses/9c8985c3b5459b14f8f68dfc0e334afdeb961145"}}}}