{"action":"closed","number":190,"pull_request":{"url":"https://api.github.com/repos/crawler-commons/crawler-commons/pulls/190","id":158687849,"html_url":"https://github.com/crawler-commons/crawler-commons/pull/190","diff_url":"https://github.com/crawler-commons/crawler-commons/pull/190.diff","patch_url":"https://github.com/crawler-commons/crawler-commons/pull/190.patch","issue_url":"https://api.github.com/repos/crawler-commons/crawler-commons/issues/190","number":190,"state":"closed","locked":false,"title":"Add SiteMapParser#walkSiteMap(URL,Consumer)","user":{"login":"lucboruta","id":2213706,"avatar_url":"https://avatars1.githubusercontent.com/u/2213706?v=4","gravatar_id":"","url":"https://api.github.com/users/lucboruta","html_url":"https://github.com/lucboruta","followers_url":"https://api.github.com/users/lucboruta/followers","following_url":"https://api.github.com/users/lucboruta/following{/other_user}","gists_url":"https://api.github.com/users/lucboruta/gists{/gist_id}","starred_url":"https://api.github.com/users/lucboruta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lucboruta/subscriptions","organizations_url":"https://api.github.com/users/lucboruta/orgs","repos_url":"https://api.github.com/users/lucboruta/repos","events_url":"https://api.github.com/users/lucboruta/events{/privacy}","received_events_url":"https://api.github.com/users/lucboruta/received_events","type":"User","site_admin":false},"body":"This PR adds a convenience method to fetch a sitemap from the specified URL, recursively traverse any enclosed sitemap index, and perform the specified action for each sitemap URL. It is strongly inspired by methods like [`Iterable#forEach`](https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html#forEach-java.util.function.Consumer-) and [`Stream#forEach`](https://docs.oracle.com/javase/8/docs/api/java/util/stream/Stream.html#forEach-java.util.function.Consumer-).\r\n\r\nThe code is based on [SitemapParser.java](https://github.com/Chaiavi/SitemapParser/blob/master/src/main/java/org/chaiware/SitemapParser.java) by @chaiavi, with extra checks to avoid NullPointerExceptions.\r\n\r\nI added the method to `SiteMapParser` rather than `AbstractSiteMap` since the parser is needed to recurse into sitemap indices.\r\n\r\nI'm open to suggestions regarding the method's name and null-friendliness.","created_at":"2017-12-15T20:31:43Z","updated_at":"2018-04-25T12:13:03Z","closed_at":"2018-04-25T12:13:03Z","merged_at":null,"merge_commit_sha":"44636c5e85a7ae7ecfc3e99b3602c9a54a6334b7","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/crawler-commons/crawler-commons/pulls/190/commits","review_comments_url":"https://api.github.com/repos/crawler-commons/crawler-commons/pulls/190/comments","review_comment_url":"https://api.github.com/repos/crawler-commons/crawler-commons/pulls/comments{/number}","comments_url":"https://api.github.com/repos/crawler-commons/crawler-commons/issues/190/comments","statuses_url":"https://api.github.com/repos/crawler-commons/crawler-commons/statuses/7b2057e1283f8dbb8bd529b34e9827283164167f","head":{"label":"thunken:features/for-each","ref":"features/for-each","sha":"7b2057e1283f8dbb8bd529b34e9827283164167f","user":{"login":"thunken","id":22261899,"avatar_url":"https://avatars1.githubusercontent.com/u/22261899?v=4","gravatar_id":"","url":"https://api.github.com/users/thunken","html_url":"https://github.com/thunken","followers_url":"https://api.github.com/users/thunken/followers","following_url":"https://api.github.com/users/thunken/following{/other_user}","gists_url":"https://api.github.com/users/thunken/gists{/gist_id}","starred_url":"https://api.github.com/users/thunken/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thunken/subscriptions","organizations_url":"https://api.github.com/users/thunken/orgs","repos_url":"https://api.github.com/users/thunken/repos","events_url":"https://api.github.com/users/thunken/events{/privacy}","received_events_url":"https://api.github.com/users/thunken/received_events","type":"Organization","site_admin":false},"repo":{"id":114403941,"name":"crawler-commons","full_name":"thunken/crawler-commons","owner":{"login":"thunken","id":22261899,"avatar_url":"https://avatars1.githubusercontent.com/u/22261899?v=4","gravatar_id":"","url":"https://api.github.com/users/thunken","html_url":"https://github.com/thunken","followers_url":"https://api.github.com/users/thunken/followers","following_url":"https://api.github.com/users/thunken/following{/other_user}","gists_url":"https://api.github.com/users/thunken/gists{/gist_id}","starred_url":"https://api.github.com/users/thunken/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thunken/subscriptions","organizations_url":"https://api.github.com/users/thunken/orgs","repos_url":"https://api.github.com/users/thunken/repos","events_url":"https://api.github.com/users/thunken/events{/privacy}","received_events_url":"https://api.github.com/users/thunken/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/thunken/crawler-commons","description":"A set of reusable Java components that implement functionality common to any web crawler","fork":true,"url":"https://api.github.com/repos/thunken/crawler-commons","forks_url":"https://api.github.com/repos/thunken/crawler-commons/forks","keys_url":"https://api.github.com/repos/thunken/crawler-commons/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thunken/crawler-commons/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thunken/crawler-commons/teams","hooks_url":"https://api.github.com/repos/thunken/crawler-commons/hooks","issue_events_url":"https://api.github.com/repos/thunken/crawler-commons/issues/events{/number}","events_url":"https://api.github.com/repos/thunken/crawler-commons/events","assignees_url":"https://api.github.com/repos/thunken/crawler-commons/assignees{/user}","branches_url":"https://api.github.com/repos/thunken/crawler-commons/branches{/branch}","tags_url":"https://api.github.com/repos/thunken/crawler-commons/tags","blobs_url":"https://api.github.com/repos/thunken/crawler-commons/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thunken/crawler-commons/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thunken/crawler-commons/git/refs{/sha}","trees_url":"https://api.github.com/repos/thunken/crawler-commons/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thunken/crawler-commons/statuses/{sha}","languages_url":"https://api.github.com/repos/thunken/crawler-commons/languages","stargazers_url":"https://api.github.com/repos/thunken/crawler-commons/stargazers","contributors_url":"https://api.github.com/repos/thunken/crawler-commons/contributors","subscribers_url":"https://api.github.com/repos/thunken/crawler-commons/subscribers","subscription_url":"https://api.github.com/repos/thunken/crawler-commons/subscription","commits_url":"https://api.github.com/repos/thunken/crawler-commons/commits{/sha}","git_commits_url":"https://api.github.com/repos/thunken/crawler-commons/git/commits{/sha}","comments_url":"https://api.github.com/repos/thunken/crawler-commons/comments{/number}","issue_comment_url":"https://api.github.com/repos/thunken/crawler-commons/issues/comments{/number}","contents_url":"https://api.github.com/repos/thunken/crawler-commons/contents/{+path}","compare_url":"https://api.github.com/repos/thunken/crawler-commons/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thunken/crawler-commons/merges","archive_url":"https://api.github.com/repos/thunken/crawler-commons/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thunken/crawler-commons/downloads","issues_url":"https://api.github.com/repos/thunken/crawler-commons/issues{/number}","pulls_url":"https://api.github.com/repos/thunken/crawler-commons/pulls{/number}","milestones_url":"https://api.github.com/repos/thunken/crawler-commons/milestones{/number}","notifications_url":"https://api.github.com/repos/thunken/crawler-commons/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thunken/crawler-commons/labels{/name}","releases_url":"https://api.github.com/repos/thunken/crawler-commons/releases{/id}","deployments_url":"https://api.github.com/repos/thunken/crawler-commons/deployments","created_at":"2017-12-15T19:19:40Z","updated_at":"2017-12-15T19:19:43Z","pushed_at":"2018-03-22T10:04:39Z","git_url":"git://github.com/thunken/crawler-commons.git","ssh_url":"git@github.com:thunken/crawler-commons.git","clone_url":"https://github.com/thunken/crawler-commons.git","svn_url":"https://github.com/thunken/crawler-commons","homepage":"","size":2247,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"crawler-commons:master","ref":"master","sha":"4b13456bc954f97ae209446b3736976b2a9ea298","user":{"login":"crawler-commons","id":11871279,"avatar_url":"https://avatars0.githubusercontent.com/u/11871279?v=4","gravatar_id":"","url":"https://api.github.com/users/crawler-commons","html_url":"https://github.com/crawler-commons","followers_url":"https://api.github.com/users/crawler-commons/followers","following_url":"https://api.github.com/users/crawler-commons/following{/other_user}","gists_url":"https://api.github.com/users/crawler-commons/gists{/gist_id}","starred_url":"https://api.github.com/users/crawler-commons/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crawler-commons/subscriptions","organizations_url":"https://api.github.com/users/crawler-commons/orgs","repos_url":"https://api.github.com/users/crawler-commons/repos","events_url":"https://api.github.com/users/crawler-commons/events{/privacy}","received_events_url":"https://api.github.com/users/crawler-commons/received_events","type":"Organization","site_admin":false},"repo":{"id":33669215,"name":"crawler-commons","full_name":"crawler-commons/crawler-commons","owner":{"login":"crawler-commons","id":11871279,"avatar_url":"https://avatars0.githubusercontent.com/u/11871279?v=4","gravatar_id":"","url":"https://api.github.com/users/crawler-commons","html_url":"https://github.com/crawler-commons","followers_url":"https://api.github.com/users/crawler-commons/followers","following_url":"https://api.github.com/users/crawler-commons/following{/other_user}","gists_url":"https://api.github.com/users/crawler-commons/gists{/gist_id}","starred_url":"https://api.github.com/users/crawler-commons/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crawler-commons/subscriptions","organizations_url":"https://api.github.com/users/crawler-commons/orgs","repos_url":"https://api.github.com/users/crawler-commons/repos","events_url":"https://api.github.com/users/crawler-commons/events{/privacy}","received_events_url":"https://api.github.com/users/crawler-commons/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/crawler-commons/crawler-commons","description":"A set of reusable Java components that implement functionality common to any web crawler","fork":false,"url":"https://api.github.com/repos/crawler-commons/crawler-commons","forks_url":"https://api.github.com/repos/crawler-commons/crawler-commons/forks","keys_url":"https://api.github.com/repos/crawler-commons/crawler-commons/keys{/key_id}","collaborators_url":"https://api.github.com/repos/crawler-commons/crawler-commons/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/crawler-commons/crawler-commons/teams","hooks_url":"https://api.github.com/repos/crawler-commons/crawler-commons/hooks","issue_events_url":"https://api.github.com/repos/crawler-commons/crawler-commons/issues/events{/number}","events_url":"https://api.github.com/repos/crawler-commons/crawler-commons/events","assignees_url":"https://api.github.com/repos/crawler-commons/crawler-commons/assignees{/user}","branches_url":"https://api.github.com/repos/crawler-commons/crawler-commons/branches{/branch}","tags_url":"https://api.github.com/repos/crawler-commons/crawler-commons/tags","blobs_url":"https://api.github.com/repos/crawler-commons/crawler-commons/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/crawler-commons/crawler-commons/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/crawler-commons/crawler-commons/git/refs{/sha}","trees_url":"https://api.github.com/repos/crawler-commons/crawler-commons/git/trees{/sha}","statuses_url":"https://api.github.com/repos/crawler-commons/crawler-commons/statuses/{sha}","languages_url":"https://api.github.com/repos/crawler-commons/crawler-commons/languages","stargazers_url":"https://api.github.com/repos/crawler-commons/crawler-commons/stargazers","contributors_url":"https://api.github.com/repos/crawler-commons/crawler-commons/contributors","subscribers_url":"https://api.github.com/repos/crawler-commons/crawler-commons/subscribers","subscription_url":"https://api.github.com/repos/crawler-commons/crawler-commons/subscription","commits_url":"https://api.github.com/repos/crawler-commons/crawler-commons/commits{/sha}","git_commits_url":"https://api.github.com/repos/crawler-commons/crawler-commons/git/commits{/sha}","comments_url":"https://api.github.com/repos/crawler-commons/crawler-commons/comments{/number}","issue_comment_url":"https://api.github.com/repos/crawler-commons/crawler-commons/issues/comments{/number}","contents_url":"https://api.github.com/repos/crawler-commons/crawler-commons/contents/{+path}","compare_url":"https://api.github.com/repos/crawler-commons/crawler-commons/compare/{base}...{head}","merges_url":"https://api.github.com/repos/crawler-commons/crawler-commons/merges","archive_url":"https://api.github.com/repos/crawler-commons/crawler-commons/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/crawler-commons/crawler-commons/downloads","issues_url":"https://api.github.com/repos/crawler-commons/crawler-commons/issues{/number}","pulls_url":"https://api.github.com/repos/crawler-commons/crawler-commons/pulls{/number}","milestones_url":"https://api.github.com/repos/crawler-commons/crawler-commons/milestones{/number}","notifications_url":"https://api.github.com/repos/crawler-commons/crawler-commons/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/crawler-commons/crawler-commons/labels{/name}","releases_url":"https://api.github.com/repos/crawler-commons/crawler-commons/releases{/id}","deployments_url":"https://api.github.com/repos/crawler-commons/crawler-commons/deployments","created_at":"2015-04-09T13:05:29Z","updated_at":"2018-04-25T12:10:18Z","pushed_at":"2018-04-25T12:10:17Z","git_url":"git://github.com/crawler-commons/crawler-commons.git","ssh_url":"git@github.com:crawler-commons/crawler-commons.git","clone_url":"https://github.com/crawler-commons/crawler-commons.git","svn_url":"https://github.com/crawler-commons/crawler-commons","homepage":"","size":2509,"stargazers_count":104,"watchers_count":104,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":false,"has_wiki":true,"has_pages":true,"forks_count":41,"mirror_url":null,"archived":false,"open_issues_count":24,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":41,"open_issues":24,"watchers":104,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/crawler-commons/crawler-commons/pulls/190"},"html":{"href":"https://github.com/crawler-commons/crawler-commons/pull/190"},"issue":{"href":"https://api.github.com/repos/crawler-commons/crawler-commons/issues/190"},"comments":{"href":"https://api.github.com/repos/crawler-commons/crawler-commons/issues/190/comments"},"review_comments":{"href":"https://api.github.com/repos/crawler-commons/crawler-commons/pulls/190/comments"},"review_comment":{"href":"https://api.github.com/repos/crawler-commons/crawler-commons/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/crawler-commons/crawler-commons/pulls/190/commits"},"statuses":{"href":"https://api.github.com/repos/crawler-commons/crawler-commons/statuses/7b2057e1283f8dbb8bd529b34e9827283164167f"}},"author_association":"CONTRIBUTOR","merged":false,"mergeable":false,"rebaseable":false,"mergeable_state":"dirty","merged_by":null,"comments":5,"review_comments":7,"maintainer_can_modify":false,"commits":4,"additions":92,"deletions":0,"changed_files":2}}
{"actor":{"display_login":"sebastian-nagel"}}