{"action":"opened","number":2763,"pull_request":{"url":"https://api.github.com/repos/ripple/rippled/pulls/2763","id":229190022,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI5MTkwMDIy","html_url":"https://github.com/ripple/rippled/pull/2763","diff_url":"https://github.com/ripple/rippled/pull/2763.diff","patch_url":"https://github.com/ripple/rippled/pull/2763.patch","issue_url":"https://api.github.com/repos/ripple/rippled/issues/2763","number":2763,"state":"open","locked":false,"title":"Prefer regex to manual parsing in parseURL","user":{"login":"thejohnfreeman","id":1133852,"node_id":"MDQ6VXNlcjExMzM4NTI=","avatar_url":"https://avatars3.githubusercontent.com/u/1133852?v=4","gravatar_id":"","url":"https://api.github.com/users/thejohnfreeman","html_url":"https://github.com/thejohnfreeman","followers_url":"https://api.github.com/users/thejohnfreeman/followers","following_url":"https://api.github.com/users/thejohnfreeman/following{/other_user}","gists_url":"https://api.github.com/users/thejohnfreeman/gists{/gist_id}","starred_url":"https://api.github.com/users/thejohnfreeman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thejohnfreeman/subscriptions","organizations_url":"https://api.github.com/users/thejohnfreeman/orgs","repos_url":"https://api.github.com/users/thejohnfreeman/repos","events_url":"https://api.github.com/users/thejohnfreeman/events{/privacy}","received_events_url":"https://api.github.com/users/thejohnfreeman/received_events","type":"User","site_admin":false},"body":"`parseURL` in `StringUtilities.cpp` uses a regex to pull the authority\r\nout of the URL, then further parsing to get the host and port.  Roll\r\nthat parsing into the regex. Note that the host can be a name, an IPv4\r\naddress, or an IPv6 address.\r\n\r\n------\r\n\r\nBecause this is my first PR, I'm going to bet I'm running afoul of some conventions that I'm just ignorant of. Please point them out.\r\n\r\nI scoped the individual test cases in blocks to reset the `parsedURL` object. I was tripped up in development when the test cases I added at the end asserted no port number, but one was set by an earlier test case.\r\n\r\nI'm not sure when to prefer assignment initialization and when to prefer braced initialization. The existing code had a mix.\r\n\r\nI explicitly typed some declarations. Should I just prefer auto everywhere until the compiler complains?","created_at":"2018-11-07T22:30:11Z","updated_at":"2018-11-07T22:30:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ripple/rippled/pulls/2763/commits","review_comments_url":"https://api.github.com/repos/ripple/rippled/pulls/2763/comments","review_comment_url":"https://api.github.com/repos/ripple/rippled/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ripple/rippled/issues/2763/comments","statuses_url":"https://api.github.com/repos/ripple/rippled/statuses/8284f7e62608dc5cfede3941e60c57d72bfd64ae","head":{"label":"thejohnfreeman:parse_url","ref":"parse_url","sha":"8284f7e62608dc5cfede3941e60c57d72bfd64ae","user":{"login":"thejohnfreeman","id":1133852,"node_id":"MDQ6VXNlcjExMzM4NTI=","avatar_url":"https://avatars3.githubusercontent.com/u/1133852?v=4","gravatar_id":"","url":"https://api.github.com/users/thejohnfreeman","html_url":"https://github.com/thejohnfreeman","followers_url":"https://api.github.com/users/thejohnfreeman/followers","following_url":"https://api.github.com/users/thejohnfreeman/following{/other_user}","gists_url":"https://api.github.com/users/thejohnfreeman/gists{/gist_id}","starred_url":"https://api.github.com/users/thejohnfreeman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thejohnfreeman/subscriptions","organizations_url":"https://api.github.com/users/thejohnfreeman/orgs","repos_url":"https://api.github.com/users/thejohnfreeman/repos","events_url":"https://api.github.com/users/thejohnfreeman/events{/privacy}","received_events_url":"https://api.github.com/users/thejohnfreeman/received_events","type":"User","site_admin":false},"repo":{"id":156470241,"node_id":"MDEwOlJlcG9zaXRvcnkxNTY0NzAyNDE=","name":"rippled","full_name":"thejohnfreeman/rippled","private":false,"owner":{"login":"thejohnfreeman","id":1133852,"node_id":"MDQ6VXNlcjExMzM4NTI=","avatar_url":"https://avatars3.githubusercontent.com/u/1133852?v=4","gravatar_id":"","url":"https://api.github.com/users/thejohnfreeman","html_url":"https://github.com/thejohnfreeman","followers_url":"https://api.github.com/users/thejohnfreeman/followers","following_url":"https://api.github.com/users/thejohnfreeman/following{/other_user}","gists_url":"https://api.github.com/users/thejohnfreeman/gists{/gist_id}","starred_url":"https://api.github.com/users/thejohnfreeman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thejohnfreeman/subscriptions","organizations_url":"https://api.github.com/users/thejohnfreeman/orgs","repos_url":"https://api.github.com/users/thejohnfreeman/repos","events_url":"https://api.github.com/users/thejohnfreeman/events{/privacy}","received_events_url":"https://api.github.com/users/thejohnfreeman/received_events","type":"User","site_admin":false},"html_url":"https://github.com/thejohnfreeman/rippled","description":"Decentralized cryptocurrency blockchain daemon implementing the XRP Ledger in C++","fork":true,"url":"https://api.github.com/repos/thejohnfreeman/rippled","forks_url":"https://api.github.com/repos/thejohnfreeman/rippled/forks","keys_url":"https://api.github.com/repos/thejohnfreeman/rippled/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thejohnfreeman/rippled/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thejohnfreeman/rippled/teams","hooks_url":"https://api.github.com/repos/thejohnfreeman/rippled/hooks","issue_events_url":"https://api.github.com/repos/thejohnfreeman/rippled/issues/events{/number}","events_url":"https://api.github.com/repos/thejohnfreeman/rippled/events","assignees_url":"https://api.github.com/repos/thejohnfreeman/rippled/assignees{/user}","branches_url":"https://api.github.com/repos/thejohnfreeman/rippled/branches{/branch}","tags_url":"https://api.github.com/repos/thejohnfreeman/rippled/tags","blobs_url":"https://api.github.com/repos/thejohnfreeman/rippled/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thejohnfreeman/rippled/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thejohnfreeman/rippled/git/refs{/sha}","trees_url":"https://api.github.com/repos/thejohnfreeman/rippled/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thejohnfreeman/rippled/statuses/{sha}","languages_url":"https://api.github.com/repos/thejohnfreeman/rippled/languages","stargazers_url":"https://api.github.com/repos/thejohnfreeman/rippled/stargazers","contributors_url":"https://api.github.com/repos/thejohnfreeman/rippled/contributors","subscribers_url":"https://api.github.com/repos/thejohnfreeman/rippled/subscribers","subscription_url":"https://api.github.com/repos/thejohnfreeman/rippled/subscription","commits_url":"https://api.github.com/repos/thejohnfreeman/rippled/commits{/sha}","git_commits_url":"https://api.github.com/repos/thejohnfreeman/rippled/git/commits{/sha}","comments_url":"https://api.github.com/repos/thejohnfreeman/rippled/comments{/number}","issue_comment_url":"https://api.github.com/repos/thejohnfreeman/rippled/issues/comments{/number}","contents_url":"https://api.github.com/repos/thejohnfreeman/rippled/contents/{+path}","compare_url":"https://api.github.com/repos/thejohnfreeman/rippled/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thejohnfreeman/rippled/merges","archive_url":"https://api.github.com/repos/thejohnfreeman/rippled/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thejohnfreeman/rippled/downloads","issues_url":"https://api.github.com/repos/thejohnfreeman/rippled/issues{/number}","pulls_url":"https://api.github.com/repos/thejohnfreeman/rippled/pulls{/number}","milestones_url":"https://api.github.com/repos/thejohnfreeman/rippled/milestones{/number}","notifications_url":"https://api.github.com/repos/thejohnfreeman/rippled/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thejohnfreeman/rippled/labels{/name}","releases_url":"https://api.github.com/repos/thejohnfreeman/rippled/releases{/id}","deployments_url":"https://api.github.com/repos/thejohnfreeman/rippled/deployments","created_at":"2018-11-07T01:02:52Z","updated_at":"2018-11-07T01:03:05Z","pushed_at":"2018-11-07T22:23:21Z","git_url":"git://github.com/thejohnfreeman/rippled.git","ssh_url":"git@github.com:thejohnfreeman/rippled.git","clone_url":"https://github.com/thejohnfreeman/rippled.git","svn_url":"https://github.com/thejohnfreeman/rippled","homepage":"https://ripple.com/xrp","size":94938,"stargazers_count":0,"watchers_count":0,"language":"C++","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":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"ripple:develop","ref":"develop","sha":"2a8b0e4b88ed03729506a758615c51b600717d38","user":{"login":"ripple","id":3165523,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMxNjU1MjM=","avatar_url":"https://avatars2.githubusercontent.com/u/3165523?v=4","gravatar_id":"","url":"https://api.github.com/users/ripple","html_url":"https://github.com/ripple","followers_url":"https://api.github.com/users/ripple/followers","following_url":"https://api.github.com/users/ripple/following{/other_user}","gists_url":"https://api.github.com/users/ripple/gists{/gist_id}","starred_url":"https://api.github.com/users/ripple/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ripple/subscriptions","organizations_url":"https://api.github.com/users/ripple/orgs","repos_url":"https://api.github.com/users/ripple/repos","events_url":"https://api.github.com/users/ripple/events{/privacy}","received_events_url":"https://api.github.com/users/ripple/received_events","type":"Organization","site_admin":false},"repo":{"id":2724167,"node_id":"MDEwOlJlcG9zaXRvcnkyNzI0MTY3","name":"rippled","full_name":"ripple/rippled","private":false,"owner":{"login":"ripple","id":3165523,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMxNjU1MjM=","avatar_url":"https://avatars2.githubusercontent.com/u/3165523?v=4","gravatar_id":"","url":"https://api.github.com/users/ripple","html_url":"https://github.com/ripple","followers_url":"https://api.github.com/users/ripple/followers","following_url":"https://api.github.com/users/ripple/following{/other_user}","gists_url":"https://api.github.com/users/ripple/gists{/gist_id}","starred_url":"https://api.github.com/users/ripple/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ripple/subscriptions","organizations_url":"https://api.github.com/users/ripple/orgs","repos_url":"https://api.github.com/users/ripple/repos","events_url":"https://api.github.com/users/ripple/events{/privacy}","received_events_url":"https://api.github.com/users/ripple/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/ripple/rippled","description":"Decentralized cryptocurrency blockchain daemon implementing the XRP Ledger in C++","fork":false,"url":"https://api.github.com/repos/ripple/rippled","forks_url":"https://api.github.com/repos/ripple/rippled/forks","keys_url":"https://api.github.com/repos/ripple/rippled/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ripple/rippled/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ripple/rippled/teams","hooks_url":"https://api.github.com/repos/ripple/rippled/hooks","issue_events_url":"https://api.github.com/repos/ripple/rippled/issues/events{/number}","events_url":"https://api.github.com/repos/ripple/rippled/events","assignees_url":"https://api.github.com/repos/ripple/rippled/assignees{/user}","branches_url":"https://api.github.com/repos/ripple/rippled/branches{/branch}","tags_url":"https://api.github.com/repos/ripple/rippled/tags","blobs_url":"https://api.github.com/repos/ripple/rippled/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ripple/rippled/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ripple/rippled/git/refs{/sha}","trees_url":"https://api.github.com/repos/ripple/rippled/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ripple/rippled/statuses/{sha}","languages_url":"https://api.github.com/repos/ripple/rippled/languages","stargazers_url":"https://api.github.com/repos/ripple/rippled/stargazers","contributors_url":"https://api.github.com/repos/ripple/rippled/contributors","subscribers_url":"https://api.github.com/repos/ripple/rippled/subscribers","subscription_url":"https://api.github.com/repos/ripple/rippled/subscription","commits_url":"https://api.github.com/repos/ripple/rippled/commits{/sha}","git_commits_url":"https://api.github.com/repos/ripple/rippled/git/commits{/sha}","comments_url":"https://api.github.com/repos/ripple/rippled/comments{/number}","issue_comment_url":"https://api.github.com/repos/ripple/rippled/issues/comments{/number}","contents_url":"https://api.github.com/repos/ripple/rippled/contents/{+path}","compare_url":"https://api.github.com/repos/ripple/rippled/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ripple/rippled/merges","archive_url":"https://api.github.com/repos/ripple/rippled/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ripple/rippled/downloads","issues_url":"https://api.github.com/repos/ripple/rippled/issues{/number}","pulls_url":"https://api.github.com/repos/ripple/rippled/pulls{/number}","milestones_url":"https://api.github.com/repos/ripple/rippled/milestones{/number}","notifications_url":"https://api.github.com/repos/ripple/rippled/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ripple/rippled/labels{/name}","releases_url":"https://api.github.com/repos/ripple/rippled/releases{/id}","deployments_url":"https://api.github.com/repos/ripple/rippled/deployments","created_at":"2011-11-07T04:40:15Z","updated_at":"2018-11-07T15:00:40Z","pushed_at":"2018-11-07T22:19:39Z","git_url":"git://github.com/ripple/rippled.git","ssh_url":"git@github.com:ripple/rippled.git","clone_url":"https://github.com/ripple/rippled.git","svn_url":"https://github.com/ripple/rippled","homepage":"https://ripple.com/xrp","size":94938,"stargazers_count":3020,"watchers_count":3020,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":911,"mirror_url":null,"archived":false,"open_issues_count":83,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":911,"open_issues":83,"watchers":3020,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/ripple/rippled/pulls/2763"},"html":{"href":"https://github.com/ripple/rippled/pull/2763"},"issue":{"href":"https://api.github.com/repos/ripple/rippled/issues/2763"},"comments":{"href":"https://api.github.com/repos/ripple/rippled/issues/2763/comments"},"review_comments":{"href":"https://api.github.com/repos/ripple/rippled/pulls/2763/comments"},"review_comment":{"href":"https://api.github.com/repos/ripple/rippled/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ripple/rippled/pulls/2763/commits"},"statuses":{"href":"https://api.github.com/repos/ripple/rippled/statuses/8284f7e62608dc5cfede3941e60c57d72bfd64ae"}},"author_association":"MEMBER","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":1,"additions":96,"deletions":39,"changed_files":2}}
{"actor":{"display_login":"thejohnfreeman"}}