Skip to content

Commit

Permalink
fix revoew comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmytro Rezchykov committed Nov 22, 2021
1 parent d1fd472 commit 768a422
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -133,14 +133,16 @@ def check_connection(self, logger: AirbyteLogger, config: Mapping[str, Any]) ->
# In case of getting repository list for given organization was
# successfull no need of checking stats for every repository within
# that organization.
# Since we have "repo" scope requested it should grant access to private repos as well:
# https://docs.github.com/en/developers/apps/building-oauth-apps/scopes-for-oauth-apps#available-scopes
repositories, _ = self._generate_repositories(config=config, authenticator=authenticator)

repository_stats_stream = RepositoryStats(
authenticator=authenticator,
repositories=repositories,
)
for stream_slice in repository_stats_stream.stream_slices(sync_mode=SyncMode.full_refresh):
next(repository_stats_stream.read_records(sync_mode=SyncMode.full_refresh, stream_slice=stream_slice))
next(repository_stats_stream.read_records(sync_mode=SyncMode.full_refresh, stream_slice=stream_slice), None)
return True, None
except Exception as e:
return False, repr(e)
Expand Down

0 comments on commit 768a422

Please sign in to comment.