{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/pulls/comments/186448350","pull_request_review_id":118027015,"id":186448350,"diff_hunk":"@@ -65,24 +79,35 @@ public struct ExtensionUtils {\n             }\n         }\n \n+        // See if the text is URL-like enough to be an url, in particular, check if it has a valid TLD.\n+        func textToUrl(_ text: String) -> URL? {","path":"Storage/ExtensionUtils.swift","position":42,"original_position":42,"commit_id":"36d1f31c4e174b9e34d8bb2ee36d5afeca34d137","original_commit_id":"36d1f31c4e174b9e34d8bb2ee36d5afeca34d137","user":{"login":"garvankeeley","id":5495083,"avatar_url":"https://avatars1.githubusercontent.com/u/5495083?v=4","gravatar_id":"","url":"https://api.github.com/users/garvankeeley","html_url":"https://github.com/garvankeeley","followers_url":"https://api.github.com/users/garvankeeley/followers","following_url":"https://api.github.com/users/garvankeeley/following{/other_user}","gists_url":"https://api.github.com/users/garvankeeley/gists{/gist_id}","starred_url":"https://api.github.com/users/garvankeeley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garvankeeley/subscriptions","organizations_url":"https://api.github.com/users/garvankeeley/orgs","repos_url":"https://api.github.com/users/garvankeeley/repos","events_url":"https://api.github.com/users/garvankeeley/events{/privacy}","received_events_url":"https://api.github.com/users/garvankeeley/received_events","type":"User","site_admin":false},"body":"Adds fuzzy logic to see if selection is URL-like and has a TLD, if so treat it as an URL (which provides more options in the share dialog).","created_at":"2018-05-07T14:53:49Z","updated_at":"2018-05-07T14:53:49Z","html_url":"https://github.com/mozilla-mobile/firefox-ios/pull/3902#discussion_r186448350","pull_request_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/pulls/3902","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/mozilla-mobile/firefox-ios/pulls/comments/186448350"},"html":{"href":"https://github.com/mozilla-mobile/firefox-ios/pull/3902#discussion_r186448350"},"pull_request":{"href":"https://api.github.com/repos/mozilla-mobile/firefox-ios/pulls/3902"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/pulls/3902","id":186371761,"html_url":"https://github.com/mozilla-mobile/firefox-ios/pull/3902","diff_url":"https://github.com/mozilla-mobile/firefox-ios/pull/3902.diff","patch_url":"https://github.com/mozilla-mobile/firefox-ios/pull/3902.patch","issue_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/issues/3902","number":3902,"state":"open","locked":false,"title":"Bug 1457464 - Share Extension: handle raw text, perform search","user":{"login":"garvankeeley","id":5495083,"avatar_url":"https://avatars1.githubusercontent.com/u/5495083?v=4","gravatar_id":"","url":"https://api.github.com/users/garvankeeley","html_url":"https://github.com/garvankeeley","followers_url":"https://api.github.com/users/garvankeeley/followers","following_url":"https://api.github.com/users/garvankeeley/following{/other_user}","gists_url":"https://api.github.com/users/garvankeeley/gists{/gist_id}","starred_url":"https://api.github.com/users/garvankeeley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garvankeeley/subscriptions","organizations_url":"https://api.github.com/users/garvankeeley/orgs","repos_url":"https://api.github.com/users/garvankeeley/repos","events_url":"https://api.github.com/users/garvankeeley/events{/privacy}","received_events_url":"https://api.github.com/users/garvankeeley/received_events","type":"User","site_admin":false},"body":"https://bugzilla.mozilla.org/show_bug.cgi?id=1457464","created_at":"2018-05-07T14:42:22Z","updated_at":"2018-05-07T14:53:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1af937da31d45217ca6c69d1d939fd58b8689375","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/pulls/3902/commits","review_comments_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/pulls/3902/comments","review_comment_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/issues/3902/comments","statuses_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/statuses/36d1f31c4e174b9e34d8bb2ee36d5afeca34d137","head":{"label":"garvankeeley:garvan/bug-1457464-share-search-for-text","ref":"garvan/bug-1457464-share-search-for-text","sha":"36d1f31c4e174b9e34d8bb2ee36d5afeca34d137","user":{"login":"garvankeeley","id":5495083,"avatar_url":"https://avatars1.githubusercontent.com/u/5495083?v=4","gravatar_id":"","url":"https://api.github.com/users/garvankeeley","html_url":"https://github.com/garvankeeley","followers_url":"https://api.github.com/users/garvankeeley/followers","following_url":"https://api.github.com/users/garvankeeley/following{/other_user}","gists_url":"https://api.github.com/users/garvankeeley/gists{/gist_id}","starred_url":"https://api.github.com/users/garvankeeley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garvankeeley/subscriptions","organizations_url":"https://api.github.com/users/garvankeeley/orgs","repos_url":"https://api.github.com/users/garvankeeley/repos","events_url":"https://api.github.com/users/garvankeeley/events{/privacy}","received_events_url":"https://api.github.com/users/garvankeeley/received_events","type":"User","site_admin":false},"repo":{"id":50397029,"name":"firefox-ios","full_name":"garvankeeley/firefox-ios","owner":{"login":"garvankeeley","id":5495083,"avatar_url":"https://avatars1.githubusercontent.com/u/5495083?v=4","gravatar_id":"","url":"https://api.github.com/users/garvankeeley","html_url":"https://github.com/garvankeeley","followers_url":"https://api.github.com/users/garvankeeley/followers","following_url":"https://api.github.com/users/garvankeeley/following{/other_user}","gists_url":"https://api.github.com/users/garvankeeley/gists{/gist_id}","starred_url":"https://api.github.com/users/garvankeeley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garvankeeley/subscriptions","organizations_url":"https://api.github.com/users/garvankeeley/orgs","repos_url":"https://api.github.com/users/garvankeeley/repos","events_url":"https://api.github.com/users/garvankeeley/events{/privacy}","received_events_url":"https://api.github.com/users/garvankeeley/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/garvankeeley/firefox-ios","description":"Firefox for iOS","fork":true,"url":"https://api.github.com/repos/garvankeeley/firefox-ios","forks_url":"https://api.github.com/repos/garvankeeley/firefox-ios/forks","keys_url":"https://api.github.com/repos/garvankeeley/firefox-ios/keys{/key_id}","collaborators_url":"https://api.github.com/repos/garvankeeley/firefox-ios/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/garvankeeley/firefox-ios/teams","hooks_url":"https://api.github.com/repos/garvankeeley/firefox-ios/hooks","issue_events_url":"https://api.github.com/repos/garvankeeley/firefox-ios/issues/events{/number}","events_url":"https://api.github.com/repos/garvankeeley/firefox-ios/events","assignees_url":"https://api.github.com/repos/garvankeeley/firefox-ios/assignees{/user}","branches_url":"https://api.github.com/repos/garvankeeley/firefox-ios/branches{/branch}","tags_url":"https://api.github.com/repos/garvankeeley/firefox-ios/tags","blobs_url":"https://api.github.com/repos/garvankeeley/firefox-ios/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/garvankeeley/firefox-ios/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/garvankeeley/firefox-ios/git/refs{/sha}","trees_url":"https://api.github.com/repos/garvankeeley/firefox-ios/git/trees{/sha}","statuses_url":"https://api.github.com/repos/garvankeeley/firefox-ios/statuses/{sha}","languages_url":"https://api.github.com/repos/garvankeeley/firefox-ios/languages","stargazers_url":"https://api.github.com/repos/garvankeeley/firefox-ios/stargazers","contributors_url":"https://api.github.com/repos/garvankeeley/firefox-ios/contributors","subscribers_url":"https://api.github.com/repos/garvankeeley/firefox-ios/subscribers","subscription_url":"https://api.github.com/repos/garvankeeley/firefox-ios/subscription","commits_url":"https://api.github.com/repos/garvankeeley/firefox-ios/commits{/sha}","git_commits_url":"https://api.github.com/repos/garvankeeley/firefox-ios/git/commits{/sha}","comments_url":"https://api.github.com/repos/garvankeeley/firefox-ios/comments{/number}","issue_comment_url":"https://api.github.com/repos/garvankeeley/firefox-ios/issues/comments{/number}","contents_url":"https://api.github.com/repos/garvankeeley/firefox-ios/contents/{+path}","compare_url":"https://api.github.com/repos/garvankeeley/firefox-ios/compare/{base}...{head}","merges_url":"https://api.github.com/repos/garvankeeley/firefox-ios/merges","archive_url":"https://api.github.com/repos/garvankeeley/firefox-ios/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/garvankeeley/firefox-ios/downloads","issues_url":"https://api.github.com/repos/garvankeeley/firefox-ios/issues{/number}","pulls_url":"https://api.github.com/repos/garvankeeley/firefox-ios/pulls{/number}","milestones_url":"https://api.github.com/repos/garvankeeley/firefox-ios/milestones{/number}","notifications_url":"https://api.github.com/repos/garvankeeley/firefox-ios/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/garvankeeley/firefox-ios/labels{/name}","releases_url":"https://api.github.com/repos/garvankeeley/firefox-ios/releases{/id}","deployments_url":"https://api.github.com/repos/garvankeeley/firefox-ios/deployments","created_at":"2016-01-26T02:28:00Z","updated_at":"2018-05-07T14:16:46Z","pushed_at":"2018-05-07T14:41:57Z","git_url":"git://github.com/garvankeeley/firefox-ios.git","ssh_url":"git@github.com:garvankeeley/firefox-ios.git","clone_url":"https://github.com/garvankeeley/firefox-ios.git","svn_url":"https://github.com/garvankeeley/firefox-ios","homepage":"","size":202805,"stargazers_count":0,"watchers_count":0,"language":"Swift","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":"mpl-2.0","name":"Mozilla Public License 2.0","spdx_id":"MPL-2.0","url":"https://api.github.com/licenses/mpl-2.0"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mozilla-mobile:master","ref":"master","sha":"ec1f7522c47188204cbaf4172e3b42ec0a7c7340","user":{"login":"mozilla-mobile","id":22351667,"avatar_url":"https://avatars3.githubusercontent.com/u/22351667?v=4","gravatar_id":"","url":"https://api.github.com/users/mozilla-mobile","html_url":"https://github.com/mozilla-mobile","followers_url":"https://api.github.com/users/mozilla-mobile/followers","following_url":"https://api.github.com/users/mozilla-mobile/following{/other_user}","gists_url":"https://api.github.com/users/mozilla-mobile/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla-mobile/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla-mobile/subscriptions","organizations_url":"https://api.github.com/users/mozilla-mobile/orgs","repos_url":"https://api.github.com/users/mozilla-mobile/repos","events_url":"https://api.github.com/users/mozilla-mobile/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla-mobile/received_events","type":"Organization","site_admin":false},"repo":{"id":26133979,"name":"firefox-ios","full_name":"mozilla-mobile/firefox-ios","owner":{"login":"mozilla-mobile","id":22351667,"avatar_url":"https://avatars3.githubusercontent.com/u/22351667?v=4","gravatar_id":"","url":"https://api.github.com/users/mozilla-mobile","html_url":"https://github.com/mozilla-mobile","followers_url":"https://api.github.com/users/mozilla-mobile/followers","following_url":"https://api.github.com/users/mozilla-mobile/following{/other_user}","gists_url":"https://api.github.com/users/mozilla-mobile/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla-mobile/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla-mobile/subscriptions","organizations_url":"https://api.github.com/users/mozilla-mobile/orgs","repos_url":"https://api.github.com/users/mozilla-mobile/repos","events_url":"https://api.github.com/users/mozilla-mobile/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla-mobile/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla-mobile/firefox-ios","description":"Firefox for iOS","fork":false,"url":"https://api.github.com/repos/mozilla-mobile/firefox-ios","forks_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/forks","keys_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/teams","hooks_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/hooks","issue_events_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/events","assignees_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/tags","blobs_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/languages","stargazers_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/stargazers","contributors_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/contributors","subscribers_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/subscribers","subscription_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/subscription","commits_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/merges","archive_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/downloads","issues_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/labels{/name}","releases_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/releases{/id}","deployments_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/deployments","created_at":"2014-11-03T19:07:02Z","updated_at":"2018-05-07T13:58:54Z","pushed_at":"2018-05-07T14:42:23Z","git_url":"git://github.com/mozilla-mobile/firefox-ios.git","ssh_url":"git@github.com:mozilla-mobile/firefox-ios.git","clone_url":"https://github.com/mozilla-mobile/firefox-ios.git","svn_url":"https://github.com/mozilla-mobile/firefox-ios","homepage":"","size":450776,"stargazers_count":7987,"watchers_count":7987,"language":"Swift","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1775,"mirror_url":null,"archived":false,"open_issues_count":48,"license":{"key":"mpl-2.0","name":"Mozilla Public License 2.0","spdx_id":"MPL-2.0","url":"https://api.github.com/licenses/mpl-2.0"},"forks":1775,"open_issues":48,"watchers":7987,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla-mobile/firefox-ios/pulls/3902"},"html":{"href":"https://github.com/mozilla-mobile/firefox-ios/pull/3902"},"issue":{"href":"https://api.github.com/repos/mozilla-mobile/firefox-ios/issues/3902"},"comments":{"href":"https://api.github.com/repos/mozilla-mobile/firefox-ios/issues/3902/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla-mobile/firefox-ios/pulls/3902/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla-mobile/firefox-ios/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mozilla-mobile/firefox-ios/pulls/3902/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla-mobile/firefox-ios/statuses/36d1f31c4e174b9e34d8bb2ee36d5afeca34d137"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"garvankeeley"}}