{"action":"created","comment":{"url":"https://api.github.com/repos/alphagov/document-download-api/pulls/comments/197126487","pull_request_review_id":130806591,"id":197126487,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NzEyNjQ4Nw==","diff_hunk":"@@ -1,20 +1,13 @@\n-from urllib.parse import urlsplit, urlunsplit\n-from flask import current_app, url_for\n+from urllib.parse import urlunsplit, urlencode\n \n+from flask import current_app\n+from notifications_utils.base64_uuid import bytes_to_base64, uuid_to_base64\n \n-def get_document_download_url(service_id, document_id, key):","path":"app/utils/urls.py","position":8,"original_position":8,"commit_id":"78a1949ee2df93791d0a5806019f320e16fb72c8","original_commit_id":"78a1949ee2df93791d0a5806019f320e16fb72c8","user":{"login":"allait","id":246664,"node_id":"MDQ6VXNlcjI0NjY2NA==","avatar_url":"https://avatars2.githubusercontent.com/u/246664?v=4","gravatar_id":"","url":"https://api.github.com/users/allait","html_url":"https://github.com/allait","followers_url":"https://api.github.com/users/allait/followers","following_url":"https://api.github.com/users/allait/following{/other_user}","gists_url":"https://api.github.com/users/allait/gists{/gist_id}","starred_url":"https://api.github.com/users/allait/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/allait/subscriptions","organizations_url":"https://api.github.com/users/allait/orgs","repos_url":"https://api.github.com/users/allait/repos","events_url":"https://api.github.com/users/allait/events{/privacy}","received_events_url":"https://api.github.com/users/allait/received_events","type":"User","site_admin":false},"body":"I think maybe we should keep this function as well and add the \"api_url\" to the response","created_at":"2018-06-21T13:11:34Z","updated_at":"2018-06-21T13:15:12Z","html_url":"https://github.com/alphagov/document-download-api/pull/13#discussion_r197126487","pull_request_url":"https://api.github.com/repos/alphagov/document-download-api/pulls/13","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/alphagov/document-download-api/pulls/comments/197126487"},"html":{"href":"https://github.com/alphagov/document-download-api/pull/13#discussion_r197126487"},"pull_request":{"href":"https://api.github.com/repos/alphagov/document-download-api/pulls/13"}}},"pull_request":{"url":"https://api.github.com/repos/alphagov/document-download-api/pulls/13","id":194602505,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk0NjAyNTA1","html_url":"https://github.com/alphagov/document-download-api/pull/13","diff_url":"https://github.com/alphagov/document-download-api/pull/13.diff","patch_url":"https://github.com/alphagov/document-download-api/pull/13.patch","issue_url":"https://api.github.com/repos/alphagov/document-download-api/issues/13","number":13,"state":"open","locked":false,"title":"Shorter urls","user":{"login":"leohemsted","id":5020841,"node_id":"MDQ6VXNlcjUwMjA4NDE=","avatar_url":"https://avatars2.githubusercontent.com/u/5020841?v=4","gravatar_id":"","url":"https://api.github.com/users/leohemsted","html_url":"https://github.com/leohemsted","followers_url":"https://api.github.com/users/leohemsted/followers","following_url":"https://api.github.com/users/leohemsted/following{/other_user}","gists_url":"https://api.github.com/users/leohemsted/gists{/gist_id}","starred_url":"https://api.github.com/users/leohemsted/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leohemsted/subscriptions","organizations_url":"https://api.github.com/users/leohemsted/orgs","repos_url":"https://api.github.com/users/leohemsted/repos","events_url":"https://api.github.com/users/leohemsted/events{/privacy}","received_events_url":"https://api.github.com/users/leohemsted/received_events","type":"User","site_admin":false},"body":"### THE OLD: 207 characters\r\n\r\n`https://download.notifications.service.gov.uk/services/3e1ed7ea-8a05-4b4e-93ec-d7bebfea6cae/documents/33389ce1-d118-424b-8cd4-53c5d50c721d?key=05733e123ab2a9c76a395da33b6c02c10460bd7abb8054369ea34ae9131e14a5`\r\n\r\n### THE NEW: 141 characters\r\n`https://download.notifications.service.gov.uk/d/Ph7X6ooFS06T7Ne-v-psrg/w0yBUDbKTjixb82geNFPjg?key=4ohtWL3rzOdIOgL4IZMU9Io75EjigQ13hle9ptOzLGw`","created_at":"2018-06-13T14:17:52Z","updated_at":"2018-06-21T13:15:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"349172fcf1ef2f121e16f43147d33bea94d35cc8","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/alphagov/document-download-api/pulls/13/commits","review_comments_url":"https://api.github.com/repos/alphagov/document-download-api/pulls/13/comments","review_comment_url":"https://api.github.com/repos/alphagov/document-download-api/pulls/comments{/number}","comments_url":"https://api.github.com/repos/alphagov/document-download-api/issues/13/comments","statuses_url":"https://api.github.com/repos/alphagov/document-download-api/statuses/78a1949ee2df93791d0a5806019f320e16fb72c8","head":{"label":"alphagov:shorter-urls","ref":"shorter-urls","sha":"78a1949ee2df93791d0a5806019f320e16fb72c8","user":{"login":"alphagov","id":596977,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU5Njk3Nw==","avatar_url":"https://avatars0.githubusercontent.com/u/596977?v=4","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"repo":{"id":121386847,"node_id":"MDEwOlJlcG9zaXRvcnkxMjEzODY4NDc=","name":"document-download-api","full_name":"alphagov/document-download-api","owner":{"login":"alphagov","id":596977,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU5Njk3Nw==","avatar_url":"https://avatars0.githubusercontent.com/u/596977?v=4","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/alphagov/document-download-api","description":"Document Download API","fork":false,"url":"https://api.github.com/repos/alphagov/document-download-api","forks_url":"https://api.github.com/repos/alphagov/document-download-api/forks","keys_url":"https://api.github.com/repos/alphagov/document-download-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alphagov/document-download-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alphagov/document-download-api/teams","hooks_url":"https://api.github.com/repos/alphagov/document-download-api/hooks","issue_events_url":"https://api.github.com/repos/alphagov/document-download-api/issues/events{/number}","events_url":"https://api.github.com/repos/alphagov/document-download-api/events","assignees_url":"https://api.github.com/repos/alphagov/document-download-api/assignees{/user}","branches_url":"https://api.github.com/repos/alphagov/document-download-api/branches{/branch}","tags_url":"https://api.github.com/repos/alphagov/document-download-api/tags","blobs_url":"https://api.github.com/repos/alphagov/document-download-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alphagov/document-download-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alphagov/document-download-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/alphagov/document-download-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alphagov/document-download-api/statuses/{sha}","languages_url":"https://api.github.com/repos/alphagov/document-download-api/languages","stargazers_url":"https://api.github.com/repos/alphagov/document-download-api/stargazers","contributors_url":"https://api.github.com/repos/alphagov/document-download-api/contributors","subscribers_url":"https://api.github.com/repos/alphagov/document-download-api/subscribers","subscription_url":"https://api.github.com/repos/alphagov/document-download-api/subscription","commits_url":"https://api.github.com/repos/alphagov/document-download-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/alphagov/document-download-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/alphagov/document-download-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/alphagov/document-download-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/alphagov/document-download-api/contents/{+path}","compare_url":"https://api.github.com/repos/alphagov/document-download-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alphagov/document-download-api/merges","archive_url":"https://api.github.com/repos/alphagov/document-download-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alphagov/document-download-api/downloads","issues_url":"https://api.github.com/repos/alphagov/document-download-api/issues{/number}","pulls_url":"https://api.github.com/repos/alphagov/document-download-api/pulls{/number}","milestones_url":"https://api.github.com/repos/alphagov/document-download-api/milestones{/number}","notifications_url":"https://api.github.com/repos/alphagov/document-download-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alphagov/document-download-api/labels{/name}","releases_url":"https://api.github.com/repos/alphagov/document-download-api/releases{/id}","deployments_url":"https://api.github.com/repos/alphagov/document-download-api/deployments","created_at":"2018-02-13T13:40:30Z","updated_at":"2018-06-19T10:43:05Z","pushed_at":"2018-06-21T10:42:03Z","git_url":"git://github.com/alphagov/document-download-api.git","ssh_url":"git@github.com:alphagov/document-download-api.git","clone_url":"https://github.com/alphagov/document-download-api.git","svn_url":"https://github.com/alphagov/document-download-api","homepage":null,"size":61,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"alphagov:master","ref":"master","sha":"06a80fc93244d06fb1d09f3ed130d584c405f00e","user":{"login":"alphagov","id":596977,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU5Njk3Nw==","avatar_url":"https://avatars0.githubusercontent.com/u/596977?v=4","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"repo":{"id":121386847,"node_id":"MDEwOlJlcG9zaXRvcnkxMjEzODY4NDc=","name":"document-download-api","full_name":"alphagov/document-download-api","owner":{"login":"alphagov","id":596977,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU5Njk3Nw==","avatar_url":"https://avatars0.githubusercontent.com/u/596977?v=4","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/alphagov/document-download-api","description":"Document Download API","fork":false,"url":"https://api.github.com/repos/alphagov/document-download-api","forks_url":"https://api.github.com/repos/alphagov/document-download-api/forks","keys_url":"https://api.github.com/repos/alphagov/document-download-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alphagov/document-download-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alphagov/document-download-api/teams","hooks_url":"https://api.github.com/repos/alphagov/document-download-api/hooks","issue_events_url":"https://api.github.com/repos/alphagov/document-download-api/issues/events{/number}","events_url":"https://api.github.com/repos/alphagov/document-download-api/events","assignees_url":"https://api.github.com/repos/alphagov/document-download-api/assignees{/user}","branches_url":"https://api.github.com/repos/alphagov/document-download-api/branches{/branch}","tags_url":"https://api.github.com/repos/alphagov/document-download-api/tags","blobs_url":"https://api.github.com/repos/alphagov/document-download-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alphagov/document-download-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alphagov/document-download-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/alphagov/document-download-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alphagov/document-download-api/statuses/{sha}","languages_url":"https://api.github.com/repos/alphagov/document-download-api/languages","stargazers_url":"https://api.github.com/repos/alphagov/document-download-api/stargazers","contributors_url":"https://api.github.com/repos/alphagov/document-download-api/contributors","subscribers_url":"https://api.github.com/repos/alphagov/document-download-api/subscribers","subscription_url":"https://api.github.com/repos/alphagov/document-download-api/subscription","commits_url":"https://api.github.com/repos/alphagov/document-download-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/alphagov/document-download-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/alphagov/document-download-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/alphagov/document-download-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/alphagov/document-download-api/contents/{+path}","compare_url":"https://api.github.com/repos/alphagov/document-download-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alphagov/document-download-api/merges","archive_url":"https://api.github.com/repos/alphagov/document-download-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alphagov/document-download-api/downloads","issues_url":"https://api.github.com/repos/alphagov/document-download-api/issues{/number}","pulls_url":"https://api.github.com/repos/alphagov/document-download-api/pulls{/number}","milestones_url":"https://api.github.com/repos/alphagov/document-download-api/milestones{/number}","notifications_url":"https://api.github.com/repos/alphagov/document-download-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alphagov/document-download-api/labels{/name}","releases_url":"https://api.github.com/repos/alphagov/document-download-api/releases{/id}","deployments_url":"https://api.github.com/repos/alphagov/document-download-api/deployments","created_at":"2018-02-13T13:40:30Z","updated_at":"2018-06-19T10:43:05Z","pushed_at":"2018-06-21T10:42:03Z","git_url":"git://github.com/alphagov/document-download-api.git","ssh_url":"git@github.com:alphagov/document-download-api.git","clone_url":"https://github.com/alphagov/document-download-api.git","svn_url":"https://github.com/alphagov/document-download-api","homepage":null,"size":61,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/alphagov/document-download-api/pulls/13"},"html":{"href":"https://github.com/alphagov/document-download-api/pull/13"},"issue":{"href":"https://api.github.com/repos/alphagov/document-download-api/issues/13"},"comments":{"href":"https://api.github.com/repos/alphagov/document-download-api/issues/13/comments"},"review_comments":{"href":"https://api.github.com/repos/alphagov/document-download-api/pulls/13/comments"},"review_comment":{"href":"https://api.github.com/repos/alphagov/document-download-api/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/alphagov/document-download-api/pulls/13/commits"},"statuses":{"href":"https://api.github.com/repos/alphagov/document-download-api/statuses/78a1949ee2df93791d0a5806019f320e16fb72c8"}},"author_association":"NONE"}}
{"actor":{"display_login":"allait"}}