Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fetch databaseId for repos and users when initializing streams #112

Merged
merged 15 commits into from
Apr 29, 2022
Merged
6 changes: 6 additions & 0 deletions tap_github/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,12 @@ def parse_response(self, response: requests.Response) -> Iterable[dict]:

yield from results

def post_process(self, row: dict, context: Optional[Dict[str, str]] = None) -> dict:
"""Add `repo_id` by default to all streams."""
if context is not None and "repo_id" in context:
row["repo_id"] = context["repo_id"]
return row


class GitHubGraphqlStream(GraphQLStream, GitHubRestStream):
"""GitHub Graphql stream class."""
Expand Down
Loading