{"action":"created","comment":{"url":"https://api.github.com/repos/dhs-ncats/pshtt/pulls/comments/75572516","id":75572516,"diff_hunk":"@@ -481,6 +499,16 @@ def is_redirect(domain):\n         ))\n \n \n+# If a domain is a \"redirect domain\", where does it redirect to?\n+def redirects_to(domain):\n+    canonical = domain.canonical\n+\n+    if is_redirect(domain):\n+        return canonical.redirect_eventually_to\n+    else:\n+        return None","path":"pshtt.py","position":175,"original_position":175,"commit_id":"2a51c07492360d707f696339a77d4369abe35ba5","original_commit_id":"2a51c07492360d707f696339a77d4369abe35ba5","user":{"login":"konklone","id":4592,"avatar_url":"https://avatars.githubusercontent.com/u/4592?v=3","gravatar_id":"","url":"https://api.github.com/users/konklone","html_url":"https://github.com/konklone","followers_url":"https://api.github.com/users/konklone/followers","following_url":"https://api.github.com/users/konklone/following{/other_user}","gists_url":"https://api.github.com/users/konklone/gists{/gist_id}","starred_url":"https://api.github.com/users/konklone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/konklone/subscriptions","organizations_url":"https://api.github.com/users/konklone/orgs","repos_url":"https://api.github.com/users/konklone/repos","events_url":"https://api.github.com/users/konklone/events{/privacy}","received_events_url":"https://api.github.com/users/konklone/received_events","type":"User","site_admin":false},"body":"The `Redirect To` field is populated by whatever eventual redirect destination the domain's canonical endpoint uses. This is meant to surface what a \"redirect domain\" is intended to redirect users to.","created_at":"2016-08-20T04:30:26Z","updated_at":"2016-08-20T04:30:26Z","html_url":"https://github.com/dhs-ncats/pshtt/pull/16#discussion_r75572516","pull_request_url":"https://api.github.com/repos/dhs-ncats/pshtt/pulls/16","_links":{"self":{"href":"https://api.github.com/repos/dhs-ncats/pshtt/pulls/comments/75572516"},"html":{"href":"https://github.com/dhs-ncats/pshtt/pull/16#discussion_r75572516"},"pull_request":{"href":"https://api.github.com/repos/dhs-ncats/pshtt/pulls/16"}}},"pull_request":{"url":"https://api.github.com/repos/dhs-ncats/pshtt/pulls/16","id":82068506,"html_url":"https://github.com/dhs-ncats/pshtt/pull/16","diff_url":"https://github.com/dhs-ncats/pshtt/pull/16.diff","patch_url":"https://github.com/dhs-ncats/pshtt/pull/16.patch","issue_url":"https://api.github.com/repos/dhs-ncats/pshtt/issues/16","number":16,"state":"open","locked":false,"title":"Bug fixing, obtain close parity with Pulse's existing scans","user":{"login":"konklone","id":4592,"avatar_url":"https://avatars.githubusercontent.com/u/4592?v=3","gravatar_id":"","url":"https://api.github.com/users/konklone","html_url":"https://github.com/konklone","followers_url":"https://api.github.com/users/konklone/followers","following_url":"https://api.github.com/users/konklone/following{/other_user}","gists_url":"https://api.github.com/users/konklone/gists{/gist_id}","starred_url":"https://api.github.com/users/konklone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/konklone/subscriptions","organizations_url":"https://api.github.com/users/konklone/orgs","repos_url":"https://api.github.com/users/konklone/repos","events_url":"https://api.github.com/users/konklone/events{/privacy}","received_events_url":"https://api.github.com/users/konklone/received_events","type":"User","site_admin":false},"body":"This PR brings `pshtt` into \"close enough\" parity with the existing scans that take on [Pulse](https://pulse.cio.gov), which currently use [`site-inspector`](https://github.com/benbalter/site-inspector) v1.0.2.\r\n\r\nI'll comment inline on the PR with the changes that were made here. It was a lot of little paper cuts to fix regressions and mistakes that became obvious when comparing the output of `pshtt` and `site-inspector` on ~1,300 `.gov` domains. I used `domain-scan` (on [this open PR branch](https://github.com/18F/domain-scan/pull/76) to orchestrate `pshtt` and `site-inspector` in tandem and then compared the delta between the two in a spreadsheet viewer.\r\n\r\nOne notable change:\r\n\r\n* I added a `Redirect To` field, for parity with the current output of domain-scan's `inspect` scanner, which for \"redirect domains\" (domains where `Redirect` is true) contains the destination the domain redirects to.\r\n\r\nI plan to take the version of `pshtt` on this branch and integrate it into Pulse imminently, replacing the current `site-inspector` path.\r\n\r\ncc @garrettr @gbinal","created_at":"2016-08-20T04:22:40Z","updated_at":"2016-08-20T04:30:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"27f69a2d9289349bd11e607461a1dd3157db1bd8","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/dhs-ncats/pshtt/pulls/16/commits","review_comments_url":"https://api.github.com/repos/dhs-ncats/pshtt/pulls/16/comments","review_comment_url":"https://api.github.com/repos/dhs-ncats/pshtt/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dhs-ncats/pshtt/issues/16/comments","statuses_url":"https://api.github.com/repos/dhs-ncats/pshtt/statuses/2a51c07492360d707f696339a77d4369abe35ba5","head":{"label":"dhs-ncats:more-tweaks","ref":"more-tweaks","sha":"2a51c07492360d707f696339a77d4369abe35ba5","user":{"login":"dhs-ncats","id":18539691,"avatar_url":"https://avatars.githubusercontent.com/u/18539691?v=3","gravatar_id":"","url":"https://api.github.com/users/dhs-ncats","html_url":"https://github.com/dhs-ncats","followers_url":"https://api.github.com/users/dhs-ncats/followers","following_url":"https://api.github.com/users/dhs-ncats/following{/other_user}","gists_url":"https://api.github.com/users/dhs-ncats/gists{/gist_id}","starred_url":"https://api.github.com/users/dhs-ncats/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhs-ncats/subscriptions","organizations_url":"https://api.github.com/users/dhs-ncats/orgs","repos_url":"https://api.github.com/users/dhs-ncats/repos","events_url":"https://api.github.com/users/dhs-ncats/events{/privacy}","received_events_url":"https://api.github.com/users/dhs-ncats/received_events","type":"Organization","site_admin":false},"repo":{"id":62654497,"name":"pshtt","full_name":"dhs-ncats/pshtt","owner":{"login":"dhs-ncats","id":18539691,"avatar_url":"https://avatars.githubusercontent.com/u/18539691?v=3","gravatar_id":"","url":"https://api.github.com/users/dhs-ncats","html_url":"https://github.com/dhs-ncats","followers_url":"https://api.github.com/users/dhs-ncats/followers","following_url":"https://api.github.com/users/dhs-ncats/following{/other_user}","gists_url":"https://api.github.com/users/dhs-ncats/gists{/gist_id}","starred_url":"https://api.github.com/users/dhs-ncats/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhs-ncats/subscriptions","organizations_url":"https://api.github.com/users/dhs-ncats/orgs","repos_url":"https://api.github.com/users/dhs-ncats/repos","events_url":"https://api.github.com/users/dhs-ncats/events{/privacy}","received_events_url":"https://api.github.com/users/dhs-ncats/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dhs-ncats/pshtt","description":"Scan domains and return data based on HTTPS best practices","fork":false,"url":"https://api.github.com/repos/dhs-ncats/pshtt","forks_url":"https://api.github.com/repos/dhs-ncats/pshtt/forks","keys_url":"https://api.github.com/repos/dhs-ncats/pshtt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dhs-ncats/pshtt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dhs-ncats/pshtt/teams","hooks_url":"https://api.github.com/repos/dhs-ncats/pshtt/hooks","issue_events_url":"https://api.github.com/repos/dhs-ncats/pshtt/issues/events{/number}","events_url":"https://api.github.com/repos/dhs-ncats/pshtt/events","assignees_url":"https://api.github.com/repos/dhs-ncats/pshtt/assignees{/user}","branches_url":"https://api.github.com/repos/dhs-ncats/pshtt/branches{/branch}","tags_url":"https://api.github.com/repos/dhs-ncats/pshtt/tags","blobs_url":"https://api.github.com/repos/dhs-ncats/pshtt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dhs-ncats/pshtt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dhs-ncats/pshtt/git/refs{/sha}","trees_url":"https://api.github.com/repos/dhs-ncats/pshtt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dhs-ncats/pshtt/statuses/{sha}","languages_url":"https://api.github.com/repos/dhs-ncats/pshtt/languages","stargazers_url":"https://api.github.com/repos/dhs-ncats/pshtt/stargazers","contributors_url":"https://api.github.com/repos/dhs-ncats/pshtt/contributors","subscribers_url":"https://api.github.com/repos/dhs-ncats/pshtt/subscribers","subscription_url":"https://api.github.com/repos/dhs-ncats/pshtt/subscription","commits_url":"https://api.github.com/repos/dhs-ncats/pshtt/commits{/sha}","git_commits_url":"https://api.github.com/repos/dhs-ncats/pshtt/git/commits{/sha}","comments_url":"https://api.github.com/repos/dhs-ncats/pshtt/comments{/number}","issue_comment_url":"https://api.github.com/repos/dhs-ncats/pshtt/issues/comments{/number}","contents_url":"https://api.github.com/repos/dhs-ncats/pshtt/contents/{+path}","compare_url":"https://api.github.com/repos/dhs-ncats/pshtt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dhs-ncats/pshtt/merges","archive_url":"https://api.github.com/repos/dhs-ncats/pshtt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dhs-ncats/pshtt/downloads","issues_url":"https://api.github.com/repos/dhs-ncats/pshtt/issues{/number}","pulls_url":"https://api.github.com/repos/dhs-ncats/pshtt/pulls{/number}","milestones_url":"https://api.github.com/repos/dhs-ncats/pshtt/milestones{/number}","notifications_url":"https://api.github.com/repos/dhs-ncats/pshtt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dhs-ncats/pshtt/labels{/name}","releases_url":"https://api.github.com/repos/dhs-ncats/pshtt/releases{/id}","deployments_url":"https://api.github.com/repos/dhs-ncats/pshtt/deployments","created_at":"2016-07-05T17:02:18Z","updated_at":"2016-08-20T03:04:46Z","pushed_at":"2016-08-20T04:26:52Z","git_url":"git://github.com/dhs-ncats/pshtt.git","ssh_url":"git@github.com:dhs-ncats/pshtt.git","clone_url":"https://github.com/dhs-ncats/pshtt.git","svn_url":"https://github.com/dhs-ncats/pshtt","homepage":"","size":142,"stargazers_count":116,"watchers_count":116,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":6,"forks":5,"open_issues":6,"watchers":116,"default_branch":"master"}},"base":{"label":"dhs-ncats:master","ref":"master","sha":"9369cff0746a3032588559898d82bcf857f91dbd","user":{"login":"dhs-ncats","id":18539691,"avatar_url":"https://avatars.githubusercontent.com/u/18539691?v=3","gravatar_id":"","url":"https://api.github.com/users/dhs-ncats","html_url":"https://github.com/dhs-ncats","followers_url":"https://api.github.com/users/dhs-ncats/followers","following_url":"https://api.github.com/users/dhs-ncats/following{/other_user}","gists_url":"https://api.github.com/users/dhs-ncats/gists{/gist_id}","starred_url":"https://api.github.com/users/dhs-ncats/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhs-ncats/subscriptions","organizations_url":"https://api.github.com/users/dhs-ncats/orgs","repos_url":"https://api.github.com/users/dhs-ncats/repos","events_url":"https://api.github.com/users/dhs-ncats/events{/privacy}","received_events_url":"https://api.github.com/users/dhs-ncats/received_events","type":"Organization","site_admin":false},"repo":{"id":62654497,"name":"pshtt","full_name":"dhs-ncats/pshtt","owner":{"login":"dhs-ncats","id":18539691,"avatar_url":"https://avatars.githubusercontent.com/u/18539691?v=3","gravatar_id":"","url":"https://api.github.com/users/dhs-ncats","html_url":"https://github.com/dhs-ncats","followers_url":"https://api.github.com/users/dhs-ncats/followers","following_url":"https://api.github.com/users/dhs-ncats/following{/other_user}","gists_url":"https://api.github.com/users/dhs-ncats/gists{/gist_id}","starred_url":"https://api.github.com/users/dhs-ncats/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhs-ncats/subscriptions","organizations_url":"https://api.github.com/users/dhs-ncats/orgs","repos_url":"https://api.github.com/users/dhs-ncats/repos","events_url":"https://api.github.com/users/dhs-ncats/events{/privacy}","received_events_url":"https://api.github.com/users/dhs-ncats/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dhs-ncats/pshtt","description":"Scan domains and return data based on HTTPS best practices","fork":false,"url":"https://api.github.com/repos/dhs-ncats/pshtt","forks_url":"https://api.github.com/repos/dhs-ncats/pshtt/forks","keys_url":"https://api.github.com/repos/dhs-ncats/pshtt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dhs-ncats/pshtt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dhs-ncats/pshtt/teams","hooks_url":"https://api.github.com/repos/dhs-ncats/pshtt/hooks","issue_events_url":"https://api.github.com/repos/dhs-ncats/pshtt/issues/events{/number}","events_url":"https://api.github.com/repos/dhs-ncats/pshtt/events","assignees_url":"https://api.github.com/repos/dhs-ncats/pshtt/assignees{/user}","branches_url":"https://api.github.com/repos/dhs-ncats/pshtt/branches{/branch}","tags_url":"https://api.github.com/repos/dhs-ncats/pshtt/tags","blobs_url":"https://api.github.com/repos/dhs-ncats/pshtt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dhs-ncats/pshtt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dhs-ncats/pshtt/git/refs{/sha}","trees_url":"https://api.github.com/repos/dhs-ncats/pshtt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dhs-ncats/pshtt/statuses/{sha}","languages_url":"https://api.github.com/repos/dhs-ncats/pshtt/languages","stargazers_url":"https://api.github.com/repos/dhs-ncats/pshtt/stargazers","contributors_url":"https://api.github.com/repos/dhs-ncats/pshtt/contributors","subscribers_url":"https://api.github.com/repos/dhs-ncats/pshtt/subscribers","subscription_url":"https://api.github.com/repos/dhs-ncats/pshtt/subscription","commits_url":"https://api.github.com/repos/dhs-ncats/pshtt/commits{/sha}","git_commits_url":"https://api.github.com/repos/dhs-ncats/pshtt/git/commits{/sha}","comments_url":"https://api.github.com/repos/dhs-ncats/pshtt/comments{/number}","issue_comment_url":"https://api.github.com/repos/dhs-ncats/pshtt/issues/comments{/number}","contents_url":"https://api.github.com/repos/dhs-ncats/pshtt/contents/{+path}","compare_url":"https://api.github.com/repos/dhs-ncats/pshtt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dhs-ncats/pshtt/merges","archive_url":"https://api.github.com/repos/dhs-ncats/pshtt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dhs-ncats/pshtt/downloads","issues_url":"https://api.github.com/repos/dhs-ncats/pshtt/issues{/number}","pulls_url":"https://api.github.com/repos/dhs-ncats/pshtt/pulls{/number}","milestones_url":"https://api.github.com/repos/dhs-ncats/pshtt/milestones{/number}","notifications_url":"https://api.github.com/repos/dhs-ncats/pshtt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dhs-ncats/pshtt/labels{/name}","releases_url":"https://api.github.com/repos/dhs-ncats/pshtt/releases{/id}","deployments_url":"https://api.github.com/repos/dhs-ncats/pshtt/deployments","created_at":"2016-07-05T17:02:18Z","updated_at":"2016-08-20T03:04:46Z","pushed_at":"2016-08-20T04:26:52Z","git_url":"git://github.com/dhs-ncats/pshtt.git","ssh_url":"git@github.com:dhs-ncats/pshtt.git","clone_url":"https://github.com/dhs-ncats/pshtt.git","svn_url":"https://github.com/dhs-ncats/pshtt","homepage":"","size":142,"stargazers_count":116,"watchers_count":116,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":6,"forks":5,"open_issues":6,"watchers":116,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dhs-ncats/pshtt/pulls/16"},"html":{"href":"https://github.com/dhs-ncats/pshtt/pull/16"},"issue":{"href":"https://api.github.com/repos/dhs-ncats/pshtt/issues/16"},"comments":{"href":"https://api.github.com/repos/dhs-ncats/pshtt/issues/16/comments"},"review_comments":{"href":"https://api.github.com/repos/dhs-ncats/pshtt/pulls/16/comments"},"review_comment":{"href":"https://api.github.com/repos/dhs-ncats/pshtt/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dhs-ncats/pshtt/pulls/16/commits"},"statuses":{"href":"https://api.github.com/repos/dhs-ncats/pshtt/statuses/2a51c07492360d707f696339a77d4369abe35ba5"}}}}
{"actor":{"display_login":"konklone"}}