{"action":"created","comment":{"url":"https://api.github.com/repos/NYPL-Simplified/server_core/pulls/comments/180832405","pull_request_review_id":111324493,"id":180832405,"diff_hunk":"@@ -675,14 +675,22 @@ def add_entrypoint_links(cls, feed, url_generator, entrypoints,\n         :param entrypoints: A list of all EntryPoints in the facet group.\n         :param selected_entrypoint: The current EntryPoint, if selected.\n         \"\"\"\n+        if (len(entrypoints) == 1\n+            and selected_entrypoint in (None, entrypoints[0])):\n+            # There is only one entry point. Unless the currently\n+            # selected entry point is somehow different, there's no\n+            # need to put any links at all here -- a facet group with\n+            # one one facet might as well not be there.\n+            return\n+\n         is_default = True\n         for entrypoint in entrypoints:\n             link = cls._entrypoint_link(\n                 url_generator, entrypoint, selected_entrypoint, is_default,\n                 group_name\n             )\n             if link:\n-                cls.add_link_to_feed(feed, **link)\n+                cls.add_link_to_feed(feed.feed, **link)","path":"opds.py","position":20,"original_position":20,"commit_id":"a94d15ba62be1b261d3ac8ff7c9be41db19cdb12","original_commit_id":"a94d15ba62be1b261d3ac8ff7c9be41db19cdb12","user":{"login":"leonardr","id":662474,"avatar_url":"https://avatars0.githubusercontent.com/u/662474?v=4","gravatar_id":"","url":"https://api.github.com/users/leonardr","html_url":"https://github.com/leonardr","followers_url":"https://api.github.com/users/leonardr/followers","following_url":"https://api.github.com/users/leonardr/following{/other_user}","gists_url":"https://api.github.com/users/leonardr/gists{/gist_id}","starred_url":"https://api.github.com/users/leonardr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leonardr/subscriptions","organizations_url":"https://api.github.com/users/leonardr/orgs","repos_url":"https://api.github.com/users/leonardr/repos","events_url":"https://api.github.com/users/leonardr/events{/privacy}","received_events_url":"https://api.github.com/users/leonardr/received_events","type":"User","site_admin":false},"body":"This is a bug that wasn't caught by the test because the test created the wrong mock object.","created_at":"2018-04-11T17:18:05Z","updated_at":"2018-04-11T17:18:05Z","html_url":"https://github.com/NYPL-Simplified/server_core/pull/845#discussion_r180832405","pull_request_url":"https://api.github.com/repos/NYPL-Simplified/server_core/pulls/845","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/NYPL-Simplified/server_core/pulls/comments/180832405"},"html":{"href":"https://github.com/NYPL-Simplified/server_core/pull/845#discussion_r180832405"},"pull_request":{"href":"https://api.github.com/repos/NYPL-Simplified/server_core/pulls/845"}}},"pull_request":{"url":"https://api.github.com/repos/NYPL-Simplified/server_core/pulls/845","id":180970901,"html_url":"https://github.com/NYPL-Simplified/server_core/pull/845","diff_url":"https://github.com/NYPL-Simplified/server_core/pull/845.diff","patch_url":"https://github.com/NYPL-Simplified/server_core/pull/845.patch","issue_url":"https://api.github.com/repos/NYPL-Simplified/server_core/issues/845","number":845,"state":"open","locked":false,"title":"Load entry point into faceting objects during `load_facets`","user":{"login":"leonardr","id":662474,"avatar_url":"https://avatars0.githubusercontent.com/u/662474?v=4","gravatar_id":"","url":"https://api.github.com/users/leonardr","html_url":"https://github.com/leonardr","followers_url":"https://api.github.com/users/leonardr/followers","following_url":"https://api.github.com/users/leonardr/following{/other_user}","gists_url":"https://api.github.com/users/leonardr/gists{/gist_id}","starred_url":"https://api.github.com/users/leonardr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leonardr/subscriptions","organizations_url":"https://api.github.com/users/leonardr/orgs","repos_url":"https://api.github.com/users/leonardr/repos","events_url":"https://api.github.com/users/leonardr/events{/privacy}","received_events_url":"https://api.github.com/users/leonardr/received_events","type":"User","site_admin":false},"body":"This branch generalizes the `load_facets` function (used by `load_facets_from_request`) so that:\r\n\r\n1. The caller can choose which faceting class to instantiate, and pass extra arguments into its constructor.\r\n2. The caller can pass in a WorkList. If that WorkList has entry points, and the user requested a specific entry point, the faceting object will be instantiated with the corresponding EntryPoint class.\r\n\r\nIn a future branch we should change the `Facets` class to something like `ListFeedFacets`. Right now it sounds like a generic superclass, which isn't the case. A fair amount of `load_facets` only makes sense if the facets class being instantated is `Facets` rather than a different faceting class; we could make a faceting class more responsible for pulling its own information out of request arguments.","created_at":"2018-04-11T17:11:12Z","updated_at":"2018-04-11T17:18:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f5f273dc3437ea8a52302edf59bc5384ab0808cc","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":307851770,"url":"https://api.github.com/repos/NYPL-Simplified/server_core/labels/in%20review","name":"in review","color":"fbca04","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/NYPL-Simplified/server_core/pulls/845/commits","review_comments_url":"https://api.github.com/repos/NYPL-Simplified/server_core/pulls/845/comments","review_comment_url":"https://api.github.com/repos/NYPL-Simplified/server_core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/NYPL-Simplified/server_core/issues/845/comments","statuses_url":"https://api.github.com/repos/NYPL-Simplified/server_core/statuses/a94d15ba62be1b261d3ac8ff7c9be41db19cdb12","head":{"label":"NYPL-Simplified:tab-configuration-final","ref":"tab-configuration-final","sha":"a94d15ba62be1b261d3ac8ff7c9be41db19cdb12","user":{"login":"NYPL-Simplified","id":16416905,"avatar_url":"https://avatars1.githubusercontent.com/u/16416905?v=4","gravatar_id":"","url":"https://api.github.com/users/NYPL-Simplified","html_url":"https://github.com/NYPL-Simplified","followers_url":"https://api.github.com/users/NYPL-Simplified/followers","following_url":"https://api.github.com/users/NYPL-Simplified/following{/other_user}","gists_url":"https://api.github.com/users/NYPL-Simplified/gists{/gist_id}","starred_url":"https://api.github.com/users/NYPL-Simplified/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NYPL-Simplified/subscriptions","organizations_url":"https://api.github.com/users/NYPL-Simplified/orgs","repos_url":"https://api.github.com/users/NYPL-Simplified/repos","events_url":"https://api.github.com/users/NYPL-Simplified/events{/privacy}","received_events_url":"https://api.github.com/users/NYPL-Simplified/received_events","type":"Organization","site_admin":false},"repo":{"id":27601287,"name":"server_core","full_name":"NYPL-Simplified/server_core","owner":{"login":"NYPL-Simplified","id":16416905,"avatar_url":"https://avatars1.githubusercontent.com/u/16416905?v=4","gravatar_id":"","url":"https://api.github.com/users/NYPL-Simplified","html_url":"https://github.com/NYPL-Simplified","followers_url":"https://api.github.com/users/NYPL-Simplified/followers","following_url":"https://api.github.com/users/NYPL-Simplified/following{/other_user}","gists_url":"https://api.github.com/users/NYPL-Simplified/gists{/gist_id}","starred_url":"https://api.github.com/users/NYPL-Simplified/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NYPL-Simplified/subscriptions","organizations_url":"https://api.github.com/users/NYPL-Simplified/orgs","repos_url":"https://api.github.com/users/NYPL-Simplified/repos","events_url":"https://api.github.com/users/NYPL-Simplified/events{/privacy}","received_events_url":"https://api.github.com/users/NYPL-Simplified/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/NYPL-Simplified/server_core","description":"Shared data model and utilities for Library Simplified server applications","fork":false,"url":"https://api.github.com/repos/NYPL-Simplified/server_core","forks_url":"https://api.github.com/repos/NYPL-Simplified/server_core/forks","keys_url":"https://api.github.com/repos/NYPL-Simplified/server_core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NYPL-Simplified/server_core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NYPL-Simplified/server_core/teams","hooks_url":"https://api.github.com/repos/NYPL-Simplified/server_core/hooks","issue_events_url":"https://api.github.com/repos/NYPL-Simplified/server_core/issues/events{/number}","events_url":"https://api.github.com/repos/NYPL-Simplified/server_core/events","assignees_url":"https://api.github.com/repos/NYPL-Simplified/server_core/assignees{/user}","branches_url":"https://api.github.com/repos/NYPL-Simplified/server_core/branches{/branch}","tags_url":"https://api.github.com/repos/NYPL-Simplified/server_core/tags","blobs_url":"https://api.github.com/repos/NYPL-Simplified/server_core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NYPL-Simplified/server_core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NYPL-Simplified/server_core/git/refs{/sha}","trees_url":"https://api.github.com/repos/NYPL-Simplified/server_core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NYPL-Simplified/server_core/statuses/{sha}","languages_url":"https://api.github.com/repos/NYPL-Simplified/server_core/languages","stargazers_url":"https://api.github.com/repos/NYPL-Simplified/server_core/stargazers","contributors_url":"https://api.github.com/repos/NYPL-Simplified/server_core/contributors","subscribers_url":"https://api.github.com/repos/NYPL-Simplified/server_core/subscribers","subscription_url":"https://api.github.com/repos/NYPL-Simplified/server_core/subscription","commits_url":"https://api.github.com/repos/NYPL-Simplified/server_core/commits{/sha}","git_commits_url":"https://api.github.com/repos/NYPL-Simplified/server_core/git/commits{/sha}","comments_url":"https://api.github.com/repos/NYPL-Simplified/server_core/comments{/number}","issue_comment_url":"https://api.github.com/repos/NYPL-Simplified/server_core/issues/comments{/number}","contents_url":"https://api.github.com/repos/NYPL-Simplified/server_core/contents/{+path}","compare_url":"https://api.github.com/repos/NYPL-Simplified/server_core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NYPL-Simplified/server_core/merges","archive_url":"https://api.github.com/repos/NYPL-Simplified/server_core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NYPL-Simplified/server_core/downloads","issues_url":"https://api.github.com/repos/NYPL-Simplified/server_core/issues{/number}","pulls_url":"https://api.github.com/repos/NYPL-Simplified/server_core/pulls{/number}","milestones_url":"https://api.github.com/repos/NYPL-Simplified/server_core/milestones{/number}","notifications_url":"https://api.github.com/repos/NYPL-Simplified/server_core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NYPL-Simplified/server_core/labels{/name}","releases_url":"https://api.github.com/repos/NYPL-Simplified/server_core/releases{/id}","deployments_url":"https://api.github.com/repos/NYPL-Simplified/server_core/deployments","created_at":"2014-12-05T17:03:04Z","updated_at":"2018-04-11T16:56:38Z","pushed_at":"2018-04-11T17:11:13Z","git_url":"git://github.com/NYPL-Simplified/server_core.git","ssh_url":"git@github.com:NYPL-Simplified/server_core.git","clone_url":"https://github.com/NYPL-Simplified/server_core.git","svn_url":"https://github.com/NYPL-Simplified/server_core","homepage":null,"size":12244,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9,"mirror_url":null,"archived":false,"open_issues_count":67,"license":null,"forks":9,"open_issues":67,"watchers":3,"default_branch":"master"}},"base":{"label":"NYPL-Simplified:tab-configuration","ref":"tab-configuration","sha":"204a89975268d057d1792dea0af47f9e2ba52130","user":{"login":"NYPL-Simplified","id":16416905,"avatar_url":"https://avatars1.githubusercontent.com/u/16416905?v=4","gravatar_id":"","url":"https://api.github.com/users/NYPL-Simplified","html_url":"https://github.com/NYPL-Simplified","followers_url":"https://api.github.com/users/NYPL-Simplified/followers","following_url":"https://api.github.com/users/NYPL-Simplified/following{/other_user}","gists_url":"https://api.github.com/users/NYPL-Simplified/gists{/gist_id}","starred_url":"https://api.github.com/users/NYPL-Simplified/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NYPL-Simplified/subscriptions","organizations_url":"https://api.github.com/users/NYPL-Simplified/orgs","repos_url":"https://api.github.com/users/NYPL-Simplified/repos","events_url":"https://api.github.com/users/NYPL-Simplified/events{/privacy}","received_events_url":"https://api.github.com/users/NYPL-Simplified/received_events","type":"Organization","site_admin":false},"repo":{"id":27601287,"name":"server_core","full_name":"NYPL-Simplified/server_core","owner":{"login":"NYPL-Simplified","id":16416905,"avatar_url":"https://avatars1.githubusercontent.com/u/16416905?v=4","gravatar_id":"","url":"https://api.github.com/users/NYPL-Simplified","html_url":"https://github.com/NYPL-Simplified","followers_url":"https://api.github.com/users/NYPL-Simplified/followers","following_url":"https://api.github.com/users/NYPL-Simplified/following{/other_user}","gists_url":"https://api.github.com/users/NYPL-Simplified/gists{/gist_id}","starred_url":"https://api.github.com/users/NYPL-Simplified/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NYPL-Simplified/subscriptions","organizations_url":"https://api.github.com/users/NYPL-Simplified/orgs","repos_url":"https://api.github.com/users/NYPL-Simplified/repos","events_url":"https://api.github.com/users/NYPL-Simplified/events{/privacy}","received_events_url":"https://api.github.com/users/NYPL-Simplified/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/NYPL-Simplified/server_core","description":"Shared data model and utilities for Library Simplified server applications","fork":false,"url":"https://api.github.com/repos/NYPL-Simplified/server_core","forks_url":"https://api.github.com/repos/NYPL-Simplified/server_core/forks","keys_url":"https://api.github.com/repos/NYPL-Simplified/server_core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NYPL-Simplified/server_core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NYPL-Simplified/server_core/teams","hooks_url":"https://api.github.com/repos/NYPL-Simplified/server_core/hooks","issue_events_url":"https://api.github.com/repos/NYPL-Simplified/server_core/issues/events{/number}","events_url":"https://api.github.com/repos/NYPL-Simplified/server_core/events","assignees_url":"https://api.github.com/repos/NYPL-Simplified/server_core/assignees{/user}","branches_url":"https://api.github.com/repos/NYPL-Simplified/server_core/branches{/branch}","tags_url":"https://api.github.com/repos/NYPL-Simplified/server_core/tags","blobs_url":"https://api.github.com/repos/NYPL-Simplified/server_core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NYPL-Simplified/server_core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NYPL-Simplified/server_core/git/refs{/sha}","trees_url":"https://api.github.com/repos/NYPL-Simplified/server_core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NYPL-Simplified/server_core/statuses/{sha}","languages_url":"https://api.github.com/repos/NYPL-Simplified/server_core/languages","stargazers_url":"https://api.github.com/repos/NYPL-Simplified/server_core/stargazers","contributors_url":"https://api.github.com/repos/NYPL-Simplified/server_core/contributors","subscribers_url":"https://api.github.com/repos/NYPL-Simplified/server_core/subscribers","subscription_url":"https://api.github.com/repos/NYPL-Simplified/server_core/subscription","commits_url":"https://api.github.com/repos/NYPL-Simplified/server_core/commits{/sha}","git_commits_url":"https://api.github.com/repos/NYPL-Simplified/server_core/git/commits{/sha}","comments_url":"https://api.github.com/repos/NYPL-Simplified/server_core/comments{/number}","issue_comment_url":"https://api.github.com/repos/NYPL-Simplified/server_core/issues/comments{/number}","contents_url":"https://api.github.com/repos/NYPL-Simplified/server_core/contents/{+path}","compare_url":"https://api.github.com/repos/NYPL-Simplified/server_core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NYPL-Simplified/server_core/merges","archive_url":"https://api.github.com/repos/NYPL-Simplified/server_core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NYPL-Simplified/server_core/downloads","issues_url":"https://api.github.com/repos/NYPL-Simplified/server_core/issues{/number}","pulls_url":"https://api.github.com/repos/NYPL-Simplified/server_core/pulls{/number}","milestones_url":"https://api.github.com/repos/NYPL-Simplified/server_core/milestones{/number}","notifications_url":"https://api.github.com/repos/NYPL-Simplified/server_core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NYPL-Simplified/server_core/labels{/name}","releases_url":"https://api.github.com/repos/NYPL-Simplified/server_core/releases{/id}","deployments_url":"https://api.github.com/repos/NYPL-Simplified/server_core/deployments","created_at":"2014-12-05T17:03:04Z","updated_at":"2018-04-11T16:56:38Z","pushed_at":"2018-04-11T17:11:13Z","git_url":"git://github.com/NYPL-Simplified/server_core.git","ssh_url":"git@github.com:NYPL-Simplified/server_core.git","clone_url":"https://github.com/NYPL-Simplified/server_core.git","svn_url":"https://github.com/NYPL-Simplified/server_core","homepage":null,"size":12244,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9,"mirror_url":null,"archived":false,"open_issues_count":67,"license":null,"forks":9,"open_issues":67,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/NYPL-Simplified/server_core/pulls/845"},"html":{"href":"https://github.com/NYPL-Simplified/server_core/pull/845"},"issue":{"href":"https://api.github.com/repos/NYPL-Simplified/server_core/issues/845"},"comments":{"href":"https://api.github.com/repos/NYPL-Simplified/server_core/issues/845/comments"},"review_comments":{"href":"https://api.github.com/repos/NYPL-Simplified/server_core/pulls/845/comments"},"review_comment":{"href":"https://api.github.com/repos/NYPL-Simplified/server_core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/NYPL-Simplified/server_core/pulls/845/commits"},"statuses":{"href":"https://api.github.com/repos/NYPL-Simplified/server_core/statuses/a94d15ba62be1b261d3ac8ff7c9be41db19cdb12"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"leonardr"}}