Source Github: Raise Error if no organizations or repos are available (#21084)
* Source Github: Raise Error if no organizations or repos are available * Source GitHub: Update docs; bump version * Source GitHub: Add test * Source GitHub: Exclude empty streams * auto-bump connector version Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
This commit is contained in:
@@ -176,6 +176,8 @@ class SourceGithub(AbstractSource):
|
||||
def streams(self, config: Mapping[str, Any]) -> List[Stream]:
|
||||
authenticator = self._get_authenticator(config)
|
||||
organizations, repositories = self._get_org_repositories(config=config, authenticator=authenticator)
|
||||
if not any((organizations, repositories)):
|
||||
raise Exception("No streams available. Please check permissions")
|
||||
page_size = config.get("page_size_for_large_streams", DEFAULT_PAGE_SIZE_FOR_LARGE_STREAM)
|
||||
|
||||
organization_args = {"authenticator": authenticator, "organizations": organizations}
|
||||
|
||||
Reference in New Issue
Block a user